From a858af63c4bb3d08c8e87b02469fd03e3c258b6c Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:08:20 +0200 Subject: [PATCH 01/40] chore(deps): refresh development toolchain --- .vscodeignore | 92 ++-- dist/extension.js | 2 +- eslint.config.mjs | 41 ++ package-lock.json | 1197 ++++++++++++++++++++------------------------- package.json | 30 +- 5 files changed, 632 insertions(+), 730 deletions(-) create mode 100644 eslint.config.mjs diff --git a/.vscodeignore b/.vscodeignore index 037130b..8c04471 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,69 +1,49 @@ ### VSIX Ignore (bundled) ### -# Keep only runtime bundle (dist), grammar, themes, snippets, language config, images used by marketplace, license, readme. - -# Exclude development sources & build output not needed after bundling -src/ -out/ -backup/ -scripts/ - -# Node modules removed because code is bundled -node_modules/ - -# Dev / workspace meta -.git/ -.github/ -.vscode/ -.vscode-test/ -workspace.code-workspace +# Ship only the runtime bundle and user-facing extension assets. + +# Local agent, index, workspace, and repository metadata +.agents/** +.git/** +.github/** +.projectatlas/** +.serena/** +.vscode/** +.vscode-test/** +.gitignore +.vscodeignore +AGENTS.md +TODO.md launch.json renovate.json settings.json -TODO.md -tsconfig.json tslint.json -package-lock.json +workspace.code-workspace -# Tests & fixtures -src/test/ -**/*.test.vbi -**/*.tobe.vbi +# Development sources, tests, documentation, and build metadata +.Temp/** +LanguageDefinition/** +backup/** +docs/** +node_modules/** +other/** +out/** +scripts/** +src/** +temp/** +eslint.config.mjs +package-lock.json +syntaxes/schema.json +tsconfig.json -# Exclude all heavy/readme showcase images (served via GitHub raw links in README) +# Marketplace images are hosted externally; retain only the extension icon. images/** !images/logo.png -# Exclude full LanguageDefinition directory (no language docs / assets in VSIX per request) -LanguageDefinition/** - -# Misc archives / binaries +# Generated and archival artifacts +dist/**/*.map *.7z -*.zip -*.zap* -*.iso *.exe - -# Existing packaged files +*.iso *.vsix - -# Temp folders -temp/ -other/ - -# Ignore all source maps except allow dist maps (help debugging if user enables) -**/*.map -!dist/*.map - -# Keep dist bundle -!dist/** - -# Allow essential files -!README.md -!LICENSE -!package.json -!language-configuration.json -!syntaxes/** -!themes/** -!snippets/** -!images/logo.png - +*.zap* +*.zip diff --git a/dist/extension.js b/dist/extension.js index 49d26de..757a2e4 100644 --- a/dist/extension.js +++ b/dist/extension.js @@ -1,4 +1,4 @@ -"use strict";var y=(r,i)=>()=>(i||r((i={exports:{}}).exports,i),i.exports);var D=y(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.REGEX=g.KEYWORDS=g.TRENNER=g.NO_SPACE_ITEMS=g.DOUBLE_OPERATORS=g.SINGLE_OPERATORS=g.FORMATS=g.BACKSLASH=g.SQUOTE=g.DQUOTE=g.CRLF=g.LF=g.CR=g.TAB=void 0;g.TAB=" ";g.CR="\r";g.LF=` +"use strict";var y=(r,i)=>()=>{try{return i||r((i={exports:{}}).exports,i),i.exports}catch(l){throw i=0,l}};var D=y(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.REGEX=g.KEYWORDS=g.TRENNER=g.NO_SPACE_ITEMS=g.DOUBLE_OPERATORS=g.SINGLE_OPERATORS=g.FORMATS=g.BACKSLASH=g.SQUOTE=g.DQUOTE=g.CRLF=g.LF=g.CR=g.TAB=void 0;g.TAB=" ";g.CR="\r";g.LF=` `;g.CRLF=`\r `;g.DQUOTE='"';g.SQUOTE="'";g.BACKSLASH="\\";g.FORMATS=[g.TAB,g.CR,g.LF,g.CRLF,g.DQUOTE,g.SQUOTE,g.BACKSLASH];g.SINGLE_OPERATORS=["=","+","-","<",">","*","/","%","!","~","|"];g.DOUBLE_OPERATORS=["==","<>","<=",">="];g.NO_SPACE_ITEMS=["(",")","[","]",";"];g.TRENNER=[";"," "];g.KEYWORDS=["NULL","EOF","AS","IF","ENDIF","ELSE","WHILE","FOR","next","DIM","THEN","EXIT","EACH","STEP","IN","RETURN","CALL","MOD","AND","NOT","IS","OR","XOR","Abs","TO","SHL","SHR","discrete","integer","real","message","sqr","sin","cos","tan","atn","exp","log","int","frac","round","rnd","sqrt"];var te=new RegExp(/(?![^{]*})\t/,"gm"),ne=new RegExp(/\s{1,}/,"gm"),ie=new RegExp(/\s{2,}/,"gm"),oe=new RegExp(/\s{2,}(?\/\?\s]+)/,"gm"),ge=new RegExp(/-?\d*\d/,"gm");g.REGEX={gm_TAB_NOT_IN_COMMENT:te,gm_MOR_1_WSP:ne,gm_MOR_2_WSP:ie,g_CHECK_OPEN_COMMENT:re,g_CHECK_CLOSE_COMMENT:se,gm_GET_NESTING:le,gm_GET_STRING:ae,gm_GET_WSP_IN_STRING:ce,gm_MOR_2_WSP_NO_TAB:oe,gm_GET_ALL_WORDS:fe,gm_GET_ALL_Numbers:ge}});var H=y(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.NESTINGS=k.EXCLUDE_KEYWORDS=void 0;k.EXCLUDE_KEYWORDS=["EXIT FOR"];k.NESTINGS=[{keyword:"if",middle:"else",end:"endif",multiline:"then"},{keyword:"for",middle:"",end:"next",multiline:""},{keyword:"while",middle:"",end:"next",multiline:""}]});var X=y(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.preFormat=K;P.formatNestings=V;P.pureFormatPipeline=Ee;var E=D(),U=H();function K(r,i){r=r.replace(/\r\n|\n|\r/g,`\r `);let l=r.split(""),e="",s=0,u=1,C=0,T=!1,w=!1;for(let n=0;n<=l.length-1;n++)if(C++,s>0)s--;else{if(s=0,w&&l[n]==='"'?w=!1:!T&&l[n]==='"'&&(w=!0),l[n]===` diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..5881c71 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,41 @@ +import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'; +import typescriptEslintParser from '@typescript-eslint/parser'; + +export default [ + { + ignores: [ + '**/*.js', + '.Temp/**', + '.projectatlas/**', + '.serena/**', + '.vscode-test/**', + 'dist/**', + 'node_modules/**', + 'out/**', + ], + }, + { + files: ['**/*.ts', '**/*.tsx'], + languageOptions: { + parser: typescriptEslintParser, + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + }, + plugins: { + '@typescript-eslint': typescriptEslintPlugin, + }, + rules: { + ...typescriptEslintPlugin.configs.recommended.rules, + }, + }, + { + files: ['scripts/**/*.ts', 'src/**/*.ts', 'src/**/*.tsx'], + rules: { + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-unused-vars': 'warn', + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index 5b56cea..fb66b19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,39 +10,29 @@ "hasInstallScript": true, "license": "GPL-3.0-or-later", "devDependencies": { - "@types/glob": "^9.0.0", "@types/mocha": "^10.0.10", - "@types/node": "^24.5.2", - "@types/vscode": "^1.104.0", - "@typescript-eslint/eslint-plugin": "^8.44.1", - "@typescript-eslint/parser": "^8.44.1", + "@types/node": "^24.13.3", + "@types/vscode": "1.104.0", + "@typescript-eslint/eslint-plugin": "^8.67.0", + "@typescript-eslint/parser": "^8.67.0", "@vscode/test-electron": "^2.5.2", - "color": "^5.0.2", - "cross-env": "^10.0.0", - "esbuild": "^0.25.10", - "eslint": "^9.36.0", - "glob": "^11.1.0", - "mocha": "^11.7.2", - "nodemon": "^3.1.10", - "rimraf": "^6.0.1", - "source-map-support": "^0.5.21", - "typescript": "^5.9.2" + "color": "^5.0.3", + "esbuild": "^0.28.2", + "eslint": "^9.39.5", + "glob": "^13.0.6", + "mocha": "^11.8.0", + "nodemon": "^3.1.14", + "rimraf": "^6.1.3", + "typescript": "^5.9.3" }, "engines": { "vscode": "^1.104.0" } }, - "node_modules/@epic-web/invariant": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", - "integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==", - "dev": true, - "license": "MIT" - }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", - "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", "cpu": [ "ppc64" ], @@ -57,9 +47,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", - "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", "cpu": [ "arm" ], @@ -74,9 +64,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", - "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", "cpu": [ "arm64" ], @@ -91,9 +81,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", - "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", "cpu": [ "x64" ], @@ -108,9 +98,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", - "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", "cpu": [ "arm64" ], @@ -125,9 +115,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", - "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", "cpu": [ "x64" ], @@ -142,9 +132,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", - "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", "cpu": [ "arm64" ], @@ -159,9 +149,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", - "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", "cpu": [ "x64" ], @@ -176,9 +166,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", - "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", "cpu": [ "arm" ], @@ -193,9 +183,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", - "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", "cpu": [ "arm64" ], @@ -210,9 +200,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", - "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", "cpu": [ "ia32" ], @@ -227,9 +217,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", - "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", "cpu": [ "loong64" ], @@ -244,9 +234,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", - "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", "cpu": [ "mips64el" ], @@ -261,9 +251,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", - "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", "cpu": [ "ppc64" ], @@ -278,9 +268,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", - "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", "cpu": [ "riscv64" ], @@ -295,9 +285,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", - "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", "cpu": [ "s390x" ], @@ -312,9 +302,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", - "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", "cpu": [ "x64" ], @@ -329,9 +319,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", - "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", "cpu": [ "arm64" ], @@ -346,9 +336,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", - "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", "cpu": [ "x64" ], @@ -363,9 +353,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", - "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", "cpu": [ "arm64" ], @@ -380,9 +370,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", - "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", "cpu": [ "x64" ], @@ -397,9 +387,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", - "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", "cpu": [ "arm64" ], @@ -414,9 +404,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", - "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", "cpu": [ "x64" ], @@ -431,9 +421,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", - "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", "cpu": [ "arm64" ], @@ -448,9 +438,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", - "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", "cpu": [ "ia32" ], @@ -465,9 +455,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", - "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", "cpu": [ "x64" ], @@ -482,9 +472,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", "dev": true, "license": "MIT", "dependencies": { @@ -501,9 +491,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "engines": { @@ -511,24 +501,24 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", - "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", + "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.6", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", - "minimatch": "^3.1.2" + "minimatch": "^3.1.5" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -537,9 +527,9 @@ } }, "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -550,19 +540,22 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", - "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", - "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -573,20 +566,20 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.6.tgz", + "integrity": "sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==", "dev": true, "license": "MIT", "dependencies": { - "ajv": "^6.12.4", + "ajv": "^6.14.0", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", + "js-yaml": "^4.3.0", + "minimatch": "^3.1.5", "strip-json-comments": "^3.1.1" }, "engines": { @@ -597,9 +590,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -618,9 +611,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -631,9 +624,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.36.0.tgz", - "integrity": "sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==", + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz", + "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==", "dev": true, "license": "MIT", "engines": { @@ -644,9 +637,9 @@ } }, "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -654,13 +647,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", - "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.15.2", + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { @@ -668,29 +661,43 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -719,29 +726,6 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -760,44 +744,6 @@ "node": ">=12" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -810,23 +756,12 @@ } }, "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, - "node_modules/@types/glob": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-9.0.0.tgz", - "integrity": "sha512-00UxlRaIUvYm4R4W9WYkN8/J+kV8fmOQ7okeH6YFtGWFMt3odD45tpG5yA5wnL7HE6lLgjaTW5n14ju2hl2NNA==", - "deprecated": "This is a stub types definition. glob provides its own type definitions, so you do not need this installed.", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "*" - } - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -842,13 +777,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz", - "integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==", + "version": "24.13.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz", + "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.12.0" + "undici-types": "~7.18.0" } }, "node_modules/@types/vscode": { @@ -859,21 +794,20 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.1.tgz", - "integrity": "sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.67.0.tgz", + "integrity": "sha512-Un7Heoyj65NREbKAyIrFxeM143NZpExWmy1Nep4DLeQOeLlTeumPjoNKnBrU5D5moWXbPJgRa5Uwcdu0faVNGQ==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.44.1", - "@typescript-eslint/type-utils": "8.44.1", - "@typescript-eslint/utils": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1", - "graphemer": "^1.4.0", - "ignore": "^7.0.0", + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.67.0", + "@typescript-eslint/type-utils": "8.67.0", + "@typescript-eslint/utils": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0", + "ignore": "^7.0.5", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.1.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -883,23 +817,23 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.44.1", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" + "@typescript-eslint/parser": "^8.67.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.1.tgz", - "integrity": "sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.67.0.tgz", + "integrity": "sha512-fUBfTuuEulWqX6V8+O3PtScV01tzYYRUDTAirHFKoRAt7nOzoGiPt0M/bB47wWNy0coOOcgEwAMUtBpykMxl6w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.44.1", - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/typescript-estree": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1", - "debug": "^4.3.4" + "@typescript-eslint/scope-manager": "8.67.0", + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0", + "debug": "^4.4.3" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -909,20 +843,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.1.tgz", - "integrity": "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.67.0.tgz", + "integrity": "sha512-cvE8c7ulYeXN9fYuszhCeCsbzyVEXuhrRCybnBre7TUmqb5nRmBfQAwCj0O3WJFDeyAZt4VYv51vMCC9LHSdYw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.44.1", - "@typescript-eslint/types": "^8.44.1", - "debug": "^4.3.4" + "@typescript-eslint/tsconfig-utils": "^8.67.0", + "@typescript-eslint/types": "^8.67.0", + "debug": "^4.4.3" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -932,18 +866,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz", - "integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.67.0.tgz", + "integrity": "sha512-EgvsleTwS4E+WzzSvem8fAUubLwatMNF1B5hHSLQxcvs7q2dtRhGyujHwLJSYlG41niJ7GP24Aha2+0mb1b2kg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1" + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -954,9 +888,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.1.tgz", - "integrity": "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.67.0.tgz", + "integrity": "sha512-vV+LUSv5njUWsknE71fqKTlXUva+R76SaeORd6Zojcunk/6DvKFXONU3BrAs2H49mbygUXt6gbYunzwqNwlhdg==", "dev": true, "license": "MIT", "engines": { @@ -967,21 +901,21 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.1.tgz", - "integrity": "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.67.0.tgz", + "integrity": "sha512-aVWDXbRmdXO9siTfX4ditQI1T9+zVcNazT48EJCD0v40/9RIFoUgZ05CmGEq9H2gixRpjUn/iplwvlcvutJW/Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/typescript-estree": "8.44.1", - "@typescript-eslint/utils": "8.44.1", - "debug": "^4.3.4", - "ts-api-utils": "^2.1.0" + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0", + "@typescript-eslint/utils": "8.67.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -991,14 +925,14 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz", - "integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.67.0.tgz", + "integrity": "sha512-sBtgslww8nsMYUjhdPBiSyUqSzT8uR6g93A2QXnQC8+cGdjz0CyaOdqHDRJb1AtORbZCNUJBBeFA/tNR2uQmww==", "dev": true, "license": "MIT", "engines": { @@ -1010,22 +944,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz", - "integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.67.0.tgz", + "integrity": "sha512-EKQBCE9yNlRJYm7jdTW5AhDacDUmSwQb0FAJAmK2EKYrNXIsa2vxcSZx6PvJ/dEdI6lS+Y9W+EXckLj0iPFGcw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.44.1", - "@typescript-eslint/tsconfig-utils": "8.44.1", - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.1.0" + "@typescript-eslint/project-service": "8.67.0", + "@typescript-eslint/tsconfig-utils": "8.67.0", + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1035,20 +968,59 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@typescript-eslint/utils": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.1.tgz", - "integrity": "sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.67.0.tgz", + "integrity": "sha512-U9D1FdwEWBwok3hxxSdhclMb0twvt9QnjIQ0VfQ1AiX2epnpSgv2ubVDsayOFyY8K6FX+AQ7E0FKWVG3iKsj1A==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.44.1", - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/typescript-estree": "8.44.1" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.67.0", + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1058,19 +1030,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz", - "integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==", + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.67.0.tgz", + "integrity": "sha512-fkv8dHRDqfGtTHuJeebdrQ7cX6Ad4WAS00rgHh9UGvMycF1mjBfsxry1XsLIFhWZ6Judlh6UdzK+TYlbpCXgnA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.44.1", - "eslint-visitor-keys": "^4.2.1" + "@typescript-eslint/types": "8.67.0", + "eslint-visitor-keys": "^5.0.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1081,13 +1053,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", "dev": true, "license": "Apache-2.0", "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1111,9 +1083,9 @@ } }, "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", "dev": true, "license": "MIT", "bin": { @@ -1144,9 +1116,9 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -1251,9 +1223,9 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", "dev": true, "license": "MIT", "dependencies": { @@ -1280,13 +1252,6 @@ "dev": true, "license": "ISC" }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1451,23 +1416,23 @@ } }, "node_modules/color": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/color/-/color-5.0.2.tgz", - "integrity": "sha512-e2hz5BzbUPcYlIRHo8ieAhYgoajrJr+hWoceg6E345TPsATMUKqDgzt8fSXZJJbxfpiPzkWyphz8yn8At7q3fA==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/color/-/color-5.0.3.tgz", + "integrity": "sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^3.0.1", - "color-string": "^2.0.0" + "color-convert": "^3.1.3", + "color-string": "^2.1.3" }, "engines": { "node": ">=18" } }, "node_modules/color-convert": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-3.1.2.tgz", - "integrity": "sha512-UNqkvCDXstVck3kdowtOTWROIJQwafjOfXSmddoDrXo4cewMKmusCeF22Q24zvjR8nwWib/3S/dfyzPItPEiJg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-3.1.3.tgz", + "integrity": "sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg==", "dev": true, "license": "MIT", "dependencies": { @@ -1478,9 +1443,9 @@ } }, "node_modules/color-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.2.tgz", - "integrity": "sha512-9vEt7gE16EW7Eu7pvZnR0abW9z6ufzhXxGXZEVU9IqPdlsUiMwJeJfRtq0zePUmnbHGT9zajca7mX8zgoayo4A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.1.1.tgz", + "integrity": "sha512-p2FdgwVx1a9yWBHP2wI0VgShkDpgN4kZISkxdNipGBJWpa5G6b04OINlVWCyJj0JmfvcPrgqt95E9k8yvaOJFg==", "dev": true, "license": "MIT", "engines": { @@ -1488,9 +1453,9 @@ } }, "node_modules/color-string": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-2.1.2.tgz", - "integrity": "sha512-RxmjYxbWemV9gKu4zPgiZagUxbH3RQpEIO77XoSSX0ivgABDZ+h8Zuash/EMFLTI4N9QgFPOJ6JQpPZKFxa+dA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-2.1.4.tgz", + "integrity": "sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg==", "dev": true, "license": "MIT", "dependencies": { @@ -1514,24 +1479,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cross-env": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.0.0.tgz", - "integrity": "sha512-aU8qlEK/nHYtVuN4p7UQgAwVljzMg8hB4YK5ThRqD2l/ziSnryncPNn7bMLt5cFYsKVKBh8HqLqyCoTupEUu7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@epic-web/invariant": "^1.0.0", - "cross-spawn": "^7.0.6" - }, - "bin": { - "cross-env": "dist/bin/cross-env.js", - "cross-env-shell": "dist/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=20" - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1610,9 +1557,9 @@ "license": "MIT" }, "node_modules/esbuild": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", - "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1623,32 +1570,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.10", - "@esbuild/android-arm": "0.25.10", - "@esbuild/android-arm64": "0.25.10", - "@esbuild/android-x64": "0.25.10", - "@esbuild/darwin-arm64": "0.25.10", - "@esbuild/darwin-x64": "0.25.10", - "@esbuild/freebsd-arm64": "0.25.10", - "@esbuild/freebsd-x64": "0.25.10", - "@esbuild/linux-arm": "0.25.10", - "@esbuild/linux-arm64": "0.25.10", - "@esbuild/linux-ia32": "0.25.10", - "@esbuild/linux-loong64": "0.25.10", - "@esbuild/linux-mips64el": "0.25.10", - "@esbuild/linux-ppc64": "0.25.10", - "@esbuild/linux-riscv64": "0.25.10", - "@esbuild/linux-s390x": "0.25.10", - "@esbuild/linux-x64": "0.25.10", - "@esbuild/netbsd-arm64": "0.25.10", - "@esbuild/netbsd-x64": "0.25.10", - "@esbuild/openbsd-arm64": "0.25.10", - "@esbuild/openbsd-x64": "0.25.10", - "@esbuild/openharmony-arm64": "0.25.10", - "@esbuild/sunos-x64": "0.25.10", - "@esbuild/win32-arm64": "0.25.10", - "@esbuild/win32-ia32": "0.25.10", - "@esbuild/win32-x64": "0.25.10" + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" } }, "node_modules/escalade": { @@ -1675,26 +1622,25 @@ } }, "node_modules/eslint": { - "version": "9.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.36.0.tgz", - "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==", + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz", + "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.3.1", - "@eslint/core": "^0.15.2", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.36.0", - "@eslint/plugin-kit": "^0.3.5", + "@eslint/config-array": "^0.21.2", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.6", + "@eslint/js": "9.39.5", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", + "ajv": "^6.14.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", @@ -1713,7 +1659,7 @@ "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", + "minimatch": "^3.1.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, @@ -1766,9 +1712,9 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -1800,9 +1746,9 @@ } }, "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -1844,9 +1790,9 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1896,36 +1842,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1940,16 +1856,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -2018,9 +1924,9 @@ } }, "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", "dev": true, "license": "ISC" }, @@ -2080,24 +1986,18 @@ } }, "node_modules/glob": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", - "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "foreground-child": "^3.3.1", - "jackspeak": "^4.1.1", - "minimatch": "^10.1.1", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2116,17 +2016,40 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/glob/node_modules/minimatch": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", - "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" + "brace-expansion": "^5.0.8" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2145,13 +2068,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2327,6 +2243,16 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -2364,27 +2290,21 @@ "dev": true, "license": "ISC" }, - "node_modules/jackspeak": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", - "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -2502,39 +2422,15 @@ } }, "node_modules/lru-cache": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", - "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "version": "11.5.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", + "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": "20 || >=22" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/mimic-function": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", @@ -2549,13 +2445,13 @@ } }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -2565,19 +2461,19 @@ } }, "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/mocha": { - "version": "11.7.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.2.tgz", - "integrity": "sha512-lkqVJPmqqG/w5jmmFtiRvtA2jkDyNVUcefFJKb2uyX4dekk8Okgqop3cgbFiaIvj8uCRJVTP5x9dfxGyXm2jvQ==", + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.8.0.tgz", + "integrity": "sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==", "dev": true, "license": "MIT", "dependencies": { @@ -2589,6 +2485,7 @@ "find-up": "^5.0.0", "glob": "^10.4.5", "he": "^1.2.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", "minimatch": "^9.0.5", @@ -2702,16 +2599,16 @@ "license": "MIT" }, "node_modules/nodemon": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz", - "integrity": "sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==", + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.14.tgz", + "integrity": "sha512-jakjZi93UtB3jHMWsXL68FXSAosbLfY0In5gtKq3niLSkrWznrVBzXFNOEMJUfc9+Ke7SHWoAZsiMkNP3vq6Jw==", "dev": true, "license": "MIT", "dependencies": { "chokidar": "^3.5.2", "debug": "^4", "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", + "minimatch": "^10.2.1", "pstree.remy": "^1.1.8", "semver": "^7.5.3", "simple-update-notifier": "^2.0.0", @@ -2730,15 +2627,27 @@ "url": "https://opencollective.com/nodemon" } }, + "node_modules/nodemon/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, "node_modules/nodemon/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/nodemon/node_modules/chokidar": { @@ -2790,16 +2699,19 @@ } }, "node_modules/nodemon/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^5.0.8" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/nodemon/node_modules/readdirp": { @@ -3057,9 +2969,9 @@ } }, "node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -3067,7 +2979,7 @@ "minipass": "^7.1.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3081,9 +2993,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -3127,27 +3039,6 @@ "node": ">=6" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -3225,26 +3116,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rimraf": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", - "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz", + "integrity": "sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "glob": "^11.0.0", - "package-json-from-dist": "^1.0.0" + "glob": "^13.0.3", + "package-json-from-dist": "^1.0.1" }, "bin": { "rimraf": "dist/esm/bin.mjs" @@ -3256,30 +3136,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -3288,9 +3144,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -3366,27 +3222,6 @@ "node": ">=10" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/stdin-discarder": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", @@ -3540,6 +3375,54 @@ "node": ">=8" } }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3564,9 +3447,9 @@ } }, "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", "dev": true, "license": "MIT", "engines": { @@ -3590,9 +3473,9 @@ } }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3611,9 +3494,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz", - "integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index fb1a922..f8aa8e9 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,8 @@ "type": "boolean", "default": true, "markdownDescription": "Replace tabs with spaces." - },"VBI.formatter.Misc.IndentSize": { + }, + "VBI.formatter.Misc.IndentSize": { "type": "number", "default": 4, "minimum": 1, @@ -182,23 +183,20 @@ } }, "devDependencies": { - "esbuild": "^0.25.10", - "@types/glob": "^9.0.0", "@types/mocha": "^10.0.10", - "@types/node": "^24.5.2", - "@types/vscode": "^1.104.0", - "@typescript-eslint/eslint-plugin": "^8.44.1", - "@typescript-eslint/parser": "^8.44.1", + "@types/node": "^24.13.3", + "@types/vscode": "1.104.0", + "@typescript-eslint/eslint-plugin": "^8.67.0", + "@typescript-eslint/parser": "^8.67.0", "@vscode/test-electron": "^2.5.2", - "color": "^5.0.2", - "cross-env": "^10.0.0", - "eslint": "^9.36.0", - "glob": "^11.1.0", - "mocha": "^11.7.2", - "nodemon": "^3.1.10", - "rimraf": "^6.0.1", - "source-map-support": "^0.5.21", - "typescript": "^5.9.2" + "color": "^5.0.3", + "esbuild": "^0.28.2", + "eslint": "^9.39.5", + "glob": "^13.0.6", + "mocha": "^11.8.0", + "nodemon": "^3.1.14", + "rimraf": "^6.1.3", + "typescript": "^5.9.3" }, "__metadata": { "id": "834eb420-2978-4100-b7de-2430fc88e429", From b72d40dcc168b52657baba2e9589317971a8f262 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:10:26 +0200 Subject: [PATCH 02/40] test(language): establish QuickScript behavior baseline --- .../suite/language.behavior-baseline.test.ts | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/test/suite/language.behavior-baseline.test.ts diff --git a/src/test/suite/language.behavior-baseline.test.ts b/src/test/suite/language.behavior-baseline.test.ts new file mode 100644 index 0000000..80a9a83 --- /dev/null +++ b/src/test/suite/language.behavior-baseline.test.ts @@ -0,0 +1,64 @@ +import * as assert from 'assert'; + +import { formatNestings, preFormat } from '../../formats'; +import { getConfig } from '../../functions'; + +const config = getConfig(); + +suite('QuickScript formatter behavior baseline', () => { + test('preserves representative language constructs while formatting code', () => { + const input = [ + 'dim MessageText as message;', + 'dim Index as integer;', + 'if Index>=1 then', + 'LogMessage("if {not a comment} >= 1");', + 'else', + "{ call FakeFunction(1); inside a comment }", + 'for Index=1 to 2 step 1', + 'call xGatawaySettings();', + 'next;', + 'endif;', + ].join('\n'); + + const formatted = formatNestings(preFormat(input, config), config); + + assert.match(formatted, /DIM MessageText AS MESSAGE;/); + assert.match(formatted, /DIM Index AS INTEGER;/); + assert.match(formatted, /IF Index >= 1 THEN/); + assert.match(formatted, /LogMessage\("if \{not a comment\} >= 1"\);/); + assert.match(formatted, /ELSE/); + assert.match(formatted, /\{ call FakeFunction\(1\); inside a comment \}/); + assert.match(formatted, /FOR Index = 1 TO 2 STEP 1/); + assert.match(formatted, /CALL xGatawaySettings\(\);/); + assert.match(formatted, /NEXT;/); + assert.match(formatted, /ENDIF;/); + }); + + test('treats keywords case-insensitively without changing identifiers', () => { + const input = 'iF ifValue == 1 tHeN\nendifValue = ifValue;\neNdIf;'; + const formatted = preFormat(input, config); + + assert.match(formatted, /^IF ifValue == 1 THEN/m); + assert.match(formatted, /^endifValue = ifValue;/m); + assert.match(formatted, /^ENDIF;/m); + }); + + test('keeps strings and brace comments byte-for-byte intact', () => { + const string = '"if a==b then {comment-like};"'; + const comment = '{ if a==b then "string-like"; }'; + const formatted = preFormat(`MessageText=${string};\n${comment}`, config); + + assert.ok(formatted.includes(string)); + assert.ok(formatted.includes(comment)); + }); + + test('does not throw or drop an incomplete final statement', () => { + const input = 'if Reading >'; + let formatted = ''; + + assert.doesNotThrow(() => { + formatted = formatNestings(preFormat(input, config), config); + }); + assert.match(formatted, /IF Reading >\s*$/); + }); +}); From 508863717cb4cd672154862d4c5377902ae12021 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:13:49 +0200 Subject: [PATCH 03/40] feat(core): add source and token model --- .gitignore | 1 + .vscodeignore | 1 + package.json | 6 +- packages/core/package.json | 5 ++ packages/core/src/index.ts | 2 + packages/core/src/source.ts | 120 ++++++++++++++++++++++++++++++ packages/core/src/token.ts | 24 ++++++ packages/core/test/source.test.ts | 38 ++++++++++ packages/core/tsconfig.json | 22 ++++++ 9 files changed, 217 insertions(+), 2 deletions(-) create mode 100644 packages/core/package.json create mode 100644 packages/core/src/index.ts create mode 100644 packages/core/src/source.ts create mode 100644 packages/core/src/token.ts create mode 100644 packages/core/test/source.test.ts create mode 100644 packages/core/tsconfig.json diff --git a/.gitignore b/.gitignore index 4ff84b6..ecebfc1 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ all-agents-combined.md #.vscode/** typings/** out/test/** +/out/core/ #src/** **/*.map diff --git a/.vscodeignore b/.vscodeignore index 8c04471..70cba93 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -27,6 +27,7 @@ docs/** node_modules/** other/** out/** +packages/** scripts/** src/** temp/** diff --git a/package.json b/package.json index f8aa8e9..0fd01e6 100644 --- a/package.json +++ b/package.json @@ -157,11 +157,13 @@ "scripts": { "start": "nodemon --watch src src/index.js", "build:theme": "node src/index.js", - "compile": "tsc -p ./", + "compile": "tsc -p ./ && npm run compile:core", + "compile:core": "tsc -p ./packages/core", "bundle": "esbuild ./out/extension.js --bundle --platform=node --external:vscode --format=cjs --minify --sourcemap --outfile=dist/extension.js", "vscode:prepublish": "npm run compile && npm run build:theme && npm run bundle", "postinstall": "npm run compile", - "test": "npm run compile && node ./out/test/runTest.js", + "test": "npm run compile && npm run test:core && node ./out/test/runTest.js", + "test:core": "mocha --ui tdd \"out/core/test/**/*.test.js\"", "update:fixtures": "npm run compile && node ./scripts/update-fixtures.js", "watch": "tsc -watch -p ./", "lint": "eslint . --ext .ts,.tsx", diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 0000000..f9c3683 --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,5 @@ +{ + "name": "@intouch-language/core", + "private": true, + "description": "Editor-independent QuickScript language primitives" +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts new file mode 100644 index 0000000..3ae1ed4 --- /dev/null +++ b/packages/core/src/index.ts @@ -0,0 +1,2 @@ +export * from './source'; +export * from './token'; diff --git a/packages/core/src/source.ts b/packages/core/src/source.ts new file mode 100644 index 0000000..6de5342 --- /dev/null +++ b/packages/core/src/source.ts @@ -0,0 +1,120 @@ +/** A zero-based UTF-16 offset into a source string. */ +export type Offset = number; + +/** A zero-based line and UTF-16 character position. */ +export interface Position { + line: number; + character: number; +} + +/** A half-open position range: start is inclusive and end is exclusive. */ +export interface Range { + start: Position; + end: Position; +} + +/** A half-open offset span: start is inclusive and end is exclusive. */ +export interface SourceSpan { + start: Offset; + end: Offset; +} + +/** The equivalent offset and position representations of a source range. */ +export interface SourceRange { + span: SourceSpan; + range: Range; +} + +function assertOffset(source: string, offset: Offset): void { + if (!Number.isInteger(offset) || offset < 0 || offset > source.length) { + throw new RangeError(`Offset ${offset} is outside the source.`); + } +} + +function assertPositionPart(name: string, value: number): void { + if (!Number.isInteger(value) || value < 0) { + throw new RangeError(`${name} ${value} must be a non-negative integer.`); + } +} + +function getLineStarts(source: string): number[] { + const starts = [0]; + for (let offset = 0; offset < source.length; offset += 1) { + if (source[offset] === '\r' && source[offset + 1] === '\n') { + offset += 1; + starts.push(offset + 1); + } else if (source[offset] === '\r' || source[offset] === '\n') { + starts.push(offset + 1); + } + } + return starts; +} + +function getLineContentEnd(source: string, lineStarts: number[], line: number): number { + if (line + 1 >= lineStarts.length) { + return source.length; + } + + let end = lineStarts[line + 1]; + if (source[end - 1] === '\n') { + end -= 1; + } + if (source[end - 1] === '\r') { + end -= 1; + } + return end; +} + +/** Convert an offset to a zero-based UTF-16 position. */ +export function positionAt(source: string, offset: Offset): Position { + assertOffset(source, offset); + const lineStarts = getLineStarts(source); + let low = 0; + let high = lineStarts.length; + + while (low + 1 < high) { + const middle = Math.floor((low + high) / 2); + if (lineStarts[middle] <= offset) { + low = middle; + } else { + high = middle; + } + } + + return { line: low, character: offset - lineStarts[low] }; +} + +/** Convert a zero-based UTF-16 position to an offset. */ +export function offsetAt(source: string, position: Position): Offset { + assertPositionPart('Line', position.line); + assertPositionPart('Character', position.character); + const lineStarts = getLineStarts(source); + if (position.line >= lineStarts.length) { + throw new RangeError(`Line ${position.line} is outside the source.`); + } + + const lineStart = lineStarts[position.line]; + const lineEnd = getLineContentEnd(source, lineStarts, position.line); + const offset = lineStart + position.character; + if (offset > lineEnd) { + throw new RangeError(`Character ${position.character} is outside line ${position.line}.`); + } + return offset; +} + +/** Create equivalent half-open offset and position ranges for a source span. */ +export function sourceRange(source: string, span: SourceSpan): SourceRange { + assertOffset(source, span.start); + assertOffset(source, span.end); + if (span.end < span.start) { + throw new RangeError('A source span cannot end before it starts.'); + } + + return { + span: { ...span }, + range: { + start: positionAt(source, span.start), + end: positionAt(source, span.end), + }, + }; +} diff --git a/packages/core/src/token.ts b/packages/core/src/token.ts new file mode 100644 index 0000000..2145c49 --- /dev/null +++ b/packages/core/src/token.ts @@ -0,0 +1,24 @@ +import { Range, SourceSpan } from './source'; + +export enum TokenKind { + Identifier = 'Identifier', + Keyword = 'Keyword', + Datatype = 'Datatype', + Number = 'Number', + String = 'String', + Operator = 'Operator', + Punctuation = 'Punctuation', + Comment = 'Comment', + Whitespace = 'Whitespace', + Newline = 'Newline', + Unknown = 'Unknown', + EOF = 'EOF', +} + +/** A token whose lexeme and half-open locations refer to the original source. */ +export interface Token { + kind: TokenKind; + lexeme: string; + span: SourceSpan; + range: Range; +} diff --git a/packages/core/test/source.test.ts b/packages/core/test/source.test.ts new file mode 100644 index 0000000..3127bc3 --- /dev/null +++ b/packages/core/test/source.test.ts @@ -0,0 +1,38 @@ +import * as assert from 'assert'; + +import { offsetAt, positionAt, sourceRange } from '../src/source'; + +suite('core source model', () => { + const source = 'alpha\r\nβ😀\n'; + + test('uses zero-based UTF-16 positions across supported newline forms', () => { + assert.deepStrictEqual(positionAt(source, 0), { line: 0, character: 0 }); + assert.deepStrictEqual(positionAt(source, 5), { line: 0, character: 5 }); + assert.deepStrictEqual(positionAt(source, 7), { line: 1, character: 0 }); + assert.deepStrictEqual(positionAt(source, 10), { line: 1, character: 3 }); + assert.deepStrictEqual(positionAt(source, 11), { line: 2, character: 0 }); + }); + + test('maps valid positions back to offsets', () => { + assert.strictEqual(offsetAt(source, { line: 0, character: 5 }), 5); + assert.strictEqual(offsetAt(source, { line: 1, character: 3 }), 10); + assert.strictEqual(offsetAt(source, { line: 2, character: 0 }), 11); + }); + + test('uses inclusive starts and exclusive ends for ranges', () => { + assert.deepStrictEqual(sourceRange(source, { start: 7, end: 10 }), { + span: { start: 7, end: 10 }, + range: { + start: { line: 1, character: 0 }, + end: { line: 1, character: 3 }, + }, + }); + }); + + test('rejects offsets and positions outside the source', () => { + assert.throws(() => positionAt(source, -1), RangeError); + assert.throws(() => positionAt(source, source.length + 1), RangeError); + assert.throws(() => offsetAt(source, { line: 1, character: 4 }), RangeError); + assert.throws(() => sourceRange(source, { start: 4, end: 3 }), RangeError); + }); +}); diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 0000000..82ab3d2 --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "declaration": true, + "lib": [ + "es2021" + ], + "module": "commonjs", + "outDir": "../../out/core", + "rootDir": ".", + "sourceMap": true, + "strict": true, + "target": "es2021", + "types": [ + "mocha", + "node" + ] + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ] +} From 46a3d9217ae8fecb748a909da437163949fd2a68 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:17:31 +0200 Subject: [PATCH 04/40] feat(core): implement QuickScript tokenizer --- packages/core/src/index.ts | 2 + packages/core/src/languageData.ts | 76 ++++++++ packages/core/src/tokenizer.ts | 164 ++++++++++++++++++ packages/core/test/fixtures/incomplete.vi | 4 + .../core/test/fixtures/representative.vbi | 11 ++ packages/core/test/tokenizer.test.ts | 128 ++++++++++++++ tsconfig.json | 3 + 7 files changed, 388 insertions(+) create mode 100644 packages/core/src/languageData.ts create mode 100644 packages/core/src/tokenizer.ts create mode 100644 packages/core/test/fixtures/incomplete.vi create mode 100644 packages/core/test/fixtures/representative.vbi create mode 100644 packages/core/test/tokenizer.test.ts diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 3ae1ed4..b9ad5ba 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,2 +1,4 @@ +export * from './languageData'; export * from './source'; export * from './token'; +export * from './tokenizer'; diff --git a/packages/core/src/languageData.ts b/packages/core/src/languageData.ts new file mode 100644 index 0000000..de5c98a --- /dev/null +++ b/packages/core/src/languageData.ts @@ -0,0 +1,76 @@ +/** + * Lexical language data shared by the new core. + * + * Built-in and project-specific function names intentionally remain in the TextMate grammar + * until that larger inventory can be migrated without creating a partial third source of truth. + */ +export const KEYWORDS = [ + 'ABS', + 'AND', + 'AS', + 'ATN', + 'CALL', + 'COS', + 'DIM', + 'EACH', + 'ELSE', + 'ENDIF', + 'EOF', + 'EXIT', + 'EXP', + 'FALSE', + 'FOR', + 'FRAC', + 'IF', + 'IN', + 'INT', + 'IS', + 'LOG', + 'MOD', + 'NEXT', + 'NOT', + 'NULL', + 'OR', + 'RETURN', + 'RND', + 'ROUND', + 'SHL', + 'SHR', + 'SIN', + 'SQR', + 'SQRT', + 'STEP', + 'TAN', + 'THEN', + 'TO', + 'TRUE', + 'WHILE', + 'XOR', +] as const; + +export const DATATYPES = ['DISCRETE', 'INTEGER', 'MESSAGE', 'REAL'] as const; + +/** Operators are ordered longest-first for deterministic matching. */ +export const OPERATORS = [ + '==', + '<>', + '<=', + '>=', + '->', + '=', + '+', + '-', + '<', + '>', + '*', + '/', + '%', + '!', + '~', + '|', +] as const; + +export const PUNCTUATION = ['(', ')', '[', ']', ';', ',', ':', '.'] as const; + +export const KEYWORD_SET: ReadonlySet = new Set(KEYWORDS); +export const DATATYPE_SET: ReadonlySet = new Set(DATATYPES); diff --git a/packages/core/src/tokenizer.ts b/packages/core/src/tokenizer.ts new file mode 100644 index 0000000..965f103 --- /dev/null +++ b/packages/core/src/tokenizer.ts @@ -0,0 +1,164 @@ +import { DATATYPE_SET, KEYWORD_SET, OPERATORS, PUNCTUATION } from './languageData'; +import { Position } from './source'; +import { Token, TokenKind } from './token'; + +function isIdentifierStart(character: string | undefined): boolean { + return character !== undefined && /[A-Za-z_$#]/.test(character); +} + +function isIdentifierPart(character: string | undefined): boolean { + return character !== undefined && /[A-Za-z0-9_$#-]/.test(character); +} + +function isDigit(character: string | undefined): boolean { + return character !== undefined && /[0-9]/.test(character); +} + +function classifyWord(word: string): TokenKind { + const normalized = word.toUpperCase(); + if (DATATYPE_SET.has(normalized)) { + return TokenKind.Datatype; + } + if (KEYWORD_SET.has(normalized)) { + return TokenKind.Keyword; + } + return TokenKind.Identifier; +} + +/** Tokenize QuickScript source without file I/O or editor dependencies. */ +export function tokenize(source: string): Token[] { + const tokens: Token[] = []; + let offset = 0; + let line = 0; + let character = 0; + + const currentPosition = (): Position => ({ line, character }); + + const advanceTo = (end: number): void => { + while (offset < end) { + if (source[offset] === '\r' && source[offset + 1] === '\n' && offset + 1 < end) { + offset += 2; + line += 1; + character = 0; + } else if (source[offset] === '\r' || source[offset] === '\n') { + offset += 1; + line += 1; + character = 0; + } else { + offset += 1; + character += 1; + } + } + }; + + const emit = (kind: TokenKind, end: number): void => { + const start = offset; + const startPosition = currentPosition(); + advanceTo(end); + tokens.push({ + kind, + lexeme: source.slice(start, end), + span: { start, end }, + range: { start: startPosition, end: currentPosition() }, + }); + }; + + while (offset < source.length) { + const current = source[offset]; + + if (current === '\r' || current === '\n') { + emit(TokenKind.Newline, current === '\r' && source[offset + 1] === '\n' ? offset + 2 : offset + 1); + continue; + } + + if (/[ \t\f\v]/.test(current)) { + let end = offset + 1; + while (end < source.length && /[ \t\f\v]/.test(source[end])) { + end += 1; + } + emit(TokenKind.Whitespace, end); + continue; + } + + if (current === '"') { + let end = offset + 1; + while (end < source.length && source[end] !== '\r' && source[end] !== '\n') { + if (source[end] === '\\' && end + 1 < source.length && source[end + 1] !== '\r' && source[end + 1] !== '\n') { + end += 2; + } else if (source[end] === '"') { + end += 1; + break; + } else { + end += 1; + } + } + emit(TokenKind.String, end); + continue; + } + + if (current === '{') { + const closingBrace = source.indexOf('}', offset + 1); + emit(TokenKind.Comment, closingBrace === -1 ? source.length : closingBrace + 1); + continue; + } + + if (current === "'") { + let end = offset + 1; + while (end < source.length && source[end] !== '\r' && source[end] !== '\n') { + end += 1; + } + emit(TokenKind.Comment, end); + continue; + } + + if (isDigit(current)) { + let end = offset + 1; + while (isDigit(source[end])) { + end += 1; + } + if (source[end] === '.' && isDigit(source[end + 1])) { + end += 1; + while (isDigit(source[end])) { + end += 1; + } + } + emit(TokenKind.Number, end); + continue; + } + + if (isIdentifierStart(current)) { + let end = offset + 1; + while (isIdentifierPart(source[end])) { + if (source[end] === '-' && source[end + 1] === '>') { + break; + } + end += 1; + } + emit(classifyWord(source.slice(offset, end)), end); + continue; + } + + const operator = OPERATORS.find(candidate => source.startsWith(candidate, offset)); + if (operator !== undefined) { + emit(TokenKind.Operator, offset + operator.length); + continue; + } + + if ((PUNCTUATION as readonly string[]).includes(current)) { + emit(TokenKind.Punctuation, offset + 1); + continue; + } + + const codePoint = source.codePointAt(offset); + emit(TokenKind.Unknown, offset + (codePoint !== undefined && codePoint > 0xffff ? 2 : 1)); + } + + const position = currentPosition(); + tokens.push({ + kind: TokenKind.EOF, + lexeme: '', + span: { start: offset, end: offset }, + range: { start: position, end: { ...position } }, + }); + return tokens; +} diff --git a/packages/core/test/fixtures/incomplete.vi b/packages/core/test/fixtures/incomplete.vi new file mode 100644 index 0000000..4a56f19 --- /dev/null +++ b/packages/core/test/fixtures/incomplete.vi @@ -0,0 +1,4 @@ +DIM Reading AS REAL; +IF Reading > + MessageText = "unfinished input + @ diff --git a/packages/core/test/fixtures/representative.vbi b/packages/core/test/fixtures/representative.vbi new file mode 100644 index 0000000..b1d2c4e --- /dev/null +++ b/packages/core/test/fixtures/representative.vbi @@ -0,0 +1,11 @@ +{ Representative QuickScript tokenizer fixture } +DIM MessageText AS MESSAGE; +DIM Index AS INTEGER; + +IF Index >= 1 THEN + LogMessage("IF and { braces } stay in this string"); +ELSE + FOR Index = 1 TO 2 STEP 1 + CALL xGatawaySettings(); ' Hermes-specific function call + NEXT; +ENDIF; diff --git a/packages/core/test/tokenizer.test.ts b/packages/core/test/tokenizer.test.ts new file mode 100644 index 0000000..09d67f5 --- /dev/null +++ b/packages/core/test/tokenizer.test.ts @@ -0,0 +1,128 @@ +import * as assert from 'assert'; +import * as fs from 'fs'; +import * as path from 'path'; + +import { positionAt } from '../src/source'; +import { Token, TokenKind } from '../src/token'; +import { tokenize } from '../src/tokenizer'; + +function significant(tokens: Token[]): Token[] { + return tokens.filter(token => token.kind !== TokenKind.Whitespace && token.kind !== TokenKind.Newline); +} + +suite('QuickScript tokenizer', () => { + test('classifies representative declarations, control flow, calls, and values', () => { + const tokens = significant(tokenize('dim MessageText as message; IF Reading>=10.5 THEN CALL LogMessage("ok"); ENDIF;')); + const actual = tokens.map(token => [token.kind, token.lexeme]); + + assert.deepStrictEqual(actual, [ + [TokenKind.Keyword, 'dim'], + [TokenKind.Identifier, 'MessageText'], + [TokenKind.Keyword, 'as'], + [TokenKind.Datatype, 'message'], + [TokenKind.Punctuation, ';'], + [TokenKind.Keyword, 'IF'], + [TokenKind.Identifier, 'Reading'], + [TokenKind.Operator, '>='], + [TokenKind.Number, '10.5'], + [TokenKind.Keyword, 'THEN'], + [TokenKind.Keyword, 'CALL'], + [TokenKind.Identifier, 'LogMessage'], + [TokenKind.Punctuation, '('], + [TokenKind.String, '"ok"'], + [TokenKind.Punctuation, ')'], + [TokenKind.Punctuation, ';'], + [TokenKind.Keyword, 'ENDIF'], + [TokenKind.Punctuation, ';'], + [TokenKind.EOF, ''], + ]); + }); + + test('preserves case and treats InTouch and Hermes function names as identifiers', () => { + const tokens = significant(tokenize('CALL LogMessage(); CALL xGatawaySettings();')); + const identifiers = tokens.filter(token => token.kind === TokenKind.Identifier); + + assert.deepStrictEqual(identifiers.map(token => token.lexeme), ['LogMessage', 'xGatawaySettings']); + }); + + test('recognizes established identifier forms without splitting instance prefixes', () => { + const tokens = significant(tokenize('STATION1:S09BNOnline = SYS_Tag-Name; $Second = #Trend;')); + const identifiers = tokens.filter(token => token.kind === TokenKind.Identifier); + + assert.deepStrictEqual( + identifiers.map(token => token.lexeme), + ['STATION1', 'S09BNOnline', 'SYS_Tag-Name', '$Second', '#Trend'], + ); + }); + + test('keeps syntax-looking text inside strings and comments', () => { + const source = 'Empty = ""; Message = "IF {not a comment} \\"quoted\\""; { IF a >= 1 }\n\' NEXT is a comment'; + const tokens = tokenize(source); + + assert.deepStrictEqual( + tokens.filter(token => token.kind === TokenKind.String).map(token => token.lexeme), + ['""', '"IF {not a comment} \\"quoted\\""'], + ); + assert.deepStrictEqual( + tokens.filter(token => token.kind === TokenKind.Comment).map(token => token.lexeme), + ['{ IF a >= 1 }', "' NEXT is a comment"], + ); + }); + + test('matches operators longest-first and recognizes QuickScript punctuation', () => { + const tokens = significant(tokenize('A==B; C<>D; E<=F; G>=H; Tag.Field->Method()[1], X:Y;')); + + assert.deepStrictEqual( + tokens.filter(token => token.kind === TokenKind.Operator).map(token => token.lexeme), + ['==', '<>', '<=', '>=', '->'], + ); + assert.deepStrictEqual( + tokens.filter(token => token.kind === TokenKind.Punctuation).map(token => token.lexeme), + [';', ';', ';', ';', '.', '(', ')', '[', ']', ',', ':', ';'], + ); + }); + + test('tracks CRLF positions and half-open offsets', () => { + const tokens = tokenize('IF\r\nReading >= 10;'); + const keyword = tokens[0]; + const newline = tokens[1]; + const identifier = tokens[2]; + + assert.deepStrictEqual(keyword.span, { start: 0, end: 2 }); + assert.deepStrictEqual(keyword.range, { start: { line: 0, character: 0 }, end: { line: 0, character: 2 } }); + assert.deepStrictEqual(newline.span, { start: 2, end: 4 }); + assert.deepStrictEqual(newline.range.end, { line: 1, character: 0 }); + assert.deepStrictEqual(identifier.range, { start: { line: 1, character: 0 }, end: { line: 1, character: 7 } }); + }); + + test('returns stable tokens for unclosed strings and unknown characters', () => { + const tokens = tokenize('Message = "unfinished\n@'); + + assert.strictEqual(tokens.find(token => token.kind === TokenKind.String)?.lexeme, '"unfinished'); + assert.strictEqual(tokens.find(token => token.kind === TokenKind.Unknown)?.lexeme, '@'); + assert.strictEqual(tokens[tokens.length - 1].kind, TokenKind.EOF); + }); + + for (const fixture of ['representative.vbi', 'incomplete.vi']) { + test(`maintains token invariants for ${fixture}`, () => { + const fixturePath = path.resolve(__dirname, '../../../packages/core/test/fixtures', fixture); + const source = fs.readFileSync(fixturePath, 'utf8'); + const tokens = tokenize(source); + const contentTokens = tokens.slice(0, -1); + + assert.strictEqual(contentTokens.map(token => token.lexeme).join(''), source); + assert.strictEqual(tokens[tokens.length - 1].kind, TokenKind.EOF); + for (let index = 0; index < tokens.length; index += 1) { + const token = tokens[index]; + assert.ok(token.span.start >= 0); + assert.ok(token.span.end >= token.span.start); + assert.ok(token.span.end <= source.length); + assert.deepStrictEqual(token.range.start, positionAt(source, token.span.start)); + assert.deepStrictEqual(token.range.end, positionAt(source, token.span.end)); + if (index > 0) { + assert.strictEqual(token.span.start, tokens[index - 1].span.end); + } + } + }); + } +}); diff --git a/tsconfig.json b/tsconfig.json index 2ec04bf..348e5a6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,5 +15,8 @@ "temp", ".vscode-test", "scripts" + ], + "include": [ + "src/**/*.ts" ] } From eccd656d219e30ca16f3cd528bcca6bfa8f62f5f Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:18:41 +0200 Subject: [PATCH 05/40] docs(architecture): document core foundation --- docs/architecture/intouch-core-preparation.md | 85 ++++++++++++++----- docs/language/quickscript.md | 11 +-- 2 files changed, 71 insertions(+), 25 deletions(-) diff --git a/docs/architecture/intouch-core-preparation.md b/docs/architecture/intouch-core-preparation.md index 19672cb..2d2727a 100644 --- a/docs/architecture/intouch-core-preparation.md +++ b/docs/architecture/intouch-core-preparation.md @@ -1,15 +1,21 @@ -# InTouch Core Preparation Audit +# InTouch Core Foundation ## Current extension shape -The repository is a single npm-managed VS Code extension. `package.json` +The repository remains an npm-managed VS Code extension. `package.json` registers language ID `intouch` for `.vbi` and `.vi`, a TextMate grammar, -snippets, a formatter command, and the theme. `src/extension.ts` is the VS Code -activation boundary; compiled output is `out/` and the bundle is -`dist/extension.js`. +snippets, a formatter command, and the theme. `src/extension.ts` remains the VS +Code activation boundary; its compiled output is `out/` and its published +bundle is `dist/extension.js`. -No `packages/`, tokenizer, parser, language server, LSP transport, semantic -definition/reference provider, or diagnostics provider exists yet. +`packages/core` now provides editor-independent source positions, token types, +lexical language data, and a deterministic QuickScript tokenizer. It compiles +strictly to the ignored `out/core` directory, is tested through +`npm run test:core`, and is excluded from the VSIX until an extension runtime +consumer is introduced. + +No parser, language server, LSP transport, semantic definition/reference +provider, or diagnostics provider exists yet. ## Migration inventory @@ -23,15 +29,54 @@ definition/reference provider, or diagnostics provider exists yet. | `syntaxes/intouch.tmLanguage.json` | TextMate lexical highlighting, functions, data types, and scopes | Retain in `packages/vscode-extension` initially; later generate/shared language data only after validation | VS Code TextMate grammar | Highlighting patterns are not a parser specification. | | `language-configuration.json`, `snippets/vbi.json` | Editor rules and authoring snippets | `packages/vscode-extension` | VS Code contribution model | Keep declarative assets out of core. | | `src/test/suite/*.test.ts` and `testfiles/` | Extension-host tests and formatter golden fixtures | Core formatter test suite plus extension integration tests | Mocha, VS Code test host | Fixtures should stay byte-for-byte stable unless behavior intentionally changes. | +| `packages/core/src/source.ts` | Zero-based UTF-16 positions and half-open offset/position ranges | Established core source model | TypeScript only | Keep position semantics aligned with the later LSP boundary. | +| `packages/core/src/token.ts` | Editor-independent token contract | Established core token model | Core source model | Preserve source lexemes and locations; diagnostics do not belong in tokens. | +| `packages/core/src/tokenizer.ts` | QuickScript lexical scanning | Established core tokenizer | Core language data and token model | Stay resilient to incomplete input without guessing parser semantics. | ## Language knowledge and duplication -Language vocabulary currently appears in the grammar and formatter constants; -block behavior appears in the formatter and language configuration. This is -useful evidence but not yet one canonical typed model. The first core milestone -should inventory these sets, write characterization tests for their intentional -overlap/divergence, and then extract a VS Code-independent language-data and -formatter surface. +The core now owns the typed lexical sets needed by the tokenizer: control +keywords, data types, operators, and punctuation. Matching is case-insensitive +while tokens preserve the original source text. + +The formatter constants and TextMate grammar remain compatibility sources for +their existing consumers. The grammar's large InTouch and Hermes function +inventories intentionally remain there; the tokenizer represents function +names as identifiers followed by punctuation rather than copying a partial +function list into core. Block and indentation data also remain in the +formatter until a structure parser can replace that responsibility safely. + +These remaining overlaps are deliberate migration boundaries, not a third +canonical language model. + +## Source and token semantics + +- Offsets, lines, and characters are zero-based UTF-16 units. +- Source spans and position ranges are half-open: start is inclusive and end is + exclusive. +- CRLF, LF, and CR are recognized as line boundaries. +- Tokens retain their original lexeme, offset span, and position range. +- The tokenizer emits identifiers, keywords, data types, numbers, strings, + operators, punctuation, comments, whitespace, newlines, unknown input, and a + zero-width EOF token. +- Double-quoted strings, brace comments, apostrophe line comments, established + identifier forms, and decimal numbers are based on repository grammar, + formatter, and fixture evidence. +- Unclosed strings/comments and unknown characters remain tokenizable; parser + diagnostics are intentionally deferred. + +## Formatter coupling + +`src/formatCore.ts` still owns keyword uppercasing, operator/whitespace +normalization, comment/string preservation, and nesting indentation. The new +tokenizer models some of the same lexical boundaries, but the production +formatter does not consume it yet. Replacing the formatter's ordered mutation +pipeline now would combine lexical extraction with a behavior-sensitive +rewrite. + +A later formatter migration can reuse core tokens after it has targeted +equivalence tests for text reconstruction and formatting edits. Existing +characterization tests and golden fixtures remain the compatibility gate. ## Diagnostics and semantic navigation @@ -43,10 +88,10 @@ symbols, definitions, and references be implemented. ## Recommended next autonomous block -1. Create a read-only language-data inventory from grammar, formatter constants, - nesting definitions, and fixtures. -2. Add characterization tests that protect existing formatter output and record - intentional vocabulary differences. -3. Define a small VS Code-independent `intouch-core` API and extract only pure - language data and formatting helpers behind it. -4. Do not create LSP transport or Serena QuickScript integration in that block. +1. Add a QuickScript structure parser over core tokens for `DIM`, + `IF`/`ELSE`/`ENDIF`, `FOR`/`NEXT`, and `CALL`. +2. Model local scopes without introducing editor or transport dependencies. +3. Add the first parser-based diagnostics only after recovery behavior is + tested for incomplete source. +4. Continue to defer language-server transport, definitions, references, + completion, and hover until the parser contract is stable. diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index 98bb823..96e23d8 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -31,9 +31,9 @@ ProjectAtlas can index these files as neutral text for repository navigation and lexical search only. Neither tool currently supplies QuickScript symbols, definitions, references, or diagnostics. -## Planned architecture +## Target architecture -The approved future target is: +The approved target is: ```text packages/ @@ -42,6 +42,7 @@ packages/ vscode-extension/ ``` -`core` and the language server must be independent of the VS Code API. This -document records the boundary only; it does not introduce the package split or -language-server implementation. +`packages/core` now establishes the editor-independent source and tokenizer +boundary. The language server must also remain independent of the VS Code API. +`packages/language-server` and `packages/vscode-extension` are still planned; +no language-server implementation or transport exists yet. From eb962e84ac5e5bcadfcfa3fb250939785b8572ed Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:20:53 +0200 Subject: [PATCH 06/40] chore(release): prepare version 1.5.1 --- CHANGELOG.md | 7 +++++++ README.md | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9812e5e..34f29c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ +### V1.5.1 + +- Added the editor-independent QuickScript source model, token model, and tokenizer foundation. +- Added focused formatter behavior baselines and `.vbi`/`.vi` tokenizer fixtures. +- Refreshed the compatible development toolchain and tightened VSIX packaging exclusions. +- Kept formatter, grammar, snippets, and extension runtime behavior unchanged. + ### V1.4.0 - 29.11.2022 VitalyRuhl diff --git a/README.md b/README.md index ee7fc2b..19a94b8 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,11 @@ The following items are either recently resolved or planned but not yet implemen # What's new in Intouch-Language +### V1.5.1 + +- Added an editor-independent QuickScript tokenizer foundation for future language intelligence. +- Refreshed the development toolchain and package validation while preserving current extension behavior. + ### V1.5.0 - Added deeper multiline IF continuation indentation (base + 2) keeping THEN line aligned with expression diff --git a/package-lock.json b/package-lock.json index fb66b19..f7f96d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.0", + "version": "1.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.0", + "version": "1.5.1", "hasInstallScript": true, "license": "GPL-3.0-or-later", "devDependencies": { diff --git a/package.json b/package.json index 0fd01e6..e52d3b1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2025 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.0", + "version": "1.5.1", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { From ee6e9c52189ec947d425f9e3d950d48ac16286e5 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:25:01 +0200 Subject: [PATCH 07/40] docs(architecture): define formatter migration path --- docs/architecture/intouch-core-preparation.md | 88 +++++++++++++++---- docs/language/quickscript.md | 11 +++ 2 files changed, 81 insertions(+), 18 deletions(-) diff --git a/docs/architecture/intouch-core-preparation.md b/docs/architecture/intouch-core-preparation.md index 2d2727a..9db4189 100644 --- a/docs/architecture/intouch-core-preparation.md +++ b/docs/architecture/intouch-core-preparation.md @@ -17,6 +17,25 @@ consumer is introduced. No parser, language server, LSP transport, semantic definition/reference provider, or diagnostics provider exists yet. +The target dependency direction is: + +```text +QuickScript source + | + v +packages/core tokenizer and structure model + |----------------------| + v v +QuickScript formatter language server + | + v +VS Code formatter adapter +``` + +The formatter and language server are independent core consumers. The language +server is not an intermediary for formatting, and VS Code remains a client +adapter rather than a language-semantics layer. + ## Migration inventory | Current source | Current responsibility | Future target module | Dependencies | Risk | @@ -37,7 +56,9 @@ provider, or diagnostics provider exists yet. The core now owns the typed lexical sets needed by the tokenizer: control keywords, data types, operators, and punctuation. Matching is case-insensitive -while tokens preserve the original source text. +while tokens preserve the original source text. The tokenizer is the canonical +lexical interpretation that the future parser, formatter, diagnostics, and +language server must consume; those components must not add parallel lexers. The formatter constants and TextMate grammar remain compatibility sources for their existing consumers. The grammar's large InTouch and Hermes function @@ -59,24 +80,48 @@ canonical language model. - The tokenizer emits identifiers, keywords, data types, numbers, strings, operators, punctuation, comments, whitespace, newlines, unknown input, and a zero-width EOF token. +- Concatenating every non-EOF lexeme reconstructs the original source exactly; + fixture invariants enforce this for both `.vbi` and `.vi` input. - Double-quoted strings, brace comments, apostrophe line comments, established identifier forms, and decimal numbers are based on repository grammar, formatter, and fixture evidence. +- Block metadata such as `{>`, `{<`, `{#`, `{region`, and `{endregion` remains + losslessly available in comment lexemes for later formatting decisions. - Unclosed strings/comments and unknown characters remain tokenizable; parser diagnostics are intentionally deferred. ## Formatter coupling -`src/formatCore.ts` still owns keyword uppercasing, operator/whitespace -normalization, comment/string preservation, and nesting indentation. The new -tokenizer models some of the same lexical boundaries, but the production -formatter does not consume it yet. Replacing the formatter's ordered mutation -pipeline now would combine lexical extraction with a behavior-sensitive -rewrite. - -A later formatter migration can reuse core tokens after it has targeted -equivalence tests for text reconstruction and formatting edits. Existing -characterization tests and golden fixtures remain the compatibility gate. +`src/formatCore.ts` is a legacy implementation, not the future formatting +contract. Its ordered mutations currently mix lexical protection, structural +heuristics, and output decisions. The production formatter does not consume +core tokens yet because replacing all three responsibilities in the tokenizer +milestone would be a behavior-sensitive rewrite. + +| Current component | Current responsibility | Responsibility type | Future target | +| --- | --- | --- | --- | +| `preFormat` orchestration | Applies ordered keyword, operator, punctuation, and whitespace mutations | Mixed lexical and output | Token-aware QuickScript formatter engine consuming core tokens | +| String and comment protection in `preFormat` | Prevents regex formatting inside quoted or commented text | Lexical | Core `String` and `Comment` tokens with original ranges | +| Keyword and operator recognition in `preFormat` | Finds case-insensitive words and longest operators | Lexical | Core token kinds and language data | +| Whitespace normalization | Adjusts spaces, tabs, semicolons, and trailing whitespace | Output | Formatter rules over lossless whitespace/newline tokens | +| `formatNestings` | Infers indentation from lines, keywords, and configured comment markers | Structural and output | Structure-parser blocks plus formatter indentation rules | +| Block keyword recognition | Detects `IF`/`ELSE`/`ENDIF`, `FOR`/`NEXT`, `WHILE`, and comment blocks | Structural | Shared core structure model derived from tokens | +| Output generation | Rebuilds a formatted source string for the VS Code edit | Output | Editor-independent `formatQuickScript(source, options)` result | +| `src/functions.ts` formatting entry | Reads VS Code settings and creates `TextEdit` values | Editor adapter | Thin VS Code adapter over the shared formatter engine | + +Migration is planned in two controlled stages: + +1. Lexical formatter integration: use core string, comment, keyword, operator, + punctuation, whitespace, newline, and source-range information so + `preFormat` no longer performs a second lexical analysis. +2. Structural formatter integration: after the structure parser is stable, + drive nesting and indentation from shared `DIM`, `IF`/`ELSE`/`ENDIF`, + `FOR`/`NEXT`, `WHILE`, `CALL`, block, and scope information. + +Existing characterization tests and golden fixtures protect already-correct +behavior; they do not declare every historical formatter result optimal. Later +improvements may replace poor legacy output when their intended behavior is +covered by focused tests. ## Diagnostics and semantic navigation @@ -88,10 +133,17 @@ symbols, definitions, and references be implemented. ## Recommended next autonomous block -1. Add a QuickScript structure parser over core tokens for `DIM`, - `IF`/`ELSE`/`ENDIF`, `FOR`/`NEXT`, and `CALL`. -2. Model local scopes without introducing editor or transport dependencies. -3. Add the first parser-based diagnostics only after recovery behavior is - tested for incomplete source. -4. Continue to defer language-server transport, definitions, references, - completion, and hover until the parser contract is stable. +The next block is **Core Integration + Structure Parser + Formatter Refactor**, +split into safe internal phases when needed: + +1. Prepare tokenizer integration in the formatter and remove duplicated + lexical protection from `preFormat` behind focused equivalence tests. +2. Add a formatting-capable QuickScript structure parser over core tokens for + `DIM`, `IF`/`ELSE`/`ENDIF`, `FOR`/`NEXT`, `WHILE`, and `CALL`. +3. Establish shared block, statement, nesting, and local-scope information. +4. Move formatter nesting and indentation incrementally onto that structure. +5. Add focused expectations for known weak formatter cases instead of + preserving them as accidental contracts. +6. Only then extend symbols and parser-based diagnostics; continue to defer + LSP transport, definitions, references, completion, and hover until the + shared parser and formatter contracts are stable. diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index 96e23d8..8a660bd 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -46,3 +46,14 @@ packages/ boundary. The language server must also remain independent of the VS Code API. `packages/language-server` and `packages/vscode-extension` are still planned; no language-server implementation or transport exists yet. + +The core tokenizer is the canonical lexical interpretation for every future +consumer. The structure parser, formatter, diagnostics, and language server +must reuse its lossless tokens instead of implementing independent string, +comment, keyword, operator, or whitespace recognition. + +The formatter is a direct core consumer, not a language-server consumer. Its +planned editor-independent engine will serve both a thin VS Code formatter +adapter and later LSP formatting. Migration happens first at the lexical layer +and then, after a formatting-capable structure parser exists, at the block and +indentation layer. From 07f6c28aa946301e001618c0ebe6e3297dbce86f Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:35:00 +0200 Subject: [PATCH 08/40] chore(release): defer version bump until HIL --- CHANGELOG.md | 7 ------- README.md | 5 ----- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34f29c9..9812e5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,6 @@ -### V1.5.1 - -- Added the editor-independent QuickScript source model, token model, and tokenizer foundation. -- Added focused formatter behavior baselines and `.vbi`/`.vi` tokenizer fixtures. -- Refreshed the compatible development toolchain and tightened VSIX packaging exclusions. -- Kept formatter, grammar, snippets, and extension runtime behavior unchanged. - ### V1.4.0 - 29.11.2022 VitalyRuhl diff --git a/README.md b/README.md index 19a94b8..ee7fc2b 100644 --- a/README.md +++ b/README.md @@ -195,11 +195,6 @@ The following items are either recently resolved or planned but not yet implemen # What's new in Intouch-Language -### V1.5.1 - -- Added an editor-independent QuickScript tokenizer foundation for future language intelligence. -- Refreshed the development toolchain and package validation while preserving current extension behavior. - ### V1.5.0 - Added deeper multiline IF continuation indentation (base + 2) keeping THEN line aligned with expression diff --git a/package-lock.json b/package-lock.json index f7f96d6..fb66b19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.1", + "version": "1.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.1", + "version": "1.5.0", "hasInstallScript": true, "license": "GPL-3.0-or-later", "devDependencies": { diff --git a/package.json b/package.json index e52d3b1..0fd01e6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2025 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.1", + "version": "1.5.0", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { From 7bd02e2b1a31dc6060b1d0cf9c08879049aafff4 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 15:19:19 +0200 Subject: [PATCH 09/40] feat(language): add native QuickScript language server --- .gitattributes | 1 + .gitignore | 3 +- dist/extension.js | 42 +- dist/server.js | 27 + out/const.js | 57 - out/extension.js | 32 - out/formatCore.js | 618 ----- out/formats.js | 21 - out/functions.js | 164 -- out/nestingdef.js | 25 - package-lock.json | 120 +- package.json | 21 +- packages/core/package.json | 4 +- packages/core/src/formatter.ts | 278 +++ packages/core/src/generatedFunctionCatalog.ts | 2191 +++++++++++++++++ packages/core/src/index.ts | 5 + packages/core/src/languageService.ts | 103 + packages/core/src/parser.ts | 266 ++ packages/core/src/semantics.ts | 141 ++ packages/core/src/tokenizer.ts | 11 +- packages/core/test/formatter.test.ts | 67 + packages/core/test/languageService.test.ts | 32 + packages/core/test/parser.test.ts | 57 + packages/core/test/semantics.test.ts | 28 + packages/core/test/tokenizer.test.ts | 4 +- packages/language-server/package.json | 12 + packages/language-server/src/features.ts | 108 + packages/language-server/src/server.ts | 67 + packages/language-server/src/settings.ts | 40 + .../language-server/test/features.test.ts | 77 + .../language-server/test/protocol.test.ts | 85 + packages/language-server/tsconfig.json | 15 + scripts/generate-language-data.js | 58 + scripts/update-fixtures.js | 20 +- scripts/update-fixtures.ts | 76 +- src/const.ts | 60 - src/extension.ts | 59 +- src/formatCore.ts | 530 ---- src/formats.ts | 20 - src/functions.ts | 191 -- src/nestingdef.ts | 29 - src/test/runTest.ts | 6 +- src/test/suite/extension.test.ts | 26 + src/test/suite/formats.comments.test.ts | 4 +- src/test/suite/formats.eof.test.ts | 4 +- src/test/suite/formats.fixtures.test.ts | 22 +- src/test/suite/formats.idempotent.test.ts | 4 +- src/test/suite/formats.misc.test.ts | 4 +- src/test/suite/formats.operators.test.ts | 4 +- src/test/suite/formatterTestSupport.ts | 36 + src/test/suite/functions.test.ts | 15 - src/test/suite/index.ts | 2 +- src/test/suite/keywords.uppercase.test.ts | 4 +- .../suite/language.behavior-baseline.test.ts | 3 +- .../suite/testfiles/03.spacing.other.tobe.vbi | 1 + .../04.indentation.basic.nesting.tobe.vbi | 6 +- .../05.comment_rules.nesting.tobe.vbi | 2 +- src/test/suite/testfiles/all.tobe.vbi | 8 +- tsconfig.json | 3 +- 59 files changed, 4000 insertions(+), 1919 deletions(-) create mode 100644 .gitattributes create mode 100644 dist/server.js delete mode 100644 out/const.js delete mode 100644 out/extension.js delete mode 100644 out/formatCore.js delete mode 100644 out/formats.js delete mode 100644 out/functions.js delete mode 100644 out/nestingdef.js create mode 100644 packages/core/src/formatter.ts create mode 100644 packages/core/src/generatedFunctionCatalog.ts create mode 100644 packages/core/src/languageService.ts create mode 100644 packages/core/src/parser.ts create mode 100644 packages/core/src/semantics.ts create mode 100644 packages/core/test/formatter.test.ts create mode 100644 packages/core/test/languageService.test.ts create mode 100644 packages/core/test/parser.test.ts create mode 100644 packages/core/test/semantics.test.ts create mode 100644 packages/language-server/package.json create mode 100644 packages/language-server/src/features.ts create mode 100644 packages/language-server/src/server.ts create mode 100644 packages/language-server/src/settings.ts create mode 100644 packages/language-server/test/features.test.ts create mode 100644 packages/language-server/test/protocol.test.ts create mode 100644 packages/language-server/tsconfig.json create mode 100644 scripts/generate-language-data.js delete mode 100644 src/const.ts delete mode 100644 src/formatCore.ts delete mode 100644 src/formats.ts delete mode 100644 src/functions.ts delete mode 100644 src/nestingdef.ts create mode 100644 src/test/suite/formatterTestSupport.ts delete mode 100644 src/test/suite/functions.test.ts diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..175b23e --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +dist/*.js whitespace=-trailing-space diff --git a/.gitignore b/.gitignore index ecebfc1..f99ba3a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,8 +18,7 @@ all-agents-combined.md #formatter #.vscode/** typings/** -out/test/** -/out/core/ +/out/ #src/** **/*.map diff --git a/dist/extension.js b/dist/extension.js index 757a2e4..1455886 100644 --- a/dist/extension.js +++ b/dist/extension.js @@ -1,15 +1,29 @@ -"use strict";var y=(r,i)=>()=>{try{return i||r((i={exports:{}}).exports,i),i.exports}catch(l){throw i=0,l}};var D=y(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.REGEX=g.KEYWORDS=g.TRENNER=g.NO_SPACE_ITEMS=g.DOUBLE_OPERATORS=g.SINGLE_OPERATORS=g.FORMATS=g.BACKSLASH=g.SQUOTE=g.DQUOTE=g.CRLF=g.LF=g.CR=g.TAB=void 0;g.TAB=" ";g.CR="\r";g.LF=` -`;g.CRLF=`\r -`;g.DQUOTE='"';g.SQUOTE="'";g.BACKSLASH="\\";g.FORMATS=[g.TAB,g.CR,g.LF,g.CRLF,g.DQUOTE,g.SQUOTE,g.BACKSLASH];g.SINGLE_OPERATORS=["=","+","-","<",">","*","/","%","!","~","|"];g.DOUBLE_OPERATORS=["==","<>","<=",">="];g.NO_SPACE_ITEMS=["(",")","[","]",";"];g.TRENNER=[";"," "];g.KEYWORDS=["NULL","EOF","AS","IF","ENDIF","ELSE","WHILE","FOR","next","DIM","THEN","EXIT","EACH","STEP","IN","RETURN","CALL","MOD","AND","NOT","IS","OR","XOR","Abs","TO","SHL","SHR","discrete","integer","real","message","sqr","sin","cos","tan","atn","exp","log","int","frac","round","rnd","sqrt"];var te=new RegExp(/(?![^{]*})\t/,"gm"),ne=new RegExp(/\s{1,}/,"gm"),ie=new RegExp(/\s{2,}/,"gm"),oe=new RegExp(/\s{2,}(?\/\?\s]+)/,"gm"),ge=new RegExp(/-?\d*\d/,"gm");g.REGEX={gm_TAB_NOT_IN_COMMENT:te,gm_MOR_1_WSP:ne,gm_MOR_2_WSP:ie,g_CHECK_OPEN_COMMENT:re,g_CHECK_CLOSE_COMMENT:se,gm_GET_NESTING:le,gm_GET_STRING:ae,gm_GET_WSP_IN_STRING:ce,gm_MOR_2_WSP_NO_TAB:oe,gm_GET_ALL_WORDS:fe,gm_GET_ALL_Numbers:ge}});var H=y(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.NESTINGS=k.EXCLUDE_KEYWORDS=void 0;k.EXCLUDE_KEYWORDS=["EXIT FOR"];k.NESTINGS=[{keyword:"if",middle:"else",end:"endif",multiline:"then"},{keyword:"for",middle:"",end:"next",multiline:""},{keyword:"while",middle:"",end:"next",multiline:""}]});var X=y(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.preFormat=K;P.formatNestings=V;P.pureFormatPipeline=Ee;var E=D(),U=H();function K(r,i){r=r.replace(/\r\n|\n|\r/g,`\r -`);let l=r.split(""),e="",s=0,u=1,C=0,T=!1,w=!1;for(let n=0;n<=l.length-1;n++)if(C++,s>0)s--;else{if(s=0,w&&l[n]==='"'?w=!1:!T&&l[n]==='"'&&(w=!0),l[n]===` -`){if(w)return r;u++,C=0}if(!T&&l[n]==="}")return r;if(l[n]==="{"?T=!0:T&&l[n]==="}"&&(T=!1),!w&&!(s>0)&&(!T||i.KeywordUppercaseAlsoInComment)){for(let d of E.KEYWORDS){let h=r.substr(n,d.length),L=r[n-1],S=r[n+d.length];if(h.toLowerCase()===d.toLowerCase()&&j(L)&&j(S)){e+=d.toUpperCase(),s=d.length-1;break}}if(!(s>0)){for(let d of E.DOUBLE_OPERATORS)if(r.substr(n,d.length)===d){r[n-1]!==" "&&(e+=" "),e+=d,r[n+d.length]!==" "&&(e+=" "),s=d.length-1;break}}if(!(s>0)){let d=S=>/[A-Za-z0-9_$]/.test(S||""),h=S=>/[A-Za-z]/.test(S||""),L=S=>/[A-Za-z0-9$-]/.test(S||"");for(let S of E.SINGLE_OPERATORS){if(l[n]!==S)continue;if(S==="-"){let o=r[n-1],m=r[n+1];if(L(o)&&L(m)){let R=n-1;for(;R>=0&&L(r[R]);)R--;R++;let b=n+1;for(;b=0&&/[ \t]/.test(e[o]);)o--;let m=o>=0?e[o]:void 0,R=r[n+1];(m===void 0||/[=+\-*/,(;{}]/.test(m)||m===` -`||m==="\r")&&/[0-9]/.test(R)&&(f=!0)}let t=!(S==="-"&&f);if(t&&e.length>0&&!/[ \t\r\n]/.test(e[e.length-1])&&(e+=" "),e+=S,t){let o=r[n+1];o&&!/[ \t\r\n]/.test(o)&&(e+=" ")}s=-1;break}}}s===0&&(e+=l[n])}e=e.replace(/\r\r\n/g,E.CRLF).replace(/\r(?!\n)/g,"");let B=e.split(E.CRLF).map(n=>n.replace(/\s+$/g,"")),F=[],$=0;for(let n of B)if(n===""){$++,$===1&&F.push("");continue}else $=0,F.push(n);let c=F.join(E.CRLF);return c=(()=>{let n="",d=!1,h=!1,L=0,S=f=>/[A-Za-z]/.test(f);for(let f=0;f0){for(;n.length>0&&n[n.length-1]===" ";)n=n.slice(0,-1);L=0}n+=")";let o=f+1;for(;o=0&&/[A-Za-z0-9$-]/.test(n[o]);)o--;let m=f+3;for(;m0&&n[n.length-1]===" ";)n=n.slice(0,-1);n+=",";let o=c[f+1];o&&o!==" "&&o!==")"&&o!=="\r"&&o!==` -`&&(n+=" ");continue}}n+=t}return n.replace(/= {2,}>/g,"= >")})(),c=c.split(E.CRLF).map(n=>{if(/^\s*\{[^{}]*\}\s*$/.test(n))return n;let d=n.indexOf("{"),h=n,L="";return d!==-1&&(h=n.slice(0,d),L=n.slice(d)),h.split(/("[^"\\]*(?:\\.[^"\\]*)*"?)/g).map(f=>f.startsWith('"')&&f.endsWith('"')?f:f.replace(/(\S)\s+;/g,"$1;")).join("")+L}).join(E.CRLF),c}function V(r,i){let l="",e=[],s="",u=0,C=0,T=!1,w=!1,B=!1,F=0,$=`^${i.BlockCodeBegin}`,c=`^${i.BlockCodeExclude}`,n=`^${i.BlockCodeEnd}`,d=`^${i.RegionBlockCodeBegin}`,h=`^${i.RegionBlockCodeExclude}`,L=`^${i.RegionBlockCodeEnd}`,S=r.endsWith(E.CRLF);e=r.split(E.CRLF);for(let t=0;t{s=`((?![^{]*})(${A}))`,e[t].search(new RegExp(s,"i"))!==-1&&(W=!0)}),B)_&&(u++,w=!0,B=!1);else if(!z)if(ee)B=!0,F=C;else for(let A of U.NESTINGS){if(W||(s=`((?![^{]*})(\\b${A.keyword})\\b)`,e[t].search(new RegExp(s,"i"))!==-1&&u++),A.multiline!==""&&(s=`((?![^{]*})(\\b${A.multiline})\\b)`,e[t].search(new RegExp(s,"i"))),A.middle!==""&&(s=`((?![^{]*})(\\b${A.middle})\\b)`,e[t].search(new RegExp(s,"i"))!==-1)){w=!0;break}if(s=`((?![^{]*})(\\b${A.end})\\b)`,e[t].search(new RegExp(s,"i"))!==-1){u--,u<0&&(u=0),w=!0;break}}}if(!m){let O=o&&e[t].includes("}");if(T||O||o){e[t]=b,B=!1,C!==u&&(C=u);continue}let p=C;B?/\bIF\b/i.test(e[t])&&!/\bTHEN\b/i.test(e[t])||(p=F+2):w&&/\bTHEN\b/i.test(e[t])&&(p=F+2,w=!1);let _=ue(p,w,i);e[t]=_+e[t],C!==u&&(C=u),w=!1}}e=e.map(t=>t.replace(/[ \t]+$/g,""));for(let t=0;t{if(t.trim()==="")return t;let o=t.match(/\{[^{}\r\n]*\}/g)||[],m=[],R=t;o.forEach((p,_)=>{let x=`@@C${_}@@`;m.push(p),R=R.replace(p,x)});let b=R.split(/("[^"\\]*(?:\\.[^"\\]*)*"?)/g).filter(p=>p!==""),O="";return b.forEach(p=>{if(p.startsWith('"')&&p.endsWith('"'))O+=p;else{let _=p.match(/^(\s*)(.*)$/);if(_){let x=_[1],z=_[2].replace(/ {2,}/g," ");O+=x+z}else O+=p.replace(/ {2,}/g," ")}}),m.forEach((p,_)=>{O=O.replace(`@@C${_}@@`,p)}),O}).join(E.CRLF)}function ue(r,i,l){let e="";if(r!==0){let s=l.ReplaceTabToSpaces!==!1,u=typeof l.IndentSize=="number"&&l.IndentSize>=1&&l.IndentSize<=10?l.IndentSize:4,C=s?" ".repeat(u):" ";for(let T=0;Tr===i)}function Ee(r,i){let l=K(r,i);l=V(l,i);let e=(i.allowedNumberOfEmptyLines||1)+1;if(i.RemoveEmptyLines){let C;i.EmptyLinesAlsoInComment?C=new RegExp(`(?![^{]*})(^[ ]*$\r? -){${e},}`,"gm"):C=new RegExp(`(^[ ]*$\r? -){${e},}`,"gm"),l=l.replace(C,E.CRLF)}let s=i.ReplaceTabToSpaces!==!1,u=typeof i.IndentSize=="number"&&i.IndentSize>=1&&i.IndentSize<=10?i.IndentSize:4;if(s){let C=/^\t+/gm;l=l.replace(C,T=>" ".repeat(T.length*u))}return l}});var Z=y(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.preFormat=pe;M.formatNestings=me;M.fullFormatPipeline=de;var G=X();function pe(r,i){return(0,G.preFormat)(r,i)}function me(r,i){return(0,G.formatNestings)(r,i)}function de(r,i){return(0,G.pureFormatPipeline)(r,i)}});var Y=y(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.info=a.config=void 0;a.formatTE=Ce;a.getConfig=Q;a.log=he;a.cloneArray=Se;var v=require("vscode"),I=require("vscode"),q=Z(),Re=D();a.config={};function Ce(r){a.config=Q();let i=I.window.activeTextEditor.document,l=we(r,i,a.config);return[v.TextEdit.replace(r,l)]}function we(r,i,l){let e,s=i.getText(r);s=(0,q.preFormat)(s,l),s=(0,q.formatNestings)(s,l);let u=(l.allowedNumberOfEmptyLines||1)+1;return l.RemoveEmptyLines&&(l.EmptyLinesAlsoInComment?e=new RegExp(`(?![^{]*})(^[ ]*$\r? -){${u},}`,"gm"):e=new RegExp(`(^[ ]*$\r? -){${u},}`,"gm"),s=s.replace(e,Re.CRLF)),s}function Q(){return a.config.debug=!1,a.config.debugToChannel=!0,a.config.allowedNumberOfEmptyLines=I.workspace.getConfiguration().get("VBI.formatter.EmptyLine.allowedNumberOfEmptyLines"),(a.config.allowedNumberOfEmptyLines<0||a.config.allowedNumberOfEmptyLines>50)&&(a.config.allowedNumberOfEmptyLines=1),a.config.RemoveEmptyLines=I.workspace.getConfiguration().get("VBI.formatter.EmptyLine.RemoveEmptyLines"),a.config.EmptyLinesAlsoInComment=I.workspace.getConfiguration().get("VBI.formatter.EmptyLine.EmptyLinesAlsoInComment"),a.config.BlockCodeBegin=I.workspace.getConfiguration().get("VBI.formatter.BC.BlockCodeBegin"),a.config.BlockCodeEnd=I.workspace.getConfiguration().get("VBI.formatter.BC.BlockCodeEnd"),a.config.BlockCodeExclude=I.workspace.getConfiguration().get("VBI.formatter.BC.BlockCodeExclude"),a.config.RegionBlockCodeBegin=I.workspace.getConfiguration().get("VBI.formatter.Region.BlockCodeBegin"),a.config.RegionBlockCodeEnd=I.workspace.getConfiguration().get("VBI.formatter.Region.BlockCodeEnd"),a.config.RegionBlockCodeExclude=I.workspace.getConfiguration().get("VBI.formatter.Region.BlockCodeExclude"),a.config.ReplaceTabToSpaces=I.workspace.getConfiguration().get("VBI.formatter.Misc.ReplaceTabToSpaces"),a.config.IndentSize=I.workspace.getConfiguration().get("VBI.formatter.Misc.IndentSize"),(typeof a.config.IndentSize!="number"||a.config.IndentSize<1||a.config.IndentSize>10)&&(a.config.IndentSize=4),typeof a.config.ReplaceTabToSpaces!="boolean"&&(a.config.ReplaceTabToSpaces=!0),console.log("getConfig():",a.config),a.config}a.info=v.window.createOutputChannel("VBI-Info");function he(r,...i){function l(e){switch(typeof e){case"undefined":return"undefined";case"object":let s="";for(let[u,C]of Object.entries(e))s+=`${u}: ${C} -`;return s;default:return e}}if(a.config.debug)if(a.config.debugToChannel)switch(r.toLowerCase()){case"info":i.map(s=>{a.info.appendLine("INFO:"+l(s))}),a.info.show();return;case"warn":i.map(s=>{a.info.appendLine("WARN:"+l(s))}),a.info.show();return;case"error":let e="";i.map(s=>{e+=l(s)}),a.info.appendLine(e),v.window.showErrorMessage(e),a.info.show();return;default:i.map(s=>{a.info.appendLine("INFO-Other:"+l(s))}),a.info.show();return}else switch(r.toLowerCase()){case"info":console.log("INFO:",i);return;case"warn":console.log("WARNING:",i);return;case"error":console.error("ERROR:",i);return;default:console.log("log:",r,i);return}else if(r.toLowerCase()==="error"){let e="";i.map(s=>{e+=l(s)}),console.error("ERROR:",i),v.window.showErrorMessage(e);return}}function Se(r){return[...r]}});Object.defineProperty(exports,"__esModule",{value:!0});exports.activate=_e;exports.deactivate=Te;var N=require("vscode"),J=Y();function _e(r){N.commands.registerCommand("vbi-format",()=>{let{activeTextEditor:i}=N.window;if(i){let{document:l}=i,e=new N.Position(0,0),s=new N.Position(l.lineCount-1,l.lineAt(l.lineCount-1).text.length),u=new N.Range(e,s);return(0,J.formatTE)(u)}}),N.languages.registerDocumentFormattingEditProvider({scheme:"file",language:"intouch"},{provideDocumentFormattingEdits(i){let{activeTextEditor:l}=N.window,e=new N.Position(0,0),s=new N.Position(i.lineCount-1,i.lineAt(i.lineCount-1).text.length),u=new N.Range(e,s);return(0,J.formatTE)(u)}})}function Te(){} +"use strict";var Ea=Object.defineProperty;var pb=Object.getOwnPropertyDescriptor;var gb=Object.getOwnPropertyNames;var mb=Object.prototype.hasOwnProperty;var Nh=(n,e,t)=>()=>{if(t)throw t[0];try{return n&&(e=n(n=0)),e}catch(r){throw t=[r],r}};var P=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},jh=(n,e)=>{for(var t in e)Ea(n,t,{get:e[t],enumerable:!0})},_b=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gb(e))!mb.call(n,i)&&i!==t&&Ea(n,i,{get:()=>e[i],enumerable:!(r=pb(e,i))||r.enumerable});return n};var Hs=n=>_b(Ea({},"__esModule",{value:!0}),n);var Ft=P(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.boolean=yb;jt.string=Fh;jt.number=vb;jt.error=bb;jt.func=Lh;jt.array=Ah;jt.stringArray=Cb;jt.typedArray=wb;jt.thenable=kh;jt.asPromise=Db;function yb(n){return n===!0||n===!1}function Fh(n){return typeof n=="string"||n instanceof String}function vb(n){return typeof n=="number"||n instanceof Number}function bb(n){return n instanceof Error}function Lh(n){return typeof n=="function"}function Ah(n){return Array.isArray(n)}function Cb(n){return Ah(n)&&n.every(e=>Fh(e))}function wb(n,e){return Array.isArray(n)&&n.every(e)}function kh(n){return n&&Lh(n.then)}function Db(n){return n instanceof Promise?n:kh(n)?new Promise((e,t)=>{n.then(r=>e(r),r=>t(r))}):Promise.resolve(n)}});var oi=P(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.boolean=Sb;In.string=$h;In.number=Pb;In.error=Rb;In.func=Tb;In.array=Hh;In.stringArray=Ob;function Sb(n){return n===!0||n===!1}function $h(n){return typeof n=="string"||n instanceof String}function Pb(n){return typeof n=="number"||n instanceof Number}function Rb(n){return n instanceof Error}function Tb(n){return typeof n=="function"}function Hh(n){return Array.isArray(n)}function Ob(n){return Hh(n)&&n.every(e=>$h(e))}});var ec=P(W=>{"use strict";var Eb=W&&W.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qb=W&&W.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Mb=W&&W.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.LRUCache=hr.LinkedMap=hr.Touch=void 0;var it;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(it||(hr.Touch=it={}));var Us=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let t=this._map.get(e);return t?t.previous?.value:void 0}after(e){let t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=it.None){let r=this._map.get(e);if(r)return t!==it.None&&this.touch(r,t),r.value}set(e,t,r=it.None){let i=this._map.get(e);if(i)i.value=t,r!==it.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case it.None:this.addItemLast(i);break;case it.First:this.addItemFirst(i);break;case it.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 new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==it.First&&t!==it.Last)){if(t===it.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===it.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};hr.LinkedMap=Us;var tc=class extends Us{_limit;_ratio;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=it.AsNew){return super.get(e,t)}peek(e){return super.get(e,it.None)}set(e,t){return super.set(e,t,it.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};hr.LRUCache=tc});var zh=P(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.Disposable=void 0;var Wh;(function(n){function e(t){return{dispose:t}}n.create=e})(Wh||(Ws.Disposable=Wh={}))});var pr=P(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var rc;function ic(){if(rc===void 0)throw new Error("No runtime abstraction layer installed");return rc}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");rc=t}n.install=e})(ic||(ic={}));sc.default=ic});var ai=P(gr=>{"use strict";var xb=gr&&gr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gr,"__esModule",{value:!0});gr.Emitter=gr.Event=void 0;var Ib=xb(pr()),Kh;(function(n){let e={dispose(){}};n.None=function(){return e}})(Kh||(gr.Event=Kh={}));var oc=class{_callbacks;_contexts;add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new oc),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};gr.Emitter=ac});var Bs=P(_t=>{"use strict";var Nb=_t&&_t.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jb=_t&&_t.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Fb=_t&&_t.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.SharedArrayReceiverStrategy=ci.SharedArraySenderStrategy=void 0;var Hb=Bs(),Bi;(function(n){n.Continue=0,n.Cancelled=1})(Bi||(Bi={}));var lc=class{buffers;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]=Bi.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,Bi.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};ci.SharedArraySenderStrategy=lc;var dc=class{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Bi.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fc=class{token;constructor(e){this.token=new dc(e)}cancel(){}dispose(){}},hc=class{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new Hb.CancellationTokenSource:new fc(t)}};ci.SharedArrayReceiverStrategy=hc});var gc=P(ui=>{"use strict";var Ub=ui&&ui.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ui,"__esModule",{value:!0});ui.Semaphore=void 0;var Wb=Ub(pr()),pc=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Wb.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};ui.Semaphore=pc});var Vh=P(st=>{"use strict";var zb=st&&st.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Kb=st&&st.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Bb=st&&st.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let s=parseInt(i);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_c.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))}};st.ReadableStreamMessageReader=vc});var Zh=P(ot=>{"use strict";var Xb=ot&&ot.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Jb=ot&&ot.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Qb=ot&&ot.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(eC,r.byteLength.toString(),Qh),i.push(Qh),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};ot.WriteableStreamMessageWriter=Cc});var ep=P(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.AbstractMessageBuffer=void 0;var tC=13,nC=10,rC=`\r +`,wc=class{_encoding;_chunks;_totalLength;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 t=0,r=0,i=0,s=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],o=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,o}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let s=this._chunks[i];if(s.byteLength>e){let o=s.slice(0,e);t.set(o,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else t.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return t}};Xs.AbstractMessageBuffer=wc});var ip=P(K=>{"use strict";var iC=K&&K.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sC=K&&K.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oC=K&&K.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{},warn:()=>{},info:()=>{},log:()=>{}});var ue;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(ue||(K.Trace=ue={}));var Tc;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(Tc||(K.TraceValue=Tc={}));K.TraceValues=Tc;(function(n){function e(r){if(!Me.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(ue||(K.Trace=ue={}));var St;(function(n){n.Text="text",n.JSON="json"})(St||(K.TraceFormat=St={}));(function(n){function e(t){return Me.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(St||(K.TraceFormat=St={}));var Oc;(function(n){n.type=new X.NotificationType("$/setTrace")})(Oc||(K.SetTraceNotification=Oc={}));var Js;(function(n){n.type=new X.NotificationType("$/logTrace")})(Js||(K.LogTraceNotification=Js={}));var Ji;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ji||(K.ConnectionErrors=Ji={}));var di=class n extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};K.ConnectionError=di;var Ec;(function(n){function e(t){let r=t;return r&&Me.func(r.cancelUndispatched)}n.is=e})(Ec||(K.ConnectionStrategy=Ec={}));var Qs;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(Qs||(K.IdCancellationReceiverStrategy=Qs={}));var qc;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(qc||(K.RequestCancellationReceiverStrategy=qc={}));var Ys;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Dc.CancellationTokenSource}});function e(t){return Qs.is(t)||qc.is(t)}n.is=e})(Ys||(K.CancellationReceiverStrategy=Ys={}));var Zs;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(Qi.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Me.func(r.sendCancellation)&&Me.func(r.cleanup)}n.is=e})(Zs||(K.CancellationSenderStrategy=Zs={}));var eo;(function(n){n.Message=Object.freeze({receiver:Ys.Message,sender:Zs.Message});function e(t){let r=t;return r&&Ys.is(r.receiver)&&Zs.is(r.sender)}n.is=e})(eo||(K.CancellationStrategy=eo={}));var to;(function(n){function e(t){let r=t;return r&&Me.func(r.handleMessage)}n.is=e})(to||(K.MessageStrategy=to={}));var rp;(function(n){function e(t){let r=t;return r&&(eo.is(r.cancellationStrategy)||Ec.is(r.connectionStrategy)||to.is(r.messageStrategy)||Me.number(r.maxParallelism))}n.is=e})(rp||(K.ConnectionOptions=rp={}));var Wt;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(Wt||(Wt={}));function cC(n,e,t,r){let i=t!==void 0?t:K.NullLogger,s=0,o=0,a=0,u="2.0",l=r?.maxParallelism??-1,f=0,p,h=new Map,g,_=new Map,v=new Map,R,q=new np.LinkedMap,w=new Map,M=new Set,j=new Map,F=ue.Off,oe=St.Text,te,Te=Wt.New,Pn=new Vi.Emitter,Qr=new Vi.Emitter,rr=new Vi.Emitter,Yr=new Vi.Emitter,Zr=new Vi.Emitter,Mt=r&&r.cancellationStrategy?r.cancellationStrategy:eo.Message;function Rn(y){}function xt(){return Te===Wt.Listening}function Tn(){return Te===Wt.Closed}function Ht(){return Te===Wt.Disposed}function Oe(){(Te===Wt.New||Te===Wt.Listening)&&(Te=Wt.Closed,Qr.fire(void 0))}function Ui(y){Pn.fire([y,void 0,void 0])}function Zt(y){Pn.fire(y)}n.onClose(Oe),n.onError(Ui),e.onClose(Oe),e.onError(Zt);function ir(y){if(y===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}function ei(y){return y===null?"res-unknown-"+(++a).toString():"res-"+y.toString()}function Mr(){return"not-"+(++o).toString()}function en(y,E){X.Message.isRequest(E)?y.set(ir(E.id),E):X.Message.isResponse(E)?l===-1?y.set(ei(E.id),E):ar(E):y.set(Mr(),E)}function xr(){R||q.size===0||l!==-1&&f>=l||(R=(0,tp.default)().timer.setImmediate(async()=>{if(R=void 0,q.size===0||l!==-1&&f>=l)return;let y=q.shift(),E;try{f++;let I=r?.messageStrategy;to.is(I)?E=I.handleMessage(y,ti):E=ti(y)}catch(I){i.error(`Processing message queue failed: ${I.toString()}`)}finally{E instanceof Promise?E.then(()=>{f--,xr()}).catch(I=>{i.error(`Processing message queue failed: ${I.toString()}`)}):f--,xr()}}))}async function ti(y){return X.Message.isRequest(y)?or(y):X.Message.isNotification(y)?Wi(y):X.Message.isResponse(y)?ar(y):ni(y)}let sr=y=>{try{if(X.Message.isNotification(y)&&y.method===Qi.type.method){let E=y.params.id,I=ir(E),H=q.get(I);if(X.Message.isRequest(H)){let ae=r?.connectionStrategy,ie=ae&&ae.cancelUndispatched?ae.cancelUndispatched(H,Rn):void 0;if(ie&&(ie.error!==void 0||ie.result!==void 0)){q.delete(I),j.delete(E),ie.id=H.id,cr(ie,y.method,Date.now()),e.write(ie).catch(()=>i.error("Sending response for canceled message failed."));return}}let Z=j.get(E);if(Z!==void 0){Z.cancel(),On(y);return}else M.add(E)}en(q,y)}finally{xr()}};async function or(y){if(Ht())return Promise.resolve();function E(Ee,ke,pe){let ye={jsonrpc:u,id:y.id};return Ee instanceof X.ResponseError?ye.error=Ee.toJson():ye.result=Ee===void 0?null:Ee,cr(ye,ke,pe),e.write(ye)}function I(Ee,ke,pe){let ye={jsonrpc:u,id:y.id,error:Ee.toJson()};return cr(ye,ke,pe),e.write(ye)}ur(y);let H=h.get(y.method),Z,ae;H&&(Z=H.type,ae=H.handler);let ie=Date.now();if(ae||p){let Ee=y.id??String(Date.now()),ke=Qs.is(Mt.receiver)?Mt.receiver.createCancellationTokenSource(Ee):Mt.receiver.createCancellationTokenSource(y);y.id!==null&&M.has(y.id)&&ke.cancel(),y.id!==null&&j.set(Ee,ke);try{let pe;if(ae)if(y.params===void 0){if(Z!==void 0&&Z.numberOfParams!==0)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines ${Z.numberOfParams} params but received none.`),y.method,ie);pe=ae(ke.token)}else if(Array.isArray(y.params)){if(Z!==void 0&&Z.parameterStructures===X.ParameterStructures.byName)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,ie);pe=ae(...y.params,ke.token)}else{if(Z!==void 0&&Z.parameterStructures===X.ParameterStructures.byPosition)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,ie);pe=ae(y.params,ke.token)}else p&&(pe=p(y.method,y.params,ke.token));let ye=await pe;await E(ye,y.method,ie)}catch(pe){pe instanceof X.ResponseError?await E(pe,y.method,ie):pe&&Me.string(pe.message)?await I(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${pe.message}`),y.method,ie):await I(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,ie)}finally{j.delete(Ee)}}else await I(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,ie)}function ar(y){if(!Ht())if(y.id===null)y.error?i.error(`Received response message without id: Error is: +${JSON.stringify(y.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let E=y.id,I=w.get(E);if(ri(y,I),I!==void 0){w.delete(E);try{if(y.error){let H=y.error;I.reject(new X.ResponseError(H.code,H.message,H.data))}else if(y.result!==void 0)I.resolve(y.result);else throw new Error("Should never happen.")}catch(H){H.message?i.error(`Response handler '${I.method}' failed with message: ${H.message}`):i.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}async function Wi(y){if(Ht())return;let E,I;if(y.method===Qi.type.method){let H=y.params.id;M.delete(H),On(y);return}else{let H=_.get(y.method);H&&(I=H.handler,E=H.type)}if(I||g)try{if(On(y),I)if(y.params===void 0)E!==void 0&&E.numberOfParams!==0&&E.parameterStructures!==X.ParameterStructures.byName&&i.error(`Notification ${y.method} defines ${E.numberOfParams} params but received none.`),await I();else if(Array.isArray(y.params)){let H=y.params;y.method===Xi.type.method&&H.length===2&&Sc.is(H[0])?await I({token:H[0],value:H[1]}):(E!==void 0&&(E.parameterStructures===X.ParameterStructures.byName&&i.error(`Notification ${y.method} defines parameters by name but received parameters by position`),E.numberOfParams!==y.params.length&&i.error(`Notification ${y.method} defines ${E.numberOfParams} params but received ${H.length} arguments`)),await I(...H))}else E!==void 0&&E.parameterStructures===X.ParameterStructures.byPosition&&i.error(`Notification ${y.method} defines parameters by position but received parameters by name`),await I(y.params);else g&&await g(y.method,y.params)}catch(H){H.message?i.error(`Notification handler '${y.method}' failed with message: ${H.message}`):i.error(`Notification handler '${y.method}' failed unexpectedly.`)}else rr.fire(y)}function ni(y){if(!y){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(y,null,4)}`);let E=y;if(Me.string(E.id)||Me.number(E.id)){let I=E.id,H=w.get(I);H&&H.reject(new Error("The received response has neither a result nor an error property."))}}function wt(y){if(y!=null)switch(F){case ue.Verbose:return JSON.stringify(y,null,4);case ue.Compact:return JSON.stringify(y);default:return}}function zi(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&y.params&&(E=`Params: ${wt(y.params)}`),te.log(`Sending request '${y.method} - (${y.id})'.`,E)}else tt("send-request",y)}function tn(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&(y.params?E=`Params: ${wt(y.params)}`:E="No parameters provided."),te.log(`Sending notification '${y.method}'.`,E)}else tt("send-notification",y)}function cr(y,E,I){if(!(F===ue.Off||!te))if(oe===St.Text){let H;(F===ue.Verbose||F===ue.Compact)&&(y.error&&y.error.data?H=`Error data: ${wt(y.error.data)}`:y.result?H=`Result: ${wt(y.result)}`:y.error===void 0&&(H="No result returned.")),te.log(`Sending response '${E} - (${y.id})'. Processing request took ${Date.now()-I}ms`,H)}else tt("send-response",y)}function ur(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&y.params&&(E=`Params: ${wt(y.params)}`),te.log(`Received request '${y.method} - (${y.id})'.`,E)}else tt("receive-request",y)}function On(y){if(!(F===ue.Off||!te||y.method===Js.type.method))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&(y.params?E=`Params: ${wt(y.params)}`:E="No parameters provided."),te.log(`Received notification '${y.method}'.`,E)}else tt("receive-notification",y)}function ri(y,E){if(!(F===ue.Off||!te))if(oe===St.Text){let I;if((F===ue.Verbose||F===ue.Compact)&&(y.error&&y.error.data?I=`Error data: ${wt(y.error.data)}`:y.result?I=`Result: ${wt(y.result)}`:y.error===void 0&&(I="No result returned.")),E){let H=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";te.log(`Received response '${E.method} - (${y.id})' in ${Date.now()-E.timerStart}ms.${H}`,I)}else te.log(`Received response ${y.id} without active response promise.`,I)}else tt("receive-response",y)}function tt(y,E){if(!te||F===ue.Off)return;let I={isLSPMessage:!0,type:y,message:E,timestamp:Date.now()};te.log(I)}function Ut(){if(Tn())throw new di(Ji.Closed,"Connection is closed.");if(Ht())throw new di(Ji.Disposed,"Connection is disposed.")}function nt(){if(xt())throw new di(Ji.AlreadyListening,"Connection is already listening")}function Ki(){if(!xt())throw new Error("Call listen() first.")}function Ye(y){return y===void 0?null:y}function En(y){if(y!==null)return y}function ii(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}function Ir(y,E){switch(y){case X.ParameterStructures.auto:return ii(E)?En(E):[Ye(E)];case X.ParameterStructures.byName:if(!ii(E))throw new Error("Received parameters by name but param is not an object literal.");return En(E);case X.ParameterStructures.byPosition:return[Ye(E)];default:throw new Error(`Unknown parameter structure ${y.toString()}`)}}function lr(y,E){let I,H=y.numberOfParams;switch(H){case 0:I=void 0;break;case 1:I=Ir(y.parameterStructures,E[0]);break;default:I=[];for(let Z=0;Z{Ut();let I,H;if(Me.string(y)){I=y;let ae=E[0],ie=0,Ee=X.ParameterStructures.auto;X.ParameterStructures.is(ae)&&(ie=1,Ee=ae);let ke=E.length,pe=ke-ie;switch(pe){case 0:H=void 0;break;case 1:H=Ir(Ee,E[ie]);break;default:if(Ee===X.ParameterStructures.byName)throw new Error(`Received ${pe} parameters for 'by Name' notification parameter structure.`);H=E.slice(ie,ke).map(ye=>Ye(ye));break}}else{let ae=E;I=y.method,H=lr(y,ae)}let Z={jsonrpc:u,method:I,params:H};return tn(Z),e.write(Z).catch(ae=>{throw i.error("Sending notification failed."),ae})},onNotification:(y,E)=>{Ut();let I;return Me.func(y)?g=y:E&&(Me.string(y)?(I=y,_.set(y,{type:void 0,handler:E})):(I=y.method,_.set(y.method,{type:y,handler:E}))),{dispose:()=>{I!==void 0?_.get(I)?.handler===E&&_.delete(I):g===y&&(g=void 0)}}},onProgress:(y,E,I)=>{if(v.has(E))throw new Error(`Progress handler for token ${E} already registered`);return v.set(E,I),{dispose:()=>{v.get(E)===I&&v.delete(E)}}},sendProgress:(y,E,I)=>It.sendNotification(Xi.type,{token:E,value:I}),onUnhandledProgress:Yr.event,sendRequest:(y,...E)=>{Ut(),Ki();function I(ye,rt){let pt=Mt.sender.sendCancellation(ye,rt);pt===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${rt}`):pt.catch(()=>{i.log(`Sending cancellation messages for id ${rt} failed.`)})}let H,Z,ae;if(Me.string(y)){H=y;let ye=E[0],rt=E[E.length-1],pt=0,qn=X.ParameterStructures.auto;X.ParameterStructures.is(ye)&&(pt=1,qn=ye);let Dt=E.length;Dc.CancellationToken.is(rt)&&(Dt=Dt-1,ae=rt);let gt=Dt-pt;switch(gt){case 0:Z=void 0;break;case 1:Z=Ir(qn,E[pt]);break;default:if(qn===X.ParameterStructures.byName)throw new Error(`Received ${gt} parameters for 'by Name' request parameter structure.`);Z=E.slice(pt,Dt).map(si=>Ye(si));break}}else{let ye=E;H=y.method,Z=lr(y,ye);let rt=y.numberOfParams;ae=Dc.CancellationToken.is(ye[rt])?ye[rt]:void 0}let ie=s++,Ee,ke=!1;ae!==void 0&&(ae.isCancellationRequested?ke=!0:Ee=ae.onCancellationRequested(()=>{I(It,ie)}));let pe={jsonrpc:u,id:ie,method:H,params:Z};return zi(pe),typeof Mt.sender.enableCancellation=="function"&&Mt.sender.enableCancellation(pe),new Promise(async(ye,rt)=>{let pt=gt=>{ye(gt),Mt.sender.cleanup(ie),Ee?.dispose()},qn=gt=>{rt(gt),Mt.sender.cleanup(ie),Ee?.dispose()},Dt={method:H,timerStart:Date.now(),resolve:pt,reject:qn};try{w.set(ie,Dt),await e.write(pe),ke&&I(It,ie)}catch(gt){throw w.delete(ie),Dt.reject(new X.ResponseError(X.ErrorCodes.MessageWriteError,gt.message?gt.message:"Unknown reason")),i.error("Sending request failed."),gt}})},onRequest:(y,E)=>{Ut();let I=null;return Rc.is(y)?(I=void 0,p=y):Me.string(y)?(I=null,E!==void 0&&(I=y,h.set(y,{handler:E,type:void 0}))):E!==void 0&&(I=y.method,h.set(y.method,{type:y,handler:E})),{dispose:()=>{I!==null&&(I!==void 0?h.get(I)?.handler===E&&h.delete(I):p===y&&(p=void 0))}}},hasPendingResponse:()=>w.size>0,trace:async(y,E,I)=>{let H=!1,Z=St.Text;I!==void 0&&(Me.boolean(I)?H=I:(H=I.sendNotification||!1,Z=I.traceFormat||St.Text)),F=y,oe=Z,F===ue.Off?te=void 0:te=E,H&&!Tn()&&!Ht()&&await It.sendNotification(Oc.type,{value:ue.toString(y)})},onError:Pn.event,onClose:Qr.event,onUnhandledNotification:rr.event,onDispose:Zr.event,end:()=>{e.end()},dispose:()=>{if(Ht())return;Te=Wt.Disposed,Zr.fire(void 0);let y=new X.ResponseError(X.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let E of w.values())E.reject(y);w=new Map,j=new Map,M=new Set,q=new np.LinkedMap,Me.func(e.dispose)&&e.dispose(),Me.func(n.dispose)&&n.dispose()},listen:()=>{Ut(),nt(),Te=Wt.Listening,n.listen(sr)},inspect:()=>{(0,tp.default)().console.log("inspect")}};return It.onNotification(Js.type,y=>{if(F===ue.Off||!te)return;let E=F===ue.Verbose||F===ue.Compact;te.log(y.message,E?y.verbose:void 0)}),It.onNotification(Xi.type,async y=>{let E=v.get(y.token);E?await E(y.value):Yr.fire(y)}),It}});var Nn=P(S=>{"use strict";var uC=S&&S.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(S,"__esModule",{value:!0});S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.AbstractMessageBuffer=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.SharedArrayReceiverStrategy=S.SharedArraySenderStrategy=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.MessageStrategy=S.CancellationStrategy=S.CancellationSenderStrategy=S.RequestCancellationReceiverStrategy=S.IdCancellationReceiverStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=S.SetTraceNotification=S.TraceFormat=S.TraceValues=S.TraceValue=S.Trace=void 0;var ve=ec();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return ve.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return ve.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return ve.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return ve.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return ve.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return ve.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return ve.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return ve.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return ve.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return ve.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return ve.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return ve.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return ve.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return ve.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return ve.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return ve.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return ve.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return ve.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return ve.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return ve.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return ve.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return ve.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return ve.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return ve.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return ve.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return ve.ParameterStructures}});var Mc=nc();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return Mc.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return Mc.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return Mc.Touch}});var lC=zh();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return lC.Disposable}});var sp=ai();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return sp.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return sp.Emitter}});var op=Bs();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return op.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return op.CancellationToken}});var ap=Bh();Object.defineProperty(S,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return ap.SharedArraySenderStrategy}});Object.defineProperty(S,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return ap.SharedArrayReceiverStrategy}});var xc=Vh();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return xc.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return xc.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return xc.ReadableStreamMessageReader}});var Ic=Zh();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return Ic.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ic.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ic.WriteableStreamMessageWriter}});var dC=ep();Object.defineProperty(S,"AbstractMessageBuffer",{enumerable:!0,get:function(){return dC.AbstractMessageBuffer}});var He=ip();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return He.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return He.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return He.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return He.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return He.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return He.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return He.Trace}});Object.defineProperty(S,"TraceValue",{enumerable:!0,get:function(){return He.TraceValue}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return He.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return He.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return He.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return He.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return He.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return He.CancellationReceiverStrategy}});Object.defineProperty(S,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return He.IdCancellationReceiverStrategy}});Object.defineProperty(S,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return He.RequestCancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return He.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return He.CancellationStrategy}});Object.defineProperty(S,"MessageStrategy",{enumerable:!0,get:function(){return He.MessageStrategy}});Object.defineProperty(S,"TraceValues",{enumerable:!0,get:function(){return He.TraceValues}});var fC=uC(pr());S.RAL=fC.default});var ho={};jh(ho,{AnnotatedTextEdit:()=>jn,ApplyKind:()=>tu,ChangeAnnotation:()=>mr,ChangeAnnotationIdentifier:()=>Be,CodeAction:()=>_u,CodeActionContext:()=>mu,CodeActionKind:()=>gu,CodeActionTag:()=>co,CodeActionTriggerKind:()=>is,CodeDescription:()=>Wc,CodeLens:()=>yu,Color:()=>ro,ColorInformation:()=>Lc,ColorPresentation:()=>Ac,Command:()=>jr,CompletionItem:()=>ru,CompletionItemKind:()=>Jc,CompletionItemLabelDetails:()=>nu,CompletionItemTag:()=>Yc,CompletionList:()=>iu,CreateFile:()=>hi,DeleteFile:()=>gi,Diagnostic:()=>es,DiagnosticRelatedInformation:()=>io,DiagnosticSeverity:()=>Hc,DiagnosticTag:()=>Uc,DocumentHighlight:()=>uu,DocumentHighlightKind:()=>cu,DocumentLink:()=>bu,DocumentSymbol:()=>pu,DocumentUri:()=>Nc,EOL:()=>hC,FoldingRange:()=>$c,FoldingRangeKind:()=>kc,FormattingOptions:()=>vu,Hover:()=>su,InlayHint:()=>Eu,InlayHintKind:()=>uo,InlayHintLabelPart:()=>lo,InlineCompletionContext:()=>Nu,InlineCompletionItem:()=>qu,InlineCompletionList:()=>Mu,InlineCompletionTriggerKind:()=>xu,InlineValueContext:()=>Ou,InlineValueEvaluatableExpression:()=>Tu,InlineValueText:()=>Pu,InlineValueVariableLookup:()=>Ru,InsertReplaceEdit:()=>Zc,InsertTextFormat:()=>Qc,InsertTextMode:()=>eu,LanguageKind:()=>Vc,Location:()=>Zi,LocationLink:()=>Fc,MarkedString:()=>rs,MarkupContent:()=>_r,MarkupKind:()=>ao,OptionalVersionedTextDocumentIdentifier:()=>ns,ParameterInformation:()=>ou,Position:()=>Lt,Range:()=>xe,RenameFile:()=>pi,SelectedCompletionInfo:()=>Iu,SelectionRange:()=>Cu,SemanticTokenModifiers:()=>Du,SemanticTokenTypes:()=>wu,SemanticTokens:()=>Su,SignatureInformation:()=>au,SnippetTextEdit:()=>zc,StringValue:()=>fo,SymbolInformation:()=>fu,SymbolKind:()=>lu,SymbolTag:()=>du,TextDocument:()=>Fu,TextDocumentEdit:()=>ts,TextDocumentIdentifier:()=>Bc,TextDocumentItem:()=>Xc,TextEdit:()=>nn,URI:()=>no,VersionedTextDocumentIdentifier:()=>Gc,WorkspaceChange:()=>Kc,WorkspaceEdit:()=>so,WorkspaceFolder:()=>ju,WorkspaceSymbol:()=>hu,integer:()=>jc,uinteger:()=>Yi});var Nc,no,jc,Yi,Lt,xe,Zi,Fc,ro,Lc,Ac,kc,$c,io,Hc,Uc,Wc,es,jr,nn,mr,Be,jn,ts,hi,pi,gi,so,fi,zc,oo,Kc,Bc,Gc,ns,Vc,Xc,ao,_r,Jc,Qc,Yc,Zc,eu,tu,nu,ru,iu,rs,su,ou,au,cu,uu,lu,du,fu,hu,pu,gu,is,mu,co,_u,yu,vu,bu,Cu,wu,Du,Su,Pu,Ru,Tu,Ou,uo,lo,Eu,fo,qu,Mu,xu,Iu,Nu,ju,hC,Fu,Lu,C,po=Nh(()=>{"use strict";(function(n){function e(t){return typeof t=="string"}n.is=e})(Nc||(Nc={}));(function(n){function e(t){return typeof t=="string"}n.is=e})(no||(no={}));(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(jc||(jc={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Yi||(Yi={}));(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Yi.MAX_VALUE),i===Number.MAX_VALUE&&(i=Yi.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}n.is=t})(Lt||(Lt={}));(function(n){function e(r,i,s,o){if(C.uinteger(r)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(o))return{start:Lt.create(r,i),end:Lt.create(s,o)};if(Lt.is(r)&&Lt.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Lt.is(i.start)&&Lt.is(i.end)}n.is=t})(xe||(xe={}));(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}n.is=t})(Zi||(Zi={}));(function(n){function e(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.targetRange)&&C.string(i.targetUri)&&xe.is(i.targetSelectionRange)&&(xe.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}n.is=t})(Fc||(Fc={}));(function(n){function e(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}n.is=t})(ro||(ro={}));(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&ro.is(i.color)}n.is=t})(Lc||(Lc={}));(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.undefined(i.textEdit)||nn.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,nn.is))}n.is=t})(Ac||(Ac={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(kc||(kc={}));(function(n){function e(r,i,s,o,a,u){let l={startLine:r,endLine:i};return C.defined(s)&&(l.startCharacter=s),C.defined(o)&&(l.endCharacter=o),C.defined(a)&&(l.kind=a),C.defined(u)&&(l.collapsedText=u),l}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}n.is=t})($c||($c={}));(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&Zi.is(i.location)&&C.string(i.message)}n.is=t})(io||(io={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Hc||(Hc={}));(function(n){n.Unnecessary=1,n.Deprecated=2})(Uc||(Uc={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&C.string(r.href)}n.is=e})(Wc||(Wc={}));(function(n){function e(s,o,a,u,l,f){let p={range:s,message:o};return C.defined(a)&&(p.severity=a),C.defined(u)&&(p.code=u),C.defined(l)&&(p.source=l),C.defined(f)&&(p.relatedInformation=f),p}n.create=e;function t(s){var o;let a=s;return C.defined(a)&&xe.is(a.range)&&(C.string(a.message)||_r.is(a.message))&&(C.number(a.severity)||C.undefined(a.severity))&&(C.integer(a.code)||C.string(a.code)||C.undefined(a.code))&&(C.undefined(a.codeDescription)||C.string((o=a.codeDescription)===null||o===void 0?void 0:o.href))&&(C.string(a.source)||C.undefined(a.source))&&(C.undefined(a.relatedInformation)||C.typedArray(a.relatedInformation,io.is))}n.is=t;function r(s){return C.string(s.message)}n.is3_17=r;function i(s){if(C.string(s.message))return s.message;if(_r.is(s.message))return s.message.value;throw new Error(`Unknown message type ${typeof s.message}`)}n.getMessageString=i})(es||(es={}));(function(n){function e(r,i,...s){let o={title:r,command:i};return C.defined(s)&&s.length>0&&(o.arguments=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.title)&&(i.tooltip===void 0||C.string(i.tooltip))&&C.string(i.command)}n.is=t})(jr||(jr={}));(function(n){function e(s,o){return{range:s,newText:o}}n.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){let o=s;return C.objectLiteral(o)&&C.string(o.newText)&&xe.is(o.range)}n.is=i})(nn||(nn={}));(function(n){function e(r,i,s){let o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}n.is=t})(mr||(mr={}));(function(n){function e(t){let r=t;return C.string(r)}n.is=e})(Be||(Be={}));(function(n){function e(s,o,a){return{range:s,newText:o,annotationId:a}}n.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}n.insert=t;function r(s,o){return{range:s,newText:"",annotationId:o}}n.del=r;function i(s){let o=s;return nn.is(o)&&(mr.is(o.annotationId)||Be.is(o.annotationId))}n.is=i})(jn||(jn={}));(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&ns.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(ts||(ts={}));(function(n){function e(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(hi||(hi={}));(function(n){function e(r,i,s,o){let a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(pi||(pi={}));(function(n){function e(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(gi||(gi={}));(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>C.string(i.kind)?hi.is(i)||pi.is(i)||gi.is(i):ts.is(i)))}n.is=e})(so||(so={}));fi=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,s;if(r===void 0?i=nn.insert(e,t):Be.is(r)?(s=r,i=jn.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=jn.insert(e,t,s)),this.edits.push(i),s!==void 0)return s}replace(e,t,r){let i,s;if(r===void 0?i=nn.replace(e,t):Be.is(r)?(s=r,i=jn.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=jn.replace(e,t,s)),this.edits.push(i),s!==void 0)return s}delete(e,t){let r,i;if(t===void 0?r=nn.del(e):Be.is(t)?(i=t,r=jn.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=jn.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(n){function e(t){let r=t;return C.objectLiteral(r)&&xe.is(r.range)&&fo.isSnippet(r.snippet)&&(r.annotationId===void 0||mr.is(r.annotationId)||Be.is(r.annotationId))}n.is=e})(zc||(zc={}));oo=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Be.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Kc=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new oo(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(ts.is(t)){let r=new fi(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new fi(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(ns.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let i=[],s={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(s),r=new fi(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new fi(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new oo,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mr.is(t)||Be.is(t)?i=t:r=t;let s,o;if(i===void 0?s=hi.create(e,r):(o=Be.is(i)?i:this._changeAnnotations.manage(i),s=hi.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}renameFile(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;mr.is(r)||Be.is(r)?s=r:i=r;let o,a;if(s===void 0?o=pi.create(e,t,i):(a=Be.is(s)?s:this._changeAnnotations.manage(s),o=pi.create(e,t,i,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mr.is(t)||Be.is(t)?i=t:r=t;let s,o;if(i===void 0?s=gi.create(e,r):(o=Be.is(i)?i:this._changeAnnotations.manage(i),s=gi.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}};(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)}n.is=t})(Bc||(Bc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}n.is=t})(Gc||(Gc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}n.is=t})(ns||(ns={}));(function(n){n.ABAP="abap",n.WindowsBat="bat",n.BibTeX="bibtex",n.Clojure="clojure",n.Coffeescript="coffeescript",n.C="c",n.CPP="cpp",n.CSharp="csharp",n.CSS="css",n.D="d",n.Delphi="pascal",n.Diff="diff",n.Dart="dart",n.Dockerfile="dockerfile",n.Elixir="elixir",n.Erlang="erlang",n.FSharp="fsharp",n.GitCommit="git-commit",n.GitRebase="git-rebase",n.Go="go",n.Groovy="groovy",n.Handlebars="handlebars",n.Haskell="haskell",n.HTML="html",n.Ini="ini",n.Java="java",n.JavaScript="javascript",n.JavaScriptReact="javascriptreact",n.JSON="json",n.LaTeX="latex",n.Less="less",n.Lua="lua",n.Makefile="makefile",n.Markdown="markdown",n.ObjectiveC="objective-c",n.ObjectiveCPP="objective-cpp",n.Pascal="pascal",n.Perl="perl",n.Perl6="perl6",n.PHP="php",n.Plaintext="plaintext",n.Powershell="powershell",n.Pug="jade",n.Python="python",n.R="r",n.Razor="razor",n.Ruby="ruby",n.Rust="rust",n.SCSS="scss",n.SASS="sass",n.Scala="scala",n.ShaderLab="shaderlab",n.ShellScript="shellscript",n.SQL="sql",n.Swift="swift",n.TypeScript="typescript",n.TypeScriptReact="typescriptreact",n.TeX="tex",n.VisualBasic="vb",n.XML="xml",n.XSL="xsl",n.YAML="yaml"})(Vc||(Vc={}));(function(n){function e(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}n.is=t})(Xc||(Xc={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){let r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(ao||(ao={}));(function(n){function e(t){let r=t;return C.objectLiteral(t)&&ao.is(r.kind)&&C.string(r.value)}n.is=e})(_r||(_r={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(Jc||(Jc={}));(function(n){n.PlainText=1,n.Snippet=2})(Qc||(Qc={}));(function(n){n.Deprecated=1})(Yc||(Yc={}));(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){let i=r;return i&&C.string(i.newText)&&xe.is(i.insert)&&xe.is(i.replace)}n.is=t})(Zc||(Zc={}));(function(n){n.asIs=1,n.adjustIndentation=2})(eu||(eu={}));(function(n){n.Replace=1,n.Merge=2})(tu||(tu={}));(function(n){function e(t){let r=t;return r&&(C.string(r.detail)||r.detail===void 0)&&(C.string(r.description)||r.description===void 0)}n.is=e})(nu||(nu={}));(function(n){function e(t){return{label:t}}n.create=e})(ru||(ru={}));(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(iu||(iu={}));(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){let i=r;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}n.is=t})(rs||(rs={}));(function(n){function e(t){let r=t;return!!r&&C.objectLiteral(r)&&(_r.is(r.contents)||rs.is(r.contents)||C.typedArray(r.contents,rs.is))&&(t.range===void 0||xe.is(t.range))}n.is=e})(su||(su={}));(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(ou||(ou={}));(function(n){function e(t,r,...i){let s={label:t};return C.defined(r)&&(s.documentation=r),C.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(au||(au={}));(function(n){n.Text=1,n.Read=2,n.Write=3})(cu||(cu={}));(function(n){function e(t,r){let i={range:t};return C.number(r)&&(i.kind=r),i}n.create=e})(uu||(uu={}));(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(lu||(lu={}));(function(n){n.Deprecated=1})(du||(du={}));(function(n){function e(t,r,i,s,o){let a={name:t,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}n.create=e})(fu||(fu={}));(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(hu||(hu={}));(function(n){function e(r,i,s,o,a,u){let l={name:r,detail:i,kind:s,range:o,selectionRange:a};return u!==void 0&&(l.children=u),l}n.create=e;function t(r){let i=r;return i&&C.string(i.name)&&C.number(i.kind)&&xe.is(i.range)&&xe.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(pu||(pu={}));(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorMove="refactor.move",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll",n.Notebook="notebook"})(gu||(gu={}));(function(n){n.Invoked=1,n.Automatic=2})(is||(is={}));(function(n){function e(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.typedArray(i.diagnostics,es.is)&&(i.only===void 0||C.typedArray(i.only,C.string))&&(i.triggerKind===void 0||i.triggerKind===is.Invoked||i.triggerKind===is.Automatic)}n.is=t})(mu||(mu={}));(function(n){n.LLMGenerated=1;function e(t){return C.defined(t)&&t===n.LLMGenerated}n.is=e})(co||(co={}));(function(n){function e(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):jr.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,es.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||jr.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||so.is(i.edit))&&(i.tags===void 0||C.typedArray(i.tags,co.is))}n.is=t})(_u||(_u={}));(function(n){function e(r,i){let s={range:r};return C.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(i.range)&&(C.undefined(i.command)||jr.is(i.command))}n.is=t})(yu||(yu={}));(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}n.is=t})(vu||(vu={}));(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}n.is=t})(bu||(bu={}));(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Cu||(Cu={}));(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator",n.label="label"})(wu||(wu={}));(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Du||(Du={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(Su||(Su={}));(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&C.string(i.text)}n.is=t})(Pu||(Pu={}));(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&C.boolean(i.caseSensitiveLookup)&&(C.string(i.variableName)||i.variableName===void 0)}n.is=t})(Ru||(Ru={}));(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&(C.string(i.expression)||i.expression===void 0)}n.is=t})(Tu||(Tu={}));(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(r.stoppedLocation)}n.is=t})(Ou||(Ou={}));(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(uo||(uo={}));(function(n){function e(r){return{value:r}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&(i.tooltip===void 0||C.string(i.tooltip)||_r.is(i.tooltip))&&(i.location===void 0||Zi.is(i.location))&&(i.command===void 0||jr.is(i.command))}n.is=t})(lo||(lo={}));(function(n){function e(r,i,s){let o={position:r,label:i};return s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Lt.is(i.position)&&(C.string(i.label)||C.typedArray(i.label,lo.is))&&(i.kind===void 0||uo.is(i.kind))&&i.textEdits===void 0||C.typedArray(i.textEdits,nn.is)&&(i.tooltip===void 0||C.string(i.tooltip)||_r.is(i.tooltip))&&(i.paddingLeft===void 0||C.boolean(i.paddingLeft))&&(i.paddingRight===void 0||C.boolean(i.paddingRight))}n.is=t})(Eu||(Eu={}));(function(n){function e(r){return{kind:"snippet",value:r}}n.createSnippet=e;function t(r){let i=r;return C.objectLiteral(i)&&i.kind==="snippet"&&C.string(i.value)}n.isSnippet=t})(fo||(fo={}));(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(qu||(qu={}));(function(n){function e(t){return{items:t}}n.create=e})(Mu||(Mu={}));(function(n){n.Invoked=1,n.Automatic=2})(xu||(xu={}));(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(Iu||(Iu={}));(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(Nu||(Nu={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&no.is(r.uri)&&C.string(r.name)}n.is=e})(ju||(ju={}));hC=[` +`,`\r +`,"\r"];(function(n){function e(s,o,a,u){return new Lu(s,o,a,u)}n.create=e;function t(s){let o=s;return!!(C.defined(o)&&C.string(o.uri)&&(C.undefined(o.languageId)||C.string(o.languageId))&&C.uinteger(o.lineCount)&&C.func(o.getText)&&C.func(o.positionAt)&&C.func(o.offsetAt))}n.is=t;function r(s,o){let a=s.getText(),u=i(o,(f,p)=>{let h=f.range.start.line-p.range.start.line;return h===0?f.range.start.character-p.range.start.character:h}),l=a.length;for(let f=u.length-1;f>=0;f--){let p=u[f],h=s.offsetAt(p.range.start),g=s.offsetAt(p.range.end);if(g<=l)a=a.substring(0,h)+p.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");l=h}return a}n.applyEdits=r;function i(s,o){if(s.length<=1)return s;let a=s.length/2|0,u=s.slice(0,a),l=s.slice(a);i(u,o),i(l,o);let f=0,p=0,h=0;for(;f0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return Lt.create(0,e);for(;re?i=o:r=o+1}let s=r-1;return Lt.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(g){return g===!0||g===!1}n.boolean=i;function s(g){return e.call(g)==="[object String]"}n.string=s;function o(g){return e.call(g)==="[object Number]"}n.number=o;function a(g,_,v){return e.call(g)==="[object Number]"&&_<=g&&g<=v}n.numberRange=a;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}n.integer=u;function l(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}n.uinteger=l;function f(g){return e.call(g)==="[object Function]"}n.func=f;function p(g){return g!==null&&typeof g=="object"}n.objectLiteral=p;function h(g,_){return Array.isArray(g)&&g.every(_)}n.typedArray=h})(C||(C={}))});var Ce=P(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.CM=at.ProtocolNotificationType=at.ProtocolNotificationType0=at.ProtocolRequestType=at.ProtocolRequestType0=at.RegistrationType=at.MessageDirection=void 0;var mi=Nn(),cp;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(cp||(at.MessageDirection=cp={}));var Au=class{____;method;constructor(e){this.method=e}};at.RegistrationType=Au;var ku=class extends mi.RequestType0{__;___;____;_pr;constructor(e){super(e)}};at.ProtocolRequestType0=ku;var $u=class extends mi.RequestType{__;___;____;_pr;constructor(e){super(e,mi.ParameterStructures.byName)}};at.ProtocolRequestType=$u;var Hu=class extends mi.NotificationType0{___;____;constructor(e){super(e)}};at.ProtocolNotificationType0=Hu;var Uu=class extends mi.NotificationType{___;____;constructor(e){super(e,mi.ParameterStructures.byName)}};at.ProtocolNotificationType=Uu;var up;(function(n){function e(t,r){return{client:t,server:r}}n.create=e})(up||(at.CM=up={}))});var go=P(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.boolean=pC;zt.string=lp;zt.number=gC;zt.error=mC;zt.func=_C;zt.array=dp;zt.stringArray=yC;zt.typedArray=vC;zt.objectLiteral=bC;function pC(n){return n===!0||n===!1}function lp(n){return typeof n=="string"||n instanceof String}function gC(n){return typeof n=="number"||n instanceof Number}function mC(n){return n instanceof Error}function _C(n){return typeof n=="function"}function dp(n){return Array.isArray(n)}function yC(n){return dp(n)&&n.every(e=>lp(e))}function vC(n,e){return Array.isArray(n)&&n.every(e)}function bC(n){return n!==null&&typeof n=="object"}});var hp=P(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.ImplementationRequest=void 0;var Wu=Ce(),fp;(function(n){n.method="textDocument/implementation",n.messageDirection=Wu.MessageDirection.clientToServer,n.type=new Wu.ProtocolRequestType(n.method),n.capabilities=Wu.CM.create("textDocument.implementation","implementationProvider")})(fp||(mo.ImplementationRequest=fp={}))});var gp=P(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.TypeDefinitionRequest=void 0;var zu=Ce(),pp;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=zu.MessageDirection.clientToServer,n.type=new zu.ProtocolRequestType(n.method),n.capabilities=zu.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(pp||(_o.TypeDefinitionRequest=pp={}))});var yp=P(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.DidChangeWorkspaceFoldersNotification=yi.WorkspaceFoldersRequest=void 0;var _i=Ce(),mp;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=_i.MessageDirection.serverToClient,n.type=new _i.ProtocolRequestType0(n.method),n.capabilities=_i.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(mp||(yi.WorkspaceFoldersRequest=mp={}));var _p;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=_i.MessageDirection.clientToServer,n.type=new _i.ProtocolNotificationType(n.method),n.capabilities=_i.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(_p||(yi.DidChangeWorkspaceFoldersNotification=_p={}))});var bp=P(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.ConfigurationRequest=void 0;var Ku=Ce(),vp;(function(n){n.method="workspace/configuration",n.messageDirection=Ku.MessageDirection.serverToClient,n.type=new Ku.ProtocolRequestType(n.method),n.capabilities=Ku.CM.create("workspace.configuration",void 0)})(vp||(yo.ConfigurationRequest=vp={}))});var Dp=P(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.ColorPresentationRequest=bi.DocumentColorRequest=void 0;var vi=Ce(),Cp;(function(n){n.method="textDocument/documentColor",n.messageDirection=vi.MessageDirection.clientToServer,n.type=new vi.ProtocolRequestType(n.method),n.capabilities=vi.CM.create("textDocument.colorProvider","colorProvider")})(Cp||(bi.DocumentColorRequest=Cp={}));var wp;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=vi.MessageDirection.clientToServer,n.type=new vi.ProtocolRequestType(n.method),n.capabilities=vi.CM.create("textDocument.colorProvider","colorProvider")})(wp||(bi.ColorPresentationRequest=wp={}))});var Rp=P(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.FoldingRangeRefreshRequest=wi.FoldingRangeRequest=void 0;var Ci=Ce(),Sp;(function(n){n.method="textDocument/foldingRange",n.messageDirection=Ci.MessageDirection.clientToServer,n.type=new Ci.ProtocolRequestType(n.method),n.capabilities=Ci.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Sp||(wi.FoldingRangeRequest=Sp={}));var Pp;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=Ci.MessageDirection.serverToClient,n.type=new Ci.ProtocolRequestType0(n.method),n.capabilities=Ci.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Pp||(wi.FoldingRangeRefreshRequest=Pp={}))});var Op=P(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.DeclarationRequest=void 0;var Bu=Ce(),Tp;(function(n){n.method="textDocument/declaration",n.messageDirection=Bu.MessageDirection.clientToServer,n.type=new Bu.ProtocolRequestType(n.method),n.capabilities=Bu.CM.create("textDocument.declaration","declarationProvider")})(Tp||(vo.DeclarationRequest=Tp={}))});var qp=P(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.SelectionRangeRequest=void 0;var Gu=Ce(),Ep;(function(n){n.method="textDocument/selectionRange",n.messageDirection=Gu.MessageDirection.clientToServer,n.type=new Gu.ProtocolRequestType(n.method),n.capabilities=Gu.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Ep||(bo.SelectionRangeRequest=Ep={}))});var Np=P(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.WorkDoneProgressCancelNotification=yr.WorkDoneProgressCreateRequest=yr.WorkDoneProgress=void 0;var CC=Nn(),ss=Ce(),Mp;(function(n){n.type=new CC.ProgressType;function e(t){return t===n.type}n.is=e})(Mp||(yr.WorkDoneProgress=Mp={}));var xp;(function(n){n.method="window/workDoneProgress/create",n.messageDirection=ss.MessageDirection.serverToClient,n.type=new ss.ProtocolRequestType(n.method),n.capabilities=ss.CM.create("window.workDoneProgress",void 0)})(xp||(yr.WorkDoneProgressCreateRequest=xp={}));var Ip;(function(n){n.method="window/workDoneProgress/cancel",n.messageDirection=ss.MessageDirection.clientToServer,n.type=new ss.ProtocolNotificationType(n.method)})(Ip||(yr.WorkDoneProgressCancelNotification=Ip={}))});var Ap=P(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.CallHierarchyOutgoingCallsRequest=vr.CallHierarchyIncomingCallsRequest=vr.CallHierarchyPrepareRequest=void 0;var Fn=Ce(),jp;(function(n){n.method="textDocument/prepareCallHierarchy",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(jp||(vr.CallHierarchyPrepareRequest=jp={}));var Fp;(function(n){n.method="callHierarchy/incomingCalls",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Fp||(vr.CallHierarchyIncomingCallsRequest=Fp={}));var Lp;(function(n){n.method="callHierarchy/outgoingCalls",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Lp||(vr.CallHierarchyOutgoingCallsRequest=Lp={}))});var zp=P(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.SemanticTokensRefreshRequest=yt.SemanticTokensRangeRequest=yt.SemanticTokensDeltaRequest=yt.SemanticTokensRequest=yt.SemanticTokensRegistrationType=yt.TokenFormat=void 0;var Pt=Ce(),kp;(function(n){n.Relative="relative"})(kp||(yt.TokenFormat=kp={}));var os;(function(n){n.method="textDocument/semanticTokens",n.type=new Pt.RegistrationType(n.method)})(os||(yt.SemanticTokensRegistrationType=os={}));var $p;(function(n){n.method="textDocument/semanticTokens/full",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens","semanticTokensProvider")})($p||(yt.SemanticTokensRequest=$p={}));var Hp;(function(n){n.method="textDocument/semanticTokens/full/delta",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Hp||(yt.SemanticTokensDeltaRequest=Hp={}));var Up;(function(n){n.method="textDocument/semanticTokens/range",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Up||(yt.SemanticTokensRangeRequest=Up={}));var Wp;(function(n){n.method="workspace/semanticTokens/refresh",n.messageDirection=Pt.MessageDirection.serverToClient,n.type=new Pt.ProtocolRequestType0(n.method),n.capabilities=Pt.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Wp||(yt.SemanticTokensRefreshRequest=Wp={}))});var Bp=P(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.ShowDocumentRequest=void 0;var Vu=Ce(),Kp;(function(n){n.method="window/showDocument",n.messageDirection=Vu.MessageDirection.serverToClient,n.type=new Vu.ProtocolRequestType(n.method),n.capabilities=Vu.CM.create("window.showDocument.support",void 0)})(Kp||(Co.ShowDocumentRequest=Kp={}))});var Vp=P(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.LinkedEditingRangeRequest=void 0;var Xu=Ce(),Gp;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=Xu.MessageDirection.clientToServer,n.type=new Xu.ProtocolRequestType(n.method),n.capabilities=Xu.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Gp||(wo.LinkedEditingRangeRequest=Gp={}))});var ng=P(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.WillDeleteFilesRequest=ct.DidDeleteFilesNotification=ct.DidRenameFilesNotification=ct.WillRenameFilesRequest=ct.DidCreateFilesNotification=ct.WillCreateFilesRequest=ct.FileOperationPatternKind=void 0;var Ge=Ce(),Xp;(function(n){n.file="file",n.folder="folder"})(Xp||(ct.FileOperationPatternKind=Xp={}));var Jp;(function(n){n.method="workspace/willCreateFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Jp||(ct.WillCreateFilesRequest=Jp={}));var Qp;(function(n){n.method="workspace/didCreateFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Qp||(ct.DidCreateFilesNotification=Qp={}));var Yp;(function(n){n.method="workspace/willRenameFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Yp||(ct.WillRenameFilesRequest=Yp={}));var Zp;(function(n){n.method="workspace/didRenameFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Zp||(ct.DidRenameFilesNotification=Zp={}));var eg;(function(n){n.method="workspace/didDeleteFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(eg||(ct.DidDeleteFilesNotification=eg={}));var tg;(function(n){n.method="workspace/willDeleteFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(tg||(ct.WillDeleteFilesRequest=tg={}))});var og=P(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.MonikerRequest=br.MonikerKind=br.UniquenessLevel=void 0;var Ju=Ce(),rg;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(rg||(br.UniquenessLevel=rg={}));var ig;(function(n){n.$import="import",n.$export="export",n.local="local"})(ig||(br.MonikerKind=ig={}));var sg;(function(n){n.method="textDocument/moniker",n.messageDirection=Ju.MessageDirection.clientToServer,n.type=new Ju.ProtocolRequestType(n.method),n.capabilities=Ju.CM.create("textDocument.moniker","monikerProvider")})(sg||(br.MonikerRequest=sg={}))});var lg=P(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.TypeHierarchySubtypesRequest=Cr.TypeHierarchySupertypesRequest=Cr.TypeHierarchyPrepareRequest=void 0;var Fr=Ce(),ag;(function(n){n.method="textDocument/prepareTypeHierarchy",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method),n.capabilities=Fr.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(ag||(Cr.TypeHierarchyPrepareRequest=ag={}));var cg;(function(n){n.method="typeHierarchy/supertypes",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method)})(cg||(Cr.TypeHierarchySupertypesRequest=cg={}));var ug;(function(n){n.method="typeHierarchy/subtypes",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method)})(ug||(Cr.TypeHierarchySubtypesRequest=ug={}))});var hg=P(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.InlineValueRefreshRequest=Si.InlineValueRequest=void 0;var Di=Ce(),dg;(function(n){n.method="textDocument/inlineValue",n.messageDirection=Di.MessageDirection.clientToServer,n.type=new Di.ProtocolRequestType(n.method),n.capabilities=Di.CM.create("textDocument.inlineValue","inlineValueProvider")})(dg||(Si.InlineValueRequest=dg={}));var fg;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=Di.MessageDirection.serverToClient,n.type=new Di.ProtocolRequestType0(n.method),n.capabilities=Di.CM.create("workspace.inlineValue.refreshSupport",void 0)})(fg||(Si.InlineValueRefreshRequest=fg={}))});var _g=P(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.InlayHintRefreshRequest=wr.InlayHintResolveRequest=wr.InlayHintRequest=void 0;var Ln=Ce(),pg;(function(n){n.method="textDocument/inlayHint",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint","inlayHintProvider")})(pg||(wr.InlayHintRequest=pg={}));var gg;(function(n){n.method="inlayHint/resolve",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(gg||(wr.InlayHintResolveRequest=gg={}));var mg;(function(n){n.method="workspace/inlayHint/refresh",n.messageDirection=Ln.MessageDirection.serverToClient,n.type=new Ln.ProtocolRequestType0(n.method),n.capabilities=Ln.CM.create("workspace.inlayHint.refreshSupport",void 0)})(mg||(wr.InlayHintRefreshRequest=mg={}))});var Sg=P(Ve=>{"use strict";var wC=Ve&&Ve.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),DC=Ve&&Ve.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),SC=Ve&&Ve.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var RC=de&&de.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),TC=de&&de.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),OC=de&&de.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.InlineCompletionRequest=void 0;var Zu=Ce(),xg;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=Zu.MessageDirection.clientToServer,n.type=new Zu.ProtocolRequestType(n.method),n.capabilities=Zu.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(xg||(So.InlineCompletionRequest=xg={}))});var Fg=P(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.TextDocumentContentRefreshRequest=Ri.TextDocumentContentRequest=void 0;var cs=Ce(),Ng;(function(n){n.method="workspace/textDocumentContent",n.messageDirection=cs.MessageDirection.clientToServer,n.type=new cs.ProtocolRequestType(n.method),n.capabilities=cs.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Ng||(Ri.TextDocumentContentRequest=Ng={}));var jg;(function(n){n.method="workspace/textDocumentContent/refresh",n.messageDirection=cs.MessageDirection.serverToClient,n.type=new cs.ProtocolRequestType(n.method)})(jg||(Ri.TextDocumentContentRefreshRequest=jg={}))});var Jm=P(m=>{"use strict";var EC=m&&m.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qC=m&&m.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),MC=m&&m.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}n.hasId=e})(zg||(m.StaticRegistrationOptions=zg={}));var Kg;(function(n){function e(t){let r=t;return r&&(r.documentSelector===null||rl.is(r.documentSelector))}n.is=e})(Kg||(m.TextDocumentRegistrationOptions=Kg={}));var Bg;(function(n){function e(r){let i=r;return Xe.objectLiteral(i)&&(i.workDoneProgress===void 0||Xe.boolean(i.workDoneProgress))}n.is=e;function t(r){let i=r;return i&&Xe.boolean(i.workDoneProgress)}n.hasWorkDoneProgress=t})(Bg||(m.WorkDoneProgressOptions=Bg={}));var Gg;(function(n){n.method="initialize",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method)})(Gg||(m.InitializeRequest=Gg={}));var Vg;(function(n){n.unknownProtocolVersion=1})(Vg||(m.InitializeErrorCodes=Vg={}));var Xg;(function(n){n.method="initialized",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method)})(Xg||(m.InitializedNotification=Xg={}));var Jg;(function(n){n.method="shutdown",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType0(n.method)})(Jg||(m.ShutdownRequest=Jg={}));var Qg;(function(n){n.method="exit",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType0(n.method)})(Qg||(m.ExitNotification=Qg={}));var Yg;(function(n){n.method="workspace/didChangeConfiguration",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("workspace.didChangeConfiguration",void 0)})(Yg||(m.DidChangeConfigurationNotification=Yg={}));var Zg;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4,n.Debug=5})(Zg||(m.MessageType=Zg={}));var em;(function(n){n.method="window/showMessage",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("window.showMessage",void 0)})(em||(m.ShowMessageNotification=em={}));var tm;(function(n){n.method="window/showMessageRequest",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("window.showMessage",void 0)})(tm||(m.ShowMessageRequest=tm={}));var nm;(function(n){n.method="window/logMessage",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method)})(nm||(m.LogMessageNotification=nm={}));var rm;(function(n){n.method="telemetry/event",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method)})(rm||(m.TelemetryEventNotification=rm={}));var im;(function(n){n.None=0,n.Full=1,n.Incremental=2})(im||(m.TextDocumentSyncKind=im={}));var sm;(function(n){n.method="textDocument/didOpen",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(sm||(m.DidOpenTextDocumentNotification=sm={}));var om;(function(n){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}n.isIncremental=e;function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}n.isFull=t})(om||(m.TextDocumentContentChangeEvent=om={}));var am;(function(n){n.method="textDocument/didChange",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync")})(am||(m.DidChangeTextDocumentNotification=am={}));var cm;(function(n){n.method="textDocument/didClose",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(cm||(m.DidCloseTextDocumentNotification=cm={}));var um;(function(n){n.method="textDocument/didSave",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(um||(m.DidSaveTextDocumentNotification=um={}));var lm;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(lm||(m.TextDocumentSaveReason=lm={}));var dm;(function(n){n.method="textDocument/willSave",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(dm||(m.WillSaveTextDocumentNotification=dm={}));var fm;(function(n){n.method="textDocument/willSaveWaitUntil",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(fm||(m.WillSaveTextDocumentWaitUntilRequest=fm={}));var hm;(function(n){n.method="workspace/didChangeWatchedFiles",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("workspace.didChangeWatchedFiles",void 0)})(hm||(m.DidChangeWatchedFilesNotification=hm={}));var pm;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(pm||(m.FileChangeType=pm={}));var il;(function(n){function e(t){let r=t;return Xe.objectLiteral(r)&&(Lg.URI.is(r.baseUri)||Lg.WorkspaceFolder.is(r.baseUri))&&Xe.string(r.pattern)}n.is=e})(il||(m.RelativePattern=il={}));var sl;(function(n){function e(t){let r=t;return Xe.string(r)||il.is(r)}n.is=e})(sl||(m.GlobPattern=sl={}));var gm;(function(n){n.Create=1,n.Change=2,n.Delete=4})(gm||(m.WatchKind=gm={}));var mm;(function(n){n.method="textDocument/publishDiagnostics",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.publishDiagnostics",void 0)})(mm||(m.PublishDiagnosticsNotification=mm={}));var _m;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(_m||(m.CompletionTriggerKind=_m={}));var ym;(function(n){n.method="textDocument/completion",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.completion","completionProvider")})(ym||(m.CompletionRequest=ym={}));var vm;(function(n){n.method="completionItem/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(vm||(m.CompletionResolveRequest=vm={}));var bm;(function(n){n.method="textDocument/hover",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.hover","hoverProvider")})(bm||(m.HoverRequest=bm={}));var Cm;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(Cm||(m.SignatureHelpTriggerKind=Cm={}));var wm;(function(n){n.method="textDocument/signatureHelp",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(wm||(m.SignatureHelpRequest=wm={}));var Dm;(function(n){n.method="textDocument/definition",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.definition","definitionProvider")})(Dm||(m.DefinitionRequest=Dm={}));var Sm;(function(n){n.method="textDocument/references",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.references","referencesProvider")})(Sm||(m.ReferencesRequest=Sm={}));var Pm;(function(n){n.method="textDocument/documentHighlight",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Pm||(m.DocumentHighlightRequest=Pm={}));var Rm;(function(n){n.method="textDocument/documentSymbol",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Rm||(m.DocumentSymbolRequest=Rm={}));var Tm;(function(n){n.method="textDocument/codeAction",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeAction","codeActionProvider")})(Tm||(m.CodeActionRequest=Tm={}));var Om;(function(n){n.method="codeAction/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Om||(m.CodeActionResolveRequest=Om={}));var Em;(function(n){n.method="workspace/symbol",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.symbol","workspaceSymbolProvider")})(Em||(m.WorkspaceSymbolRequest=Em={}));var qm;(function(n){n.method="workspaceSymbol/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(qm||(m.WorkspaceSymbolResolveRequest=qm={}));var Mm;(function(n){n.method="textDocument/codeLens",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeLens","codeLensProvider")})(Mm||(m.CodeLensRequest=Mm={}));var xm;(function(n){n.method="codeLens/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(xm||(m.CodeLensResolveRequest=xm={}));var Im;(function(n){n.method="workspace/codeLens/refresh",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType0(n.method),n.capabilities=O.CM.create("workspace.codeLens",void 0)})(Im||(m.CodeLensRefreshRequest=Im={}));var Nm;(function(n){n.method="textDocument/documentLink",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentLink","documentLinkProvider")})(Nm||(m.DocumentLinkRequest=Nm={}));var jm;(function(n){n.method="documentLink/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(jm||(m.DocumentLinkResolveRequest=jm={}));var Fm;(function(n){n.method="textDocument/formatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.formatting","documentFormattingProvider")})(Fm||(m.DocumentFormattingRequest=Fm={}));var Lm;(function(n){n.method="textDocument/rangeFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Lm||(m.DocumentRangeFormattingRequest=Lm={}));var Am;(function(n){n.method="textDocument/rangesFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Am||(m.DocumentRangesFormattingRequest=Am={}));var km;(function(n){n.method="textDocument/onTypeFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(km||(m.DocumentOnTypeFormattingRequest=km={}));var $m;(function(n){n.Identifier=1})($m||(m.PrepareSupportDefaultBehavior=$m={}));var Hm;(function(n){n.method="textDocument/rename",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rename","renameProvider")})(Hm||(m.RenameRequest=Hm={}));var Um;(function(n){n.method="textDocument/prepareRename",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Um||(m.PrepareRenameRequest=Um={}));var Wm;(function(n){n.method="workspace/executeCommand",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.executeCommand","executeCommandProvider")})(Wm||(m.ExecuteCommandRequest=Wm={}));var zm;(function(n){n.method="workspace/applyEdit",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType("workspace/applyEdit"),n.capabilities=O.CM.create("workspace.applyEdit",void 0)})(zm||(m.ApplyWorkspaceEditRequest=zm={}))});var Ym=P(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.createProtocolConnection=$C;var Qm=Nn();function $C(n,e,t,r){return Qm.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Qm.createMessageConnection)(n,e,t,r)}});var V=P(vt=>{"use strict";var HC=vt&&vt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Po=vt&&vt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&HC(e,n,t)};Object.defineProperty(vt,"__esModule",{value:!0});vt.LSPErrorCodes=vt.createProtocolConnection=void 0;Po(Nn(),vt);Po((po(),Hs(ho)),vt);Po(Ce(),vt);Po(Jm(),vt);var UC=Ym();Object.defineProperty(vt,"createProtocolConnection",{enumerable:!0,get:function(){return UC.createProtocolConnection}});var Zm;(function(n){n.lspReservedErrorRangeStart=-32899,n.RequestFailed=-32803,n.ServerCancelled=-32802,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(Zm||(vt.LSPErrorCodes=Zm={}))});var Ro=P(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.Semaphore=Bt.Delayer=void 0;Bt.setTestMode=WC;Bt.clearTestMode=zC;Bt.map=KC;Bt.mapAsync=BC;Bt.forEach=GC;var ds=V(),fl=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(r=>{this.onSuccess=r}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let r=this.task();return this.task=void 0,r})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,ds.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};Bt.Delayer=fl;var hl=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ds.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Bt.Semaphore=hl;var pl=!1;function WC(){pl=!0}function zC(){pl=!1}var e_=15,ls=class{yieldAfter;startTime;counter;total;counterInterval;constructor(e=e_){this.yieldAfter=pl===!0?Math.max(e,2):Math.max(e,e_),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}};async function KC(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new ls(r?.yieldAfter);function o(u){s.start();for(let l=u;l{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function BC(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new ls(r?.yieldAfter);async function o(u){s.start();for(let l=u;l{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function GC(n,e,t,r){if(n.length===0)return;let i=new ls(r?.yieldAfter);function s(a){i.start();for(let u=a;u{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?a(-1):a(s(o))})})}});var ml=P(kn=>{"use strict";var VC=kn&&kn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XC=kn&&kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),JC=kn&&kn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var YC=$n&&$n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ZC=$n&&$n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ew=$n&&$n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var nw=Hn&&Hn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),rw=Hn&&Hn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),iw=Hn&&Hn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var ow=Un&&Un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),aw=Un&&Un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),cw=Un&&Un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var lw=At&&At.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),dw=At&&At.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),n_=At&&At.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var hw=Wn&&Wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pw=Wn&&Wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gw=Wn&&Wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var _w=zn&&zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),yw=zn&&zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),vw=zn&&zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Cw=Kn&&Kn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ww=Kn&&Kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Dw=Kn&&Kn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Sw=Bn&&Bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Pw=Bn&&Bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Rw=Bn&&Bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Ow=Gt&&Gt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Ew=Gt&&Gt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Oo=Gt&&Gt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;id.toString());function r(d){return t(d)}function i(d){return{uri:t(d.uri)}}function s(d){return{uri:t(d.uri),languageId:d.languageId,version:d.version,text:d.getText()}}function o(d){return{uri:t(d.uri),version:d.version}}function a(d){return{textDocument:s(d)}}function u(d){let D=d;return!!D.document&&!!D.contentChanges}function l(d){let D=d;return!!D.uri&&!!D.version}function f(d,D,$){if(l(d))return{textDocument:{uri:t(d.uri),version:d.version},contentChanges:[{text:d.getText()}]};if(u(d)){let ge=D,ce=$;return{textDocument:{uri:t(ge),version:ce},contentChanges:d.contentChanges.map(mt=>{let Mn=mt.range;return{range:{start:{line:Mn.start.line,character:Mn.start.character},end:{line:Mn.end.line,character:Mn.end.character}},rangeLength:mt.rangeLength,text:mt.text}})}}else throw Error("Unsupported text document change parameter")}function p(d){return{textDocument:i(d)}}function h(d,D=!1){let $={textDocument:i(d)};return D&&($.text=d.getText()),$}function g(d){switch(d){case Fe.TextDocumentSaveReason.Manual:return B.TextDocumentSaveReason.Manual;case Fe.TextDocumentSaveReason.AfterDelay:return B.TextDocumentSaveReason.AfterDelay;case Fe.TextDocumentSaveReason.FocusOut:return B.TextDocumentSaveReason.FocusOut}return B.TextDocumentSaveReason.Manual}function _(d){return{textDocument:i(d.document),reason:g(d.reason)}}function v(d){return{files:d.files.map(D=>({uri:t(D)}))}}function R(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function q(d){return{files:d.files.map(D=>({uri:t(D)}))}}function w(d){return{files:d.files.map(D=>({uri:t(D)}))}}function M(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function j(d){return{files:d.files.map(D=>({uri:t(D)}))}}function F(d,D){return{textDocument:i(d),position:Rn(D)}}function oe(d){switch(d){case Fe.CompletionTriggerKind.TriggerCharacter:return B.CompletionTriggerKind.TriggerCharacter;case Fe.CompletionTriggerKind.TriggerForIncompleteCompletions:return B.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return B.CompletionTriggerKind.Invoked}}function te(d,D,$){return{textDocument:i(d),position:Rn(D),context:{triggerKind:oe($.triggerKind),triggerCharacter:$.triggerCharacter}}}function Te(d){switch(d){case Fe.SignatureHelpTriggerKind.Invoke:return B.SignatureHelpTriggerKind.Invoked;case Fe.SignatureHelpTriggerKind.TriggerCharacter:return B.SignatureHelpTriggerKind.TriggerCharacter;case Fe.SignatureHelpTriggerKind.ContentChange:return B.SignatureHelpTriggerKind.ContentChange}}function Pn(d){return{label:d.label}}function Qr(d){return d.map(Pn)}function rr(d){return{label:d.label,parameters:Qr(d.parameters)}}function Yr(d){return d.map(rr)}function Zr(d){return d===void 0?d:{signatures:Yr(d.signatures),activeSignature:d.activeSignature,activeParameter:d.activeParameter}}function Mt(d,D,$){return{textDocument:i(d),position:Rn(D),context:{isRetrigger:$.isRetrigger,triggerCharacter:$.triggerCharacter,triggerKind:Te($.triggerKind),activeSignatureHelp:Zr($.activeSignatureHelp)}}}function Rn(d){return{line:d.line,character:d.character}}function xt(d){return d==null?d:{line:d.line>B.uinteger.MAX_VALUE?B.uinteger.MAX_VALUE:d.line,character:d.character>B.uinteger.MAX_VALUE?B.uinteger.MAX_VALUE:d.character}}function Tn(d,D){return r_.map(d,xt,D)}function Ht(d){return d.map(xt)}function Oe(d){return d==null?d:{start:xt(d.start),end:xt(d.end)}}function Ui(d){return d.map(Oe)}function Zt(d){return d==null?d:B.Location.create(r(d.uri),Oe(d.range))}function ir(d){switch(d){case Fe.DiagnosticSeverity.Error:return B.DiagnosticSeverity.Error;case Fe.DiagnosticSeverity.Warning:return B.DiagnosticSeverity.Warning;case Fe.DiagnosticSeverity.Information:return B.DiagnosticSeverity.Information;case Fe.DiagnosticSeverity.Hint:return B.DiagnosticSeverity.Hint}}function ei(d){if(!d)return;let D=[];for(let $ of d){let ge=Mr($);ge!==void 0&&D.push(ge)}return D.length>0?D:void 0}function Mr(d){switch(d){case Fe.DiagnosticTag.Unnecessary:return B.DiagnosticTag.Unnecessary;case Fe.DiagnosticTag.Deprecated:return B.DiagnosticTag.Deprecated;default:return}}function en(d){return{message:d.message,location:Zt(d.location)}}function xr(d){return d.map(en)}function ti(d){if(d!=null)return Ar.number(d)||Ar.string(d)?d:{value:d.value,target:r(d.target)}}function sr(d){let D=B.Diagnostic.create(Oe(d.range),d.message),$=d instanceof s_.ProtocolDiagnostic?d:void 0;$!==void 0&&$.data!==void 0&&(D.data=$.data);let ge=ti(d.code);return s_.DiagnosticCode.is(ge)?$!==void 0&&$.hasDiagnosticCode?D.code=ge:(D.code=ge.value,D.codeDescription={href:ge.target}):D.code=ge,Ar.number(d.severity)&&(D.severity=ir(d.severity)),Array.isArray(d.tags)&&(D.tags=ei(d.tags)),d.relatedInformation&&(D.relatedInformation=xr(d.relatedInformation)),d.source&&(D.source=d.source),D}function or(d,D){return d==null?d:r_.map(d,sr,D)}function ar(d){return d==null?d:d.map(sr)}function Wi(d,D){switch(d){case"$string":return D;case B.MarkupKind.PlainText:return{kind:d,value:D};case B.MarkupKind.Markdown:return{kind:d,value:D.value};default:return`Unsupported Markup content received. Kind is: ${d}`}}function ni(d){if(d===Fe.CompletionItemTag.Deprecated)return B.CompletionItemTag.Deprecated}function wt(d){if(d===void 0)return d;let D=[];for(let $ of d){let ge=ni($);ge!==void 0&&D.push(ge)}return D}function zi(d,D){return D!==void 0?D:d+1}function tn(d,D=!1){let $,ge;Ar.string(d.label)?$=d.label:($=d.label.label,D&&(d.label.detail!==void 0||d.label.description!==void 0)&&(ge={detail:d.label.detail,description:d.label.description}));let ce={label:$};ge!==void 0&&(ce.labelDetails=ge);let Ze=d instanceof qw.default?d:void 0;d.detail&&(ce.detail=d.detail),d.documentation&&(!Ze||Ze.documentationFormat==="$string"?ce.documentation=d.documentation:ce.documentation=Wi(Ze.documentationFormat,d.documentation)),d.filterText&&(ce.filterText=d.filterText),cr(ce,d),Ar.number(d.kind)&&(ce.kind=zi(d.kind,Ze&&Ze.originalItemKind)),d.sortText&&(ce.sortText=d.sortText),d.additionalTextEdits&&(ce.additionalTextEdits=ri(d.additionalTextEdits)),d.commitCharacters&&(ce.commitCharacters=d.commitCharacters.slice()),d.command&&(ce.command=ae(d.command)),(d.preselect===!0||d.preselect===!1)&&(ce.preselect=d.preselect);let mt=wt(d.tags);if(Ze){if(Ze.data!==void 0&&(ce.data=Ze.data),Ze.deprecated===!0||Ze.deprecated===!1){if(Ze.deprecated===!0&&mt!==void 0&&mt.length>0){let Mn=mt.indexOf(Fe.CompletionItemTag.Deprecated);Mn!==-1&&mt.splice(Mn,1)}ce.deprecated=Ze.deprecated}Ze.insertTextMode!==void 0&&(ce.insertTextMode=Ze.insertTextMode)}return mt!==void 0&&mt.length>0&&(ce.tags=mt),ce.insertTextMode===void 0&&d.keepWhitespace===!0&&(ce.insertTextMode=B.InsertTextMode.adjustIndentation),ce}function cr(d,D){let $=B.InsertTextFormat.PlainText,ge,ce;D.textEdit?(ge=D.textEdit.newText,ce=D.textEdit.range):D.insertText instanceof Fe.SnippetString?($=B.InsertTextFormat.Snippet,ge=D.insertText.value):ge=D.insertText,D.range&&(ce=D.range),d.insertTextFormat=$,D.fromEdit&&ge!==void 0&&ce!==void 0?d.textEdit=ur(ge,ce):d.insertText=ge}function ur(d,D){return Nl.is(D)?B.InsertReplaceEdit.create(d,Oe(D.inserting),Oe(D.replacing)):{newText:d,range:Oe(D)}}function On(d){return{range:Oe(d.range),newText:d.newText}}function ri(d){return d==null?d:d.map(On)}function tt(d){return d<=Fe.SymbolKind.TypeParameter?d+1:B.SymbolKind.Property}function Ut(d){return d}function nt(d){return d.map(Ut)}function Ki(d,D,$){return{textDocument:i(d),position:Rn(D),context:{includeDeclaration:$.includeDeclaration}}}async function Ye(d,D){let $=B.CodeAction.create(d.title);if(d instanceof i_.default&&d.data!==void 0&&($.data=d.data),d.kind!==void 0&&($.kind=It(d.kind)),d.diagnostics!==void 0&&($.diagnostics=await or(d.diagnostics,D)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&($.command=ae(d.command)),d.isPreferred!==void 0&&($.isPreferred=d.isPreferred),d.disabled!==void 0&&($.disabled={reason:d.disabled.reason}),d.isAI&&($.tags??=[],$.tags.push(B.CodeActionTag.LLMGenerated)),$}function En(d){let D=B.CodeAction.create(d.title);if(d instanceof i_.default&&d.data!==void 0&&(D.data=d.data),d.kind!==void 0&&(D.kind=It(d.kind)),d.diagnostics!==void 0&&(D.diagnostics=ar(d.diagnostics)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(D.command=ae(d.command)),d.isPreferred!==void 0&&(D.isPreferred=d.isPreferred),d.disabled!==void 0&&(D.disabled={reason:d.disabled.reason}),d.isAI&&(D.tags??=[],D.tags.push(B.CodeActionTag.LLMGenerated)),D}async function ii(d,D){if(d==null)return d;let $;return d.only&&Ar.string(d.only.value)&&($=[d.only.value]),B.CodeActionContext.create(await or(d.diagnostics,D),$,lr(d.triggerKind))}function Ir(d){if(d==null)return d;let D;return d.only&&Ar.string(d.only.value)&&(D=[d.only.value]),B.CodeActionContext.create(ar(d.diagnostics),D,lr(d.triggerKind))}function lr(d){switch(d){case Fe.CodeActionTriggerKind.Invoke:return B.CodeActionTriggerKind.Invoked;case Fe.CodeActionTriggerKind.Automatic:return B.CodeActionTriggerKind.Automatic;default:return}}function It(d){if(d!=null)return d.value}function y(d){return B.InlineValueContext.create(d.frameId,Oe(d.stoppedLocation))}function E(d,D,$){return{textDocument:i(d),position:xt(D),context:I($)}}function I(d){return{triggerKind:H(d.triggerKind),selectedCompletionInfo:Z(d.selectedCompletionInfo)}}function H(d){switch(d){case Fe.InlineCompletionTriggerKind.Invoke:return B.InlineCompletionTriggerKind.Invoked;case Fe.InlineCompletionTriggerKind.Automatic:return B.InlineCompletionTriggerKind.Automatic}}function Z(d){if(d!=null)return{range:Oe(d.range),text:d.text}}function ae(d){let D=B.Command.create(d.title,d.command);return d.tooltip&&(D.tooltip=d.tooltip),d.arguments&&(D.arguments=d.arguments),D}function ie(d){let D=B.CodeLens.create(Oe(d.range));return d.command&&(D.command=ae(d.command)),d instanceof Mw.default&&d.data&&(D.data=d.data),D}function Ee(d,D){let $={tabSize:d.tabSize,insertSpaces:d.insertSpaces};return D.trimTrailingWhitespace&&($.trimTrailingWhitespace=!0),D.trimFinalNewlines&&($.trimFinalNewlines=!0),D.insertFinalNewline&&($.insertFinalNewline=!0),$}function ke(d){return{textDocument:i(d)}}function pe(d){return{textDocument:i(d)}}function ye(d){let D=B.DocumentLink.create(Oe(d.range));d.target&&(D.target=r(d.target)),d.tooltip!==void 0&&(D.tooltip=d.tooltip);let $=d instanceof xw.default?d:void 0;return $&&$.data&&(D.data=$.data),D}function rt(d){return{textDocument:i(d)}}function pt(d){let D={name:d.name,kind:tt(d.kind),uri:r(d.uri),range:Oe(d.range),selectionRange:Oe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=nt(d.tags)),d instanceof Iw.default&&d.data!==void 0&&(D.data=d.data),D}function qn(d){let D={name:d.name,kind:tt(d.kind),uri:r(d.uri),range:Oe(d.range),selectionRange:Oe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=nt(d.tags)),d instanceof Nw.default&&d.data!==void 0&&(D.data=d.data),D}function Dt(d){let D=d instanceof jw.default?{name:d.name,kind:tt(d.kind),location:d.hasRange?Zt(d.location):{uri:t(d.location.uri)},data:d.data}:{name:d.name,kind:tt(d.kind),location:Zt(d.location)};return d.tags!==void 0&&(D.tags=nt(d.tags)),d.containerName!==""&&(D.containerName=d.containerName),D}function gt(d){let D=typeof d.label=="string"?d.label:d.label.map(si),$=B.InlayHint.create(xt(d.position),D);return d.kind!==void 0&&($.kind=d.kind),d.textEdits!==void 0&&($.textEdits=ri(d.textEdits)),d.tooltip!==void 0&&($.tooltip=ks(d.tooltip)),d.paddingLeft!==void 0&&($.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&($.paddingRight=d.paddingRight),d instanceof Fw.default&&d.data!==void 0&&($.data=d.data),$}function si(d){let D=B.InlayHintLabelPart.create(d.value);return d.location!==void 0&&(D.location=Zt(d.location)),d.command!==void 0&&(D.command=ae(d.command)),d.tooltip!==void 0&&(D.tooltip=ks(d.tooltip)),D}function ks(d){return typeof d=="string"?d:{kind:B.MarkupKind.Markdown,value:d.value}}return{asUri:r,asTextDocumentIdentifier:i,asTextDocumentItem:s,asVersionedTextDocumentIdentifier:o,asOpenTextDocumentParams:a,asChangeTextDocumentParams:f,asCloseTextDocumentParams:p,asSaveTextDocumentParams:h,asWillSaveTextDocumentParams:_,asDidCreateFilesParams:v,asDidRenameFilesParams:R,asDidDeleteFilesParams:q,asWillCreateFilesParams:w,asWillRenameFilesParams:M,asWillDeleteFilesParams:j,asTextDocumentPositionParams:F,asCompletionParams:te,asSignatureHelpParams:Mt,asWorkerPosition:Rn,asRange:Oe,asRanges:Ui,asPosition:xt,asPositions:Tn,asPositionsSync:Ht,asLocation:Zt,asDiagnosticSeverity:ir,asDiagnosticTag:Mr,asDiagnostic:sr,asDiagnostics:or,asDiagnosticsSync:ar,asCompletionItem:tn,asTextEdit:On,asSymbolKind:tt,asSymbolTag:Ut,asSymbolTags:nt,asReferenceParams:Ki,asCodeAction:Ye,asCodeActionSync:En,asCodeActionContext:ii,asCodeActionContextSync:Ir,asInlineValueContext:y,asCommand:ae,asCodeLens:ie,asFormattingOptions:Ee,asDocumentSymbolParams:ke,asCodeLensParams:pe,asDocumentLink:ye,asDocumentLinkParams:rt,asCallHierarchyItem:pt,asTypeHierarchyItem:qn,asInlayHint:gt,asWorkspaceSymbol:Dt,asInlineCompletionParams:E,asInlineCompletionContext:I}}});var u_=P(Vt=>{"use strict";var Aw=Vt&&Vt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kw=Vt&&Vt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qo=Vt&&Vt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;iN.Uri.parse(c));function o(c){return s(c)}function a(c){let b=[];for(let T of c)if(typeof T=="string")b.push(T);else if(c_.NotebookCellTextDocumentFilter.is(T))if(typeof T.notebook=="string")b.push({notebookType:T.notebook,language:T.language});else{let L=T.notebook.notebookType??"*";b.push({notebookType:L,scheme:T.notebook.scheme,pattern:Ra(T.notebook.pattern),language:T.language})}else c_.TextDocumentFilter.is(T)&&b.push({language:T.language,scheme:T.scheme,pattern:Ra(T.pattern)});return b}async function u(c,b){return se.map(c,f,b)}function l(c){let b=new Array(c.length);for(let T=0;T0?b:void 0}function g(c){switch(c){case z.DiagnosticTag.Unnecessary:return N.DiagnosticTag.Unnecessary;case z.DiagnosticTag.Deprecated:return N.DiagnosticTag.Deprecated;default:return}}function _(c){return c?new N.Position(c.line,c.character):void 0}function v(c){return c?new N.Range(c.start.line,c.start.character,c.end.line,c.end.character):void 0}async function R(c,b){return se.map(c,T=>new N.Range(T.start.line,T.start.character,T.end.line,T.end.character),b)}function q(c){if(c==null)return N.DiagnosticSeverity.Error;switch(c){case z.DiagnosticSeverity.Error:return N.DiagnosticSeverity.Error;case z.DiagnosticSeverity.Warning:return N.DiagnosticSeverity.Warning;case z.DiagnosticSeverity.Information:return N.DiagnosticSeverity.Information;case z.DiagnosticSeverity.Hint:return N.DiagnosticSeverity.Hint}return N.DiagnosticSeverity.Error}function w(c){if(Rt.string(c))return j(c);if(Eo.is(c))return j().appendCodeblock(c.value,c.language);if(Array.isArray(c)){let b=[];for(let T of c){let L=j();Eo.is(T)?L.appendCodeblock(T.value,T.language):L.appendMarkdown(T),b.push(L)}return b}else return j(c)}function M(c){if(Rt.string(c))return c;switch(c.kind){case z.MarkupKind.Markdown:return j(c.value);case z.MarkupKind.PlainText:return c.value;default:return`Unsupported Markup content received. Kind is: ${c.kind}`}}function j(c){let b;if(c===void 0||typeof c=="string")b=new N.MarkdownString(c);else switch(c.kind){case z.MarkupKind.Markdown:b=new N.MarkdownString(c.value);break;case z.MarkupKind.PlainText:b=new N.MarkdownString,b.appendText(c.value);break;default:b=new N.MarkdownString,b.appendText(`Unsupported Markup content received. Kind is: ${c.kind}`);break}return b.isTrusted=e,b.supportHtml=t,b.supportThemeIcons=r,b}function F(c){if(c)return new N.Hover(w(c.contents),v(c.range))}async function oe(c,b,T){if(!c)return;if(Array.isArray(c))return se.map(c,xn=>rr(xn,b),T);let L=c,{defaultRange:qe,commitCharacters:Le}=te(L,b),me=await se.map(L.items,xn=>rr(xn,Le,L.applyKind?.commitCharacters,qe,L.itemDefaults?.insertTextMode,L.itemDefaults?.insertTextFormat,L.itemDefaults?.data,L.applyKind?.data),T);return new N.CompletionList(me,L.isIncomplete)}function te(c,b){let T=c.itemDefaults?.editRange,L=c.itemDefaults?.commitCharacters??b;return z.Range.is(T)?{defaultRange:v(T),commitCharacters:L}:T!==void 0?{defaultRange:{inserting:v(T.insert),replacing:v(T.replace)},commitCharacters:L}:{defaultRange:void 0,commitCharacters:L}}function Te(c){return z.CompletionItemKind.Text<=c&&c<=z.CompletionItemKind.TypeParameter?[c-1,void 0]:[N.CompletionItemKind.Text,c]}function Pn(c){if(c===z.CompletionItemTag.Deprecated)return N.CompletionItemTag.Deprecated}function Qr(c){if(c==null)return[];let b=[];for(let T of c){let L=Pn(T);L!==void 0&&b.push(L)}return b}function rr(c,b,T,L,qe,Le,me,xn){let dr=Qr(c.tags),Nt=Mt(c),$e=new $w.default(Nt);c.detail&&($e.detail=c.detail),c.documentation&&($e.documentation=M(c.documentation),$e.documentationFormat=Rt.string(c.documentation)?"$string":c.documentation.kind),c.filterText&&($e.filterText=c.filterText);let $s=Rn(c,L,Le);if($s&&($e.insertText=$s.text,$e.range=$s.range,$e.fromEdit=$s.fromEdit),Rt.number(c.kind)){let[hb,Ih]=Te(c.kind);$e.kind=hb,Ih&&($e.originalItemKind=Ih)}c.sortText&&($e.sortText=c.sortText),c.additionalTextEdits&&($e.additionalTextEdits=Oe(c.additionalTextEdits));let Mh=Yr(c,b,T);Mh&&($e.commitCharacters=Mh.slice()),c.command&&($e.command=nt(c.command)),(c.deprecated===!0||c.deprecated===!1)&&($e.deprecated=c.deprecated,c.deprecated===!0&&dr.push(N.CompletionItemTag.Deprecated)),(c.preselect===!0||c.preselect===!1)&&($e.preselect=c.preselect);let xh=Zr(c,me,xn);xh!==void 0&&($e.data=xh),dr.length>0&&($e.tags=dr);let Oa=c.insertTextMode??qe;return Oa!==void 0&&($e.insertTextMode=Oa,Oa===z.InsertTextMode.asIs&&($e.keepWhitespace=!0)),$e}function Yr(c,b,T){if(T===z.ApplyKind.Merge){if(!b&&!c.commitCharacters)return;let L=new Set;if(b)for(let qe of b)L.add(qe);if(Rt.stringArray(c.commitCharacters))for(let qe of c.commitCharacters)L.add(qe);return Array.from(L)}return c.commitCharacters!==void 0?Rt.stringArray(c.commitCharacters)?c.commitCharacters:void 0:b}function Zr(c,b,T){if(T===z.ApplyKind.Merge){let L={...b};return c.data&&Object.entries(c.data).forEach(([qe,Le])=>{Le!=null&&(L[qe]=Le)}),L}return c.data??b}function Mt(c){return z.CompletionItemLabelDetails.is(c.labelDetails)?{label:c.label,detail:c.labelDetails.detail,description:c.labelDetails.description}:c.label}function Rn(c,b,T){let L=c.insertTextFormat??T;if(c.textEdit!==void 0||b!==void 0){let[qe,Le]=c.textEdit!==void 0?xt(c.textEdit):[b,c.textEditText??c.label];return L===z.InsertTextFormat.Snippet?{text:new N.SnippetString(Le),range:qe,fromEdit:!0}:{text:Le,range:qe,fromEdit:!0}}else return c.insertText?L===z.InsertTextFormat.Snippet?{text:new N.SnippetString(c.insertText),fromEdit:!1}:{text:c.insertText,fromEdit:!1}:void 0}function xt(c){return z.InsertReplaceEdit.is(c)?[{inserting:v(c.insert),replacing:v(c.replace)},c.newText]:[v(c.range),c.newText]}function Tn(c){if(c)return new N.TextEdit(v(c.range),c.newText)}async function Ht(c,b){if(c)return se.map(c,Tn,b)}function Oe(c){if(!c)return;let b=new Array(c.length);for(let T=0;T0){let T=[];for(let L of c.children)T.push(tt(L));b.children=T}return b}function Ut(c,b){c.tags=ur(b.tags),b.deprecated&&(c.tags?c.tags.includes(N.SymbolTag.Deprecated)||(c.tags=c.tags.concat(N.SymbolTag.Deprecated)):c.tags=[N.SymbolTag.Deprecated])}function nt(c){let b={title:c.title,command:c.command};return c.tooltip&&(b.tooltip=c.tooltip),c.arguments&&(b.arguments=c.arguments),b}async function Ki(c,b){if(c)return se.map(c,nt,b)}let Ye=new Map;Ye.set(z.CodeActionKind.Empty,N.CodeActionKind.Empty),Ye.set(z.CodeActionKind.QuickFix,N.CodeActionKind.QuickFix),Ye.set(z.CodeActionKind.Refactor,N.CodeActionKind.Refactor),Ye.set(z.CodeActionKind.RefactorExtract,N.CodeActionKind.RefactorExtract),Ye.set(z.CodeActionKind.RefactorInline,N.CodeActionKind.RefactorInline),Ye.set(z.CodeActionKind.RefactorRewrite,N.CodeActionKind.RefactorRewrite),Ye.set(z.CodeActionKind.Source,N.CodeActionKind.Source),Ye.set(z.CodeActionKind.SourceOrganizeImports,N.CodeActionKind.SourceOrganizeImports);function En(c){if(c==null)return;let b=Ye.get(c);if(b)return b;let T=c.split(".");b=N.CodeActionKind.Empty;for(let L of T)b=b.append(L);return b}function ii(c){if(c!=null)return c.map(b=>En(b))}function Ir(c){if(c!=null)return c.map(b=>({kind:En(b.kind),command:nt(b.command)}))}async function lr(c,b){if(c==null)return;let T=new Ww.default(c.title,c.data);return c.kind!==void 0&&(T.kind=En(c.kind)),c.diagnostics!==void 0&&(T.diagnostics=l(c.diagnostics)),c.edit!==void 0&&(T.edit=await I(c.edit,b)),c.command!==void 0&&(T.command=nt(c.command)),c.isPreferred!==void 0&&(T.isPreferred=c.isPreferred),c.disabled!==void 0&&(T.disabled={reason:c.disabled.reason}),c.tags?.includes(z.CodeActionTag.LLMGenerated)&&(T.isAI=!0),T}function It(c,b){return se.mapAsync(c,async T=>z.Command.is(T)?nt(T):lr(T,b),b)}function y(c){if(!c)return;let b=new Hw.default(v(c.range));return c.command&&(b.command=nt(c.command)),c.data!==void 0&&c.data!==null&&(b.data=c.data),b}async function E(c,b){if(c)return se.map(c,y,b)}async function I(c,b){if(!c)return;let T=new Map;if(c.changeAnnotations!==void 0){let Le=c.changeAnnotations;await se.forEach(Object.keys(Le),me=>{let xn=H(Le[me]);T.set(me,xn)},b)}let L=Le=>{if(Le!==void 0)return T.get(Le)},qe=new N.WorkspaceEdit;if(c.documentChanges){let Le=c.documentChanges;await se.forEach(Le,me=>{if(z.CreateFile.is(me))qe.createFile(s(me.uri),me.options,L(me.annotationId));else if(z.RenameFile.is(me))qe.renameFile(s(me.oldUri),s(me.newUri),me.options,L(me.annotationId));else if(z.DeleteFile.is(me))qe.deleteFile(s(me.uri),me.options,L(me.annotationId));else if(z.TextDocumentEdit.is(me)){let xn=s(me.textDocument.uri),dr=[];for(let Nt of me.edits)z.AnnotatedTextEdit.is(Nt)?dr.push([new N.TextEdit(v(Nt.range),Nt.newText),L(Nt.annotationId)]):z.SnippetTextEdit.is(Nt)?dr.push([new N.SnippetTextEdit(v(Nt.range),new N.SnippetString(Nt.snippet.value)),L(Nt.annotationId)]):dr.push([new N.TextEdit(v(Nt.range),Nt.newText),void 0]);qe.set(xn,dr)}else throw new Error(`Unknown workspace edit change received: +${JSON.stringify(me,void 0,4)}`)},b)}else if(c.changes){let Le=c.changes;await se.forEach(Object.keys(Le),me=>{qe.set(s(me),Oe(Le[me]))},b)}return qe}function H(c){if(c!==void 0)return{label:c.label,needsConfirmation:!!c.needsConfirmation,description:c.description}}function Z(c){let b=v(c.range),T=c.target?o(c.target):void 0,L=new Uw.default(b,T);return c.tooltip!==void 0&&(L.tooltip=c.tooltip),c.data!==void 0&&c.data!==null&&(L.data=c.data),L}async function ae(c,b){if(c)return se.map(c,Z,b)}function ie(c){return new N.Color(c.red,c.green,c.blue,c.alpha)}function Ee(c){return new N.ColorInformation(v(c.range),ie(c.color))}async function ke(c,b){if(c)return se.map(c,Ee,b)}function pe(c){let b=new N.ColorPresentation(c.label);return b.additionalTextEdits=Oe(c.additionalTextEdits),c.textEdit&&(b.textEdit=Tn(c.textEdit)),b}async function ye(c,b){if(c)return se.map(c,pe,b)}function rt(c){if(c)switch(c){case z.FoldingRangeKind.Comment:return N.FoldingRangeKind.Comment;case z.FoldingRangeKind.Imports:return N.FoldingRangeKind.Imports;case z.FoldingRangeKind.Region:return N.FoldingRangeKind.Region}}function pt(c){return new N.FoldingRange(c.startLine,c.endLine,rt(c.kind))}async function qn(c,b){if(c)return se.map(c,pt,b)}function Dt(c){return new N.SelectionRange(v(c.range),c.parent?Dt(c.parent):void 0)}async function gt(c,b){return Array.isArray(c)?se.map(c,Dt,b):[]}function si(c){return z.InlineValueText.is(c)?new N.InlineValueText(v(c.range),c.text):z.InlineValueVariableLookup.is(c)?new N.InlineValueVariableLookup(v(c.range),c.variableName,c.caseSensitiveLookup):new N.InlineValueEvaluatableExpression(v(c.range),c.expression)}async function ks(c,b){return Array.isArray(c)?se.map(c,si,b):[]}async function d(c,b){let T=typeof c.label=="string"?c.label:await se.map(c.label,D,b),L=new Gw.default(_(c.position),T);return c.kind!==void 0&&(L.kind=c.kind),c.textEdits!==void 0&&(L.textEdits=await Ht(c.textEdits,b)),c.tooltip!==void 0&&(L.tooltip=$(c.tooltip)),c.paddingLeft!==void 0&&(L.paddingLeft=c.paddingLeft),c.paddingRight!==void 0&&(L.paddingRight=c.paddingRight),c.data!==void 0&&(L.data=c.data),L}function D(c){let b=new N.InlayHintLabelPart(c.value);return c.location!==void 0&&(b.location=en(c.location)),c.tooltip!==void 0&&(b.tooltip=$(c.tooltip)),c.command!==void 0&&(b.command=nt(c.command)),b}function $(c){return typeof c=="string"?c:j(c)}async function ge(c,b){if(Array.isArray(c))return se.mapAsync(c,d,b)}function ce(c){if(c===null)return;let b=new zw.default(tn(c.kind),c.name,c.detail||"",o(c.uri),v(c.range),v(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=ur(c.tags)),b}async function Ze(c,b){if(c!==null)return se.map(c,ce,b)}async function mt(c,b){return new N.CallHierarchyIncomingCall(ce(c.from),await R(c.fromRanges,b))}async function Mn(c,b){if(c!==null)return se.mapAsync(c,mt,b)}async function Oh(c,b){return new N.CallHierarchyOutgoingCall(ce(c.to),await R(c.fromRanges,b))}async function sb(c,b){if(c!==null)return se.mapAsync(c,Oh,b)}async function ob(c,b){if(c!=null)return new N.SemanticTokens(new Uint32Array(c.data),c.resultId)}function Eh(c){return new N.SemanticTokensEdit(c.start,c.deleteCount,c.data!==void 0?new Uint32Array(c.data):void 0)}async function ab(c,b){if(c!=null)return new N.SemanticTokensEdits(c.edits.map(Eh),c.resultId)}function cb(c){return c}async function ub(c,b){if(c!=null)return new N.LinkedEditingRanges(await R(c.ranges,b),lb(c.wordPattern))}function lb(c){if(c!=null)return new RegExp(c)}function qh(c){if(c===null)return;let b=new Kw.default(tn(c.kind),c.name,c.detail||"",o(c.uri),v(c.range),v(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=ur(c.tags)),b}async function db(c,b){if(c!==null)return se.map(c,qh,b)}function Ra(c){if(Rt.string(c))return c;if(z.RelativePattern.is(c)){if(z.URI.is(c.baseUri))return new N.RelativePattern(o(c.baseUri),c.pattern);if(z.WorkspaceFolder.is(c.baseUri)){let b=N.workspace.getWorkspaceFolder(o(c.baseUri.uri));return b!==void 0?new N.RelativePattern(b,c.pattern):void 0}}}async function fb(c,b){if(!c)return;if(Array.isArray(c))return se.map(c,qe=>Ta(qe),b);let T=c,L=await se.map(T.items,qe=>Ta(qe),b);return new N.InlineCompletionList(L)}function Ta(c){let b;typeof c.insertText=="string"?b=c.insertText:b=new N.SnippetString(c.insertText.value);let T;c.command&&(T=nt(c.command));let L=new N.InlineCompletionItem(b,v(c.range),T);return c.filterText&&(L.filterText=c.filterText),L}return{asUri:o,asDocumentSelector:a,asDiagnostics:u,asDiagnostic:f,asRange:v,asRanges:R,asPosition:_,asDiagnosticSeverity:q,asDiagnosticTag:g,asHover:F,asCompletionResult:oe,asCompletionItem:rr,asTextEdit:Tn,asTextEdits:Ht,asSignatureHelp:Ui,asSignatureInformations:Zt,asSignatureInformation:ir,asParameterInformations:ei,asParameterInformation:Mr,asDeclarationResult:xr,asDefinitionResult:ti,asLocation:en,asReferences:ar,asDocumentHighlights:Wi,asDocumentHighlight:ni,asDocumentHighlightKind:wt,asSymbolKind:tn,asSymbolTag:cr,asSymbolTags:ur,asSymbolInformations:zi,asSymbolInformation:On,asDocumentSymbols:ri,asDocumentSymbol:tt,asCommand:nt,asCommands:Ki,asCodeAction:lr,asCodeActionKind:En,asCodeActionKinds:ii,asCodeActionDocumentations:Ir,asCodeActionResult:It,asCodeLens:y,asCodeLenses:E,asWorkspaceEdit:I,asDocumentLink:Z,asDocumentLinks:ae,asFoldingRangeKind:rt,asFoldingRange:pt,asFoldingRanges:qn,asColor:ie,asColorInformation:Ee,asColorInformations:ke,asColorPresentation:pe,asColorPresentations:ye,asSelectionRange:Dt,asSelectionRanges:gt,asInlineValue:si,asInlineValues:ks,asInlayHint:d,asInlayHints:ge,asSemanticTokensLegend:cb,asSemanticTokens:ob,asSemanticTokensEdit:Eh,asSemanticTokensEdits:ab,asCallHierarchyItem:ce,asCallHierarchyItems:Ze,asCallHierarchyIncomingCall:mt,asCallHierarchyIncomingCalls:Mn,asCallHierarchyOutgoingCall:Oh,asCallHierarchyOutgoingCalls:sb,asLinkedEditingRanges:ub,asTypeHierarchyItem:qh,asTypeHierarchyItems:db,asGlobPattern:Ra,asInlineCompletionResult:fb,asInlineCompletionItem:Ta}}});var we=P(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.empty=void 0;Pr.v4=l_;Pr.isUUID=d_;Pr.parse=Jw;Pr.generateUuid=Qw;var fs=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},jl=class n extends fs{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}};Pr.empty=new fs("00000000-0000-0000-0000-000000000000");function l_(){return new jl}var Xw=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function d_(n){return Xw.test(n)}function Jw(n){if(!d_(n))throw new Error("invalid uuid");return new fs(n)}function Qw(){return l_().asHex()}});var Ll=P(on=>{"use strict";var Yw=on&&on.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Zw=on&&on.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),eD=on&&on.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{switch(i.kind){case"begin":this.begin(i);break;case"report":this.report(i);break;case"end":this.done(),r&&r(this);break}})}begin(e){this._infinite=e.percentage===void 0,this._lspProgressDisposable!==void 0&&f_.window.withProgress({location:f_.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(t,r)=>{if(this._lspProgressDisposable!==void 0)return this._progress=t,this._cancellationToken=r,this._tokenDisposable=this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(h_.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((i,s)=>{this._resolve=i,this._reject=s})})}report(e){if(this._infinite&&p_.string(e.message))this._progress!==void 0&&this._progress.report({message:e.message});else if(p_.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),r=Math.max(0,t-this._reported);this._reported+=r,this._progress!==void 0&&this._progress.report({message:e.message,increment:r})}}cancel(){this.cleanup(),this._reject!==void 0&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),this._resolve!==void 0&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){this._lspProgressDisposable!==void 0&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),this._tokenDisposable!==void 0&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}};on.ProgressPart=Fl});var ne=P(_e=>{"use strict";var tD=_e&&_e.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),nD=_e&&_e.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),v_=_e&&_e.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}let r=t>0;return{kind:"document",id:this.registrationType.method,registrations:r,matches:!1}}};_e.DynamicDocumentFeature=hs;var $l=class extends hs{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onAboutToSendNotification;_onNotificationSent;static textDocumentFilter(e,t){for(let r of e)if(Xt.languages.match(r,t)>0)return!0;return!1}constructor(e,t,r,i,s,o,a){super(e),this._event=t,this._type=r,this._middleware=i,this._createParams=s,this._textDocument=o,this._selectorFilter=a,this._selectors=new Map,this._onAboutToSendNotification=new Xt.EventEmitter,this._onNotificationSent=new Xt.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(t=>{this.callback(t).catch(r=>{this._client.error(`Sending document notification ${this._type.method} failed.`,r)})})),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){let t=async r=>{let i=this.getTextDocument(r),s=this._createParams(r);this.aboutToSendNotification(i,this._type,s),await this._client.sendNotification(this._type,s),this.notificationSent(i,this._type,s)};if(this.matches(e)){let r=this._middleware();return r?r(e,i=>t(i)):t(e)}}matches(e){return this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))?!1:!this._selectorFilter||this._selectorFilter(this._selectors.values(),e)}get onAboutToSendNotification(){return this._onAboutToSendNotification.event}aboutToSendNotification(e,t,r){this._onAboutToSendNotification.fire({textDocument:e,type:t,params:r})}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._onNotificationSent=new Xt.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(Xt.languages.match(t,e)>0)return{send:r=>this.callback(r)}}};_e.TextDocumentEventFeature=$l;var Hl=class extends hs{_registrationType;_registrations;constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(let e of this._registrations.values()){let t=e.data.registerOptions.documentSelector;t!==null&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(Al.TextDocumentRegistrationOptions.is(t)){let r=Al.StaticRegistrationOptions.hasId(t)?t.id:g_.generateUuid(),i=t.documentSelector??e;if(i)return[r,Object.assign({},t,{documentSelector:i})]}else if(ft.boolean(t)&&t===!0||Al.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let r=ft.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[g_.generateUuid(),r]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return ft.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let r=t.data.registerOptions.documentSelector;if(r!==null&&Xt.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(r),e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};_e.TextDocumentLanguageFeature=Hl;var Ul=class{_client;_registrationType;_registrations;constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};_e.WorkspaceFeature=Ul;var y_;(function(n){n.push="push",n.pull="pull"})(y_||(_e.DiagnosticCollectionSource=y_={}));var Wl=class{create(e,t){return e!==void 0?Xt.languages.createDiagnosticCollection(e):Xt.languages.createDiagnosticCollection()}dispose(e,t){e.dispose()}};_e.DefaultDiagnosticCollectionProvider=Wl});var C_=P(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.range=kr.balanced=void 0;var iD=(n,e,t)=>{let r=n instanceof RegExp?b_(n,t):n,i=e instanceof RegExp?b_(e,t):e,s=r!==null&&i!=null&&(0,kr.range)(r,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+r.length,s[1]),post:t.slice(s[1]+i.length)}};kr.balanced=iD;var b_=(n,e)=>{let t=e.match(n);return t?t[0]:null},sD=(n,e,t)=>{let r,i,s,o,a,u=t.indexOf(n),l=t.indexOf(e,u+1),f=u;if(u>=0&&l>0){if(n===e)return[u,l];for(r=[],s=t.length;f>=0&&!a;){if(f===u)r.push(f),u=t.indexOf(n,f+1);else if(r.length===1){let p=r.pop();p!==void 0&&(a=[p,l])}else i=r.pop(),i!==void 0&&i=0?u:l}r.length&&o!==void 0&&(a=[s,o])}return a};kr.range=sD});var O_=P(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.EXPANSION_MAX_LENGTH=Gn.EXPANSION_MAX=void 0;Gn.expand=yD;var w_=C_(),D_="\0SLASH"+Math.random()+"\0",S_="\0OPEN"+Math.random()+"\0",Bl="\0CLOSE"+Math.random()+"\0",P_="\0COMMA"+Math.random()+"\0",R_="\0PERIOD"+Math.random()+"\0",oD=new RegExp(D_,"g"),aD=new RegExp(S_,"g"),cD=new RegExp(Bl,"g"),uD=new RegExp(P_,"g"),lD=new RegExp(R_,"g"),dD=/\\\\/g,fD=/\\{/g,hD=/\\}/g,pD=/\\,/g,gD=/\\\./g;Gn.EXPANSION_MAX=1e5;Gn.EXPANSION_MAX_LENGTH=4e6;function zl(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function mD(n){return n.replace(dD,D_).replace(fD,S_).replace(hD,Bl).replace(pD,P_).replace(gD,R_)}function _D(n){return n.replace(oD,"\\").replace(aD,"{").replace(cD,"}").replace(uD,",").replace(lD,".")}function T_(n){if(!n)return[""];let e=[],t=(0,w_.balanced)("{","}",n);if(!t)return n.split(",");let{pre:r,body:i,post:s}=t,o=r.split(",");o[o.length-1]+="{"+i+"}";let a=T_(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function yD(n,e={}){if(!n)return[];let{max:t=Gn.EXPANSION_MAX,maxLength:r=Gn.EXPANSION_MAX_LENGTH}=e;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),Kl(mD(n),t,r,!0).map(_D)}function vD(n){return"{"+n+"}"}function bD(n){return/^-?0\d/.test(n)}function CD(n,e){return n<=e}function wD(n,e){return n>=e}function ps(n,e,t,r,i,s){let o=[],a=0;for(let u=0;u=r)return o;let f=n[u]+e+t[l];if(!(s&&!f)){if(a+f.length>i)return o;o.push(f),a+=f.length}}return o}function DD(n,e,t,r){let i=n.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=zl(i[0]),a=zl(i[1]),u=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(zl(i[2])),1):1,f=CD;a0){let q=new Array(R+1).join("0");_<0?v="-"+q+v.slice(1):v=q+v}}if(g+v.length>r)break;s.push(v),g+=v.length}return s}function Kl(n,e,t,r){let i=[""],s=!1,o=!0;for(;;){let a=(0,w_.balanced)("{","}",n);if(!a)return ps(i,n,[""],e,t,s);let u=a.pre;if(/\$$/.test(u)){if(i=ps(i,u+"{"+a.body+"}",[""],e,t,s&&!a.post.length),o=!1,!a.post.length)break;n=a.post;continue}let l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),p=l||f,h=a.body.indexOf(",")>=0;if(!p&&!h){if(a.post.match(/,(?!,).*\}/)){n=a.pre+"{"+a.body+Bl+a.post,r=!0;continue}return ps(i,u+"{"+a.body+"}"+a.post,[""],e,t,s)}o&&(s=r&&!p,o=!1);let g;if(p)g=DD(a.body,f,e,t);else{let _=T_(a.body);if(_.length===1&&_[0]!==void 0&&(_=Kl(_[0],e,t,!1).map(vD),_.length===1)){if(i=ps(i,u+_[0],[""],e,t,s&&!a.post.length),!a.post.length)break;n=a.post;continue}let v=s&&!a.post.length&&!u;for(let q=0;v&&q=e||R+j.length>t)break e;g.push(j),R+=j.length}}}}if(i=ps(i,u,g,e,t,s&&!a.post.length),!a.post.length)break;n=a.post}return i}});var E_=P(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.assertValidPattern=void 0;var SD=1024*64,PD=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>SD)throw new TypeError("pattern is too long")};Mo.assertValidPattern=PD});var M_=P(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.parseClass=void 0;var RD={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},gs=n=>n.replace(/[[\]\\-]/g,"\\$&"),TD=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),q_=n=>n.join(""),OD=(n,e)=>{let t=e;if(n.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=t+1,o=!1,a=!1,u=!1,l=!1,f=t,p="";e:for(;sp?r.push(gs(p)+"-"+gs(v)):v===p&&r.push(gs(v)),p="",s++;continue}if(n.startsWith("-]",s+1)){r.push(gs(v+"-")),s+=2;continue}if(n.startsWith("-",s+1)){p=v,s+=2;continue}r.push(gs(v)),s++}if(f{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.unescape=void 0;var ED=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?n.replace(/\[([^/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?n.replace(/\[([^/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");Io.unescape=ED});var Xl=P(Ao=>{"use strict";var bt;Object.defineProperty(Ao,"__esModule",{value:!0});Ao.AST=void 0;var qD=M_(),jo=No(),MD=new Set(["!","?","+","*","@"]),Gl=n=>MD.has(n),x_=n=>Gl(n.type),xD=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),ID=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),ND=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),I_=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),jD="(?!(?:^|/)\\.\\.?(?:$|/))",Fo="(?!\\.)",FD=new Set(["[","."]),LD=new Set(["..","."]),AD=new Set("().*{}+?[]^$\\!"),kD=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Vl="[^/]",N_=Vl+"*?",j_=Vl+"+?",$D=0,Lo=class{type;#n;#r;#i=!1;#e=[];#t;#a;#u;#c=!1;#s;#o;#l=!1;id=++$D;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,r={}){this.type=e,e&&(this.#r=!0),this.#t=t,this.#n=this.#t?this.#t.#n:this,this.#s=this.#n===this?r:this.#n.#s,this.#u=this.#n===this?[]:this.#n.#u,e==="!"&&!this.#n.#c&&this.#u.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#o=this.#e.map(e=>String(e)).join("")}#_(){if(this!==this.#n)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,r=t.#t;for(;r;){for(let i=t.#a+1;!r.type&&itypeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#c&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let e=this.#t;for(let t=0;ttypeof g!="string"),l=this.#e.map(g=>{let[_,v,R,q]=typeof g=="string"?bt.#D(g,this.#r,u):g.toRegExpSource(e);return this.#r=this.#r||R,this.#i=this.#i||q,_}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&LD.has(this.#e[0]))){let _=FD,v=t&&_.has(l.charAt(0))||l.startsWith("\\.")&&_.has(l.charAt(2))||l.startsWith("\\.\\.")&&_.has(l.charAt(4)),R=!t&&!e&&_.has(l.charAt(0));f=v?jD:R?Fo:""}let p="";return this.isEnd()&&this.#n.#c&&this.#t?.type==="!"&&(p="(?:$|\\/)"),[f+l+p,(0,jo.unescape)(l),this.#r=!!this.#r,this.#i]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#m(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),l=this;return l.#e=[u],l.type=null,l.#r=void 0,[u,(0,jo.unescape)(this.toString()),!1,!1]}let o=!r||e||t||!Fo?"":this.#m(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!t?Fo:"")+j_;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Fo:"")+N_+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+u}return[a,(0,jo.unescape)(s),this.#r=!!this.#r,this.#i]}#h(){if(x_(this)){let e=0,t=!1;do{t=!0;for(let r=0;r{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,s,o]=t.toRegExpSource(e);return this.#i=this.#i||o,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#D(e,t,r=!1){let i=!1,s="",o=!1,a=!1;for(let u=0;u{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.escape=void 0;var HD=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):e?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");ko.escape=HD});var Ql=P(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.unescape=U.escape=U.AST=U.Minimatch=U.match=U.makeRe=U.braceExpand=U.defaults=U.filter=U.GLOBSTAR=U.sep=U.minimatch=void 0;var UD=O_(),$o=E_(),A_=Xl(),WD=Jl(),zD=No(),KD=(n,e,t={})=>((0,$o.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new $r(e,t).match(n));U.minimatch=KD;var BD=/^\*+([^+@!?*[(]*)$/,GD=n=>e=>!e.startsWith(".")&&e.endsWith(n),VD=n=>e=>e.endsWith(n),XD=n=>(n=n.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(n)),JD=n=>(n=n.toLowerCase(),e=>e.toLowerCase().endsWith(n)),QD=/^\*+\.\*+$/,YD=n=>!n.startsWith(".")&&n.includes("."),ZD=n=>n!=="."&&n!==".."&&n.includes("."),eS=/^\.\*+$/,tS=n=>n!=="."&&n!==".."&&n.startsWith("."),nS=/^\*+$/,rS=n=>n.length!==0&&!n.startsWith("."),iS=n=>n.length!==0&&n!=="."&&n!=="..",sS=/^\?+([^+@!?*[(]*)?$/,oS=([n,e=""])=>{let t=k_([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},aS=([n,e=""])=>{let t=$_([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},cS=([n,e=""])=>{let t=$_([n]);return e?r=>t(r)&&r.endsWith(e):t},uS=([n,e=""])=>{let t=k_([n]);return e?r=>t(r)&&r.endsWith(e):t},k_=([n])=>{let e=n.length;return t=>t.length===e&&!t.startsWith(".")},$_=([n])=>{let e=n.length;return t=>t.length===e&&t!=="."&&t!==".."},H_=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",F_={win32:{sep:"\\"},posix:{sep:"/"}};U.sep=H_==="win32"?F_.win32.sep:F_.posix.sep;U.minimatch.sep=U.sep;U.GLOBSTAR=Symbol("globstar **");U.minimatch.GLOBSTAR=U.GLOBSTAR;var lS="[^/]",dS=lS+"*?",fS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",hS="(?:(?!(?:\\/|^)\\.).)*?",pS=(n,e={})=>t=>(0,U.minimatch)(t,n,e);U.filter=pS;U.minimatch.filter=U.filter;var kt=(n,e={})=>Object.assign({},n,e),gS=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return U.minimatch;let e=U.minimatch;return Object.assign((r,i,s={})=>e(r,i,kt(n,s)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,kt(n,s))}static defaults(i){return e.defaults(kt(n,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,o={}){super(i,s,kt(n,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,kt(n,s))}},unescape:(r,i={})=>e.unescape(r,kt(n,i)),escape:(r,i={})=>e.escape(r,kt(n,i)),filter:(r,i={})=>e.filter(r,kt(n,i)),defaults:r=>e.defaults(kt(n,r)),makeRe:(r,i={})=>e.makeRe(r,kt(n,i)),braceExpand:(r,i={})=>e.braceExpand(r,kt(n,i)),match:(r,i,s={})=>e.match(r,i,kt(n,s)),sep:e.sep,GLOBSTAR:U.GLOBSTAR})};U.defaults=gS;U.minimatch.defaults=U.defaults;var mS=(n,e={})=>((0,$o.assertValidPattern)(n),e.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,UD.expand)(n,{max:e.braceExpandMax}));U.braceExpand=mS;U.minimatch.braceExpand=U.braceExpand;var _S=(n,e={})=>new $r(n,e).makeRe();U.makeRe=_S;U.minimatch.makeRe=U.makeRe;var yS=(n,e,t={})=>{let r=new $r(e,t);return n=n.filter(i=>r.match(i)),r.options.nonull&&!n.length&&n.push(e),n};U.match=yS;U.minimatch.match=U.match;var L_=/[?*]|[+@!]\(.*?\)|\[|\]/,vS=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$r=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,$o.assertValidPattern)(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||H_,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!L_.test(s[2]))&&!L_.test(s[3]),l=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(l)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&r.splice(i+1,o-i);let a=r[i+1],u=r[i+2],l=r[i+3];if(a!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(i,1);let f=r.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;ot.length)}partsMatch(e,t,r=!1){let i=0,s=0,o=[],a="";for(;i=2&&(e=this.levelTwoFileOptimize(e)),t.includes(U.GLOBSTAR)?this.#n(e,t,r,i,s):this.#i(e,t,r,i,s)}#n(e,t,r,i,s){let o=t.indexOf(U.GLOBSTAR,s),a=t.lastIndexOf(U.GLOBSTAR),[u,l,f]=r?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(u.length){let w=e.slice(i,i+u.length);if(!this.#i(w,u,r,0,0))return!1;i+=u.length,s+=u.length}let p=0;if(f.length){if(f.length+i>e.length)return!1;let w=e.length-f.length;if(this.#i(e,f,r,w,0))p=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(w--,!this.#i(e,f,r,w,0)))return!1;p=f.length+1}}if(!l.length){let w=!!p;for(let M=i;M{let l=u.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?vS(p):p===U.GLOBSTAR?U.GLOBSTAR:p._src});l.forEach((p,h)=>{let g=l[h+1],_=l[h-1];p!==U.GLOBSTAR||_===U.GLOBSTAR||(_===void 0?g!==void 0&&g!==U.GLOBSTAR?l[h+1]="(?:\\/|"+r+"\\/)?"+g:l[h]=r:g===void 0?l[h-1]=_+"(?:\\/|\\/"+r+")?":g!==U.GLOBSTAR&&(l[h-1]=_+"(?:\\/|\\/"+r+"\\/)"+g,l[h+1]=U.GLOBSTAR))});let f=l.filter(p=>p!==U.GLOBSTAR);if(this.partial&&f.length>=1){let p=[];for(let h=1;h<=f.length;h++)p.push(f.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a of s){let u=i;if(r.matchBase&&a.length===1&&(u=[o]),this.matchOne(u,a,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return U.minimatch.defaults(e).Minimatch}};U.Minimatch=$r;var bS=Xl();Object.defineProperty(U,"AST",{enumerable:!0,get:function(){return bS.AST}});var CS=Jl();Object.defineProperty(U,"escape",{enumerable:!0,get:function(){return CS.escape}});var wS=No();Object.defineProperty(U,"unescape",{enumerable:!0,get:function(){return wS.unescape}});U.minimatch.AST=A_.AST;U.minimatch.Minimatch=$r;U.minimatch.escape=WD.escape;U.minimatch.unescape=zD.unescape});var Yl=P(Vn=>{"use strict";var DS=Vn&&Vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SS=Vn&&Vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PS=Vn&&Vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.DiagnosticFeature=Rr.DiagnosticPullMode=Rr.vsdiag=void 0;var De=require("vscode"),Se=V(),ES=we(),qS=Yl(),ms=ne();function Ho(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var Tt;(function(n){let e;(function(t){t.full="full",t.unChanged="unChanged"})(e=n.DocumentDiagnosticReportKind||(n.DocumentDiagnosticReportKind={}))})(Tt||(Rr.vsdiag=Tt={}));var _s;(function(n){n.onType="onType",n.onSave="onSave",n.onFocus="onFocus"})(_s||(Rr.DiagnosticPullMode=_s={}));var Je;(function(n){n.active="open",n.reschedule="reschedule",n.outDated="drop"})(Je||(Je={}));var Ue;(function(n){n[n.document=1]="document",n[n.workspace=2]="workspace"})(Ue||(Ue={}));var Xn;(function(n){function e(t){return t instanceof De.Uri?t.toString():t.uri.toString()}n.asKey=e})(Xn||(Xn={}));var Zl=class{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,r){let i=e===Ue.document?this.documentPullStates:this.workspacePullStates,[s,o,a]=t instanceof De.Uri?[t.toString(),t,r]:[t.uri.toString(),t.uri,t.version],u=i.get(s);return u===void 0&&(u={document:o,pulledVersion:a,resultId:void 0},i.set(s,u)),u}update(e,t,r,i){let s=e===Ue.document?this.documentPullStates:this.workspacePullStates,[o,a,u,l]=t instanceof De.Uri?[t.toString(),t,r,i]:[t.uri.toString(),t.uri,t.version,r],f=s.get(o);f===void 0?(f={document:a,pulledVersion:u,resultId:l},s.set(o,f)):(f.pulledVersion=u,f.resultId=l)}unTrack(e,t){let r=Xn.asKey(t);(e===Ue.document?this.documentPullStates:this.workspacePullStates).delete(r)}tracks(e,t){let r=Xn.asKey(t);return(e===Ue.document?this.documentPullStates:this.workspacePullStates).has(r)}tracksSameVersion(e,t){let r=t.uri.toString(),s=(e===Ue.document?this.documentPullStates:this.workspacePullStates).get(r);return s!==void 0&&s.pulledVersion===t.version}getResultId(e,t){let r=Xn.asKey(t);return(e===Ue.document?this.documentPullStates:this.workspacePullStates).get(r)?.resultId}getAllResultIds(){let e=[];for(let[t,r]of this.workspacePullStates)this.documentPullStates.has(t)&&(r=this.documentPullStates.get(t)),r.resultId!==void 0&&e.push({uri:t,value:r.resultId});return e}},ed=class{isDisposed;client;visibleDocuments;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,t,r){this.client=e,this.visibleDocuments=t,this.options=r,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new De.EventEmitter,this.provider=this.createProvider(),this.diagnostics=this.createDiagnosticCollection(),this.openRequests=new Map,this.documentStates=new Zl,this.workspaceErrorCounter=0}createDiagnosticCollection(){return this.client.clientOptions.diagnosticCollectionProvider===void 0?De.languages.createDiagnosticCollection(this.options.identifier):this.client.clientOptions.diagnosticCollectionProvider.create(this.options.identifier,ms.DiagnosticCollectionSource.pull)}knows(e,t){let r=t instanceof De.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(r.toString())}knowsSameVersion(e,t){let r=this.openRequests.get(t.uri.toString());return r===void 0?this.documentStates.tracksSameVersion(e,t):r.state===Je.reschedule?!0:r.state===Je.outDated?!1:r.version===t.version}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;let r=e instanceof De.Uri?e:e.uri;this.pullAsync(e).then(()=>{t&&t()},i=>{this.client.error(`Document pull failed for text document ${r.toString()}`,i,!1)})}async pullAsync(e,t){if(this.isDisposed)return;let r=e instanceof De.Uri,i=r?e:e.uri,s=i.toString();t=r?t:e.version;let o=this.openRequests.get(s),a=r?this.documentStates.track(Ue.document,e,t):this.documentStates.track(Ue.document,e);if(o===void 0){let u=new De.CancellationTokenSource;this.openRequests.set(s,{state:Je.active,document:e,version:t,tokenSource:u});let l,f;try{l=await this.provider.provideDiagnostics(e,a.resultId,u.token)??{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}}catch(p){if(p instanceof ms.LSPCancellationError&&Se.DiagnosticServerCancellationData.is(p.data)&&p.data.retriggerRequest===!1&&(f={state:Je.outDated,document:e}),f===void 0&&p instanceof De.CancellationError)f={state:Je.reschedule,document:e};else throw p}if(f=f??this.openRequests.get(s),f===void 0){this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),this.diagnostics.delete(i);return}if(this.openRequests.delete(s),!this.visibleDocuments.isVisible(e)){this.documentStates.unTrack(Ue.document,e);return}if(f.state===Je.outDated)return;l!==void 0&&(l.kind===Tt.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,l.items),a.pulledVersion=t,a.resultId=l.resultId),f.state===Je.reschedule&&this.pull(e)}else o.state===Je.active?(o.tokenSource.cancel(),this.openRequests.set(s,{state:Je.reschedule,document:o.document})):o.state===Je.outDated&&this.openRequests.set(s,{state:Je.reschedule,document:o.document})}forgetDocument(e){if(this.isDisposed)return;let t=e instanceof De.Uri?e:e.uri,r=t.toString(),i=this.openRequests.get(r);this.options.workspaceDiagnostics&&t.scheme!=="untitled"?(i!==void 0?this.openRequests.set(r,{state:Je.reschedule,document:e}):this.pull(e,()=>{this.forget(Ue.document,e)}),this.forget(Ue.workspace,e)):(i!==void 0&&(i.state===Je.active&&i.tokenSource.cancel(),this.openRequests.set(r,{state:Je.outDated,document:e})),this.diagnostics.delete(t),this.forget(Ue.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then(()=>{this.workspaceTimeout=(0,Se.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3)},e=>{!(e instanceof ms.LSPCancellationError)&&!Se.DiagnosticServerCancellationData.is(e.data)&&(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,Se.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3))})}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;this.workspaceCancellation!==void 0&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new De.CancellationTokenSource;let e=this.documentStates.getAllResultIds().map(t=>({uri:this.client.protocol2CodeConverter.asUri(t.uri),value:t.value}));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,t=>{if(!(!t||this.isDisposed))for(let r of t.items)r.kind===Tt.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(Ue.document,r.uri)||this.diagnostics.set(r.uri,r.items)),this.documentStates.update(Ue.workspace,r.uri,r.version??void 0,r.resultId)})}createProvider(){let e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(t,r,i)=>{let s=(a,u,l)=>{let f={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(a instanceof De.Uri?a:a.uri)},previousResultId:u};return this.isDisposed===!0||!this.client.isRunning()?{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}:this.client.sendRequest(Se.DocumentDiagnosticRequest.type,f,l).then(async p=>{if(this.isDisposed)return{kind:Tt.DocumentDiagnosticReportKind.full,items:[]};if(l.isCancellationRequested)throw new De.CancellationError;return p==null?{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}:p.kind===Se.DocumentDiagnosticReportKind.Full?{kind:Tt.DocumentDiagnosticReportKind.full,resultId:p.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(p.items,l)}:{kind:Tt.DocumentDiagnosticReportKind.unChanged,resultId:p.resultId}},p=>this.client.handleFailedRequest(Se.DocumentDiagnosticRequest.type,l,p,{kind:Tt.DocumentDiagnosticReportKind.full,items:[]},!0,!0))},o=this.client.middleware;return o.provideDiagnostics?o.provideDiagnostics(t,r,i,s):s(t,r,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(t,r,i)=>{let s=async l=>l.kind===Se.DocumentDiagnosticReportKind.Full?{kind:Tt.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version,items:await this.client.protocol2CodeConverter.asDiagnostics(l.items,r)}:{kind:Tt.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version},o=l=>{let f=[];for(let p of l)f.push({uri:this.client.code2ProtocolConverter.asUri(p.uri),value:p.value});return f},a=(l,f,p)=>{let h=(0,ES.generateUuid)(),g=this.client.onProgress(Se.WorkspaceDiagnosticRequest.partialResult,h,async v=>{if(v==null){p(null);return}let R={items:[]};for(let q of v.items)try{R.items.push(await s(q))}catch(w){this.client.error("Converting workspace diagnostics failed.",w)}p(R)}),_={identifier:this.options.identifier,previousResultIds:o(l),partialResultToken:h};return this.isDisposed===!0||!this.client.isRunning()?{items:[]}:this.client.sendRequest(Se.WorkspaceDiagnosticRequest.type,_,f).then(async v=>{if(f.isCancellationRequested)return{items:[]};let R={items:[]};for(let q of v.items)R.items.push(await s(q));return g.dispose(),p(R),{items:[]}},v=>(g.dispose(),this.client.handleFailedRequest(Se.DocumentDiagnosticRequest.type,f,v,{items:[]})))},u=this.client.middleware;return u.provideWorkspaceDiagnostics?u.provideWorkspaceDiagnostics(t,r,i,a):a(t,r,i)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(let[e,t]of this.openRequests)t.state===Je.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:Je.outDated,document:t.document});this.client.clientOptions.diagnosticCollectionProvider!==void 0?this.client.clientOptions.diagnosticCollectionProvider.dispose(this.diagnostics,ms.DiagnosticCollectionSource.pull):this.diagnostics.dispose()}},td=class{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,t){this.client=e,this.diagnosticRequestor=t,this.documents=new Se.LinkedMap,this.isDisposed=!1}add(e){if(this.isDisposed===!0)return;let t=Xn.asKey(e);this.documents.has(t)||(this.documents.set(t,e,Se.Touch.Last),this.lastDocumentToPull=e)}remove(e){let t=Xn.asKey(e);if(this.documents.delete(t),this.documents.size===0){this.stop();return}else if(t===this.lastDocumentToPullKey()){let r=this.documents.before(t);r===void 0?this.stop():this.lastDocumentToPull=r}}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){if(this.isDisposed!==!0){if(this.documents.size===0){this.stop();return}this.lastDocumentToPull!==void 0&&this.timeoutHandle===void 0&&(this.timeoutHandle=(0,Se.RAL)().timer.setTimeout(()=>{let e=this.documents.first;if(e===void 0)return;let t=Xn.asKey(e);this.diagnosticRequestor.pullAsync(e).catch(r=>{this.client.error(`Document pull failed for text document ${t}`,r,!1)}).finally(()=>{this.timeoutHandle=void 0,this.documents.set(t,e,Se.Touch.Last),t!==this.lastDocumentToPullKey()&&this.runLoop()})},500))}}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return this.lastDocumentToPull!==void 0?Xn.asKey(this.lastDocumentToPull):void 0}},nd=class{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,t,r){let i=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),s=e.protocol2CodeConverter.asDocumentSelector(r.documentSelector),o=[],a=(w,M)=>!(typeof w=="string"||w.language!==void 0&&w.language!=="*"||w.scheme!==void 0&&w.scheme!=="*"&&w.scheme!==M.scheme||w.pattern!==void 0&&!(0,qS.matchGlobPattern)(w.pattern,M)),u=w=>{let M=r.documentSelector;if(i.match!==void 0)return i.match(M,w);for(let j of M)if(Se.TextDocumentFilter.is(j)&&a(j,w))return!0;return!1},l=w=>w instanceof De.Uri?u(w):De.languages.match(s,w)>0&&t.isVisible(w),f=w=>De.languages.match(s,w.document)>0&&t.isVisible(w.notebook.uri),p=w=>w instanceof De.Uri?this.activeTextDocument?.uri.toString()===w.toString():this.activeTextDocument===w;this.diagnosticRequestor=new ed(e,t,r),this.backgroundScheduler=new td(e,this.diagnosticRequestor);let h=w=>{!l(w)||!r.interFileDependencies||p(w)||i.onChange===!1||this.backgroundScheduler.add(w)},g=(w,M)=>(i.filter===void 0||!i.filter(w,M))&&this.diagnosticRequestor.knows(Ue.document,w);this.activeTextDocument=De.window.activeTextEditor?.document,o.push(De.window.onDidChangeActiveTextEditor(w=>{let M=this.activeTextDocument;this.activeTextDocument=w?.document,M!==void 0&&h(M),this.activeTextDocument!==void 0&&(this.backgroundScheduler.remove(this.activeTextDocument),i.onFocus===!0&&l(this.activeTextDocument)&&g(this.activeTextDocument,_s.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))}));let _=e.getFeature(Se.DidOpenTextDocumentNotification.method);o.push(_.onNotificationSent(w=>{let M=w.textDocument;this.diagnosticRequestor.knowsSameVersion(Ue.document,M)||l(M)&&this.diagnosticRequestor.pull(M,()=>{h(M)})}));let v=e.getFeature(Se.NotebookDocumentSyncRegistrationType.method);o.push(v.onOpenNotificationSent(w=>{for(let M of w.getCells())f(M)&&this.diagnosticRequestor.pull(M.document,()=>{h(M.document)})})),o.push(t.onOpen(w=>{for(let M of w){if(this.diagnosticRequestor.knows(Ue.document,M))continue;let j=M.toString(),F;for(let oe of De.workspace.textDocuments)if(j===oe.uri.toString()){F=oe;break}F!==void 0&&l(F)&&this.diagnosticRequestor.pull(F,()=>{h(F)})}}));let R=new Set;for(let w of De.workspace.textDocuments)l(w)&&(this.diagnosticRequestor.pull(w,()=>{h(w)}),R.add(w.uri.toString()));for(let w of De.workspace.notebookDocuments)for(let M of w.getCells())f(M)&&(this.diagnosticRequestor.pull(M.document,()=>{h(M.document)}),R.add(M.document.uri.toString()));if(i.onTabs===!0)for(let w of t.getResources())!R.has(w.toString())&&l(w)&&this.diagnosticRequestor.pull(w,()=>{h(w)});if(i.onChange===!0){let w=e.getFeature(Se.DidChangeTextDocumentNotification.method);o.push(w.onNotificationSent(async M=>{let j=M.textDocument;g(j,_s.onType)&&this.diagnosticRequestor.pull(j,()=>{this.backgroundScheduler.trigger()})})),o.push(v.onChangeNotificationSent(async M=>{let F=(M.cells?.textContent||[]).map(Te=>M.notebook.getCells().find(Pn=>Pn.document.uri.toString()===Te.document.uri.toString()));for(let Te of F)Te&&f(Te)&&this.diagnosticRequestor.pull(Te.document,()=>{this.backgroundScheduler.trigger()});let oe=M.cells?.structure?.didClose||[];for(let Te of oe)this.diagnosticRequestor.forgetDocument(Te.document);let te=M.cells?.structure?.didOpen||[];for(let Te of te)f(Te)&&this.diagnosticRequestor.pull(Te.document,()=>{this.backgroundScheduler.trigger()})}))}if(i.onSave===!0){let w=e.getFeature(Se.DidSaveTextDocumentNotification.method);o.push(w.onNotificationSent(M=>{let j=M.textDocument;g(j,_s.onSave)&&this.diagnosticRequestor.pull(M.textDocument)})),o.push(v.onSaveNotificationSent(M=>{for(let j of M.getCells())f(j)&&this.diagnosticRequestor.pull(j.document)}))}let q=e.getFeature(Se.DidCloseTextDocumentNotification.method);o.push(q.onAboutToSendNotification(w=>{this.cleanUpDocument(w.textDocument)})),o.push(v.onCloseNotificationSent(w=>{for(let M of w.getCells())this.cleanUpDocument(M.document)})),o.push(t.onClose(w=>{for(let M of w)this.cleanUpDocument(M)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(let w of De.workspace.textDocuments)l(w)&&this.diagnosticRequestor.pull(w)}),r.workspaceDiagnostics===!0&&r.identifier!=="da348dc5-c30a-4515-9d98-31ff3be38d14"&&this.diagnosticRequestor.pullWorkspace(),this.disposable=De.Disposable.from(...o,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(Ue.document,e)&&this.diagnosticRequestor.forgetDocument(e)}},rd=class extends ms.TextDocumentLanguageFeature{constructor(e){super(e,Se.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=Ho(Ho(e,"textDocument"),"diagnostic");t.relatedInformation=!0,t.tagSupport={valueSet:[Se.DiagnosticTag.Unnecessary,Se.DiagnosticTag.Deprecated]},t.codeDescriptionSupport=!0,t.dataSupport=!0,t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,t.markupMessageSupport=!1,Ho(Ho(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(Se.DiagnosticRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeDiagnosticsEmitter.fire()});let[i,s]=this.getRegistration(t,e.diagnosticProvider);!i||!s||this.register({id:i,registerOptions:s})}clear(){super.clear()}refresh(){for(let e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){let t=new nd(this._client,this._client.visibleDocuments,e);return[t.disposable,t]}};Rr.DiagnosticFeature=rd});var z_=P(an=>{"use strict";var MS=an&&an.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),xS=an&&an.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ko=an&&an.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(v.metadata=o(h.metadata)),v}t.asNotebookDocument=i;function s(h,g){return h.map(_=>a(_,g))}t.asNotebookCells=s;function o(h){return l(new Set,h)}t.asMetadata=o;function a(h,g){let _=Jn.NotebookCell.create(u(h.kind),g.asUri(h.document.uri));return Object.keys(h.metadata).length>0&&(_.metadata=o(h.metadata)),h.executionSummary!==void 0&&U_.number(h.executionSummary.executionOrder)&&U_.boolean(h.executionSummary.success)&&(_.executionSummary={executionOrder:h.executionSummary.executionOrder,success:h.executionSummary.success}),_}t.asNotebookCell=a;function u(h){switch(h){case Re.NotebookCellKind.Markup:return Jn.NotebookCellKind.Markup;case Re.NotebookCellKind.Code:return Jn.NotebookCellKind.Code}}function l(h,g){if(h.has(g))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(g)){let _=[];for(let v of g)if(v!==null&&typeof v=="object"||Array.isArray(v))_.push(l(h,v));else{if(v instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");_.push(v)}return _}else{let _=Object.keys(g),v=Object.create(null);for(let R of _){let q=g[R];if(q!==null&&typeof q=="object"||Array.isArray(q))v[R]=l(h,q);else{if(q instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");v[R]=q}}return v}}function f(h,g){let _=g.asChangeTextDocumentParams(h,h.document.uri,h.document.version);return{document:_.textDocument,changes:_.contentChanges}}t.asTextContentChange=f;function p(h,g){let _=Object.create(null);if(h.metadata&&(_.metadata=n.c2p.asMetadata(h.metadata)),h.cells!==void 0){let v=Object.create(null),R=h.cells;R.structure&&(v.structure={array:{start:R.structure.array.start,deleteCount:R.structure.array.deleteCount,cells:R.structure.array.cells!==void 0?R.structure.array.cells.map(q=>n.c2p.asNotebookCell(q,g)):void 0},didOpen:R.structure.didOpen!==void 0?R.structure.didOpen.map(q=>g.asOpenTextDocumentParams(q.document).textDocument):void 0,didClose:R.structure.didClose!==void 0?R.structure.didClose.map(q=>g.asCloseTextDocumentParams(q.document).textDocument):void 0}),R.data!==void 0&&(v.data=R.data.map(q=>n.c2p.asNotebookCell(q,g))),R.textContent!==void 0&&(v.textContent=R.textContent.map(q=>n.c2p.asTextContentChange(q,g))),Object.keys(v).length>0&&(_.cells=v)}return _}t.asNotebookDocumentChangeEvent=p})(e=n.c2p||(n.c2p={}))})(Oi||(Oi={}));var sd;(function(n){function e(a,u,l){let f=a.length,p=u.length,h=0;for(;h=0&&_>=0&&t(a[g],u[_],l);)g--,_--;let v=g+1-h,R=h===_+1?void 0:u.slice(h,_+1);return R!==void 0?{start:h,deleteCount:v,cells:R}:{start:h,deleteCount:v}}else return hr.document.uri.toString()))}}n.create=e})(zo||(zo={}));var Ei=class{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,t,r,i,s,o){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(Wo.asDocumentSelector(t)),this.onChangeNotificationSent=r,this.onOpenNotificationSent=i,this.onCloseNotificationSent=s,this.onSaveNotificationSent=o,Re.workspace.onDidOpenNotebookDocument(a=>{this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a)},void 0,this.disposables);for(let a of Re.workspace.notebookDocuments)this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a);Re.workspace.onDidChangeNotebookDocument(a=>this.didChangeNotebookDocument(a),void 0,this.disposables),this.options.save===!0&&Re.workspace.onDidSaveNotebookDocument(a=>this.didSave(a),void 0,this.disposables),Re.workspace.onDidCloseNotebookDocument(a=>{this.didClose(a),this.notebookDidOpen.delete(a.uri.toString())},void 0,this.disposables)}getState(){for(let e of Re.workspace.notebookDocuments)if(this.getMatchingCellsConsideringSyncInfo(e)!==void 0)return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){if(Re.languages.match(this.selector,e)>0)return!0;let t=e.uri.toString();for(let r of this.notebookSyncInfo.values())if(r.uris.has(t))return!0;return!1}didOpenNotebookCellTextDocument(e,t){if(Re.languages.match(this.selector,t.document)===0||!this.notebookDidOpen.has(e.uri.toString()))return;let r=this.getSyncInfo(e),i=this.cellMatches(e,t);if(r!==void 0){let s=r.uris.has(t.document.uri.toString());if(i&&s||!i&&!s)return;if(i){let o=this.mergeCells(e,r,[t]);if(o!==void 0){let a=this.asNotebookDocumentChangeEvent(e,void 0,r,o);a!==void 0&&this.doSendChange(a,o).catch(()=>{})}}}else i&&this.doSendOpen(e,[t]).catch(()=>{})}didChangeNotebookCellTextDocument(e,t,r){if(Re.languages.match(this.selector,r.document)===0)return;let i=this.getSyncInfo(e);i===void 0||!i.uris.has(t.document.uri.toString())||this.doSendChange({notebook:e,cells:{textContent:[r]}},i.cells).catch(()=>{})}didCloseNotebookCellTextDocument(e,t){let r=this.getSyncInfo(e);if(r===void 0)return;let i=t.document.uri,s=r.cells.findIndex(o=>o.document.uri.toString()===i.toString());if(s!==-1)if(s===0&&r.cells.length===1)this.doSendClose(e,r.cells).catch(()=>{});else{let o=r.cells.slice(),a=o.splice(s,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:s,deleteCount:1},didClose:a}}},o).catch(()=>{})}}dispose(){for(let e of this.disposables)e.dispose()}didOpen(e,t,r=this.getSyncInfo(e)){if(r!==void 0)if(t===void 0&&(t=r.cells.slice()),t!==void 0){let i=this.asNotebookDocumentChangeEvent(e,void 0,r,t);i!==void 0&&this.doSendChange(i,t).catch(()=>{})}else this.doSendClose(e,[]).catch(()=>{});else{if(t=this.getMatchingCells(e),t===void 0)return;this.doSendOpen(e,t).catch(()=>{})}}didChangeNotebookDocument(e){let t=e.notebook,r=this.getSyncInfo(t);if(r===void 0){if(e.contentChanges.length===0)return;let i=this.getMatchingCells(t);if(i===void 0)return;this.didOpen(t,i,r)}else{let i=this.getMatchingCellsFromEvent(t,r,e);if(i===void 0){this.didClose(t,r);return}let s=this.asNotebookDocumentChangeEvent(e.notebook,e,r,i);s!==void 0&&this.doSendChange(s,i).catch(()=>{})}}didSave(e){this.getSyncInfo(e)!==void 0&&this.doSendSave(e).catch(()=>{})}didClose(e,t=this.getSyncInfo(e)){if(t===void 0)return;let r=e.getCells().filter(i=>t.uris.has(i.document.uri.toString()));this.doSendClose(e,r).catch(()=>{})}async sendDidOpenNotebookDocument(e){if(this.getSyncInfo(e)!==void 0)throw new Error(`Notebook document ${e.uri.toString()} is already open`);let r=this.getMatchingCells(e);if(r!==void 0)return this.doSendOpen(e,r)}async doSendOpen(e,t){let r=async(s,o)=>{let a=o.map(u=>this.client.code2ProtocolConverter.asTextDocumentItem(u.document));try{await this.client.sendNotification(Jn.DidOpenNotebookDocumentNotification.type,{notebookDocument:Oi.c2p.asNotebookDocument(s,o,this.client.code2ProtocolConverter),cellTextDocuments:a}),this.onOpenNotificationSent.fire(s)}catch(u){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",u),u}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),zo.create(t)),i?.didOpen!==void 0?i.didOpen(e,t,r):r(e,t)}async sendDidChangeNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e.notebook);if(t===void 0)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,t)}async doSendChange(e,t){let r=async s=>{try{await this.client.sendNotification(Jn.DidChangeNotebookDocumentNotification.type,{notebookDocument:Oi.c2p.asVersionedNotebookDocumentIdentifier(s.notebook,this.client.code2ProtocolConverter),change:Oi.c2p.asNotebookDocumentChangeEvent(s,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(s)}catch(o){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",o),o}},i=this.client.middleware?.notebooks;return e.cells?.structure!==void 0&&this.notebookSyncInfo.set(e.notebook.uri.toString(),zo.create(t)),i?.didChange!==void 0?i?.didChange(e,r):r(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){let t=async i=>{try{await this.client.sendNotification(Jn.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(i.uri)}}),this.onSaveNotificationSent.fire(i)}catch(s){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",s),s}},r=this.client.middleware?.notebooks;return r?.didSave!==void 0?r.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e);if(t===void 0)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,t)}async doSendClose(e,t){let r=async(s,o)=>{try{await this.client.sendNotification(Jn.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(s.uri)},cellTextDocuments:o.map(a=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(a.document))}),this.onCloseNotificationSent.fire(s)}catch(a){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",a),a}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),i?.didClose!==void 0?i.didClose(e,t,r):r(e,t)}getSynchronizedCells(e){return this.getSyncInfo(e)?.cells}asNotebookDocumentChangeEvent(e,t,r,i){if(t!==void 0&&t.notebook!==e)throw new Error("Notebook must be identical");let s={notebook:e};t?.metadata!==void 0&&(s.metadata=Oi.c2p.asMetadata(t.metadata));let o;if(t?.cellChanges!==void 0&&t.cellChanges.length>0){let a=[];o=new Set(i.map(u=>u.document.uri.toString()));for(let u of t.cellChanges)o.has(u.cell.document.uri.toString())&&(u.executionSummary!==void 0||u.metadata!==void 0)&&a.push(u.cell);a.length>0&&(s.cells=s.cells??{},s.cells.data=a)}if((t?.contentChanges!==void 0&&t.contentChanges.length>0||t===void 0)&&r!==void 0&&i!==void 0){let a=r.cells,u=i,l=sd.computeDiff(a,u,!1),f,p;if(l!==void 0){f=l.cells===void 0?new Map:new Map(l.cells.map(_=>[_.document.uri.toString(),_])),p=l.deleteCount===0?new Map:new Map(a.slice(l.start,l.start+l.deleteCount).map(_=>[_.document.uri.toString(),_]));for(let _ of Array.from(p.keys()))f.has(_)&&(p.delete(_),f.delete(_));s.cells=s.cells??{};let h=[],g=[];if(f.size>0||p.size>0){for(let _ of f.values())h.push(_);for(let _ of p.values())g.push(_)}s.cells.structure={array:l,didOpen:h,didClose:g}}}return Object.keys(s).length>1?s:void 0}getMatchingCells(e,t=e.getCells()){if(this.options.notebookSelector!==void 0){for(let r of this.options.notebookSelector)if(r.notebook===void 0||Uo.matchNotebook(r.notebook,e)){let i=this.filterCells(e,t,r.cells);return i.length===0?void 0:i}}}getMatchingCellsFromEvent(e,t,r){if(this.options.notebookSelector===void 0)return;let i;for(let u of this.options.notebookSelector)if(u.notebook===void 0||Uo.matchNotebook(u.notebook,e)){i=u;break}if(i===void 0)return;if((r.cellChanges===void 0||r.cellChanges.length===0)&&(r.contentChanges===void 0||r.contentChanges.length===0))return t.cells;let s;if(r.cellChanges!==void 0&&r.cellChanges.length>0){let u=r.cellChanges.map(f=>f.cell),l=this.filterCells(e,u,i.cells);if(l.length!==u.length){s=new Set(t.uris);for(let f of u)s.delete(f.document.uri.toString());for(let f of l)s.add(f.document.uri.toString())}}if(r.contentChanges!==void 0&&r.contentChanges.length>0){s===void 0&&(s=new Set(t.uris));for(let u of r.contentChanges){for(let f of u.removedCells)s.delete(f.document.uri.toString());let l=this.filterCells(e,new Array(...u.addedCells),i.cells);for(let f of l)s.add(f.document.uri.toString())}}if(s===void 0)return t.cells;let o=[],a=e.getCells();for(let u of a)s.has(u.document.uri.toString())&&o.push(u);return o}getMatchingCellsFromSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:void 0}getMatchingCellsConsideringSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:this.getMatchingCells(e)}mergeCells(e,t,r){let i=[],s=new Set(t.uris);for(let o of r)s.add(o.document.uri.toString());for(let o of e.getCells())s.has(o.document.uri.toString())&&i.push(o);return i}cellMatches(e,t){let r=this.getMatchingCells(e,[t]);return r!==void 0&&r[0]===t}filterCells(e,t,r){let i=r!==void 0?t.filter(s=>{let o=s.document.languageId;return r.some((a=>a.language==="*"||o===a.language))}):t;return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells=="function"?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}},od=class n{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=Jn.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new Re.EventEmitter,this._onOpenNotificationSent=new Re.EventEmitter,this._onCloseNotificationSent=new Re.EventEmitter,this._onSaveNotificationSent=new Re.EventEmitter,Re.workspace.onDidOpenTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Ei&&s.didOpenNotebookCellTextDocument(r,i)}),Re.workspace.onDidChangeTextDocument(t=>{if(t.contentChanges.length===0)return;let r=t.document;if(r.uri.scheme!==n.CellScheme)return;let[i,s]=this.findNotebookDocumentAndCell(r);if(!(i===void 0||s===void 0))for(let o of this.registrations.values())o instanceof Ei&&o.didChangeNotebookCellTextDocument(i,s,t)}),Re.workspace.onDidCloseTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Ei&&s.didCloseNotebookCellTextDocument(r,i)})}getState(){if(this.registrations.size===0)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(let e of this.registrations.values()){let t=e.getState();if(t.kind==="document"&&t.registrations===!0&&t.matches===!0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){let t=W_(W_(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){let t=e.notebookDocumentSync;t!==void 0&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(Wo.asDocumentSelector(t)))}initialize(e){let t=e.notebookDocumentSync;if(t===void 0)return;let r=t.id??IS.generateUuid();this.register({id:r,registerOptions:t})}register(e){let t=new Ei(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,t)}unregister(e){let t=this.registrations.get(e);t!==void 0&&(this.registrations.delete(e),t.dispose())}clear(){for(let e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new Re.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new Re.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new Re.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new Re.EventEmitter}handles(e){if(e.uri.scheme!==n.CellScheme)return!1;if(this.dedicatedChannel!==void 0&&Re.languages.match(this.dedicatedChannel,e)>0)return!0;for(let t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(let t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){let t=e.uri.toString();for(let r of Re.workspace.notebookDocuments)for(let i of r.getCells())if(i.document.uri.toString()===t)return[r,i];return[void 0,void 0]}};an.NotebookDocumentSyncFeature=od});var G_=P(Ot=>{"use strict";var jS=Ot&&Ot.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),FS=Ot&&Ot.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),B_=Ot&&Ot.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let i=o=>{let a=[];for(let u of o.items){let l=u.scopeUri!==void 0&&u.scopeUri!==null?this._client.protocol2CodeConverter.asUri(u.scopeUri):void 0;a.push(this.getConfiguration(l,u.section!==null?u.section:void 0))}return a},s=e.middleware.workspace;return s&&s.configuration?s.configuration(t,r,i):i(t,r)})}getConfiguration(e,t){let r=null;if(t){let i=t.lastIndexOf(".");if(i===-1)r=Hr(qi.workspace.getConfiguration(void 0,e).get(t));else{let s=qi.workspace.getConfiguration(t.substr(0,i),e);s&&(r=Hr(s.get(t.substr(i+1))))}}else{let i=qi.workspace.getConfiguration(void 0,e);r={};for(let s of Object.keys(i))i.has(s)&&(r[s]=Hr(i.get(s)))}return r===void 0&&(r=null),r}clear(){}};Ot.ConfigurationFeature=ad;function Hr(n){if(n){if(Array.isArray(n))return n.map(Hr);if(typeof n=="object"){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=Hr(n[t]));return e}}return n}var cd=class{_client;isCleared;_listeners;constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return ys.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,K_.ensure)((0,K_.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;e!==void 0&&this.register({id:AS.generateUuid(),registerOptions:{section:e}})}register(e){let t=qi.workspace.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,t),e.registerOptions.section!==void 0&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let r;if(LS.string(e)?r=[e]:r=e,r!==void 0&&t!==void 0&&!r.some(a=>t.affectsConfiguration(a)))return;let i=async o=>o===void 0?this._client.sendNotification(ys.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(ys.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(o)}),s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(r,i):i(r)).catch(o=>{this._client.error(`Sending notification ${ys.DidChangeConfigurationNotification.type.method} failed`,o)})}extractSettingsInformation(e){function t(s,o){let a=s;for(let u=0;u=0?u=qi.workspace.getConfiguration(o.substr(0,a),r).get(o.substr(a+1)):u=qi.workspace.getConfiguration(void 0,r).get(o),u){let l=e[s].split(".");t(i,l)[l[l.length-1]]=Hr(u)}}return i}};Ot.SyncConfigurationFeature=cd});var Q_={};jh(Q_,{TextDocument:()=>ud});function ld(n,e){if(n.length<=1)return n;let t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);ld(r,e),ld(i,e);let s=0,o=0,a=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function kS(n){let e=J_(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var Bo,ud,Y_=Nh(()=>{"use strict";Bo=class n{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let r of e)if(n.isIncremental(r)){let i=J_(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),u=Math.max(i.end.line,0),l=this._lineOffsets,f=V_(r.text,!1,s);if(u-a===f.length)for(let h=0,g=f.length;he?i=o:r=o+1}let s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line];if(e.character<=0)return r;let i=e.line+1=t.length){let o=t.length-1;return{start:{line:o,character:0},end:{line:o,character:this._content.length-t[o]}}}else if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=t[e],i=e+1=t.length)return"";if(e<0)return"";let r=e+1t&&X_(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}};(function(n){function e(i,s,o,a){return new Bo(i,s,o,a)}n.create=e;function t(i,s,o){if(i instanceof Bo)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){let o=i.getText(),a=ld(s.map(kS),(f,p)=>{let h=f.range.start.line-p.range.start.line;return h===0?f.range.start.character-p.range.start.character:h}),u=0,l=[];for(let f of a){let p=i.offsetAt(f.range.start);if(pu&&l.push(o.substring(u,p)),f.newText.length&&l.push(f.newText),u=i.offsetAt(f.range.end)}return l.push(o.substr(u)),l.join("")}n.applyEdits=r})(ud||(ud={}))});var Z_=P(We=>{"use strict";var $S=We&&We.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),HS=We&&We.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),US=We&&We.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.middleware.didOpen,r=>e.code2ProtocolConverter.asOpenTextDocumentParams(r),r=>r,Ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){if(this._delayOpen){if(!this.matches(e))return;if(this._client.visibleDocuments.isVisible(e))return super.callback(e);{let r=new _d(e);this._pendingOpenNotifications.set(r.uri.toString(),r)}}else return super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return fe.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(Ae.workspace.textDocuments.forEach(r=>{let i=r.uri.toString();if(!this._syncedDocuments.has(i)&&Ae.languages.match(t,r)>0&&!this._client.hasDedicatedTextSynchronizationFeature(r))if(this._client.visibleDocuments.isVisible(r)){let o=this._client.middleware,a=u=>this._client.sendNotification(this._type,this._createParams(u));(o.didOpen?o.didOpen(r,a):a(r)).catch(u=>{this._client.error(`Sending document notification ${this._type.method} failed`,u)}),this._syncedDocuments.set(i,r)}else this._pendingOpenNotifications.set(i,r)}),this._delayOpen&&this._pendingOpenListeners===void 0){this._pendingOpenListeners=[];let r=this._client.visibleDocuments;this._pendingOpenListeners.push(r.onClose(i=>{for(let s of i)this._pendingOpenNotifications.delete(s.toString())})),this._pendingOpenListeners.push(r.onOpen(i=>{for(let s of i){let o=this._pendingOpenNotifications.get(s.toString());o!==void 0&&(super.callback(o).catch((a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})),this._pendingOpenNotifications.delete(s.toString()))}})),this._pendingOpenListeners.push(Ae.workspace.onDidCloseTextDocument(i=>{this._pendingOpenNotifications.delete(i.uri.toString())}))}}async sendPendingOpenNotifications(e){let t=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();let r=!1;for(let i of t){if(e!==void 0&&i.uri.toString()===e){r=!0;continue}await super.callback(i)}return r}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,r)}clear(){if(this._pendingOpenNotifications.clear(),this._pendingOpenListeners!==void 0){for(let e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}};We.DidOpenTextDocumentFeature=dd;var fd=class extends Ie.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,t,r){super(e,Ae.workspace.onDidCloseTextDocument,fe.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,i=>e.code2ProtocolConverter.asCloseTextDocumentParams(i),i=>i,Ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=r}get registrationType(){return fe.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,r)}unregister(e){let t=this._selectors.get(e);if(t===void 0)return;super.unregister(e);let r=this._selectors.values();this._syncedDocuments.forEach(i=>{if(Ae.languages.match(t,i)>0&&!this._selectorFilter(r,i)&&!this._client.hasDedicatedTextSynchronizationFeature(i)){let s=this._client.middleware,o=a=>this._client.sendNotification(this._type,this._createParams(a));this._syncedDocuments.delete(i.uri.toString()),(s.didClose?s.didClose(i,o):o(i)).catch(a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})}})}};We.DidCloseTextDocumentFeature=fd;var hd=class extends Ie.DynamicDocumentFeature{_listener;_changeData;_onAboutToSendNotification;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,t){super(e),this._changeData=new Map,this._onAboutToSendNotification=new Ae.EventEmitter,this._onNotificationSent=new Ae.EventEmitter,this._onPendingChangeAdded=new Ae.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=fe.TextDocumentSyncKind.None}get onAboutToSendNotification(){return this._onAboutToSendNotification.event}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return fe.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.change!==void 0&&r.change!==fe.TextDocumentSyncKind.None&&this.register({id:Mi.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:r.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ae.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(let e of this._changeData.values())yield e.documentSelector}async callback(e){if(e.contentChanges.length===0)return;let t=e.document.uri,r=e.document.version,i=[];for(let s of this._changeData.values())if(Ae.languages.match(s.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let o=this._client.middleware;if(s.syncKind===fe.TextDocumentSyncKind.Incremental){let a=async u=>{let l=this._client.code2ProtocolConverter.asChangeTextDocumentParams(u,t,r);this.aboutToSendNotification(u.document,fe.DidChangeTextDocumentNotification.type,l),await this._client.sendNotification(fe.DidChangeTextDocumentNotification.type,l),this.notificationSent(u.document,fe.DidChangeTextDocumentNotification.type,l)};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}else if(s.syncKind===fe.TextDocumentSyncKind.Full){let a=async u=>{let l=u.document.uri.toString();this._pendingTextDocumentChanges.set(l,u.document),this._onPendingChangeAdded.fire()};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}}return Promise.all(i).then(void 0,s=>{throw this._client.error(`Sending document notification ${fe.DidChangeTextDocumentNotification.type.method} failed`,s),s})}aboutToSendNotification(e,t,r){this._onAboutToSendNotification.fire({textDocument:e,type:t,params:r})}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){if(this._changeData.delete(e),this._changeData.size===0)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=fe.TextDocumentSyncKind.None;else{this._syncKind=fe.TextDocumentSyncKind.None;for(let t of this._changeData.values())if(this.updateSyncKind(t.syncKind),this._syncKind===fe.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=fe.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(this._pendingTextDocumentChanges.size===0)return[];let t;if(e.size===0)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(let r of this._pendingTextDocumentChanges)e.has(r[0])||(t.push(r[1]),this._pendingTextDocumentChanges.delete(r[0]))}return t}getProvider(e){for(let t of this._changeData.values())if(Ae.languages.match(t.documentSelector,e)>0)return{send:r=>this.callback(r)}}updateSyncKind(e){if(this._syncKind!==fe.TextDocumentSyncKind.Full)switch(e){case fe.TextDocumentSyncKind.Full:this._syncKind=e;break;case fe.TextDocumentSyncKind.Incremental:this._syncKind===fe.TextDocumentSyncKind.None&&(this._syncKind=fe.TextDocumentSyncKind.Incremental);break}}};We.DidChangeTextDocumentFeature=hd;var pd=class extends Ie.TextDocumentEventFeature{constructor(e){super(e,Ae.workspace.onWillSaveTextDocument,fe.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),t=>t.document,(t,r)=>Ie.TextDocumentEventFeature.textDocumentFilter(t,r.document))}get registrationType(){return fe.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSave&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}};We.WillSaveFeature=pd;var gd=class extends Ie.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return fe.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSaveWaitUntil&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ae.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(Ie.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,r=i=>this._client.sendRequest(fe.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(i)).then(async s=>{let o=await this._client.protocol2CodeConverter.asTextEdits(s);return o===void 0?[]:o});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,r):r(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}};We.WillSaveWaitUntilFeature=gd;var md=class extends Ie.TextDocumentEventFeature{_includeText;constructor(e){super(e,Ae.workspace.onDidSaveTextDocument,fe.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),t=>t,Ie.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return fe.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;if(t&&r&&r.save){let i=typeof r.save=="boolean"?{includeText:!1}:{includeText:!!r.save.includeText};this.register({id:Mi.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},i)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}};We.DidSaveTextDocumentFeature=md;var zS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function KS(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of zS)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}var BS=KS(),_d=class n{_extTextDocument;_capturedTextDocument;_content;_uri;_fileName;_languageId;_version;_eol;_isUntitled;_encoding;_isDirty;_isClosed;constructor(e){this._extTextDocument=e,this._content=e.getText(),this._uri=e.uri,this._fileName=e.fileName,this._languageId=e.languageId,this._version=e.version,this._eol=e.eol,this._isUntitled=e.isUntitled,this._encoding=e.encoding,this._isDirty=e.isDirty,this._isClosed=e.isClosed,this._capturedTextDocument=WS.TextDocument.create(this._uri.toString(),this._languageId,this._version,this._content)}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}get eol(){return this._eol}get isUntitled(){return this._isUntitled}get encoding(){return this._encoding}get fileName(){return this._fileName}get isDirty(){return this._isDirty}get isClosed(){return this._isClosed}save(){return this.version===this._extTextDocument.version?this._extTextDocument.save():Promise.resolve(!1)}get lineCount(){return this._capturedTextDocument.lineCount}offsetAt(e){return this._capturedTextDocument.offsetAt(e)}positionAt(e){let t=this._capturedTextDocument.positionAt(e);return new Ae.Position(t.line,t.character)}getText(e){return this._capturedTextDocument.getText(e)}lineAt(e){let t=typeof e=="number"?e:this.validatePosition(e).line;if(t<0||t>=this.lineCount)throw new RangeError(`Illegal value for line: ${t}`);let r=this._capturedTextDocument.getLineRange(t),i=this._capturedTextDocument.getText(r),s=i.search(/\S/),o=new Ae.Range(r.start.line,r.start.character,r.end.line,r.end.character),a=t+1=e.character)return new Ae.Range(r,o.index,r,s.lastIndex)}validateRange(e){let t=this.validatePosition(e.start),r=this.validatePosition(e.end);return t===e.start&&r===e.end?e:new Ae.Range(t.line,t.character,r.line,r.character)}validatePosition(e){let t=Math.min(Math.max(e.line,0),this.lineCount-1),r=this._capturedTextDocument.getLineRange(t),i=Math.min(Math.max(e.character,0),r.end.character);return t===e.line&&i===e.character?e:new Ae.Position(t,i)}static getWordRegExp(e){let t=e??BS;if(t.flags.includes("g"))return t;let r=`${t.flags}g`;return new RegExp(t.source,r)}}});var ey=P(cn=>{"use strict";var GS=cn&&cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),VS=cn&&cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),XS=cn&&cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let p=this._client,h=this._client.middleware,g=(_,v,R,q)=>p.sendRequest(ee.CompletionRequest.type,p.code2ProtocolConverter.asCompletionParams(_,v,R),q).then(w=>q.isCancellationRequested?null:p.protocol2CodeConverter.asCompletionResult(w,i,q),w=>p.handleFailedRequest(ee.CompletionRequest.type,q,w,null));return h.provideCompletionItem?h.provideCompletionItem(a,u,f,l,g):g(a,u,f,l)},resolveCompletionItem:e.resolveProvider?(a,u)=>{let l=this._client,f=this._client.middleware,p=(h,g)=>l.sendRequest(ee.CompletionResolveRequest.type,l.code2ProtocolConverter.asCompletionItem(h,!!this.labelDetailsSupport.get(t)),g).then(_=>g.isCancellationRequested?null:l.protocol2CodeConverter.asCompletionItem(_),_=>l.handleFailedRequest(ee.CompletionResolveRequest.type,g,_,h));return f.resolveCompletionItem?f.resolveCompletionItem(a,u,p):p(a,u)}:void 0};return[JS.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),o,...r),o]}};cn.CompletionItemFeature=vd});var ty=P(un=>{"use strict";var ZS=un&&un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),eP=un&&un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),tP=un&&un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(vs.HoverRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asHover(g),g=>a.handleFailedRequest(vs.HoverRequest.type,h,g,null)),l=a.middleware;return l.provideHover?l.provideHover(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return nP.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};un.HoverFeature=Cd});var ny=P(ln=>{"use strict";var iP=ln&&ln.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sP=ln&&ln.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oP=ln&&ln.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(wd.DefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(wd.DefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideDefinition?l.provideDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return aP.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ln.DefinitionFeature=Sd});var iy=P(dn=>{"use strict";var uP=dn&&dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),lP=dn&&dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),dP=dn&&dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h,g)=>a.sendRequest(bs.SignatureHelpRequest.type,a.code2ProtocolConverter.asSignatureHelpParams(f,p,h),g).then(_=>g.isCancellationRequested?null:a.protocol2CodeConverter.asSignatureHelp(_,g),_=>a.handleFailedRequest(bs.SignatureHelpRequest.type,g,_,null)),l=a.middleware;return l.provideSignatureHelp?l.provideSignatureHelp(r,i,o,s,u):u(r,i,o,s)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){let r=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(e.retriggerCharacters===void 0){let i=e.triggerCharacters||[];return ry.languages.registerSignatureHelpProvider(r,t,...i)}else{let i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return ry.languages.registerSignatureHelpProvider(r,t,i)}}};dn.SignatureHelpFeature=Rd});var sy=P(fn=>{"use strict";var hP=fn&&fn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pP=fn&&fn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gP=fn&&fn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(Td.DocumentHighlightRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDocumentHighlights(g,h),g=>a.handleFailedRequest(Td.DocumentHighlightRequest.type,h,g,null)),l=a.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,s,o,u):u(i,s,o)}};return[mP.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};fn.DocumentHighlightFeature=Ed});var xd=P(ut=>{"use strict";var yP=ut&&ut.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vP=ut&&ut.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bP=ut&&ut.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(le.DocumentSymbolRequest.type,a.code2ProtocolConverter.asDocumentSymbolParams(f),p);if(p.isCancellationRequested||h===void 0||h===null)return null;if(h.length===0)return[];{let g=h[0];return le.DocumentSymbol.is(g)?await a.protocol2CodeConverter.asDocumentSymbols(h,p):await a.protocol2CodeConverter.asSymbolInformations(h,p)}}catch(h){return a.handleFailedRequest(le.DocumentSymbolRequest.type,p,h,null)}},l=a.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(s,o,u):u(s,o)}},i=e.label!==void 0?{label:e.label}:void 0;return[CP.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,i),r]}};ut.DocumentSymbolFeature=Md});var ay=P(hn=>{"use strict";var DP=hn&&hn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SP=hn&&hn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PP=hn&&hn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let s=this._client,o=(u,l)=>s.sendRequest(Cs.WorkspaceSymbolRequest.type,{query:u},l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformations(f,l),f=>s.handleFailedRequest(Cs.WorkspaceSymbolRequest.type,l,f,null)),a=s.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(r,i,o):o(r,i)},resolveWorkspaceSymbol:e.resolveProvider===!0?(r,i)=>{let s=this._client,o=(u,l)=>s.sendRequest(Cs.WorkspaceSymbolResolveRequest.type,s.code2ProtocolConverter.asWorkspaceSymbol(u),l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformation(f),f=>s.handleFailedRequest(Cs.WorkspaceSymbolResolveRequest.type,l,f,null)),a=s.middleware;return a.resolveWorkspaceSymbol?a.resolveWorkspaceSymbol(r,i,o):o(r,i)}:void 0};return[RP.languages.registerWorkspaceSymbolProvider(t),t]}};hn.WorkspaceSymbolFeature=Nd});var cy=P(pn=>{"use strict";var OP=pn&&pn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),EP=pn&&pn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qP=pn&&pn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=(p,h,g,_)=>u.sendRequest(jd.ReferencesRequest.type,u.code2ProtocolConverter.asReferenceParams(p,h,g),_).then(v=>_.isCancellationRequested?null:u.protocol2CodeConverter.asReferences(v,_),v=>u.handleFailedRequest(jd.ReferencesRequest.type,_,v,null)),f=u.middleware;return f.provideReferences?f.provideReferences(i,s,o,a,l):l(i,s,o,a)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return MP.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};pn.ReferencesFeature=Ld});var uy=P(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.TypeDefinitionFeature=void 0;var IP=require("vscode"),Ad=V(),ws=ne(),kd=class extends ws.TextDocumentLanguageFeature{constructor(e){super(e,Ad.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,ws.ensure)((0,ws.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,ws.ensure)((0,ws.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeDefinitionProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideTypeDefinition:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(Ad.TypeDefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(Ad.TypeDefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return IP.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Go.TypeDefinitionFeature=kd});var ly=P(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.ImplementationFeature=void 0;var NP=require("vscode"),$d=V(),Hd=ne(),Ud=class extends Hd.TextDocumentLanguageFeature{constructor(e){super(e,$d.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,Hd.ensure)((0,Hd.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.implementationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideImplementation:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest($d.ImplementationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest($d.ImplementationRequest.type,h,g,null)),l=a.middleware;return l.provideImplementation?l.provideImplementation(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return NP.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Vo.ImplementationFeature=Ud});var dy=P(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.ColorProviderFeature=void 0;var jP=require("vscode"),Ds=V(),Wd=ne(),zd=class extends Wd.TextDocumentLanguageFeature{constructor(e){super(e,Ds.DocumentColorRequest.type)}fillClientCapabilities(e){(0,Wd.ensure)((0,Wd.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.colorProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideColorPresentations:(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={color:f,textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(p.document),range:a.code2ProtocolConverter.asRange(p.range)};return a.sendRequest(Ds.ColorPresentationRequest.type,g,h).then(_=>h.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(_,h),_=>a.handleFailedRequest(Ds.ColorPresentationRequest.type,h,_,null))},l=a.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,s,o,u):u(i,s,o)},provideDocumentColors:(i,s)=>{let o=this._client,a=(l,f)=>{let p={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(l)};return o.sendRequest(Ds.DocumentColorRequest.type,p,f).then(h=>f.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(h,f),h=>o.handleFailedRequest(Ds.DocumentColorRequest.type,f,h,null))},u=o.middleware;return u.provideDocumentColors?u.provideDocumentColors(i,s,a):a(i,s)}};return[jP.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Xo.ColorProviderFeature=zd});var fy=P(gn=>{"use strict";var FP=gn&&gn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),LP=gn&&gn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),AP=gn&&gn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),context:u.code2ProtocolConverter.asCodeActionContextSync(g)};return u.sendRequest(lt.CodeActionRequest.type,v,_).then(R=>_.isCancellationRequested||R===null||R===void 0?null:u.protocol2CodeConverter.asCodeActionResult(R,_),R=>u.handleFailedRequest(lt.CodeActionRequest.type,_,R,null))},f=u.middleware;return f.provideCodeActions?f.provideCodeActions(i,s,o,a,l):l(i,s,o,a)},resolveCodeAction:e.resolveProvider?(i,s)=>{let o=this._client,a=this._client.middleware,u=async(l,f)=>o.sendRequest(lt.CodeActionResolveRequest.type,o.code2ProtocolConverter.asCodeActionSync(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asCodeAction(p,f),p=>o.handleFailedRequest(lt.CodeActionResolveRequest.type,f,p,l));return a.resolveCodeAction?a.resolveCodeAction(i,s,u):u(i,s)}:void 0};return[kP.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,this.getMetadata(e)),r]}getMetadata(e){if(!(e.codeActionKinds===void 0&&e.documentation===void 0))return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}};gn.CodeActionFeature=Bd});var py=P(mn=>{"use strict";var HP=mn&&mn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),UP=mn&&mn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),WP=mn&&mn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let s of this.getAllProviders())s.onDidChangeCodeLensEmitter.fire()});let i=this.getRegistrationOptions(t,e.codeLensProvider);i&&this.register({id:zP.generateUuid(),registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new hy.EventEmitter,i={onDidChangeCodeLenses:r.event,provideCodeLenses:(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(xi.CodeLensRequest.type,a.code2ProtocolConverter.asCodeLensParams(f),p).then(h=>p.isCancellationRequested?null:a.protocol2CodeConverter.asCodeLenses(h,p),h=>a.handleFailedRequest(xi.CodeLensRequest.type,p,h,null)),l=a.middleware;return l.provideCodeLenses?l.provideCodeLenses(s,o,u):u(s,o)},resolveCodeLens:e.resolveProvider?(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(xi.CodeLensResolveRequest.type,a.code2ProtocolConverter.asCodeLens(f),p).then(h=>p.isCancellationRequested?f:a.protocol2CodeConverter.asCodeLens(h),h=>a.handleFailedRequest(xi.CodeLensResolveRequest.type,p,h,f)),l=a.middleware;return l.resolveCodeLens?l.resolveCodeLens(s,o,u):u(s,o)}:void 0};return[hy.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:r}]}};mn.CodeLensFeature=Gd});var gy=P(Ct=>{"use strict";var KP=Ct&&Ct.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),BP=Ct&&Ct.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),GP=Ct&&Ct.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),options:a.code2ProtocolConverter.asFormattingOptions(p,Ii.fromConfiguration(f))};return a.sendRequest(Jt.DocumentFormattingRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asTextEdits(_,h),_=>a.handleFailedRequest(Jt.DocumentFormattingRequest.type,h,_,null))},l=a.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,s,o,u):u(i,s,o)}};return[Jo.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ct.DocumentFormattingFeature=Vd;var Xd=class extends Qn.TextDocumentLanguageFeature{constructor(e){super(e,Jt.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){let t=(0,Qn.ensure)((0,Qn.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);r&&this.register({id:Qd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentRangeFormattingEdits:(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),options:u.code2ProtocolConverter.asFormattingOptions(g,Ii.fromConfiguration(p))};return u.sendRequest(Jt.DocumentRangeFormattingRequest.type,v,_).then(R=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(R,_),R=>u.handleFailedRequest(Jt.DocumentRangeFormattingRequest.type,_,R,null))},f=u.middleware;return f.provideDocumentRangeFormattingEdits?f.provideDocumentRangeFormattingEdits(i,s,o,a,l):l(i,s,o,a)}};return e.rangesSupport&&(r.provideDocumentRangesFormattingEdits=(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),ranges:u.code2ProtocolConverter.asRanges(h),options:u.code2ProtocolConverter.asFormattingOptions(g,Ii.fromConfiguration(p))};return u.sendRequest(Jt.DocumentRangesFormattingRequest.type,v,_).then(R=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(R,_),R=>u.handleFailedRequest(Jt.DocumentRangesFormattingRequest.type,_,R,null))},f=u.middleware;return f.provideDocumentRangesFormattingEdits?f.provideDocumentRangesFormattingEdits(i,s,o,a,l):l(i,s,o,a)}),[Jo.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ct.DocumentRangeFormattingFeature=Xd;var Jd=class extends Qn.TextDocumentLanguageFeature{constructor(e){super(e,Jt.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,Qn.ensure)((0,Qn.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);r&&this.register({id:Qd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideOnTypeFormattingEdits:(s,o,a,u,l)=>{let f=this._client,p=(g,_,v,R,q)=>{let w={textDocument:f.code2ProtocolConverter.asTextDocumentIdentifier(g),position:f.code2ProtocolConverter.asPosition(_),ch:v,options:f.code2ProtocolConverter.asFormattingOptions(R,Ii.fromConfiguration(g))};return f.sendRequest(Jt.DocumentOnTypeFormattingRequest.type,w,q).then(M=>q.isCancellationRequested?null:f.protocol2CodeConverter.asTextEdits(M,q),M=>f.handleFailedRequest(Jt.DocumentOnTypeFormattingRequest.type,q,M,null))},h=f.middleware;return h.provideOnTypeFormattingEdits?h.provideOnTypeFormattingEdits(s,o,a,u,l,p):p(s,o,a,u,l)}},i=e.moreTriggerCharacter||[];return[Jo.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,e.firstTriggerCharacter,...i),r]}};Ct.DocumentOnTypeFormattingFeature=Jd});var yy=P(_n=>{"use strict";var VP=_n&&_n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XP=_n&&_n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),_y=_n&&_n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),position:u.code2ProtocolConverter.asPosition(h),newName:g},R=null;try{R=await u.sendRequest(Ur.RenameRequest.type,v,_)}catch(w){return u.handleFailedRequest(Ur.RenameRequest.type,_,w,null,!1)}if(_.isCancellationRequested||R===null)return null;let q=await u.protocol2CodeConverter.asWorkspaceEdit(R,_);if(_.isCancellationRequested)return null;if(!u.validateWorkspaceEdit(R))throw new Error("The rename edit returned from the server is not valid anymore and cannot be applied.");return q},f=u.middleware;return f.provideRenameEdits?f.provideRenameEdits(i,s,o,a,l):l(i,s,o,a)},prepareRename:e.prepareProvider?(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),position:a.code2ProtocolConverter.asPosition(p)};return a.sendRequest(Ur.PrepareRenameRequest.type,g,h).then(_=>h.isCancellationRequested?null:Ur.Range.is(_)?a.protocol2CodeConverter.asRange(_):this.isDefaultBehavior(_)?_.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):_&&Ur.Range.is(_.range)?{range:a.protocol2CodeConverter.asRange(_.range),placeholder:_.placeholder}:Promise.reject(new Error("The element can't be renamed.")),_=>{throw typeof _.message=="string"?new Error(_.message):new Error("The element can't be renamed.")})},l=a.middleware;return l.prepareRename?l.prepareRename(i,s,o,u):u(i,s,o)}:void 0};return[this.registerProvider(t,r),r]}registerProvider(e,t){return JP.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){let t=e;return t&&my.boolean(t.defaultBehavior)}};_n.RenameFeature=Zd});var vy=P(yn=>{"use strict";var YP=yn&&yn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ZP=yn&&yn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),eR=yn&&yn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let o=this._client,a=(l,f)=>o.sendRequest(Ps.DocumentLinkRequest.type,o.code2ProtocolConverter.asDocumentLinkParams(l),f).then(p=>f.isCancellationRequested?null:o.protocol2CodeConverter.asDocumentLinks(p,f),p=>o.handleFailedRequest(Ps.DocumentLinkRequest.type,f,p,null)),u=o.middleware;return u.provideDocumentLinks?u.provideDocumentLinks(i,s,a):a(i,s)},resolveDocumentLink:e.resolveProvider?(i,s)=>{let o=this._client,a=(l,f)=>o.sendRequest(Ps.DocumentLinkResolveRequest.type,o.code2ProtocolConverter.asDocumentLink(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asDocumentLink(p),p=>o.handleFailedRequest(Ps.DocumentLinkResolveRequest.type,f,p,l)),u=o.middleware;return u.resolveDocumentLink?u.resolveDocumentLink(i,s,a):a(i,s)}:void 0};return[tR.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};yn.DocumentLinkFeature=tf});var Cy=P(vn=>{"use strict";var rR=vn&&vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),iR=vn&&vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sR=vn&&vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}get registrationType(){return nf.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,by.ensure)((0,by.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:aR.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,r=t.middleware,i=(s,o)=>{let a={command:s,arguments:o};return t.sendRequest(nf.ExecuteCommandRequest.type,a).then(void 0,u=>t.handleFailedRequest(nf.ExecuteCommandRequest.type,void 0,u,void 0))};if(e.registerOptions.commands){let s=[];for(let o of e.registerOptions.commands)s.push(oR.commands.registerCommand(o,(...a)=>r.executeCommand?r.executeCommand(o,a,i):i(o,a)));this._commands.set(e.id,s)}}unregister(e){let t=this._commands.get(e);t&&(this._commands.delete(e),t.forEach(r=>r.dispose()))}clear(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};vn.ExecuteCommandFeature=rf});var Dy=P(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.FoldingRangeFeature=void 0;var wy=require("vscode"),Wr=V(),Rs=ne(),sf=class extends Rs.TextDocumentLanguageFeature{constructor(e){super(e,Wr.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,Rs.ensure)((0,Rs.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[Wr.FoldingRangeKind.Comment,Wr.FoldingRangeKind.Imports,Wr.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,Rs.ensure)((0,Rs.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(Wr.FoldingRangeRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeFoldingRange.fire()});let[r,i]=this.getRegistration(t,e.foldingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new wy.EventEmitter,i={onDidChangeFoldingRanges:r.event,provideFoldingRanges:(s,o,a)=>{let u=this._client,l=(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p)};return u.sendRequest(Wr.FoldingRangeRequest.type,_,g).then(v=>g.isCancellationRequested?null:u.protocol2CodeConverter.asFoldingRanges(v,g),v=>u.handleFailedRequest(Wr.FoldingRangeRequest.type,g,v,null))},f=u.middleware;return f.provideFoldingRanges?f.provideFoldingRanges(s,o,a,l):l(s,o,a)}};return[wy.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeFoldingRange:r}]}};Qo.FoldingRangeFeature=sf});var Sy=P(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DeclarationFeature=void 0;var cR=require("vscode"),of=V(),af=ne(),cf=class extends af.TextDocumentLanguageFeature{constructor(e){super(e,of.DeclarationRequest.type)}fillClientCapabilities(e){let t=(0,af.ensure)((0,af.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.declarationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDeclaration:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(of.DeclarationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDeclarationResult(g,h),g=>a.handleFailedRequest(of.DeclarationRequest.type,h,g,null)),l=a.middleware;return l.provideDeclaration?l.provideDeclaration(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return cR.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Yo.DeclarationFeature=cf});var Py=P(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.SelectionRangeFeature=void 0;var uR=require("vscode"),uf=V(),lf=ne(),df=class extends lf.TextDocumentLanguageFeature{constructor(e){super(e,uf.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=(0,lf.ensure)((0,lf.ensure)(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.selectionRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideSelectionRanges:(i,s,o)=>{let a=this._client,u=async(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),positions:a.code2ProtocolConverter.asPositionsSync(p,h)};return a.sendRequest(uf.SelectionRangeRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asSelectionRanges(_,h),_=>a.handleFailedRequest(uf.SelectionRangeRequest.type,h,_,null))},l=a.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return uR.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Zo.SelectionRangeFeature=df});var Ry=P(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.CallHierarchyFeature=void 0;var lR=require("vscode"),zr=V(),ff=ne(),hf=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(zr.CallHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(p,l),p=>i.handleFailedRequest(zr.CallHierarchyPrepareRequest.type,l,p,null))};return s.prepareCallHierarchy?s.prepareCallHierarchy(e,t,r,o):o(e,t,r)}provideCallHierarchyIncomingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(zr.CallHierarchyIncomingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyIncomingCalls(l,a),l=>r.handleFailedRequest(zr.CallHierarchyIncomingCallsRequest.type,a,l,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,s):s(e,t)}provideCallHierarchyOutgoingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(zr.CallHierarchyOutgoingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyOutgoingCalls(l,a),l=>r.handleFailedRequest(zr.CallHierarchyOutgoingCallsRequest.type,a,l,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,s):s(e,t)}},pf=class extends ff.TextDocumentLanguageFeature{constructor(e){super(e,zr.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=e,r=(0,ff.ensure)((0,ff.ensure)(t,"textDocument"),"callHierarchy");r.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.callHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new hf(t);return[lR.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};ea.CallHierarchyFeature=pf});var Oy=P(bn=>{"use strict";var dR=bn&&bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),fR=bn&&bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ty=bn&&bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let o of this.getAllProviders())o.onDidChangeSemanticTokensEmitter.fire()});let[i,s]=this.getRegistration(t,e.semanticTokensProvider);!i||!s||this.register({id:i,registerOptions:s})}registerLanguageProvider(e){let t=e.documentSelector,r=hR.boolean(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,s=new ta.EventEmitter,o=r?{onDidChangeSemanticTokens:s.event,provideDocumentSemanticTokens:(g,_)=>{let v=this._client,R=v.middleware,q=(w,M)=>{let j={textDocument:v.code2ProtocolConverter.asTextDocumentIdentifier(w)};return v.sendRequest(J.SemanticTokensRequest.type,j,M).then(F=>M.isCancellationRequested?null:v.protocol2CodeConverter.asSemanticTokens(F,M),F=>v.handleFailedRequest(J.SemanticTokensRequest.type,M,F,null))};return R.provideDocumentSemanticTokens?R.provideDocumentSemanticTokens(g,_,q):q(g,_)},provideDocumentSemanticTokensEdits:i?(g,_,v)=>{let R=this._client,q=R.middleware,w=(M,j,F)=>{let oe={textDocument:R.code2ProtocolConverter.asTextDocumentIdentifier(M),previousResultId:j};return R.sendRequest(J.SemanticTokensDeltaRequest.type,oe,F).then(async te=>F.isCancellationRequested?null:J.SemanticTokens.is(te)?await R.protocol2CodeConverter.asSemanticTokens(te,F):await R.protocol2CodeConverter.asSemanticTokensEdits(te,F),te=>R.handleFailedRequest(J.SemanticTokensDeltaRequest.type,F,te,null))};return q.provideDocumentSemanticTokensEdits?q.provideDocumentSemanticTokensEdits(g,_,v,w):w(g,_,v)}:void 0}:void 0,u=e.range===!0?{onDidChangeSemanticTokens:s.event,provideDocumentRangeSemanticTokens:(g,_,v)=>{let R=this._client,q=R.middleware,w=(M,j,F)=>{let oe={textDocument:R.code2ProtocolConverter.asTextDocumentIdentifier(M),range:R.code2ProtocolConverter.asRange(j)};return R.sendRequest(J.SemanticTokensRangeRequest.type,oe,F).then(te=>F.isCancellationRequested?null:R.protocol2CodeConverter.asSemanticTokens(te,F),te=>R.handleFailedRequest(J.SemanticTokensRangeRequest.type,F,te,null))};return q.provideDocumentRangeSemanticTokens?q.provideDocumentRangeSemanticTokens(g,_,v,w):w(g,_,v)}}:void 0,l=[],f=this._client,p=f.protocol2CodeConverter.asSemanticTokensLegend(e.legend),h=f.protocol2CodeConverter.asDocumentSelector(t);return o!==void 0&&l.push(ta.languages.registerDocumentSemanticTokensProvider(h,o,p)),u!==void 0&&l.push(ta.languages.registerDocumentRangeSemanticTokensProvider(h,u,p)),[new ta.Disposable(()=>l.forEach(g=>g.dispose())),{range:u,full:o,onDidChangeSemanticTokensEmitter:s}]}};bn.SemanticTokensFeature=gf});var qy=P(Cn=>{"use strict";var pR=Cn&&Cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),gR=Cn&&Cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ey=Cn&&Cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(mf.LinkedEditingRangeRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asLinkedEditingRanges(g,h),g=>a.handleFailedRequest(mf.LinkedEditingRangeRequest.type,h,g,null)),l=a.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return mR.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Cn.LinkedEditingFeature=yf});var My=P(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.TypeHierarchyFeature=void 0;var _R=require("vscode"),Kr=V(),vf=ne(),bf=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(Kr.TypeHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(p,l),p=>i.handleFailedRequest(Kr.TypeHierarchyPrepareRequest.type,l,p,null))};return s.prepareTypeHierarchy?s.prepareTypeHierarchy(e,t,r,o):o(e,t,r)}provideTypeHierarchySupertypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(Kr.TypeHierarchySupertypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Kr.TypeHierarchySupertypesRequest.type,a,l,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,s):s(e,t)}provideTypeHierarchySubtypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(Kr.TypeHierarchySubtypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Kr.TypeHierarchySubtypesRequest.type,a,l,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,s):s(e,t)}},Cf=class extends vf.TextDocumentLanguageFeature{constructor(e){super(e,Kr.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=(0,vf.ensure)((0,vf.ensure)(e,"textDocument"),"typeHierarchy");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new bf(t);return[_R.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};na.TypeHierarchyFeature=Cf});var Iy=P(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.InlineValueFeature=void 0;var xy=require("vscode"),ra=V(),Os=ne(),wf=class extends Os.TextDocumentLanguageFeature{constructor(e){super(e,ra.InlineValueRequest.type)}fillClientCapabilities(e){(0,Os.ensure)((0,Os.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,Os.ensure)((0,Os.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(ra.InlineValueRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlineValues.fire()});let[r,i]=this.getRegistration(t,e.inlineValueProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new xy.EventEmitter,i={onDidChangeInlineValues:r.event,provideInlineValues:(s,o,a,u)=>{let l=this._client,f=(h,g,_,v)=>{let R={textDocument:l.code2ProtocolConverter.asTextDocumentIdentifier(h),range:l.code2ProtocolConverter.asRange(g),context:l.code2ProtocolConverter.asInlineValueContext(_)};return l.sendRequest(ra.InlineValueRequest.type,R,v).then(q=>v.isCancellationRequested?null:l.protocol2CodeConverter.asInlineValues(q,v),q=>l.handleFailedRequest(ra.InlineValueRequest.type,v,q,null))},p=l.middleware;return p.provideInlineValues?p.provideInlineValues(s,o,a,u,f):f(s,o,a,u)}};return[this.registerProvider(t,i),{provider:i,onDidChangeInlineValues:r}]}registerProvider(e,t){return xy.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ia.InlineValueFeature=wf});var jy=P(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.InlayHintsFeature=void 0;var Ny=require("vscode"),Ni=V(),Es=ne(),Df=class extends Es.TextDocumentLanguageFeature{constructor(e){super(e,Ni.InlayHintRequest.type)}fillClientCapabilities(e){let t=(0,Es.ensure)((0,Es.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,Es.ensure)((0,Es.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(Ni.InlayHintRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlayHints.fire()});let[r,i]=this.getRegistration(t,e.inlayHintProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Ny.EventEmitter,i={onDidChangeInlayHints:r.event,provideInlayHints:(s,o,a)=>{let u=this._client,l=async(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h)};try{let v=await u.sendRequest(Ni.InlayHintRequest.type,_,g);return g.isCancellationRequested?null:u.protocol2CodeConverter.asInlayHints(v,g)}catch(v){return u.handleFailedRequest(Ni.InlayHintRequest.type,g,v,null)}},f=u.middleware;return f.provideInlayHints?f.provideInlayHints(s,o,a,l):l(s,o,a)}};return i.resolveInlayHint=e.resolveProvider===!0?(s,o)=>{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(Ni.InlayHintResolveRequest.type,a.code2ProtocolConverter.asInlayHint(f),p);if(p.isCancellationRequested)return null;let g=a.protocol2CodeConverter.asInlayHint(h,p);return p.isCancellationRequested?null:g}catch(h){return a.handleFailedRequest(Ni.InlayHintResolveRequest.type,p,h,null)}},l=a.middleware;return l.resolveInlayHint?l.resolveInlayHint(s,o,u):u(s,o)}:void 0,[this.registerProvider(t,i),{provider:i,onDidChangeInlayHints:r}]}registerProvider(e,t){return Ny.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};sa.InlayHintsFeature=Df});var Fy=P(Qt=>{"use strict";var yR=Qt&&Qt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vR=Qt&&Qt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bR=Qt&&Qt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.indexOf(t)<0)}var Rf=class{_client;_listeners;_initialFolders;constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return qs.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=oa.workspace.workspaceFolders;this.initializeWithFolders(t),t===void 0?e.workspaceFolders=null:e.workspaceFolders=t.map(r=>this.asProtocol(r))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(qs.WorkspaceFoldersRequest.type,s=>{let o=()=>{let u=oa.workspace.workspaceFolders;return u===void 0?null:u.map(f=>this.asProtocol(f))},a=t.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(s,o):o(s)});let r=Sf(Sf(Sf(e,"workspace"),"workspaceFolders"),"changeNotifications"),i;typeof r=="string"?i=r:r===!0&&(i=CR.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){let r=Pf(this._initialFolders,e),i=Pf(e,this._initialFolders);(i.length>0||r.length>0)&&(t=this.doSendEvent(i,r))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));t!==void 0&&t.catch(r=>{this._client.error(`Sending notification ${qs.DidChangeWorkspaceFoldersNotification.type.method} failed`,r)})}doSendEvent(e,t){let r={event:{added:e.map(i=>this.asProtocol(i)),removed:t.map(i=>this.asProtocol(i))}};return this._client.sendNotification(qs.DidChangeWorkspaceFoldersNotification.type,r)}register(e){let t=e.id,r=this._client,i=oa.workspace.onDidChangeWorkspaceFolders(s=>{let o=l=>this.doSendEvent(l.added,l.removed),a=r.middleware.workspace;(a&&a.didChangeWorkspaceFolders?a.didChangeWorkspaceFolders(s,o):o(s)).catch(l=>{this._client.error(`Sending notification ${qs.DidChangeWorkspaceFoldersNotification.type.method} failed`,l)})});this._listeners.set(t,i),this.sendInitialEvent(oa.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return e===void 0?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}};Qt.WorkspaceFoldersFeature=Rf});var ky=P(ze=>{"use strict";var wR=ze&&ze.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),DR=ze&&ze.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ua=ze&&ze.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){let t=Ly(Ly(e,"workspace"),"fileOperations");Ay(t,"dynamicRegistration",!0),Ay(t,this._clientCapability,!0)}initialize(e){let t=e.workspace?.fileOperations,r=t!==void 0?RR(t,this._serverCapability):void 0;if(r?.filters!==void 0)try{this.register({id:PR.generateUuid(),registerOptions:{filters:r.filters}})}catch(i){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${i}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(r=>{let i=new SR.Minimatch(r.pattern.glob,n.asMinimatchOptions(r.pattern.options));if(!i.makeRe())throw new Error(`Invalid pattern ${r.pattern.glob}!`);return{scheme:r.scheme,matcher:i,kind:r.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return n.getFileType(e)}async filter(e,t){let r=await Promise.all(e.files.map(async s=>{let o=t(s),a=o.fsPath.replace(/\\/g,"/");for(let u of this._filters.values())for(let l of u)if(!(l.scheme!==void 0&&l.scheme!==o.scheme)){if(l.matcher.match(a)){if(l.kind===void 0)return!0;let f=await this.getFileType(o);if(f===void 0)return this._client.info(`Unable to determine file type for ${o.toString()}. Treating as a match.`),!0;if(f===$t.FileType.File&&l.kind===Yn.FileOperationPatternKind.file||f===$t.FileType.Directory&&l.kind===Yn.FileOperationPatternKind.folder)return!0}else if(l.kind===Yn.FileOperationPatternKind.folder&&await n.getFileType(o)===$t.FileType.Directory&&l.matcher.match(`${a}/`))return!0}return!1})),i=e.files.filter((s,o)=>r[o]);return{...e,files:i}}static async getFileType(e){try{return(await $t.workspace.fs.stat(e)).type}catch{return}}static asMinimatchOptions(e){let t={dot:!0};return e?.ignoreCase===!0&&(t.nocase=!0),t}},aa=class extends Ms{_notificationType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._notificationType=r,this._accessUri=o,this._createParams=a}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=async i=>this._client.sendNotification(this._notificationType,this._createParams(i));return this.doSend(t,r)}}},ca=class extends aa{_willListener;_fsPathFileTypes=new Map;async getFileType(e){let t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);let r=await Ms.getFileType(e);return r&&this._fsPathFileTypes.set(t,r),r}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),this.filterSize()===0&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}},Tf=class extends aa{constructor(e){super(e,$t.workspace.onDidCreateFiles,Yn.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.didCreateFiles?r.didCreateFiles(e,t):t(e)}};ze.DidCreateFilesFeature=Tf;var Of=class extends ca{constructor(e){super(e,$t.workspace.onDidRenameFiles,Yn.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=$t.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,t=>t.oldUri))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didRenameFiles?r.didRenameFiles(e,t):t(e)}};ze.DidRenameFilesFeature=Of;var Ef=class extends ca{constructor(e){super(e,$t.workspace.onDidDeleteFiles,Yn.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=$t.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,t=>t))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didDeleteFiles?r.didDeleteFiles(e,t):t(e)}};ze.DidDeleteFilesFeature=Ef;var xs=class extends Ms{_requestType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._requestType=r,this._accessUri=o,this._createParams=a}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=i=>this._client.sendRequest(this._requestType,this._createParams(i),i.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,r)}else return}},qf=class extends xs{constructor(e){super(e,$t.workspace.onWillCreateFiles,Yn.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willCreateFiles?r.willCreateFiles(e,t):t(e)}};ze.WillCreateFilesFeature=qf;var Mf=class extends xs{constructor(e){super(e,$t.workspace.onWillRenameFiles,Yn.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willRenameFiles?r.willRenameFiles(e,t):t(e)}};ze.WillRenameFilesFeature=Mf;var xf=class extends xs{constructor(e){super(e,$t.workspace.onWillDeleteFiles,Yn.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willDeleteFiles?r.willDeleteFiles(e,t):t(e)}};ze.WillDeleteFilesFeature=xf});var $y=P(wn=>{"use strict";var TR=wn&&wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OR=wn&&wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ER=wn&&wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=this._client.middleware,f=(p,h,g,_)=>u.sendRequest(If.InlineCompletionRequest.type,u.code2ProtocolConverter.asInlineCompletionParams(p,h,g),_).then(v=>_.isCancellationRequested?null:u.protocol2CodeConverter.asInlineCompletionResult(v,_),v=>u.handleFailedRequest(If.InlineCompletionRequest.type,_,v,null));return l.provideInlineCompletionItems?l.provideInlineCompletionItems(i,s,o,a,f):f(i,s,o,a)}};return[qR.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};wn.InlineCompletionItemFeature=jf});var Wy=P(Dn=>{"use strict";var xR=Dn&&Dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),IR=Dn&&Dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Uy=Dn&&Dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0;return{kind:"workspace",id:ji.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return ji.TextDocumentContentRequest.type}getProviders(){let e=[];for(let t of this._registrations.values())e.push(...t.providers);return e}fillClientCapabilities(e){let t=(0,Hy.ensure)((0,Hy.ensure)(e,"workspace"),"textDocumentContent");t.dynamicRegistration=!0}initialize(e){let t=this._client;if(t.onRequest(ji.TextDocumentContentRefreshRequest.type,async s=>{let o=t.protocol2CodeConverter.asUri(s.uri);for(let a of this._registrations.values())for(let u of a.providers)u.scheme===o.scheme&&u.onDidChangeEmitter.fire(o)}),!e?.workspace?.textDocumentContent)return;let r=e.workspace.textDocumentContent,i=ji.StaticRegistrationOptions.hasId(r)?r.id:NR.generateUuid();this.register({id:i,registerOptions:r})}register(e){let t=[],r=[];for(let i of e.registerOptions.schemes){let[s,o]=this.registerTextDocumentContentProvider(i);t.push(o),r.push(s)}this._registrations.set(e.id,{disposable:Ff.Disposable.from(...r),providers:t})}registerTextDocumentContentProvider(e){let t=new Ff.EventEmitter,r={onDidChange:t.event,provideTextDocumentContent:(i,s)=>{let o=this._client,a=(l,f)=>{let p={uri:o.code2ProtocolConverter.asUri(l)};return o.sendRequest(ji.TextDocumentContentRequest.type,p,f).then(h=>f.isCancellationRequested?null:h.text,h=>o.handleFailedRequest(ji.TextDocumentContentRequest.type,f,h,null))},u=o.middleware;return u.provideTextDocumentContent?u.provideTextDocumentContent(i,s,a):a(i,s)}};return[Ff.workspace.registerTextDocumentContentProvider(e,r),{scheme:e,onDidChangeEmitter:t,provider:r}]}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}};Dn.TextDocumentContentFeature=Lf});var zy=P(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.FileSystemWatcherFeature=void 0;var jR=require("vscode"),Br=V(),la=ne(),Af=class{_client;_notifyFileEvent;_watchers;constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return Br.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,la.ensure)((0,la.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,la.ensure)((0,la.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let r of e.registerOptions.watchers){let i=this._client.protocol2CodeConverter.asGlobPattern(r.globPattern);if(i===void 0)continue;let s=!0,o=!0,a=!0;r.kind!==void 0&&r.kind!==null&&(s=(r.kind&Br.WatchKind.Create)!==0,o=(r.kind&Br.WatchKind.Change)!==0,a=(r.kind&Br.WatchKind.Delete)!==0);let u=jR.workspace.createFileSystemWatcher(i,!s,!o,!a);this.hookListeners(u,s,o,a,t),t.push(u)}this._watchers.set(e.id,t)}registerRaw(e,t){let r=[];for(let i of t)this.hookListeners(i,!0,!0,!0,r);this._watchers.set(e,r)}hookListeners(e,t,r,i,s){t&&e.onDidCreate(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Created}),null,s),r&&e.onDidChange(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Changed}),null,s),i&&e.onDidDelete(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Deleted}),null,s)}unregister(e){let t=this._watchers.get(e);if(t){this._watchers.delete(e);for(let r of t)r.dispose()}}clear(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}};da.FileSystemWatcherFeature=Af});var By=P(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.ProgressFeature=void 0;var Ky=V(),FR=Ll();function LR(n,e){return n[e]===void 0&&(n[e]=Object.create(null)),n[e]}var kf=class{_client;activeParts;constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:Ky.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){LR(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=i=>{this.activeParts.delete(i)},r=i=>{this.activeParts.add(new FR.ProgressPart(this._client,i.token,t))};e.onRequest(Ky.WorkDoneProgressCreateRequest.type,r)}clear(){for(let e of this.activeParts)e.done();this.activeParts.clear()}};fa.ProgressFeature=kf});var Vf=P(he=>{"use strict";var AR=he&&he.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kR=he&&he.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ga=he&&he.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let t=this.open,r=new Set;n.fillVisibleResources(r);let i=new Set,s=new Set(r);for(let o of t.values())r.has(o)?s.delete(o):i.add(o);if(this.open=r,i.size>0){let o=new Set;for(let a of i)o.add(G.Uri.parse(a));this._onClose.fire(o)}if(s.size>0){let o=new Set;for(let a of s)o.add(G.Uri.parse(a));this._onOpen.fire(o)}};this.disposables.push(G.window.tabGroups.onDidChangeTabs(t=>{t.closed.length===0&&t.opened.length===0||e()})),this.disposables.push(G.window.onDidChangeVisibleTextEditors(t=>{e()}))}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposables.forEach(e=>e.dispose())}isActive(e){return e instanceof G.Uri?G.window.activeTextEditor?.document.uri===e:G.window.activeTextEditor?.document===e}isVisible(e){let t=e instanceof G.Uri?e:e.uri;return t.scheme===Hf.NotebookDocumentSyncFeature.CellScheme?G.workspace.notebookDocuments.some(r=>this.open.has(r.uri.toString())?r.getCells().find(s=>s.document.uri.toString()===t.toString())!==void 0:!1):this.open.has(t.toString())}getResources(){let e=new Set;return n.fillVisibleResources(new Set,e),e}static fillVisibleResources(e,t){let r=e??new Set;for(let i of G.window.tabGroups.all)for(let s of i.tabs){let o=s.input,a;o instanceof G.TabInputText?a=o.uri:o instanceof G.TabInputTextDiff?a=o.modified:(o instanceof G.TabInputCustom||o instanceof G.TabInputNotebook)&&(a=o.uri),a!==void 0&&!r.has(a.toString())&&(r.add(a.toString()),t!==void 0&&t.add(a))}for(let i of G.window.visibleTextEditors){let s=i.document.uri;r.has(s.toString())||(r.add(s.toString()),t!==void 0&&t.add(s))}}},pa=class n{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_traceLogLevel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=x.TraceFormat.Text;_tracer;_c2p;_p2c;_visibleDocuments;constructor(e,t,r){this._id=e,this._name=t,r=r||{};let i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};r.markdown!==void 0&&(i.isTrusted=Uf.sanitizeIsTrusted(r.markdown.isTrusted),i.supportHtml=r.markdown.supportHtml===!0,i.supportThemeIcons=r.markdown.supportThemeIcons===!0),this._clientOptions={documentSelector:r.documentSelector??[],synchronize:r.synchronize??{},diagnosticCollectionName:r.diagnosticCollectionName,outputChannelName:r.outputChannelName??this._name,revealOutputChannelOn:r.revealOutputChannelOn??Gr.Error,stdioEncoding:r.stdioEncoding??"utf8",initializationOptions:r.initializationOptions,initializationFailedHandler:r.initializationFailedHandler,progressOnInitialization:!!r.progressOnInitialization,errorHandler:r.errorHandler??this.createDefaultErrorHandler(r.connectionOptions?.maxRestartCount),middleware:r.middleware??{},uriConverters:r.uriConverters,workspaceFolder:r.workspaceFolder,connectionOptions:r.connectionOptions,markdown:i,diagnosticPullOptions:r.diagnosticPullOptions??{onChange:!0,onSave:!1},diagnosticCollectionProvider:r.diagnosticCollectionProvider??new dt.DefaultDiagnosticCollectionProvider,notebookDocumentOptions:r.notebookDocumentOptions??{},textSynchronization:this.createTextSynchronizationOptions(r.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Y.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,r.outputChannel?(this._outputChannel=r.outputChannel,this._disposeOutputChannel=!1,this._traceLogLevel=this._outputChannel.logLevel):(this._outputChannel=void 0,this._disposeOutputChannel=!0,this._traceLogLevel=G.LogLevel.Info),this._traceOutputChannel=r.traceOutputChannel,this._traceOutputChannel!==void 0&&(this._traceLogLevel=this._traceOutputChannel.logLevel),this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new ha.Semaphore(1),this._pendingChangeDelayer=new ha.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new ha.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new x.Emitter,this._stateChangeEmitter=new x.Emitter,this._trace=x.Trace.Off,this._tracer={log:(s,o)=>{Yt.string(s)?this.trace(s,o):this.traceObject(s)}},this._c2p=$R.createConverter(r.uriConverters?r.uriConverters.code2Protocol:void 0),this._p2c=HR.createConverter(r.uriConverters?r.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e?typeof e.delayOpenNotifications=="boolean"?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}:{delayOpenNotifications:!1}}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get visibleDocuments(){return this._visibleDocuments===void 0&&(this._visibleDocuments=new zf),this._visibleDocuments}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=G.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name,{log:!0}),this._traceOutputChannel===void 0&&(this._traceLogLevel=this._outputChannel.logLevel)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){if(this._diagnostics!==null)return this._diagnostics===void 0&&(this._diagnostics=this._clientOptions.diagnosticCollectionProvider.create(this._clientOptions.diagnosticCollectionName??this._id,dt.DiagnosticCollectionSource.push)),this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let r=this.getPublicState();r!==t&&this._stateChangeEmitter.fire({oldState:t,newState:r})}getPublicState(){switch(this.$state){case Y.Starting:return Ai.Starting;case Y.Running:return Ai.Running;case Y.StartFailed:return Ai.StartFailed;default:return Ai.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));let r=await this.$start();await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===x.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(r);let i,s;if(t.length===1?x.CancellationToken.is(t[0])?s=t[0]:i=t[0]:t.length===2&&(i=t[0],s=t[1]),s!==void 0&&s.isCancellationRequested)return Promise.reject(new x.ResponseError(x.LSPErrorCodes.RequestCancelled,"Request got cancelled"));let o=this._clientOptions.middleware?.sendRequest;return o!==void 0?o(e,i,s,(a,u,l)=>{let f=[];return u!==void 0&&f.push(u),l!==void 0&&f.push(l),r.sendRequest(a,...f)}):r.sendRequest(e,...t)}onRequest(e,t){let r=typeof e=="string"?e:e.method;this._requestHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._requestDisposables.set(r,i.onRequest(e,t)),s={dispose:()=>{let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}):(this._pendingRequestHandlers.set(r,t),s={dispose:()=>{this._pendingRequestHandlers.delete(r);let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}),{dispose:()=>{this._requestHandlers.delete(r),s.dispose()}}}async sendNotification(e,t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));let r=this._didChangeTextDocumentFeature.syncKind===x.TextDocumentSyncKind.Full,i;r&&typeof e!="string"&&e.method===x.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._inFlightOpenNotifications.add(i));let s;typeof e!="string"&&e.method===x.DidCloseTextDocumentNotification.method&&(s=t.textDocument.uri);let o=await this.$start();if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(s))return;r&&await this.sendPendingFullTextDocumentChanges(o),i!==void 0&&this._inFlightOpenNotifications.delete(i);let u=this._clientOptions.middleware?.sendNotification;return u?u(e,o.sendNotification.bind(o),t):o.sendNotification(e,t)}onNotification(e,t){let r=typeof e=="string"?e:e.method;this._notificationHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._notificationDisposables.set(r,i.onNotification(e,t)),s={dispose:()=>{let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}):(this._pendingNotificationHandlers.set(r,t),s={dispose:()=>{this._pendingNotificationHandlers.delete(r);let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}),{dispose:()=>{this._notificationHandlers.delete(r),s.dispose()}}}async sendProgress(e,t,r){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,r)}catch(i){throw this.error(`Sending progress for token ${t} failed.`,i),i}}onProgress(e,t,r){this._progressHandlers.set(t,{type:e,handler:r});let i=this.activeConnection(),s,o=this._clientOptions.middleware?.handleWorkDoneProgress,a=x.WorkDoneProgress.is(e)&&o!==void 0?u=>{o(t,u,()=>r(u))}:r;return i!==void 0?(this._progressDisposables.set(t,i.onProgress(e,t,a)),s={dispose:()=>{let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:r}),s={dispose:()=>{this._pendingProgressHandlers.delete(t);let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),s.dispose()}}}createDefaultErrorHandler(e){if(e!==void 0&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new Wf(this,e??4)}async setTrace(e){this._trace=e;let t=this.activeConnection();t!==void 0&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof x.ResponseError){let t=e;return` Message: ${t.message} + Code: ${t.code} ${t.data?` +`+t.data.toString():""}`}return e instanceof Error?Yt.string(e.stack)?e.stack:e.message:Yt.string(e)?e:e.toString()}shouldLogToOutputChannel(){return this.$state!==Y.Stopped?!0:this._outputChannel!==void 0}error(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.error(this.getLogMessage(e,t)),(r==="force"||r&&this._clientOptions.revealOutputChannelOn<=Gr.Error)&&this.showNotificationMessage(x.MessageType.Error,e,t)}warn(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.warn(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=Gr.Warn&&this.showNotificationMessage(x.MessageType.Warning,e,t)}info(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.info(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=Gr.Info&&this.showNotificationMessage(x.MessageType.Info,e,t)}debug(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.debug(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=Gr.Debug&&this.showNotificationMessage(x.MessageType.Debug,e,t)}trace(e,t){this.traceOutputChannel.trace(this.getLogMessage(e,t))}traceObject(e){this.traceOutputChannel.trace(JSON.stringify(e))}showNotificationMessage(e,t,r){t=t??"A request has failed. See the output for more information.",r&&(t+=` +`+this.data2String(r)),(e===x.MessageType.Error?G.window.showErrorMessage:e===x.MessageType.Warning?G.window.showWarningMessage:G.window.showInformationMessage)(t,"Go to output").then(s=>{s!==void 0&&this.outputChannel.show(!0)})}getLogMessage(e,t){return t!=null?`${e} +${this.data2String(t)}`:e}needsStart(){return this.$state===Y.Initial||this.$state===Y.Stopping||this.$state===Y.Stopped}needsStop(){return this.$state===Y.Starting||this.$state===Y.Running}activeConnection(){return this.$state===Y.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===Y.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===Y.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,t,r]=this.createOnStartPromise();this._onStart=e,this._diagnostics=void 0;for(let[i,s]of this._notificationHandlers)this._pendingNotificationHandlers.has(i)||this._pendingNotificationHandlers.set(i,s);for(let[i,s]of this._requestHandlers)this._pendingRequestHandlers.has(i)||this._pendingRequestHandlers.set(i,s);for(let[i,s]of this._progressHandlers)this._pendingProgressHandlers.has(i)||this._pendingProgressHandlers.set(i,s);this.$state=Y.Starting;try{let i=await this.createConnection();i.onNotification(x.LogMessageNotification.type,s=>{switch(s.type){case x.MessageType.Error:this.error(s.message,void 0,!1);break;case x.MessageType.Warning:this.warn(s.message,void 0,!1);break;case x.MessageType.Info:this.info(s.message,void 0,!1);break;case x.MessageType.Debug:this.debug(s.message,void 0,!1);break;default:this.outputChannel.appendLine(s.message)}}),i.onNotification(x.ShowMessageNotification.type,s=>{switch(s.type){case x.MessageType.Error:G.window.showErrorMessage(s.message);break;case x.MessageType.Warning:G.window.showWarningMessage(s.message);break;case x.MessageType.Info:G.window.showInformationMessage(s.message);break;default:G.window.showInformationMessage(s.message)}}),i.onRequest(x.ShowMessageRequest.type,s=>{let o;switch(s.type){case x.MessageType.Error:o=G.window.showErrorMessage;break;case x.MessageType.Warning:o=G.window.showWarningMessage;break;case x.MessageType.Info:o=G.window.showInformationMessage;break;default:o=G.window.showInformationMessage}let a=s.actions||[];return o(s.message,...a)}),i.onNotification(x.TelemetryEventNotification.type,s=>{this._telemetryEmitter.fire(s)}),i.onRequest(x.ShowDocumentRequest.type,async(s,o)=>{let a=async l=>{let f=this.protocol2CodeConverter.asUri(l.uri);try{if(l.external===!0)return{success:await G.env.openExternal(f)};{let p={};return l.selection!==void 0&&(p.selection=this.protocol2CodeConverter.asRange(l.selection)),l.takeFocus===void 0||l.takeFocus===!1?p.preserveFocus=!0:l.takeFocus===!0&&(p.preserveFocus=!1),await G.window.showTextDocument(f,p),{success:!0}}}catch{return{success:!1}}},u=this._clientOptions.middleware.window?.showDocument;return u!==void 0?u(s,o,a):a(s)}),i.listen(),await this.initialize(i),t()}catch(i){this.$state=Y.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,i,"force"),r(i)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise((i,s)=>{e=i,t=s}),e,t]}async initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,[r,i]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:G.env.appName,version:G.version},locale:this.getLocale(),rootPath:r||null,rootUri:r?this._c2p.asUri(G.Uri.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:Yt.func(t)?t():t,trace:x.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(s),this._clientOptions.progressOnInitialization){let o=Gy.generateUuid(),a=new UR.ProgressPart(e,o);s.workDoneToken=o;try{let u=await this.doInitialize(e,s);return a.done(),u}catch(u){throw a.cancel(),u}}else return this.doInitialize(e,s)}async doInitialize(e,t){try{let r=await e.initialize(t);if(r.capabilities.positionEncoding!==void 0&&r.capabilities.positionEncoding!==x.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${r.capabilities.positionEncoding}) received from server ${this.name}`);this._initializeResult=r,this.$state=Y.Running;let i;Yt.number(r.capabilities.textDocumentSync)?r.capabilities.textDocumentSync===x.TextDocumentSyncKind.None?i={openClose:!1,change:x.TextDocumentSyncKind.None,save:void 0}:i={openClose:!0,change:r.capabilities.textDocumentSync,save:{includeText:!1}}:r.capabilities.textDocumentSync!==void 0&&r.capabilities.textDocumentSync!==null&&(i=r.capabilities.textDocumentSync),this._capabilities=Object.assign({},r.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(x.PublishDiagnosticsNotification.type,s=>this.handleDiagnostics(s)),e.onRequest(x.RegistrationRequest.type,s=>this.handleRegistrationRequest(s)),e.onRequest("client/registerFeature",s=>this.handleRegistrationRequest(s)),e.onRequest(x.UnregistrationRequest.type,s=>this.handleUnregistrationRequest(s)),e.onRequest("client/unregisterFeature",s=>this.handleUnregistrationRequest(s)),e.onRequest(x.ApplyWorkspaceEditRequest.type,s=>this.handleApplyWorkspaceEdit(s));for(let[s,o]of this._pendingNotificationHandlers)this._notificationDisposables.set(s,e.onNotification(s,o));this._pendingNotificationHandlers.clear();for(let[s,o]of this._pendingRequestHandlers)this._requestDisposables.set(s,e.onRequest(s,o));this._pendingRequestHandlers.clear();for(let[s,o]of this._pendingProgressHandlers)this._progressDisposables.set(s,e.onProgress(o.type,s,o.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(x.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookLogLevelChanged(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),r}catch(r){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(r)?this.initialize(e):this.stop():r instanceof x.ResponseError&&r.data&&r.data.retry?G.window.showErrorMessage(r.message,{title:"Retry",id:"retry"}).then(i=>{i&&i.id==="retry"?this.initialize(e):this.stop()}):(r&&r.message&&G.window.showErrorMessage(r.message),this.error("Server initialization failed.",r),this.stop()),r}}_clientGetRootPath(){let e=G.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}stop(e=2e3){return this.shutdown(Tr.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t=2e3){if(this.$state===Y.Stopped||this.$state===Y.Initial)return;if(this.$state===Y.Stopping){if(this._onStop!==void 0)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}let r=this.activeConnection();if(r===void 0||this.$state!==Y.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Y.Stopping,this.cleanUp(e);let i=new Promise(o=>{(0,x.RAL)().timer.setTimeout(o,t)}),s=(async o=>(await o.shutdown(),await o.exit(),o))(r);return this._onStop=Promise.race([i,s]).then(o=>{if(o!==void 0)o.end(),o.dispose();else throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out")},o=>{throw this.error("Stopping server failed",o,!1),o}).finally(()=>{this.$state=Y.Stopped,e===Tr.Stop&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()})}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();let t=this._listeners.splice(0,this._listeners.length);for(let r of t)r.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(let r of Array.from(this._features.entries()).map(i=>i[1]).reverse())r.clear();(e===Tr.Stop||e===Tr.Restart)&&(this._diagnostics===void 0&&(this._diagnostics=null),this._diagnostics!==null&&(this._clientOptions.diagnosticCollectionProvider.dispose(this._diagnostics,dt.DiagnosticCollectionSource.push),this._diagnostics=null)),this._idleInterval!==void 0&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){this._outputChannel!==void 0&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){let t=this;async function r(s){return t._fileEvents.push(s),t._fileEventDelayer.trigger(async()=>{let o=t._fileEvents;t._fileEvents=[];try{await t.sendNotification(x.DidChangeWatchedFilesNotification.type,{changes:o})}catch(a){throw t._fileEvents.push(...o),a}})}let i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,r):r(e)).catch(s=>{t.error("Notifying file events failed.",s)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{let t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(t.length===0)return;for(let r of t){let i=this.code2ProtocolConverter.asChangeTextDocumentParams(r);this._didChangeTextDocumentFeature.aboutToSendNotification(r,x.DidChangeTextDocumentNotification.type,i),await e.sendNotification(x.DidChangeTextDocumentNotification.type,i),this._didChangeTextDocumentFeature.notificationSent(r,x.DidChangeTextDocumentNotification.type,i)}}catch(t){throw this.error("Sending pending changes failed",t,!1),t}})}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger(async()=>{let e=this.activeConnection();if(e===void 0){this.triggerPendingChangeDelivery();return}await this.sendPendingFullTextDocumentChanges(e)}).catch(e=>this.error("Delivering pending changes failed",e,!1))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};handleDiagnostics(e){if(this._diagnostics===null)return;let t=e.uri;this._diagnosticQueueState.state==="busy"&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,x.RAL)().timer.setImmediate(()=>{this.workDiagnosticQueue()})}workDiagnosticQueue(){if(this._diagnosticQueueState.state==="busy")return;let e=this._diagnosticQueue.entries().next();if(e.done===!0)return;let[t,r]=e.value;this._diagnosticQueue.delete(t);let i=new G.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(r,i.token).then(s=>{if(!i.token.isCancellationRequested){let o=this._p2c.asUri(t),a=this.clientOptions.middleware;a.handleDiagnostics?a.handleDiagnostics(o,s,(u,l)=>this.setDiagnostics(u,l)):this.setDiagnostics(o,s)}}).catch(s=>{this.error("Processing diagnostic queue failed.",s)}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,t){if(this._diagnostics===null)return;let r=this.diagnostics;r!==void 0&&r.set(e,t)}getLocale(){return G.env.language}async $start(){if(this.$state===Y.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();let e=this.activeConnection();if(e===void 0)throw new Error("Starting server failed");return e}async createConnection(){let e=(i,s,o)=>{this.handleConnectionError(i,s,o).catch(a=>this.error("Handling connection error failed",a))},t=()=>{this.handleConnectionClosed().catch(i=>this.error("Handling connection close failed",i))},r=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=bT(r.reader,r.writer,e,t,this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===Y.Stopped)return;try{this._connection!==void 0&&this._connection.dispose()}catch{}let e={action:Or.DoNotRestart};if(this.$state!==Y.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch{}this._connection=void 0,e.action===Or.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,e.handled===!0?!1:"force"),this.cleanUp(Tr.Stop),this.$state===Y.Starting?this.$state=Y.StartFailed:this.$state=Y.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Or.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(Tr.Restart),this.$state=Y.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch(t=>this.error("Restarting server failed",t,"force")))}async handleConnectionError(e,t,r){let i=await this._clientOptions.errorHandler.error(e,t,r);i.action===Is.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring. +${e.message} +Shutting down server.`,void 0,i.handled===!0?!1:"force"),this.stop().catch(s=>{this.error("Stopping server failed",s,!1)})):this.error(i.message??`Client ${this._name}: connection to server is erroring. +${e.message}`,void 0,i.handled===!0?!1:"force")}hookConfigurationChanged(e){this._listeners.push(G.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)}))}hookLogLevelChanged(e){this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel(t=>{this._traceLogLevel=t,this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let r=G.workspace.getConfiguration(this._id),i=this._traceLogLevel!==G.LogLevel.Trace?x.Trace.Off:x.Trace.Messages,s=x.TraceFormat.Text;if(r&&i!==x.Trace.Off){let o=r.get("trace.server","messages");typeof o=="string"?(i=x.Trace.fromString(o),i===x.Trace.Off&&(i=x.Trace.Messages)):(i=x.Trace.fromString(r.get("trace.server.verbosity","messages")),i===x.Trace.Off&&(i=x.Trace.Messages),s=x.TraceFormat.fromString(r.get("trace.server.format","text")))}this._trace=i,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch(o=>{this.error("Updating trace failed with error",o,!1)})}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let r;Yt.array(t)?r=t:r=[t],r&&this._dynamicFeatures.get(x.DidChangeWatchedFilesNotification.type.method).registerRaw(Gy.generateUuid(),r)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),dt.DynamicFeature.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){let t=this.getFeature(x.NotebookDocumentSyncRegistrationType.method);return t===void 0||!(t instanceof Hf.NotebookDocumentSyncFeature)?!1:t.handles(e)}registerBuiltinFeatures(){let e=new Map;this.registerFeature(new Vy.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new Fi.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new Fi.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new Fi.WillSaveFeature(this)),this.registerFeature(new Fi.WillSaveWaitUntilFeature(this)),this.registerFeature(new Fi.DidSaveTextDocumentFeature(this)),this.registerFeature(new Fi.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new yT.FileSystemWatcherFeature(this,t=>this.notifyFileEvent(t))),this.registerFeature(new zR.CompletionItemFeature(this)),this.registerFeature(new KR.HoverFeature(this)),this.registerFeature(new GR.SignatureHelpFeature(this)),this.registerFeature(new BR.DefinitionFeature(this)),this.registerFeature(new QR.ReferencesFeature(this)),this.registerFeature(new VR.DocumentHighlightFeature(this)),this.registerFeature(new XR.DocumentSymbolFeature(this)),this.registerFeature(new JR.WorkspaceSymbolFeature(this)),this.registerFeature(new tT.CodeActionFeature(this)),this.registerFeature(new nT.CodeLensFeature(this)),this.registerFeature(new $f.DocumentFormattingFeature(this)),this.registerFeature(new $f.DocumentRangeFormattingFeature(this)),this.registerFeature(new $f.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new rT.RenameFeature(this)),this.registerFeature(new iT.DocumentLinkFeature(this)),this.registerFeature(new sT.ExecuteCommandFeature(this)),this.registerFeature(new Vy.SyncConfigurationFeature(this)),this.registerFeature(new YR.TypeDefinitionFeature(this)),this.registerFeature(new ZR.ImplementationFeature(this)),this.registerFeature(new eT.ColorProviderFeature(this)),this.clientOptions.workspaceFolder===void 0&&this.registerFeature(new gT.WorkspaceFoldersFeature(this)),this.registerFeature(new oT.FoldingRangeFeature(this)),this.registerFeature(new aT.DeclarationFeature(this)),this.registerFeature(new cT.SelectionRangeFeature(this)),this.registerFeature(new vT.ProgressFeature(this)),this.registerFeature(new uT.CallHierarchyFeature(this)),this.registerFeature(new lT.SemanticTokensFeature(this)),this.registerFeature(new dT.LinkedEditingFeature(this)),this.registerFeature(new Li.DidCreateFilesFeature(this)),this.registerFeature(new Li.DidRenameFilesFeature(this)),this.registerFeature(new Li.DidDeleteFilesFeature(this)),this.registerFeature(new Li.WillCreateFilesFeature(this)),this.registerFeature(new Li.WillRenameFilesFeature(this)),this.registerFeature(new Li.WillDeleteFilesFeature(this)),this.registerFeature(new fT.TypeHierarchyFeature(this)),this.registerFeature(new hT.InlineValueFeature(this)),this.registerFeature(new pT.InlayHintsFeature(this)),this.registerFeature(new WR.DiagnosticFeature(this)),this.registerFeature(new Hf.NotebookDocumentSyncFeature(this)),this.registerFeature(new mT.InlineCompletionItemFeature(this)),this.registerFeature(new _T.TextDocumentContentFeature(this))}registerProposedFeatures(){this.registerFeatures(Gf.createAll(this))}fillInitializeParams(e){for(let t of this._features)Yt.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};(0,dt.ensure)(e,"workspace").applyEdit=!0;let t=(0,dt.ensure)((0,dt.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[x.ResourceOperationKind.Create,x.ResourceOperationKind.Rename,x.ResourceOperationKind.Delete],t.failureHandling=x.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0},t.metadataSupport=!0,t.snippetEditSupport=!0;let r=(0,dt.ensure)((0,dt.ensure)(e,"textDocument"),"publishDiagnostics");r.relatedInformation=!0,r.versionSupport=!1,r.tagSupport={valueSet:[x.DiagnosticTag.Unnecessary,x.DiagnosticTag.Deprecated]},r.codeDescriptionSupport=!0,r.dataSupport=!0;let i=(0,dt.ensure)((0,dt.ensure)(e,"textDocument"),"filters");i.relativePatternSupport=!0;let s=(0,dt.ensure)(e,"window"),o=(0,dt.ensure)(s,"showMessage");o.messageActionItem={additionalPropertiesSupport:!0};let a=(0,dt.ensure)(s,"showDocument");a.support=!0;let u=(0,dt.ensure)(e,"general");u.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(n.RequestsToCancelOnContentModified)},u.regularExpressions={engine:"ECMAScript",version:"ES2020"},u.markdown={parser:"marked",version:"1.1.0"},u.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(u.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let l of this._features)l.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let r of this._features)Yt.func(r.preInitialize)&&r.preInitialize(this._capabilities,t);for(let r of this._features)r.initialize(this._capabilities,t)}async handleRegistrationRequest(e){let t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,r=>this.doRegisterCapability(r)):this.doRegisterCapability(e)}async doRegisterCapability(e){if(!this.isRunning()){for(let t of e.registrations)this._ignoredRegistrations.add(t.id);return}for(let t of e.registrations){let r=this._dynamicFeatures.get(t.method);if(r===void 0)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));let i=t.registerOptions??{};i.documentSelector=i.documentSelector??this._clientOptions.documentSelector;let s={id:t.id,registerOptions:i};try{r.register(s)}catch(o){return Promise.reject(o)}}}async handleUnregistrationRequest(e){let t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,r=>this.doUnregisterCapability(r)):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;let r=this._dynamicFeatures.get(t.method);if(!r)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));r.unregister(t.id)}}async handleApplyWorkspaceEdit(e){let t=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(t){let r=await t(e,i=>this.doHandleApplyWorkspaceEdit(i));return r instanceof x.ResponseError?Promise.reject(r):r}else return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new ha.Semaphore(1);async doHandleApplyWorkspaceEdit(e){let t=e.edit,r=await this.workspaceEditLock.lock(()=>this._p2c.asWorkspaceEdit(t));return this.validateWorkspaceEdit(t)?Yt.asPromise(G.workspace.applyEdit(r,{isRefactoring:e.metadata?.isRefactoring}).then(s=>({applied:s}))):Promise.resolve({applied:!1})}validateWorkspaceEdit(e){let t=new Map;if(G.workspace.textDocuments.forEach(r=>t.set(r.uri.toString(),r)),e.documentChanges){for(let r of e.documentChanges)if(x.TextDocumentEdit.is(r)&&r.textDocument.version!==null&&r.textDocument.version>=0){let i=this._p2c.asUri(r.textDocument.uri).toString(),s=t.get(i);if(s&&s.version!==r.textDocument.version)return!1}}return!0}static RequestsToCancelOnContentModified=new Set([x.SemanticTokensRequest.method,x.SemanticTokensRangeRequest.method,x.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([x.CompletionResolveRequest.method,x.CodeLensResolveRequest.method,x.CodeActionResolveRequest.method,x.InlayHintResolveRequest.method,x.DocumentLinkResolveRequest.method,x.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,t,r,i,s=!0,o=!1){if(r instanceof x.ResponseError){if(r.code===x.ErrorCodes.PendingResponseRejected||r.code===x.ErrorCodes.ConnectionInactive)return i;if(r.code===x.LSPErrorCodes.RequestCancelled||r.code===x.LSPErrorCodes.ServerCancelled){if(t!==void 0&&t.isCancellationRequested&&!o)return i;throw r.data!==void 0?new dt.LSPCancellationError(r.data):new G.CancellationError}else if(r.code===x.LSPErrorCodes.ContentModified){if(n.RequestsToCancelOnContentModified.has(e.method)||n.CancellableResolveCalls.has(e.method))throw new G.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,r,s),r}};he.BaseLanguageClient=pa;var Kf=class extends pa{serverOptions;constructor(e,t,r,i){super(e,t,i),this.serverOptions=r}async createMessageTransports(e){return this.serverOptions()}};he.LanguageClient=Kf;var Bf=class{error(e){(0,x.RAL)().console.error(e)}warn(e){(0,x.RAL)().console.warn(e)}info(e){(0,x.RAL)().console.info(e)}log(e){(0,x.RAL)().console.log(e)}};function bT(n,e,t,r,i){let s=new Bf,o=(0,x.createProtocolConnection)(n,e,s,i);return o.onError(u=>{t(u[0],u[1],u[2])}),o.onClose(r),{listen:()=>o.listen(),sendRequest:o.sendRequest,onRequest:o.onRequest,hasPendingResponse:o.hasPendingResponse,sendNotification:o.sendNotification,onNotification:o.onNotification,onProgress:o.onProgress,sendProgress:o.sendProgress,trace:(u,l,f)=>{let p={sendNotification:!1,traceFormat:x.TraceFormat.Text};return f===void 0?o.trace(u,l,p):(Yt.boolean(f),o.trace(u,l,f))},initialize:u=>o.sendRequest(x.InitializeRequest.type,u),shutdown:()=>o.sendRequest(x.ShutdownRequest.type,void 0),exit:()=>o.sendNotification(x.ExitNotification.type),end:()=>o.end(),dispose:()=>o.dispose()}}var Gf;(function(n){function e(t){return[]}n.createAll=e})(Gf||(he.ProposedFeatures=Gf={}))});var Yy=P(Zn=>{"use strict";var CT=Zn&&Zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),wT=Zn&&Zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),DT=Zn&&Zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i /dev/null 2>&1 +} + +terminateTree "${t}" +`;return!Qy.spawnSync("/bin/sh",[],{input:r,stdio:["pipe","inherit","inherit"]}).error}catch{return!1}else return n.kill("SIGKILL"),!0}});var tv=P(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var Zy=require("util"),er=Nn(),Xf=class n extends er.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return n.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new Zy.TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}},Jf=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),er.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),er.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),er.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),er.Disposable.create(()=>this.stream.off("data",e))}},Qf=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),er.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),er.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),er.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,i)=>{let s=o=>{o==null?r():i(o)};typeof e=="string"?this.stream.write(e,t,s):this.stream.write(e,s)})}end(){this.stream.end()}},ev=Object.freeze({messageBuffer:Object.freeze({create:n=>new Xf(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(n,void 0,0),e.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{try{return n instanceof Buffer?Promise.resolve(JSON.parse(n.toString(e.charset))):Promise.resolve(JSON.parse(new Zy.TextDecoder(e.charset).decode(n)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:n=>new Jf(n),asWritableStream:n=>new Qf(n)}),console,timer:Object.freeze({setTimeout(n,e,...t){let r=setTimeout(n,e,...t);return{dispose:()=>clearTimeout(r)}},setImmediate(n,...e){let t=setImmediate(n,...e);return{dispose:()=>clearImmediate(t)}},setInterval(n,e,...t){let r=setInterval(n,e,...t);return{dispose:()=>clearInterval(r)}}})});function Yf(){return ev}(function(n){function e(){er.RAL.install(ev)}n.install=e})(Yf||(Yf={}));Zf.default=Yf});var sh=P(re=>{"use strict";var rv=re&&re.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OT=re&&re.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ih=re&&re.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),Et.Disposable.create(()=>this.process.off("message",e))}};re.IPCMessageReader=eh;var th=class extends Et.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",r=>this.fireError(r)),t.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};re.IPCMessageWriter=th;var nh=class extends Et.AbstractMessageReader{onData;constructor(e){super(),this.onData=new Et.Emitter,e.on("close",()=>this.fireClose),e.on("error",t=>this.fireError(t)),e.on("message",t=>{this.onData.fire(t)})}listen(e){return this.onData.event(e)}};re.PortMessageReader=nh;var rh=class extends Et.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",t=>this.fireError(t))}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(){}};re.PortMessageWriter=rh;var Vr=class extends Et.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,Ns.default)().stream.asReadableStream(e),t)}};re.SocketMessageReader=Vr;var Xr=class extends Et.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,Ns.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};re.SocketMessageWriter=Xr;var ma=class extends Et.ReadableStreamMessageReader{constructor(e,t){super((0,Ns.default)().stream.asReadableStream(e),t)}};re.StreamMessageReader=ma;var _a=class extends Et.WriteableStreamMessageWriter{constructor(e,t){super((0,Ns.default)().stream.asWritableStream(e),t)}};re.StreamMessageWriter=_a;var NT=process.env.XDG_RUNTIME_DIR,jT=new Map([["linux",107],["darwin",102]]);function FT(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,nv.randomBytes)(16).toString("hex")}-sock`;let n=32,e=10,t=IT.realpathSync(NT??xT.tmpdir()),r=jT.get(process.platform);if(r!==void 0&&(n=Math.min(r-t.length-e,n)),n<16)throw new Error(`Unable to generate a random pipe name with ${n} characters.`);let i=(0,nv.randomBytes)(Math.floor(n/2)).toString("hex");return MT.join(t,`lsp-${i}.sock`)}function LT(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,ya.createServer)(a=>{o.close(),t([new Vr(a,e),new Xr(a,e)])});o.on("error",s),o.listen(n,()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function AT(n,e="utf-8"){let t=(0,ya.createConnection)(n);return[new Vr(t,e),new Xr(t,e)]}function kT(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,ya.createServer)(a=>{o.close(),t([new Vr(a,e),new Xr(a,e)])});o.on("error",s),o.listen(n,"127.0.0.1",()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function $T(n,e="utf-8"){let t=(0,ya.createConnection)(n,"127.0.0.1");return[new Vr(t,e),new Xr(t,e)]}function HT(n){let e=n;return e.read!==void 0&&e.addListener!==void 0}function UT(n){let e=n;return e.write!==void 0&&e.addListener!==void 0}function WT(n,e,t,r){t||(t=Et.NullLogger);let i=HT(n)?new ma(n):n,s=UT(e)?new _a(e):e;return Et.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Et.createMessageConnection)(i,s,t,r)}});var oh=P(tr=>{"use strict";var zT=tr&&tr.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),iv=tr&&tr.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&zT(e,n,t)};Object.defineProperty(tr,"__esModule",{value:!0});tr.createProtocolConnection=BT;var KT=sh();iv(sh(),tr);iv(V(),tr);function BT(n,e,t,r){return(0,KT.createMessageConnection)(n,e,t,r)}});var js=P((vq,sv)=>{"use strict";var GT=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};sv.exports=GT});var va=P((bq,ov)=>{"use strict";var VT="2.0.0",XT=Number.MAX_SAFE_INTEGER||9007199254740991,JT=16,QT=250,YT=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ov.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:JT,MAX_SAFE_BUILD_LENGTH:QT,MAX_SAFE_INTEGER:XT,RELEASE_TYPES:YT,SEMVER_SPEC_VERSION:VT,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var ba=P((Sn,av)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ah,MAX_SAFE_BUILD_LENGTH:ZT,MAX_LENGTH:eO}=va(),tO=js();Sn=av.exports={};var nO=Sn.re=[],rO=Sn.safeRe=[],A=Sn.src=[],iO=Sn.safeSrc=[],k=Sn.t={},sO=0,ch="[a-zA-Z0-9-]",oO=[["\\s",1],["\\d",eO],[ch,ZT]],aO=n=>{for(let[e,t]of oO)n=n.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return n},Q=(n,e,t)=>{let r=aO(e),i=sO++;tO(n,i,e),k[n]=i,A[i]=e,iO[i]=r,nO[i]=new RegExp(e,t?"g":void 0),rO[i]=new RegExp(r,t?"g":void 0)};Q("NUMERICIDENTIFIER","0|[1-9]\\d*");Q("NUMERICIDENTIFIERLOOSE","\\d+");Q("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ch}*`);Q("MAINVERSION",`(${A[k.NUMERICIDENTIFIER]})\\.(${A[k.NUMERICIDENTIFIER]})\\.(${A[k.NUMERICIDENTIFIER]})`);Q("MAINVERSIONLOOSE",`(${A[k.NUMERICIDENTIFIERLOOSE]})\\.(${A[k.NUMERICIDENTIFIERLOOSE]})\\.(${A[k.NUMERICIDENTIFIERLOOSE]})`);Q("PRERELEASEIDENTIFIER",`(?:${A[k.NONNUMERICIDENTIFIER]}|${A[k.NUMERICIDENTIFIER]})`);Q("PRERELEASEIDENTIFIERLOOSE",`(?:${A[k.NONNUMERICIDENTIFIER]}|${A[k.NUMERICIDENTIFIERLOOSE]})`);Q("PRERELEASE",`(?:-(${A[k.PRERELEASEIDENTIFIER]}(?:\\.${A[k.PRERELEASEIDENTIFIER]})*))`);Q("PRERELEASELOOSE",`(?:-?(${A[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${A[k.PRERELEASEIDENTIFIERLOOSE]})*))`);Q("BUILDIDENTIFIER",`${ch}+`);Q("BUILD",`(?:\\+(${A[k.BUILDIDENTIFIER]}(?:\\.${A[k.BUILDIDENTIFIER]})*))`);Q("FULLPLAIN",`v?${A[k.MAINVERSION]}${A[k.PRERELEASE]}?${A[k.BUILD]}?`);Q("FULL",`^${A[k.FULLPLAIN]}$`);Q("LOOSEPLAIN",`[v=\\s]*${A[k.MAINVERSIONLOOSE]}${A[k.PRERELEASELOOSE]}?${A[k.BUILD]}?`);Q("LOOSE",`^${A[k.LOOSEPLAIN]}$`);Q("GTLT","((?:<|>)?=?)");Q("XRANGEIDENTIFIERLOOSE",`${A[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Q("XRANGEIDENTIFIER",`${A[k.NUMERICIDENTIFIER]}|x|X|\\*`);Q("XRANGEPLAIN",`[v=\\s]*(${A[k.XRANGEIDENTIFIER]})(?:\\.(${A[k.XRANGEIDENTIFIER]})(?:\\.(${A[k.XRANGEIDENTIFIER]})(?:${A[k.PRERELEASE]})?${A[k.BUILD]}?)?)?`);Q("XRANGEPLAINLOOSE",`[v=\\s]*(${A[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[k.XRANGEIDENTIFIERLOOSE]})(?:${A[k.PRERELEASELOOSE]})?${A[k.BUILD]}?)?)?`);Q("XRANGE",`^${A[k.GTLT]}\\s*${A[k.XRANGEPLAIN]}$`);Q("XRANGELOOSE",`^${A[k.GTLT]}\\s*${A[k.XRANGEPLAINLOOSE]}$`);Q("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ah}})(?:\\.(\\d{1,${ah}}))?(?:\\.(\\d{1,${ah}}))?`);Q("COERCE",`${A[k.COERCEPLAIN]}(?:$|[^\\d])`);Q("COERCEFULL",A[k.COERCEPLAIN]+`(?:${A[k.PRERELEASE]})?(?:${A[k.BUILD]})?(?:$|[^\\d])`);Q("COERCERTL",A[k.COERCE],!0);Q("COERCERTLFULL",A[k.COERCEFULL],!0);Q("LONETILDE","(?:~>?)");Q("TILDETRIM",`(\\s*)${A[k.LONETILDE]}\\s+`,!0);Sn.tildeTrimReplace="$1~";Q("TILDE",`^${A[k.LONETILDE]}${A[k.XRANGEPLAIN]}$`);Q("TILDELOOSE",`^${A[k.LONETILDE]}${A[k.XRANGEPLAINLOOSE]}$`);Q("LONECARET","(?:\\^)");Q("CARETTRIM",`(\\s*)${A[k.LONECARET]}\\s+`,!0);Sn.caretTrimReplace="$1^";Q("CARET",`^${A[k.LONECARET]}${A[k.XRANGEPLAIN]}$`);Q("CARETLOOSE",`^${A[k.LONECARET]}${A[k.XRANGEPLAINLOOSE]}$`);Q("COMPARATORLOOSE",`^${A[k.GTLT]}\\s*(${A[k.LOOSEPLAIN]})$|^$`);Q("COMPARATOR",`^${A[k.GTLT]}\\s*(${A[k.FULLPLAIN]})$|^$`);Q("COMPARATORTRIM",`(\\s*)${A[k.GTLT]}\\s*(${A[k.LOOSEPLAIN]}|${A[k.XRANGEPLAIN]})`,!0);Sn.comparatorTrimReplace="$1$2$3";Q("HYPHENRANGE",`^\\s*(${A[k.XRANGEPLAIN]})\\s+-\\s+(${A[k.XRANGEPLAIN]})\\s*$`);Q("HYPHENRANGELOOSE",`^\\s*(${A[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${A[k.XRANGEPLAINLOOSE]})\\s*$`);Q("STAR","(<|>)?=?\\s*\\*");Q("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Q("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ca=P((Cq,cv)=>{"use strict";var cO=Object.freeze({loose:!0}),uO=Object.freeze({}),lO=n=>n?typeof n!="object"?cO:n:uO;cv.exports=lO});var fv=P((wq,dv)=>{"use strict";var uv=/^[0-9]+$/,lv=(n,e)=>{if(typeof n=="number"&&typeof e=="number")return n===e?0:nlv(e,n);dv.exports={compareIdentifiers:lv,rcompareIdentifiers:dO}});var Fs=P((Dq,pv)=>{"use strict";var wa=js(),{MAX_LENGTH:hv,MAX_SAFE_INTEGER:Da}=va(),{safeRe:Sa,t:Pa}=ba(),fO=Ca(),{compareIdentifiers:uh}=fv(),hO=(n,e)=>{let t=e.split(".");if(t.length>n.length)return!1;for(let r=0;rhv)throw new TypeError(`version is longer than ${hv} characters`);wa("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Sa[Pa.LOOSE]:Sa[Pa.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Da||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Da||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Da||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&se.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof n||(e=new n(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(wa("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return uh(r,i)}while(++t)}compareBuild(e){e instanceof n||(e=new n(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(wa("build compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return uh(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?Sa[Pa.PRERELEASELOOSE]:Sa[Pa.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];if(r===!1&&(s=[t]),hO(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};pv.exports=lh});var _v=P((Sq,mv)=>{"use strict";var gv=Fs(),pO=(n,e,t=!1)=>{if(n instanceof gv)return n;try{return new gv(n,e)}catch(r){if(!t)return null;throw r}};mv.exports=pO});var vv=P((Pq,yv)=>{"use strict";var dh=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};yv.exports=dh});var Jr=P((Rq,Cv)=>{"use strict";var bv=Fs(),gO=(n,e,t)=>new bv(n,t).compare(new bv(e,t));Cv.exports=gO});var Dv=P((Tq,wv)=>{"use strict";var mO=Jr(),_O=(n,e,t)=>mO(n,e,t)===0;wv.exports=_O});var Pv=P((Oq,Sv)=>{"use strict";var yO=Jr(),vO=(n,e,t)=>yO(n,e,t)!==0;Sv.exports=vO});var Tv=P((Eq,Rv)=>{"use strict";var bO=Jr(),CO=(n,e,t)=>bO(n,e,t)>0;Rv.exports=CO});var Ev=P((qq,Ov)=>{"use strict";var wO=Jr(),DO=(n,e,t)=>wO(n,e,t)>=0;Ov.exports=DO});var Mv=P((Mq,qv)=>{"use strict";var SO=Jr(),PO=(n,e,t)=>SO(n,e,t)<0;qv.exports=PO});var Iv=P((xq,xv)=>{"use strict";var RO=Jr(),TO=(n,e,t)=>RO(n,e,t)<=0;xv.exports=TO});var jv=P((Iq,Nv)=>{"use strict";var OO=Dv(),EO=Pv(),qO=Tv(),MO=Ev(),xO=Mv(),IO=Iv(),NO=(n,e,t,r)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return OO(n,t,r);case"!=":return EO(n,t,r);case">":return qO(n,t,r);case">=":return MO(n,t,r);case"<":return xO(n,t,r);case"<=":return IO(n,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Nv.exports=NO});var Uv=P((Nq,Hv)=>{"use strict";var Ls=Symbol("SemVer ANY"),ph=class n{static get ANY(){return Ls}constructor(e,t){if(t=Fv(t),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),hh("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ls?this.value="":this.value=this.operator+this.semver.version,hh("comp",this)}parse(e){let t=this.options.loose?Lv[Av.COMPARATORLOOSE]:Lv[Av.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new kv(r[2],this.options.loose):this.semver=Ls}toString(){return this.value}test(e){if(hh("Comparator.test",e,this.options.loose),this.semver===Ls||e===Ls)return!0;if(typeof e=="string")try{e=new kv(e,this.options)}catch{return!1}return fh(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new $v(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new $v(this.value,t).test(e.semver):(t=Fv(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fh(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fh(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Hv.exports=ph;var Fv=Ca(),{safeRe:Lv,t:Av}=ba(),fh=jv(),hh=js(),kv=Fs(),$v=gh()});var gh=P((jq,Bv)=>{"use strict";var jO=/\s+/g,mh=class n{constructor(e,t){if(t=LO(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof _h)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(jO," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!zv(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&BO(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(KO,"");let r=((this.options.includePrerelease&&WO)|(this.options.loose&&zO))+":"+e,i=Wv.get(r);if(i)return i;let s=this.options.loose,o=s?ht[et.HYPHENRANGELOOSE]:ht[et.HYPHENRANGE];e=e.replace(o,rE(this.options.includePrerelease)),Pe("hyphen replace",e),e=e.replace(ht[et.COMPARATORTRIM],$O),Pe("comparator trim",e),e=e.replace(ht[et.TILDETRIM],HO),Pe("tilde trim",e),e=e.replace(ht[et.CARETTRIM],UO),Pe("caret trim",e);let a=e.split(" ").map(p=>GO(p,this.options)).join(" ").split(/\s+/).map(p=>nE(p,this.options));s&&(a=a.filter(p=>(Pe("loose invalid filter",p,this.options),!!p.match(ht[et.COMPARATORLOOSE])))),Pe("range list",a);let u=new Map,l=a.map(p=>new _h(p,this.options));for(let p of l){if(zv(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let f=[...u.values()];return Wv.set(r,f),f}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>Kv(r,t)&&e.set.some(i=>Kv(i,t)&&r.every(s=>i.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AO(e,this.options)}catch{return!1}for(let t=0;tn.value==="<0.0.0-0",BO=n=>n.value==="",Kv=(n,e)=>{let t=!0,r=n.slice(),i=r.pop();for(;t&&r.length;)t=r.every(s=>i.intersects(s,e)),i=r.pop();return t},GO=(n,e)=>(n=n.replace(ht[et.BUILD],""),Pe("comp",n,e),n=QO(n,e),Pe("caret",n),n=XO(n,e),Pe("tildes",n),n=ZO(n,e),Pe("xrange",n),n=tE(n,e),Pe("stars",n),n),Ke=n=>!n||n.toLowerCase()==="x"||n==="*",VO=(n,e,t)=>Ke(n)&&!Ke(e)||Ke(e)&&t&&!Ke(t),XO=(n,e)=>n.trim().split(/\s+/).map(t=>JO(t,e)).join(" "),JO=(n,e)=>{let t=e.loose?ht[et.TILDELOOSE]:ht[et.TILDE],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Pe("tilde",n,i,s,o,a,u);let l;return Ke(s)?l="":Ke(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Ke(a)?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:u?(Pe("replaceTilde pr",u),l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,Pe("tilde return",l),l})},QO=(n,e)=>n.trim().split(/\s+/).map(t=>YO(t,e)).join(" "),YO=(n,e)=>{Pe("caret",n,e);let t=e.loose?ht[et.CARETLOOSE]:ht[et.CARET],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Pe("caret",n,i,s,o,a,u);let l;return Ke(s)?l="":Ke(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Ke(a)?s==="0"?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${r} <${+s+1}.0.0-0`:u?(Pe("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${a}-${u} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a}-${u} <${+s+1}.0.0-0`):(Pe("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Pe("caret return",l),l})},ZO=(n,e)=>(Pe("replaceXRanges",n,e),n.split(/\s+/).map(t=>eE(t,e)).join(" ")),eE=(n,e)=>{n=n.trim();let t=e.loose?ht[et.XRANGELOOSE]:ht[et.XRANGE];return n.replace(t,(r,i,s,o,a,u)=>{if(Pe("xRange",n,r,i,s,o,a,u),VO(s,o,a))return n;let l=Ke(s),f=l||Ke(o),p=f||Ke(a),h=p;return i==="="&&h&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&h?(f&&(o=0),a=0,i===">"?(i=">=",f?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",f?s=+s+1:o=+o+1),i==="<"&&(u="-0"),r=`${i+s}.${o}.${a}${u}`):f?r=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),Pe("xRange return",r),r})},tE=(n,e)=>(Pe("replaceStars",n,e),n.trim().replace(ht[et.STAR],"")),nE=(n,e)=>(Pe("replaceGTE0",n,e),n.trim().replace(ht[e.includePrerelease?et.GTE0PRE:et.GTE0],"")),rE=n=>(e,t,r,i,s,o,a,u,l,f,p,h)=>(Ke(r)?t="":Ke(i)?t=`>=${r}.0.0${n?"-0":""}`:Ke(s)?t=`>=${r}.${i}.0${n?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,Ke(l)?u="":Ke(f)?u=`<${+l+1}.0.0-0`:Ke(p)?u=`<${l}.${+f+1}.0-0`:h?u=`<=${l}.${f}.${p}-${h}`:n?u=`<${l}.${f}.${+p+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),iE=(n,e,t)=>{for(let r=0;r0){let i=n[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Vv=P((Fq,Gv)=>{"use strict";var sE=gh(),oE=(n,e,t)=>{try{e=new sE(e,t)}catch{return!1}return e.test(n)};Gv.exports=oE});var Jv=P(qt=>{"use strict";var aE=qt&&qt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),yh=qt&&qt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&aE(e,n,t)};Object.defineProperty(qt,"__esModule",{value:!0});qt.DiagnosticPullMode=qt.vsdiag=void 0;yh(V(),qt);yh(ne(),qt);var Xv=id();Object.defineProperty(qt,"vsdiag",{enumerable:!0,get:function(){return Xv.vsdiag}});Object.defineProperty(qt,"DiagnosticPullMode",{enumerable:!0,get:function(){return Xv.DiagnosticPullMode}});yh(Vf(),qt)});var nb=P(Qe=>{"use strict";var eb=Qe&&Qe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),cE=Qe&&Qe.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),As=Qe&&Qe.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(e.prerelease=[]),!dE(e,Zv))throw new Error(`The language client requires VS Code version ${Zv} but received version ${qr.version}`)}get isInDebugMode(){return this._isInDebugMode}get serverProcess(){return this._serverProcess}async restart(){await this.stop(),this.isInDebugMode?(await new Promise(e=>setTimeout(e,1e3)),await this.start()):await this.start()}shutdown(e,t=2e3){return super.shutdown(e,t).finally(()=>{if(this._serverProcess){let r=this._serverProcess;this._serverProcess=void 0,(this._isDetached===void 0||!this._isDetached)&&this.checkProcessDied(r),this._isDetached=void 0}})}checkProcessDied(e){!e||e.pid===void 0||setTimeout(()=>{try{e.pid!==void 0&&(process.kill(e.pid,0),(0,uE.terminate)(e))}catch{}},2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),e.processId===null&&(e.processId=process.pid)}createMessageTransports(e){function t(h,g){if(!h&&!g)return;let _=Object.create(null);return Object.keys(process.env).forEach(v=>_[v]=process.env[v]),g&&(_.ELECTRON_RUN_AS_NODE="1",_.ELECTRON_NO_ASAR="1"),h&&Object.keys(h).forEach(v=>_[v]=h[v]),_}let r=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function s(){let h=process.execArgv;return h?h.some(g=>r.some(_=>g.startsWith(_))||i.some(_=>g===_)):!1}function o(h){if(h.stdin===null||h.stdout===null||h.stderr===null)throw new Error("Process created without stdio streams")}function a(h,g){Qv.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.info(_))}function u(h,g){Qv.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.error(_))}let l=this._serverOptions;if($i.func(l))return l().then(h=>{if(Yv.MessageTransports.is(h))return this._isDetached=!!h.detached,h;if(Dh.is(h))return this._isDetached=!!h.detached,{reader:new Ne.StreamMessageReader(h.reader),writer:new Ne.StreamMessageWriter(h.writer)};{let g;return Sh.is(h)?(g=h.process,this._isDetached=h.detached):(g=h,this._isDetached=!1),u(g.stderr,this.outputChannel),{reader:new Ne.StreamMessageReader(g.stdout),writer:new Ne.StreamMessageWriter(g.stdin)}}});let f,p=l;return p.run||p.debug?this._forceDebug||s()?(f=p.debug,this._isInDebugMode=!0):(f=p.run,this._isInDebugMode=!1):f=l,this._getServerWorkingDir(f.options).then(h=>{if(wh.is(f)&&f.module){let g=f,_=g.transport||je.stdio;if(g.runtime){let v=[],R=g.options??Object.create(null);R.execArgv&&R.execArgv.forEach(j=>v.push(j)),v.push(g.module),g.args&&g.args.forEach(j=>v.push(j));let q=Object.create(null);q.cwd=h,q.env=t(R.env,!1);let w=this._getRuntimePath(g.runtime,h),M;if(_===je.ipc?(q.stdio=[null,null,null,"ipc"],v.push("--node-ipc")):_===je.stdio?v.push("--stdio"):_===je.pipe?(M=(0,Ne.generateRandomPipeName)(),v.push(`--pipe=${M}`)):Er.isSocket(_)&&v.push(`--socket=${_.port}`),v.push(`--clientProcessId=${process.pid.toString()}`),_===je.ipc||_===je.stdio){let j=nr.spawn(w,v,q);return!j||!j.pid?ki(j,`Launching server using runtime ${w} failed.`):(this._serverProcess=j,u(j.stderr,this.outputChannel),_===je.ipc?(a(j.stdout,this.outputChannel),Promise.resolve({reader:new Ne.IPCMessageReader(j),writer:new Ne.IPCMessageWriter(j)})):Promise.resolve({reader:new Ne.StreamMessageReader(j.stdout),writer:new Ne.StreamMessageWriter(j.stdin)}))}else{if(_===je.pipe)return(0,Ne.createClientPipeTransport)(M).then(j=>{let F=nr.spawn(w,v,q);return!F||!F.pid?ki(F,`Launching server using runtime ${w} failed.`):(this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>({reader:oe[0],writer:oe[1]})))});if(Er.isSocket(_))return(0,Ne.createClientSocketTransport)(_.port).then(j=>{let F=nr.spawn(w,v,q);return!F||!F.pid?ki(F,`Launching server using runtime ${w} failed.`):(this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>({reader:oe[0],writer:oe[1]})))})}}else{let v;return new Promise((R,q)=>{let w=(g.args&&g.args.slice())??[];_===je.ipc?w.push("--node-ipc"):_===je.stdio?w.push("--stdio"):_===je.pipe?(v=(0,Ne.generateRandomPipeName)(),w.push(`--pipe=${v}`)):Er.isSocket(_)&&w.push(`--socket=${_.port}`),w.push(`--clientProcessId=${process.pid.toString()}`);let M=g.options?{...g.options}:Object.create(null);if(M.env=t(M.env,!0),M.execArgv=M.execArgv||[],M.cwd=h,M.silent=!0,_===je.ipc||_===je.stdio){let j=nr.fork(g.module,w||[],M);o(j),this._serverProcess=j,u(j.stderr,this.outputChannel),_===je.ipc?(a(j.stdout,this.outputChannel),R({reader:new Ne.IPCMessageReader(this._serverProcess),writer:new Ne.IPCMessageWriter(this._serverProcess)})):R({reader:new Ne.StreamMessageReader(j.stdout),writer:new Ne.StreamMessageWriter(j.stdin)})}else _===je.pipe?(0,Ne.createClientPipeTransport)(v).then(j=>{let F=nr.fork(g.module,w||[],M);o(F),this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>{R({reader:oe[0],writer:oe[1]})},q)},q):Er.isSocket(_)&&(0,Ne.createClientSocketTransport)(_.port).then(j=>{let F=nr.fork(g.module,w||[],M);o(F),this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>{R({reader:oe[0],writer:oe[1]})},q)},q)})}}else if(Ch.is(f)&&f.command){let g=f,_=f.args!==void 0?f.args.slice(0):[],v,R=f.transport;if(R===je.stdio)_.push("--stdio");else if(R===je.pipe)v=(0,Ne.generateRandomPipeName)(),_.push(`--pipe=${v}`);else if(Er.isSocket(R))_.push(`--socket=${R.port}`);else if(R===je.ipc)throw new Error("Transport kind ipc is not support for command executable");let q=Object.assign({},g.options);if(q.cwd=q.cwd||h,R===void 0||R===je.stdio){let w=nr.spawn(g.command,_,q);return!w||!w.pid?ki(w,`Launching server using command ${g.command} failed.`):(u(w.stderr,this.outputChannel),this._serverProcess=w,this._isDetached=!!q.detached,Promise.resolve({reader:new Ne.StreamMessageReader(w.stdout),writer:new Ne.StreamMessageWriter(w.stdin)}))}else{if(R===je.pipe)return(0,Ne.createClientPipeTransport)(v).then(w=>{let M=nr.spawn(g.command,_,q);return!M||!M.pid?ki(M,`Launching server using command ${g.command} failed.`):(this._serverProcess=M,this._isDetached=!!q.detached,u(M.stderr,this.outputChannel),a(M.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))});if(Er.isSocket(R))return(0,Ne.createClientSocketTransport)(R.port).then(w=>{let M=nr.spawn(g.command,_,q);return!M||!M.pid?ki(M,`Launching server using command ${g.command} failed.`):(this._serverProcess=M,this._isDetached=!!q.detached,u(M.stderr,this.outputChannel),a(M.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))})}}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(l,null,4)))}).finally(()=>{this._serverProcess!==void 0&&this._serverProcess.on("exit",(h,g)=>{h===0?this.info("Server process exited successfully",void 0,!1):h!==null&&this.error(`Server process exited with code ${h}.`,void 0,!1),g!==null&&this.error(`Server process exited with signal ${g}.`,void 0,!1)})})}_getRuntimePath(e,t){if(bh.isAbsolute(e))return e;let r=this._mainGetRootPath();if(r!==void 0){let i=bh.join(r,e);if(vh.existsSync(i))return i}if(t!==void 0){let i=bh.join(t,e);if(vh.existsSync(i))return i}return e}_mainGetRootPath(){let e=qr.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(r=>{vh.lstat(t,(i,s)=>{r(!i&&s.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}};Qe.LanguageClient=Ph;var Rh=class{_client;_setting;_listeners;constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return qr.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new qr.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,r=e>=0?this._setting.substr(e+1):void 0,i=r?qr.workspace.getConfiguration(t).get(r,!1):qr.workspace.getConfiguration(t);i&&this._client.needsStart()?this._client.start().catch(s=>this._client.error("Start failed after configuration change",s,"force")):!i&&this._client.needsStop()&&this._client.stop().catch(s=>this._client.error("Stop failed after configuration change",s,"force"))}};Qe.SettingMonitor=Rh;function ki(n,e){return n===null?Promise.reject(e):new Promise((t,r)=>{n.on("error",i=>{r(`${e} ${i}`)}),setImmediate(()=>r(e))})}});var fE=exports&&exports.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),hE=exports&&exports.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ib=exports&&exports.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{await rb.commands.executeCommand("editor.action.formatDocument")})),await Hi.start()}async function mE(){Hi!==void 0&&(await Hi.stop(),Hi=void 0)} //# sourceMappingURL=extension.js.map diff --git a/dist/server.js b/dist/server.js new file mode 100644 index 0000000..de72e0f --- /dev/null +++ b/dist/server.js @@ -0,0 +1,27 @@ +"use strict";var So=Object.defineProperty;var Dm=Object.getOwnPropertyDescriptor;var wm=Object.getOwnPropertyNames;var Pm=Object.prototype.hasOwnProperty;var ga=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},pa=(e,t)=>{for(var n in t)So(e,n,{get:t[n],enumerable:!0})},Rm=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wm(t))!Pm.call(e,o)&&o!==n&&So(e,o,{get:()=>t[o],enumerable:!(r=Dm(t,o))||r.enumerable});return e};var Vn=e=>Rm(So({},"__esModule",{value:!0}),e);var Xn=I(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.boolean=Om;qe.string=ya;qe.number=km;qe.error=Mm;qe.func=Ta;qe.array=_a;qe.stringArray=xm;qe.typedArray=qm;qe.thenable=Em;function Om(e){return e===!0||e===!1}function ya(e){return typeof e=="string"||e instanceof String}function km(e){return typeof e=="number"||e instanceof Number}function Mm(e){return e instanceof Error}function Ta(e){return typeof e=="function"}function _a(e){return Array.isArray(e)}function xm(e){return _a(e)&&e.every(t=>ya(t))}function qm(e,t){return Array.isArray(e)&&e.every(t)}function Em(e){return e&&Ta(e.then)}});var At=I(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.boolean=Gm;Ve.string=ba;Ve.number=Nm;Ve.error=Am;Ve.func=jm;Ve.array=va;Ve.stringArray=Fm;function Gm(e){return e===!0||e===!1}function ba(e){return typeof e=="string"||e instanceof String}function Nm(e){return typeof e=="number"||e instanceof Number}function Am(e){return e instanceof Error}function jm(e){return typeof e=="function"}function va(e){return Array.isArray(e)}function Fm(e){return va(e)&&e.every(t=>ba(t))}});var Xo=I(w=>{"use strict";var Lm=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hm=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wm=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.LRUCache=ct.LinkedMap=ct.Touch=void 0;var ae;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ae||(ct.Touch=ae={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ae.None){let r=this._map.get(t);if(r)return n!==ae.None&&this.touch(r,n),r.value}set(t,n,r=ae.None){let o=this._map.get(t);if(o)o.value=n,r!==ae.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ae.None:this.addItemLast(o);break;case ae.First:this.addItemFirst(o);break;case ae.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ae.First&&n!==ae.Last)){if(n===ae.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ae.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};ct.LinkedMap=Yn;var Yo=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ae.AsNew){return super.get(t,n)}peek(t){return super.get(t,ae.None)}set(t,n){return super.set(t,n,ae.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ct.LRUCache=Yo});var Sa=I(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var Ia;(function(e){function t(n){return{dispose:n}}e.create=t})(Ia||(Jn.Disposable=Ia={}))});var at=I(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});var Ko;function Zo(){if(Ko===void 0)throw new Error("No runtime abstraction layer installed");return Ko}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Ko=n}e.install=t})(Zo||(Zo={}));ei.default=Zo});var jt=I(ut=>{"use strict";var Um=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ut,"__esModule",{value:!0});ut.Emitter=ut.Event=void 0;var Bm=Um(at()),Da;(function(e){let t={dispose(){}};e.None=function(){return t}})(Da||(ut.Event=Da={}));var ti=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new ti),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ut.Emitter=ni});var er=I(ve=>{"use strict";var zm=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$m=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qm=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.SharedArrayReceiverStrategy=Ft.SharedArraySenderStrategy=void 0;var Km=er(),Tn;(function(e){e.Continue=0,e.Cancelled=1})(Tn||(Tn={}));var ii=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Tn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Tn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Ft.SharedArraySenderStrategy=ii;var si=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Tn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},ci=class{token;constructor(t){this.token=new si(t)}cancel(){}dispose(){}},ai=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Km.CancellationTokenSource:new ci(n)}};Ft.SharedArrayReceiverStrategy=ai});var li=I(Lt=>{"use strict";var Zm=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Semaphore=void 0;var eh=Zm(at()),ui=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,eh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Lt.Semaphore=ui});var Ra=I(ue=>{"use strict";var th=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),nh=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rh=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,fi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};ue.ReadableStreamMessageReader=hi});var qa=I(le=>{"use strict";var sh=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ch=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ah=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(dh,r.byteLength.toString(),Ma),o.push(Ma),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};le.WriteableStreamMessageWriter=pi});var Ea=I(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.AbstractMessageBuffer=void 0;var fh=13,mh=10,hh=`\r +`,yi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};rr.AbstractMessageBuffer=yi});var ja=I(R=>{"use strict";var gh=R&&R.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ph=R&&R.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yh=R&&R.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(R.Trace=F={}));var Ci;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Ci||(R.TraceValue=Ci={}));R.TraceValues=Ci;(function(e){function t(r){if(!X.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(R.Trace=F={}));var Se;(function(e){e.Text="text",e.JSON="json"})(Se||(R.TraceFormat=Se={}));(function(e){function t(n){return X.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Se||(R.TraceFormat=Se={}));var Ii;(function(e){e.type=new O.NotificationType("$/setTrace")})(Ii||(R.SetTraceNotification=Ii={}));var or;(function(e){e.type=new O.NotificationType("$/logTrace")})(or||(R.LogTraceNotification=or={}));var Cn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Cn||(R.ConnectionErrors=Cn={}));var Wt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};R.ConnectionError=Wt;var Si;(function(e){function t(n){let r=n;return r&&X.func(r.cancelUndispatched)}e.is=t})(Si||(R.ConnectionStrategy=Si={}));var ir;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(ir||(R.IdCancellationReceiverStrategy=ir={}));var Di;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(Di||(R.RequestCancellationReceiverStrategy=Di={}));var sr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ti.CancellationTokenSource}});function t(n){return ir.is(n)||Di.is(n)}e.is=t})(sr||(R.CancellationReceiverStrategy=sr={}));var cr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&X.func(r.sendCancellation)&&X.func(r.cleanup)}e.is=t})(cr||(R.CancellationSenderStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({receiver:sr.Message,sender:cr.Message});function t(n){let r=n;return r&&sr.is(r.receiver)&&cr.is(r.sender)}e.is=t})(ar||(R.CancellationStrategy=ar={}));var ur;(function(e){function t(n){let r=n;return r&&X.func(r.handleMessage)}e.is=t})(ur||(R.MessageStrategy=ur={}));var Aa;(function(e){function t(n){let r=n;return r&&(ar.is(r.cancellationStrategy)||Si.is(r.connectionStrategy)||ur.is(r.messageStrategy)||X.number(r.maxParallelism))}e.is=t})(Aa||(R.ConnectionOptions=Aa={}));var Ee;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Ee||(Ee={}));function _h(e,t,n,r){let o=n!==void 0?n:R.NullLogger,i=0,s=0,a=0,h="2.0",l=r?.maxParallelism??-1,_=0,b,g=new Map,D,N=new Map,A=new Map,B,M=new Na.LinkedMap,m=new Map,f=new Set,v=new Map,x=F.Off,G=Se.Text,q,be=Ee.New,rt=new bn.Emitter,mn=new bn.Emitter,se=new bn.Emitter,hn=new bn.Emitter,ot=new bn.Emitter,Fe=r&&r.cancellationStrategy?r.cancellationStrategy:ar.Message;function am(u){}function sa(){return be===Ee.Listening}function ca(){return be===Ee.Closed}function Gt(){return be===Ee.Disposed}function aa(){(be===Ee.New||be===Ee.Listening)&&(be=Ee.Closed,mn.fire(void 0))}function um(u){rt.fire([u,void 0,void 0])}function lm(u){rt.fire(u)}e.onClose(aa),e.onError(um),t.onClose(aa),t.onError(lm);function ua(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function dm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function fm(){return"not-"+(++s).toString()}function mm(u,T){O.Message.isRequest(T)?u.set(ua(T.id),T):O.Message.isResponse(T)?l===-1?u.set(dm(T.id),T):da(T):u.set(fm(),T)}function bo(){B||M.size===0||l!==-1&&_>=l||(B=(0,Ga.default)().timer.setImmediate(async()=>{if(B=void 0,M.size===0||l!==-1&&_>=l)return;let u=M.shift(),T;try{_++;let C=r?.messageStrategy;ur.is(C)?T=C.handleMessage(u,la):T=la(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{T instanceof Promise?T.then(()=>{_--,bo()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):_--,bo()}}))}async function la(u){return O.Message.isRequest(u)?gm(u):O.Message.isNotification(u)?pm(u):O.Message.isResponse(u)?da(u):ym(u)}let hm=u=>{try{if(O.Message.isNotification(u)&&u.method===In.type.method){let T=u.params.id,C=ua(T),P=M.get(C);if(O.Message.isRequest(P)){let V=r?.connectionStrategy,H=V&&V.cancelUndispatched?V.cancelUndispatched(P,am):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){M.delete(C),v.delete(T),H.id=P.id,vo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=v.get(T);if(j!==void 0){j.cancel(),Co(u);return}else f.add(T)}mm(M,u)}finally{bo()}};async function gm(u){if(Gt())return Promise.resolve();function T(te,ce,J){let K={jsonrpc:h,id:u.id};return te instanceof O.ResponseError?K.error=te.toJson():K.result=te===void 0?null:te,vo(K,ce,J),t.write(K)}function C(te,ce,J){let K={jsonrpc:h,id:u.id,error:te.toJson()};return vo(K,ce,J),t.write(K)}bm(u);let P=g.get(u.method),j,V;P&&(j=P.type,V=P.handler);let H=Date.now();if(V||b){let te=u.id??String(Date.now()),ce=ir.is(Fe.receiver)?Fe.receiver.createCancellationTokenSource(te):Fe.receiver.createCancellationTokenSource(u);u.id!==null&&f.has(u.id)&&ce.cancel(),u.id!==null&&v.set(te,ce);try{let J;if(V)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new O.ResponseError(O.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);J=V(ce.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===O.ParameterStructures.byName)return C(new O.ResponseError(O.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=V(...u.params,ce.token)}else{if(j!==void 0&&j.parameterStructures===O.ParameterStructures.byPosition)return C(new O.ResponseError(O.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=V(u.params,ce.token)}else b&&(J=b(u.method,u.params,ce.token));let K=await J;await T(K,u.method,H)}catch(J){J instanceof O.ResponseError?await T(J,u.method,H):J&&X.string(J.message)?await C(new O.ResponseError(O.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new O.ResponseError(O.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{v.delete(te)}}else await C(new O.ResponseError(O.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function da(u){if(!Gt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let T=u.id,C=m.get(T);if(vm(u,C),C!==void 0){m.delete(T);try{if(u.error){let P=u.error;C.reject(new O.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function pm(u){if(Gt())return;let T,C;if(u.method===In.type.method){let P=u.params.id;f.delete(P),Co(u);return}else{let P=N.get(u.method);P&&(C=P.handler,T=P.type)}if(C||D)try{if(Co(u),C)if(u.params===void 0)T!==void 0&&T.numberOfParams!==0&&T.parameterStructures!==O.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===vn.type.method&&P.length===2&&_i.is(P[0])?await C({token:P[0],value:P[1]}):(T!==void 0&&(T.parameterStructures===O.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),T.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else T!==void 0&&T.parameterStructures===O.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else D&&await D(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else se.fire(u)}function ym(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let T=u;if(X.string(T.id)||X.number(T.id)){let C=T.id,P=m.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function it(u){if(u!=null)switch(x){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Tm(u){if(!(x===F.Off||!q))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${it(u.params)}`),q.log(`Sending request '${u.method} - (${u.id})'.`,T)}else Nt("send-request",u)}function _m(u){if(!(x===F.Off||!q))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${it(u.params)}`:T="No parameters provided."),q.log(`Sending notification '${u.method}'.`,T)}else Nt("send-notification",u)}function vo(u,T,C){if(!(x===F.Off||!q))if(G===Se.Text){let P;(x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${it(u.error.data)}`:u.result?P=`Result: ${it(u.result)}`:u.error===void 0&&(P="No result returned.")),q.log(`Sending response '${T} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Nt("send-response",u)}function bm(u){if(!(x===F.Off||!q))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${it(u.params)}`),q.log(`Received request '${u.method} - (${u.id})'.`,T)}else Nt("receive-request",u)}function Co(u){if(!(x===F.Off||!q||u.method===or.type.method))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${it(u.params)}`:T="No parameters provided."),q.log(`Received notification '${u.method}'.`,T)}else Nt("receive-notification",u)}function vm(u,T){if(!(x===F.Off||!q))if(G===Se.Text){let C;if((x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${it(u.error.data)}`:u.result?C=`Result: ${it(u.result)}`:u.error===void 0&&(C="No result returned.")),T){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";q.log(`Received response '${T.method} - (${u.id})' in ${Date.now()-T.timerStart}ms.${P}`,C)}else q.log(`Received response ${u.id} without active response promise.`,C)}else Nt("receive-response",u)}function Nt(u,T){if(!q||x===F.Off)return;let C={isLSPMessage:!0,type:u,message:T,timestamp:Date.now()};q.log(C)}function gn(){if(ca())throw new Wt(Cn.Closed,"Connection is closed.");if(Gt())throw new Wt(Cn.Disposed,"Connection is disposed.")}function Cm(){if(sa())throw new Wt(Cn.AlreadyListening,"Connection is already listening")}function Im(){if(!sa())throw new Error("Call listen() first.")}function pn(u){return u===void 0?null:u}function fa(u){if(u!==null)return u}function ma(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Io(u,T){switch(u){case O.ParameterStructures.auto:return ma(T)?fa(T):[pn(T)];case O.ParameterStructures.byName:if(!ma(T))throw new Error("Received parameters by name but param is not an object literal.");return fa(T);case O.ParameterStructures.byPosition:return[pn(T)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function ha(u,T){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Io(u.parameterStructures,T[0]);break;default:C=[];for(let j=0;j{gn();let C,P;if(X.string(u)){C=u;let V=T[0],H=0,te=O.ParameterStructures.auto;O.ParameterStructures.is(V)&&(H=1,te=V);let ce=T.length,J=ce-H;switch(J){case 0:P=void 0;break;case 1:P=Io(te,T[H]);break;default:if(te===O.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=T.slice(H,ce).map(K=>pn(K));break}}else{let V=T;C=u.method,P=ha(u,V)}let j={jsonrpc:h,method:C,params:P};return _m(j),t.write(j).catch(V=>{throw o.error("Sending notification failed."),V})},onNotification:(u,T)=>{gn();let C;return X.func(u)?D=u:T&&(X.string(u)?(C=u,N.set(u,{type:void 0,handler:T})):(C=u.method,N.set(u.method,{type:u,handler:T}))),{dispose:()=>{C!==void 0?N.get(C)?.handler===T&&N.delete(C):D===u&&(D=void 0)}}},onProgress:(u,T,C)=>{if(A.has(T))throw new Error(`Progress handler for token ${T} already registered`);return A.set(T,C),{dispose:()=>{A.get(T)===C&&A.delete(T)}}},sendProgress:(u,T,C)=>vt.sendNotification(vn.type,{token:T,value:C}),onUnhandledProgress:hn.event,sendRequest:(u,...T)=>{gn(),Im();function C(K,xe){let Qe=Fe.sender.sendCancellation(K,xe);Qe===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${xe}`):Qe.catch(()=>{o.log(`Sending cancellation messages for id ${xe} failed.`)})}let P,j,V;if(X.string(u)){P=u;let K=T[0],xe=T[T.length-1],Qe=0,yn=O.ParameterStructures.auto;O.ParameterStructures.is(K)&&(Qe=1,yn=K);let Ct=T.length;Ti.CancellationToken.is(xe)&&(Ct=Ct-1,V=xe);let Le=Ct-Qe;switch(Le){case 0:j=void 0;break;case 1:j=Io(yn,T[Qe]);break;default:if(yn===O.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' request parameter structure.`);j=T.slice(Qe,Ct).map(Sm=>pn(Sm));break}}else{let K=T;P=u.method,j=ha(u,K);let xe=u.numberOfParams;V=Ti.CancellationToken.is(K[xe])?K[xe]:void 0}let H=i++,te,ce=!1;V!==void 0&&(V.isCancellationRequested?ce=!0:te=V.onCancellationRequested(()=>{C(vt,H)}));let J={jsonrpc:h,id:H,method:P,params:j};return Tm(J),typeof Fe.sender.enableCancellation=="function"&&Fe.sender.enableCancellation(J),new Promise(async(K,xe)=>{let Qe=Le=>{K(Le),Fe.sender.cleanup(H),te?.dispose()},yn=Le=>{xe(Le),Fe.sender.cleanup(H),te?.dispose()},Ct={method:P,timerStart:Date.now(),resolve:Qe,reject:yn};try{m.set(H,Ct),await t.write(J),ce&&C(vt,H)}catch(Le){throw m.delete(H),Ct.reject(new O.ResponseError(O.ErrorCodes.MessageWriteError,Le.message?Le.message:"Unknown reason")),o.error("Sending request failed."),Le}})},onRequest:(u,T)=>{gn();let C=null;return vi.is(u)?(C=void 0,b=u):X.string(u)?(C=null,T!==void 0&&(C=u,g.set(u,{handler:T,type:void 0}))):T!==void 0&&(C=u.method,g.set(u.method,{type:u,handler:T})),{dispose:()=>{C!==null&&(C!==void 0?g.get(C)?.handler===T&&g.delete(C):b===u&&(b=void 0))}}},hasPendingResponse:()=>m.size>0,trace:async(u,T,C)=>{let P=!1,j=Se.Text;C!==void 0&&(X.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||Se.Text)),x=u,G=j,x===F.Off?q=void 0:q=T,P&&!ca()&&!Gt()&&await vt.sendNotification(Ii.type,{value:F.toString(u)})},onError:rt.event,onClose:mn.event,onUnhandledNotification:se.event,onDispose:ot.event,end:()=>{t.end()},dispose:()=>{if(Gt())return;be=Ee.Disposed,ot.fire(void 0);let u=new O.ResponseError(O.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let T of m.values())T.reject(u);m=new Map,v=new Map,f=new Set,M=new Na.LinkedMap,X.func(t.dispose)&&t.dispose(),X.func(e.dispose)&&e.dispose()},listen:()=>{gn(),Cm(),be=Ee.Listening,e.listen(hm)},inspect:()=>{(0,Ga.default)().console.log("inspect")}};return vt.onNotification(or.type,u=>{if(x===F.Off||!q)return;let T=x===F.Verbose||x===F.Compact;q.log(u.message,T?u.verbose:void 0)}),vt.onNotification(vn.type,async u=>{let T=A.get(u.token);T?await T(u.value):hn.fire(u)}),vt}});var Xe=I(p=>{"use strict";var bh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var z=Xo();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return z.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return z.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return z.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return z.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return z.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return z.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return z.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return z.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return z.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return z.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return z.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return z.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return z.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return z.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return z.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return z.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return z.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return z.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return z.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return z.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return z.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return z.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return z.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return z.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return z.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return z.ParameterStructures}});var wi=Jo();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return wi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return wi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return wi.Touch}});var vh=Sa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return vh.Disposable}});var Fa=jt();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return Fa.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return Fa.Emitter}});var La=er();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return La.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return La.CancellationToken}});var Ha=wa();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Ha.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Ha.SharedArrayReceiverStrategy}});var Pi=Ra();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Pi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Pi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Pi.ReadableStreamMessageReader}});var Ri=qa();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ri.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ri.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ri.WriteableStreamMessageWriter}});var Ch=Ea();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Ch.AbstractMessageBuffer}});var ee=ja();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return ee.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return ee.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return ee.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return ee.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return ee.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return ee.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return ee.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return ee.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return ee.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return ee.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return ee.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return ee.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return ee.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ee.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return ee.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return ee.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return ee.TraceValues}});var Ih=bh(at());p.RAL=Ih.default});var br={};pa(br,{AnnotatedTextEdit:()=>Ye,ApplyKind:()=>Yi,ChangeAnnotation:()=>lt,ChangeAnnotationIdentifier:()=>ne,CodeAction:()=>fs,CodeActionContext:()=>ds,CodeActionKind:()=>ls,CodeActionTag:()=>pr,CodeActionTriggerKind:()=>kn,CodeDescription:()=>ji,CodeLens:()=>ms,Color:()=>dr,ColorInformation:()=>xi,ColorPresentation:()=>qi,Command:()=>St,CompletionItem:()=>Ki,CompletionItemKind:()=>zi,CompletionItemLabelDetails:()=>Ji,CompletionItemTag:()=>Qi,CompletionList:()=>Zi,CreateFile:()=>Bt,DeleteFile:()=>$t,Diagnostic:()=>wn,DiagnosticRelatedInformation:()=>fr,DiagnosticSeverity:()=>Ni,DiagnosticTag:()=>Ai,DocumentHighlight:()=>os,DocumentHighlightKind:()=>rs,DocumentLink:()=>gs,DocumentSymbol:()=>us,DocumentUri:()=>Oi,EOL:()=>Sh,FoldingRange:()=>Gi,FoldingRangeKind:()=>Ei,FormattingOptions:()=>hs,Hover:()=>es,InlayHint:()=>Ss,InlayHintKind:()=>yr,InlayHintLabelPart:()=>Tr,InlineCompletionContext:()=>Os,InlineCompletionItem:()=>Ds,InlineCompletionList:()=>ws,InlineCompletionTriggerKind:()=>Ps,InlineValueContext:()=>Is,InlineValueEvaluatableExpression:()=>Cs,InlineValueText:()=>bs,InlineValueVariableLookup:()=>vs,InsertReplaceEdit:()=>Vi,InsertTextFormat:()=>$i,InsertTextMode:()=>Xi,LanguageKind:()=>Ui,Location:()=>Dn,LocationLink:()=>Mi,MarkedString:()=>On,MarkupContent:()=>dt,MarkupKind:()=>gr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>ts,Position:()=>Re,Range:()=>Y,RenameFile:()=>zt,SelectedCompletionInfo:()=>Rs,SelectionRange:()=>ps,SemanticTokenModifiers:()=>Ts,SemanticTokenTypes:()=>ys,SemanticTokens:()=>_s,SignatureInformation:()=>ns,SnippetTextEdit:()=>Fi,StringValue:()=>_r,SymbolInformation:()=>cs,SymbolKind:()=>is,SymbolTag:()=>ss,TextDocument:()=>Ms,TextDocumentEdit:()=>Pn,TextDocumentIdentifier:()=>Hi,TextDocumentItem:()=>Bi,TextEdit:()=>He,URI:()=>lr,VersionedTextDocumentIdentifier:()=>Wi,WorkspaceChange:()=>Li,WorkspaceEdit:()=>mr,WorkspaceFolder:()=>ks,WorkspaceSymbol:()=>as,integer:()=>ki,uinteger:()=>Sn});var Oi,lr,ki,Sn,Re,Y,Dn,Mi,dr,xi,qi,Ei,Gi,fr,Ni,Ai,ji,wn,St,He,lt,ne,Ye,Pn,Bt,zt,$t,mr,Ut,Fi,hr,Li,Hi,Wi,Rn,Ui,Bi,gr,dt,zi,$i,Qi,Vi,Xi,Yi,Ji,Ki,Zi,On,es,ts,ns,rs,os,is,ss,cs,as,us,ls,kn,ds,pr,fs,ms,hs,gs,ps,ys,Ts,_s,bs,vs,Cs,Is,yr,Tr,Ss,_r,Ds,ws,Ps,Rs,Os,ks,Sh,Ms,xs,d,vr=ga(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Oi||(Oi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(lr||(lr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(ki||(ki={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Sn||(Sn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Sn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Sn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.line)&&d.uinteger(o.character)}e.is=n})(Re||(Re={}));(function(e){function t(r,o,i,s){if(d.uinteger(r)&&d.uinteger(o)&&d.uinteger(i)&&d.uinteger(s))return{start:Re.create(r,o),end:Re.create(i,s)};if(Re.is(r)&&Re.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Re.is(o.start)&&Re.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(d.string(o.uri)||d.undefined(o.uri))}e.is=n})(Dn||(Dn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.targetRange)&&d.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||d.undefined(o.originSelectionRange))}e.is=n})(Mi||(Mi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.numberRange(o.red,0,1)&&d.numberRange(o.green,0,1)&&d.numberRange(o.blue,0,1)&&d.numberRange(o.alpha,0,1)}e.is=n})(dr||(dr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&dr.is(o.color)}e.is=n})(xi||(xi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.undefined(o.textEdit)||He.is(o))&&(d.undefined(o.additionalTextEdits)||d.typedArray(o.additionalTextEdits,He.is))}e.is=n})(qi||(qi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ei||(Ei={}));(function(e){function t(r,o,i,s,a,h){let l={startLine:r,endLine:o};return d.defined(i)&&(l.startCharacter=i),d.defined(s)&&(l.endCharacter=s),d.defined(a)&&(l.kind=a),d.defined(h)&&(l.collapsedText=h),l}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.startLine)&&d.uinteger(o.startLine)&&(d.undefined(o.startCharacter)||d.uinteger(o.startCharacter))&&(d.undefined(o.endCharacter)||d.uinteger(o.endCharacter))&&(d.undefined(o.kind)||d.string(o.kind))}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Dn.is(o.location)&&d.string(o.message)}e.is=n})(fr||(fr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ni||(Ni={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Ai||(Ai={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&d.string(r.href)}e.is=t})(ji||(ji={}));(function(e){function t(i,s,a,h,l,_){let b={range:i,message:s};return d.defined(a)&&(b.severity=a),d.defined(h)&&(b.code=h),d.defined(l)&&(b.source=l),d.defined(_)&&(b.relatedInformation=_),b}e.create=t;function n(i){var s;let a=i;return d.defined(a)&&Y.is(a.range)&&(d.string(a.message)||dt.is(a.message))&&(d.number(a.severity)||d.undefined(a.severity))&&(d.integer(a.code)||d.string(a.code)||d.undefined(a.code))&&(d.undefined(a.codeDescription)||d.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(d.string(a.source)||d.undefined(a.source))&&(d.undefined(a.relatedInformation)||d.typedArray(a.relatedInformation,fr.is))}e.is=n;function r(i){return d.string(i.message)}e.is3_17=r;function o(i){if(d.string(i.message))return i.message;if(dt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(wn||(wn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return d.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.title)&&(o.tooltip===void 0||d.string(o.tooltip))&&d.string(o.command)}e.is=n})(St||(St={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return d.objectLiteral(s)&&d.string(s.newText)&&Y.is(s.range)}e.is=o})(He||(He={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(d.string(o.description)||o.description===void 0)}e.is=n})(lt||(lt={}));(function(e){function t(n){let r=n;return d.string(r)}e.is=t})(ne||(ne={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return He.is(s)&&(lt.is(s.annotationId)||ne.is(s.annotationId))}e.is=o})(Ye||(Ye={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Pn||(Pn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&d.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(Bt||(Bt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&d.string(o.oldUri)&&d.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(zt||(zt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&d.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||d.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||d.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})($t||($t={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>d.string(o.kind)?Bt.is(o)||zt.is(o)||$t.is(o):Pn.is(o)))}e.is=t})(mr||(mr={}));Ut=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=He.insert(t,n):ne.is(r)?(i=r,o=Ye.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ye.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=He.replace(t,n):ne.is(r)?(i=r,o=Ye.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ye.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=He.del(t):ne.is(n)?(o=n,r=Ye.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Ye.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return d.objectLiteral(r)&&Y.is(r.range)&&_r.isSnippet(r.snippet)&&(r.annotationId===void 0||lt.is(r.annotationId)||ne.is(r.annotationId))}e.is=t})(Fi||(Fi={}));hr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ne.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Li=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new hr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Pn.is(n)){let r=new Ut(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Ut(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Ut(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Ut(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new hr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;lt.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Bt.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=Bt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;lt.is(r)||ne.is(r)?i=r:o=r;let s,a;if(i===void 0?s=zt.create(t,n,o):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=zt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;lt.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=$t.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=$t.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)}e.is=n})(Hi||(Hi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.integer(o.version)}e.is=n})(Wi||(Wi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&(o.version===null||d.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Ui||(Ui={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.string(o.languageId)&&d.integer(o.version)&&d.string(o.text)}e.is=n})(Bi||(Bi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(gr||(gr={}));(function(e){function t(n){let r=n;return d.objectLiteral(n)&&gr.is(r.kind)&&d.string(r.value)}e.is=t})(dt||(dt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(zi||(zi={}));(function(e){e.PlainText=1,e.Snippet=2})($i||($i={}));(function(e){e.Deprecated=1})(Qi||(Qi={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&d.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(Vi||(Vi={}));(function(e){e.asIs=1,e.adjustIndentation=2})(Xi||(Xi={}));(function(e){e.Replace=1,e.Merge=2})(Yi||(Yi={}));(function(e){function t(n){let r=n;return r&&(d.string(r.detail)||r.detail===void 0)&&(d.string(r.description)||r.description===void 0)}e.is=t})(Ji||(Ji={}));(function(e){function t(n){return{label:n}}e.create=t})(Ki||(Ki={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(Zi||(Zi={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return d.string(o)||d.objectLiteral(o)&&d.string(o.language)&&d.string(o.value)}e.is=n})(On||(On={}));(function(e){function t(n){let r=n;return!!r&&d.objectLiteral(r)&&(dt.is(r.contents)||On.is(r.contents)||d.typedArray(r.contents,On.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(es||(es={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ts||(ts={}));(function(e){function t(n,r,...o){let i={label:n};return d.defined(r)&&(i.documentation=r),d.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ns||(ns={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(rs||(rs={}));(function(e){function t(n,r){let o={range:n};return d.number(r)&&(o.kind=r),o}e.create=t})(os||(os={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(is||(is={}));(function(e){e.Deprecated=1})(ss||(ss={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(cs||(cs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(as||(as={}));(function(e){function t(r,o,i,s,a,h){let l={name:r,detail:o,kind:i,range:s,selectionRange:a};return h!==void 0&&(l.children=h),l}e.create=t;function n(r){let o=r;return o&&d.string(o.name)&&d.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||d.string(o.detail))&&(o.deprecated===void 0||d.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(us||(us={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(ls||(ls={}));(function(e){e.Invoked=1,e.Automatic=2})(kn||(kn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.typedArray(o.diagnostics,wn.is)&&(o.only===void 0||d.typedArray(o.only,d.string))&&(o.triggerKind===void 0||o.triggerKind===kn.Invoked||o.triggerKind===kn.Automatic)}e.is=n})(ds||(ds={}));(function(e){e.LLMGenerated=1;function t(n){return d.defined(n)&&n===e.LLMGenerated}e.is=t})(pr||(pr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):St.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&d.string(o.title)&&(o.diagnostics===void 0||d.typedArray(o.diagnostics,wn.is))&&(o.kind===void 0||d.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||St.is(o.command))&&(o.isPreferred===void 0||d.boolean(o.isPreferred))&&(o.edit===void 0||mr.is(o.edit))&&(o.tags===void 0||d.typedArray(o.tags,pr.is))}e.is=n})(fs||(fs={}));(function(e){function t(r,o){let i={range:r};return d.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.command)||St.is(o.command))}e.is=n})(ms||(ms={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.uinteger(o.tabSize)&&d.boolean(o.insertSpaces)}e.is=n})(hs||(hs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.target)||d.string(o.target))}e.is=n})(gs||(gs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(ps||(ps={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(ys||(ys={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ts||(Ts={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(_s||(_s={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.string(o.text)}e.is=n})(bs||(bs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.boolean(o.caseSensitiveLookup)&&(d.string(o.variableName)||o.variableName===void 0)}e.is=n})(vs||(vs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(d.string(o.expression)||o.expression===void 0)}e.is=n})(Cs||(Cs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Is||(Is={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(yr||(yr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&(o.tooltip===void 0||d.string(o.tooltip)||dt.is(o.tooltip))&&(o.location===void 0||Dn.is(o.location))&&(o.command===void 0||St.is(o.command))}e.is=n})(Tr||(Tr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Re.is(o.position)&&(d.string(o.label)||d.typedArray(o.label,Tr.is))&&(o.kind===void 0||yr.is(o.kind))&&o.textEdits===void 0||d.typedArray(o.textEdits,He.is)&&(o.tooltip===void 0||d.string(o.tooltip)||dt.is(o.tooltip))&&(o.paddingLeft===void 0||d.boolean(o.paddingLeft))&&(o.paddingRight===void 0||d.boolean(o.paddingRight))}e.is=n})(Ss||(Ss={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return d.objectLiteral(o)&&o.kind==="snippet"&&d.string(o.value)}e.isSnippet=n})(_r||(_r={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Ds||(Ds={}));(function(e){function t(n){return{items:n}}e.create=t})(ws||(ws={}));(function(e){e.Invoked=1,e.Automatic=2})(Ps||(Ps={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Rs||(Rs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Os||(Os={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&lr.is(r.uri)&&d.string(r.name)}e.is=t})(ks||(ks={}));Sh=[` +`,`\r +`,"\r"];(function(e){function t(i,s,a,h){return new xs(i,s,a,h)}e.create=t;function n(i){let s=i;return!!(d.defined(s)&&d.string(s.uri)&&(d.undefined(s.languageId)||d.string(s.languageId))&&d.uinteger(s.lineCount)&&d.func(s.getText)&&d.func(s.positionAt)&&d.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),h=o(s,(_,b)=>{let g=_.range.start.line-b.range.start.line;return g===0?_.range.start.character-b.range.start.character:g}),l=a.length;for(let _=h.length-1;_>=0;_--){let b=h[_],g=i.offsetAt(b.range.start),D=i.offsetAt(b.range.end);if(D<=l)a=a.substring(0,g)+b.newText+a.substring(D,a.length);else throw new Error("Overlapping edit");l=g}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,h=i.slice(0,a),l=i.slice(a);o(h,s),o(l,s);let _=0,b=0,g=0;for(;_0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Re.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Re.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(D){return D===!0||D===!1}e.boolean=o;function i(D){return t.call(D)==="[object String]"}e.string=i;function s(D){return t.call(D)==="[object Number]"}e.number=s;function a(D,N,A){return t.call(D)==="[object Number]"&&N<=D&&D<=A}e.numberRange=a;function h(D){return t.call(D)==="[object Number]"&&-2147483648<=D&&D<=2147483647}e.integer=h;function l(D){return t.call(D)==="[object Number]"&&0<=D&&D<=2147483647}e.uinteger=l;function _(D){return t.call(D)==="[object Function]"}e.func=_;function b(D){return D!==null&&typeof D=="object"}e.objectLiteral=b;function g(D,N){return Array.isArray(D)&&D.every(N)}e.typedArray=g})(d||(d={}))});var Q=I(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.CM=de.ProtocolNotificationType=de.ProtocolNotificationType0=de.ProtocolRequestType=de.ProtocolRequestType0=de.RegistrationType=de.MessageDirection=void 0;var Qt=Xe(),Wa;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Wa||(de.MessageDirection=Wa={}));var qs=class{____;method;constructor(t){this.method=t}};de.RegistrationType=qs;var Es=class extends Qt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};de.ProtocolRequestType0=Es;var Gs=class extends Qt.RequestType{__;___;____;_pr;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolRequestType=Gs;var Ns=class extends Qt.NotificationType0{___;____;constructor(t){super(t)}};de.ProtocolNotificationType0=Ns;var As=class extends Qt.NotificationType{___;____;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolNotificationType=As;var Ua;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(Ua||(de.CM=Ua={}))});var Cr=I(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Dh;Ge.string=Ba;Ge.number=wh;Ge.error=Ph;Ge.func=Rh;Ge.array=za;Ge.stringArray=Oh;Ge.typedArray=kh;Ge.objectLiteral=Mh;function Dh(e){return e===!0||e===!1}function Ba(e){return typeof e=="string"||e instanceof String}function wh(e){return typeof e=="number"||e instanceof Number}function Ph(e){return e instanceof Error}function Rh(e){return typeof e=="function"}function za(e){return Array.isArray(e)}function Oh(e){return za(e)&&e.every(t=>Ba(t))}function kh(e,t){return Array.isArray(e)&&e.every(t)}function Mh(e){return e!==null&&typeof e=="object"}});var Qa=I(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.ImplementationRequest=void 0;var js=Q(),$a;(function(e){e.method="textDocument/implementation",e.messageDirection=js.MessageDirection.clientToServer,e.type=new js.ProtocolRequestType(e.method),e.capabilities=js.CM.create("textDocument.implementation","implementationProvider")})($a||(Ir.ImplementationRequest=$a={}))});var Xa=I(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.TypeDefinitionRequest=void 0;var Fs=Q(),Va;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Fs.MessageDirection.clientToServer,e.type=new Fs.ProtocolRequestType(e.method),e.capabilities=Fs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(Va||(Sr.TypeDefinitionRequest=Va={}))});var Ka=I(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DidChangeWorkspaceFoldersNotification=Xt.WorkspaceFoldersRequest=void 0;var Vt=Q(),Ya;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Vt.MessageDirection.serverToClient,e.type=new Vt.ProtocolRequestType0(e.method),e.capabilities=Vt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Ya||(Xt.WorkspaceFoldersRequest=Ya={}));var Ja;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Vt.MessageDirection.clientToServer,e.type=new Vt.ProtocolNotificationType(e.method),e.capabilities=Vt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Ja||(Xt.DidChangeWorkspaceFoldersNotification=Ja={}))});var eu=I(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ConfigurationRequest=void 0;var Ls=Q(),Za;(function(e){e.method="workspace/configuration",e.messageDirection=Ls.MessageDirection.serverToClient,e.type=new Ls.ProtocolRequestType(e.method),e.capabilities=Ls.CM.create("workspace.configuration",void 0)})(Za||(Dr.ConfigurationRequest=Za={}))});var ru=I(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.ColorPresentationRequest=Jt.DocumentColorRequest=void 0;var Yt=Q(),tu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType(e.method),e.capabilities=Yt.CM.create("textDocument.colorProvider","colorProvider")})(tu||(Jt.DocumentColorRequest=tu={}));var nu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType(e.method),e.capabilities=Yt.CM.create("textDocument.colorProvider","colorProvider")})(nu||(Jt.ColorPresentationRequest=nu={}))});var su=I(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.FoldingRangeRefreshRequest=Zt.FoldingRangeRequest=void 0;var Kt=Q(),ou;(function(e){e.method="textDocument/foldingRange",e.messageDirection=Kt.MessageDirection.clientToServer,e.type=new Kt.ProtocolRequestType(e.method),e.capabilities=Kt.CM.create("textDocument.foldingRange","foldingRangeProvider")})(ou||(Zt.FoldingRangeRequest=ou={}));var iu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=Kt.MessageDirection.serverToClient,e.type=new Kt.ProtocolRequestType0(e.method),e.capabilities=Kt.CM.create("workspace.foldingRange.refreshSupport",void 0)})(iu||(Zt.FoldingRangeRefreshRequest=iu={}))});var au=I(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.DeclarationRequest=void 0;var Hs=Q(),cu;(function(e){e.method="textDocument/declaration",e.messageDirection=Hs.MessageDirection.clientToServer,e.type=new Hs.ProtocolRequestType(e.method),e.capabilities=Hs.CM.create("textDocument.declaration","declarationProvider")})(cu||(wr.DeclarationRequest=cu={}))});var lu=I(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.SelectionRangeRequest=void 0;var Ws=Q(),uu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Ws.MessageDirection.clientToServer,e.type=new Ws.ProtocolRequestType(e.method),e.capabilities=Ws.CM.create("textDocument.selectionRange","selectionRangeProvider")})(uu||(Pr.SelectionRangeRequest=uu={}))});var hu=I(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.WorkDoneProgressCancelNotification=ft.WorkDoneProgressCreateRequest=ft.WorkDoneProgress=void 0;var xh=Xe(),Mn=Q(),du;(function(e){e.type=new xh.ProgressType;function t(n){return n===e.type}e.is=t})(du||(ft.WorkDoneProgress=du={}));var fu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(fu||(ft.WorkDoneProgressCreateRequest=fu={}));var mu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(mu||(ft.WorkDoneProgressCancelNotification=mu={}))});var Tu=I(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.CallHierarchyOutgoingCallsRequest=mt.CallHierarchyIncomingCallsRequest=mt.CallHierarchyPrepareRequest=void 0;var Je=Q(),gu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Je.MessageDirection.clientToServer,e.type=new Je.ProtocolRequestType(e.method),e.capabilities=Je.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(gu||(mt.CallHierarchyPrepareRequest=gu={}));var pu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Je.MessageDirection.clientToServer,e.type=new Je.ProtocolRequestType(e.method),e.capabilities=Je.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(pu||(mt.CallHierarchyIncomingCallsRequest=pu={}));var yu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Je.MessageDirection.clientToServer,e.type=new Je.ProtocolRequestType(e.method),e.capabilities=Je.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(yu||(mt.CallHierarchyOutgoingCallsRequest=yu={}))});var Su=I(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.SemanticTokensRefreshRequest=Ce.SemanticTokensRangeRequest=Ce.SemanticTokensDeltaRequest=Ce.SemanticTokensRequest=Ce.SemanticTokensRegistrationType=Ce.TokenFormat=void 0;var De=Q(),_u;(function(e){e.Relative="relative"})(_u||(Ce.TokenFormat=_u={}));var xn;(function(e){e.method="textDocument/semanticTokens",e.type=new De.RegistrationType(e.method)})(xn||(Ce.SemanticTokensRegistrationType=xn={}));var bu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=xn.method,e.capabilities=De.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(bu||(Ce.SemanticTokensRequest=bu={}));var vu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=xn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(vu||(Ce.SemanticTokensDeltaRequest=vu={}));var Cu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=xn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Cu||(Ce.SemanticTokensRangeRequest=Cu={}));var Iu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=De.MessageDirection.serverToClient,e.type=new De.ProtocolRequestType0(e.method),e.capabilities=De.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Iu||(Ce.SemanticTokensRefreshRequest=Iu={}))});var wu=I(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Us=Q(),Du;(function(e){e.method="window/showDocument",e.messageDirection=Us.MessageDirection.serverToClient,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("window.showDocument.support",void 0)})(Du||(Rr.ShowDocumentRequest=Du={}))});var Ru=I(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.LinkedEditingRangeRequest=void 0;var Bs=Q(),Pu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Pu||(Or.LinkedEditingRangeRequest=Pu={}))});var Nu=I(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.WillDeleteFilesRequest=fe.DidDeleteFilesNotification=fe.DidRenameFilesNotification=fe.WillRenameFilesRequest=fe.DidCreateFilesNotification=fe.WillCreateFilesRequest=fe.FileOperationPatternKind=void 0;var re=Q(),Ou;(function(e){e.file="file",e.folder="folder"})(Ou||(fe.FileOperationPatternKind=Ou={}));var ku;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(ku||(fe.WillCreateFilesRequest=ku={}));var Mu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Mu||(fe.DidCreateFilesNotification=Mu={}));var xu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(xu||(fe.WillRenameFilesRequest=xu={}));var qu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(qu||(fe.DidRenameFilesNotification=qu={}));var Eu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Eu||(fe.DidDeleteFilesNotification=Eu={}));var Gu;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Gu||(fe.WillDeleteFilesRequest=Gu={}))});var Lu=I(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.MonikerRequest=ht.MonikerKind=ht.UniquenessLevel=void 0;var zs=Q(),Au;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Au||(ht.UniquenessLevel=Au={}));var ju;(function(e){e.$import="import",e.$export="export",e.local="local"})(ju||(ht.MonikerKind=ju={}));var Fu;(function(e){e.method="textDocument/moniker",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.moniker","monikerProvider")})(Fu||(ht.MonikerRequest=Fu={}))});var Bu=I(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.TypeHierarchySubtypesRequest=gt.TypeHierarchySupertypesRequest=gt.TypeHierarchyPrepareRequest=void 0;var Dt=Q(),Hu;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method),e.capabilities=Dt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Hu||(gt.TypeHierarchyPrepareRequest=Hu={}));var Wu;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Wu||(gt.TypeHierarchySupertypesRequest=Wu={}));var Uu;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Uu||(gt.TypeHierarchySubtypesRequest=Uu={}))});var Qu=I(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.InlineValueRefreshRequest=tn.InlineValueRequest=void 0;var en=Q(),zu;(function(e){e.method="textDocument/inlineValue",e.messageDirection=en.MessageDirection.clientToServer,e.type=new en.ProtocolRequestType(e.method),e.capabilities=en.CM.create("textDocument.inlineValue","inlineValueProvider")})(zu||(tn.InlineValueRequest=zu={}));var $u;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=en.MessageDirection.serverToClient,e.type=new en.ProtocolRequestType0(e.method),e.capabilities=en.CM.create("workspace.inlineValue.refreshSupport",void 0)})($u||(tn.InlineValueRefreshRequest=$u={}))});var Ju=I(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.InlayHintRefreshRequest=pt.InlayHintResolveRequest=pt.InlayHintRequest=void 0;var Ke=Q(),Vu;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.inlayHint","inlayHintProvider")})(Vu||(pt.InlayHintRequest=Vu={}));var Xu;(function(e){e.method="inlayHint/resolve",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Xu||(pt.InlayHintResolveRequest=Xu={}));var Yu;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Ke.MessageDirection.serverToClient,e.type=new Ke.ProtocolRequestType0(e.method),e.capabilities=Ke.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Yu||(pt.InlayHintRefreshRequest=Yu={}))});var ol=I(oe=>{"use strict";var qh=oe&&oe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eh=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gh=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Ah=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jh=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fh=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.InlineCompletionRequest=void 0;var Vs=Q(),fl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(fl||(Mr.InlineCompletionRequest=fl={}))});var pl=I(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.TextDocumentContentRefreshRequest=rn.TextDocumentContentRequest=void 0;var En=Q(),hl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=En.MessageDirection.clientToServer,e.type=new En.ProtocolRequestType(e.method),e.capabilities=En.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(hl||(rn.TextDocumentContentRequest=hl={}));var gl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=En.MessageDirection.serverToClient,e.type=new En.ProtocolRequestType(e.method)})(gl||(rn.TextDocumentContentRefreshRequest=gl={}))});var kd=I(c=>{"use strict";var Lh=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hh=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wh=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Sl||(c.StaticRegistrationOptions=Sl={}));var Dl;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||Ks.is(r.documentSelector))}e.is=t})(Dl||(c.TextDocumentRegistrationOptions=Dl={}));var wl;(function(e){function t(r){let o=r;return ie.objectLiteral(o)&&(o.workDoneProgress===void 0||ie.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ie.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(wl||(c.WorkDoneProgressOptions=wl={}));var Pl;(function(e){e.method="initialize",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method)})(Pl||(c.InitializeRequest=Pl={}));var Rl;(function(e){e.unknownProtocolVersion=1})(Rl||(c.InitializeErrorCodes=Rl={}));var Ol;(function(e){e.method="initialized",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method)})(Ol||(c.InitializedNotification=Ol={}));var kl;(function(e){e.method="shutdown",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType0(e.method)})(kl||(c.ShutdownRequest=kl={}));var Ml;(function(e){e.method="exit",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType0(e.method)})(Ml||(c.ExitNotification=Ml={}));var xl;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeConfiguration",void 0)})(xl||(c.DidChangeConfigurationNotification=xl={}));var ql;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ql||(c.MessageType=ql={}));var El;(function(e){e.method="window/showMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(El||(c.ShowMessageNotification=El={}));var Gl;(function(e){e.method="window/showMessageRequest",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(Gl||(c.ShowMessageRequest=Gl={}));var Nl;(function(e){e.method="window/logMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Nl||(c.LogMessageNotification=Nl={}));var Al;(function(e){e.method="telemetry/event",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Al||(c.TelemetryEventNotification=Al={}));var jl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(jl||(c.TextDocumentSyncKind=jl={}));var Fl;(function(e){e.method="textDocument/didOpen",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Fl||(c.DidOpenTextDocumentNotification=Fl={}));var Ll;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Ll||(c.TextDocumentContentChangeEvent=Ll={}));var Hl;(function(e){e.method="textDocument/didChange",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync")})(Hl||(c.DidChangeTextDocumentNotification=Hl={}));var Wl;(function(e){e.method="textDocument/didClose",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Wl||(c.DidCloseTextDocumentNotification=Wl={}));var Ul;(function(e){e.method="textDocument/didSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Ul||(c.DidSaveTextDocumentNotification=Ul={}));var Bl;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Bl||(c.TextDocumentSaveReason=Bl={}));var zl;(function(e){e.method="textDocument/willSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(zl||(c.WillSaveTextDocumentNotification=zl={}));var $l;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})($l||(c.WillSaveTextDocumentWaitUntilRequest=$l={}));var Ql;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeWatchedFiles",void 0)})(Ql||(c.DidChangeWatchedFilesNotification=Ql={}));var Vl;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Vl||(c.FileChangeType=Vl={}));var Zs;(function(e){function t(n){let r=n;return ie.objectLiteral(r)&&(yl.URI.is(r.baseUri)||yl.WorkspaceFolder.is(r.baseUri))&&ie.string(r.pattern)}e.is=t})(Zs||(c.RelativePattern=Zs={}));var ec;(function(e){function t(n){let r=n;return ie.string(r)||Zs.is(r)}e.is=t})(ec||(c.GlobPattern=ec={}));var Xl;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Xl||(c.WatchKind=Xl={}));var Yl;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.publishDiagnostics",void 0)})(Yl||(c.PublishDiagnosticsNotification=Yl={}));var Jl;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Jl||(c.CompletionTriggerKind=Jl={}));var Kl;(function(e){e.method="textDocument/completion",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion","completionProvider")})(Kl||(c.CompletionRequest=Kl={}));var Zl;(function(e){e.method="completionItem/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Zl||(c.CompletionResolveRequest=Zl={}));var ed;(function(e){e.method="textDocument/hover",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.hover","hoverProvider")})(ed||(c.HoverRequest=ed={}));var td;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(td||(c.SignatureHelpTriggerKind=td={}));var nd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(nd||(c.SignatureHelpRequest=nd={}));var rd;(function(e){e.method="textDocument/definition",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.definition","definitionProvider")})(rd||(c.DefinitionRequest=rd={}));var od;(function(e){e.method="textDocument/references",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.references","referencesProvider")})(od||(c.ReferencesRequest=od={}));var id;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(id||(c.DocumentHighlightRequest=id={}));var sd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(sd||(c.DocumentSymbolRequest=sd={}));var cd;(function(e){e.method="textDocument/codeAction",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction","codeActionProvider")})(cd||(c.CodeActionRequest=cd={}));var ad;(function(e){e.method="codeAction/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(ad||(c.CodeActionResolveRequest=ad={}));var ud;(function(e){e.method="workspace/symbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol","workspaceSymbolProvider")})(ud||(c.WorkspaceSymbolRequest=ud={}));var ld;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(ld||(c.WorkspaceSymbolResolveRequest=ld={}));var dd;(function(e){e.method="textDocument/codeLens",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens","codeLensProvider")})(dd||(c.CodeLensRequest=dd={}));var fd;(function(e){e.method="codeLens/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(fd||(c.CodeLensResolveRequest=fd={}));var md;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType0(e.method),e.capabilities=y.CM.create("workspace.codeLens",void 0)})(md||(c.CodeLensRefreshRequest=md={}));var hd;(function(e){e.method="textDocument/documentLink",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider")})(hd||(c.DocumentLinkRequest=hd={}));var gd;(function(e){e.method="documentLink/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(gd||(c.DocumentLinkResolveRequest=gd={}));var pd;(function(e){e.method="textDocument/formatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.formatting","documentFormattingProvider")})(pd||(c.DocumentFormattingRequest=pd={}));var yd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(yd||(c.DocumentRangeFormattingRequest=yd={}));var Td;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Td||(c.DocumentRangesFormattingRequest=Td={}));var _d;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(_d||(c.DocumentOnTypeFormattingRequest=_d={}));var bd;(function(e){e.Identifier=1})(bd||(c.PrepareSupportDefaultBehavior=bd={}));var vd;(function(e){e.method="textDocument/rename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename","renameProvider")})(vd||(c.RenameRequest=vd={}));var Cd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Cd||(c.PrepareRenameRequest=Cd={}));var Id;(function(e){e.method="workspace/executeCommand",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.executeCommand","executeCommandProvider")})(Id||(c.ExecuteCommandRequest=Id={}));var Sd;(function(e){e.method="workspace/applyEdit",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType("workspace/applyEdit"),e.capabilities=y.CM.create("workspace.applyEdit",void 0)})(Sd||(c.ApplyWorkspaceEditRequest=Sd={}))});var xd=I(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.createProtocolConnection=Jh;var Md=Xe();function Jh(e,t,n,r){return Md.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Md.createMessageConnection)(e,t,n,r)}});var Z=I(Ie=>{"use strict";var Kh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xr=Ie&&Ie.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Kh(t,e,n)};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.LSPErrorCodes=Ie.createProtocolConnection=void 0;xr(Xe(),Ie);xr((vr(),Vn(br)),Ie);xr(Q(),Ie);xr(kd(),Ie);var Zh=xd();Object.defineProperty(Ie,"createProtocolConnection",{enumerable:!0,get:function(){return Zh.createProtocolConnection}});var qd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(qd||(Ie.LSPErrorCodes=qd={}))});var ac=I(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.empty=void 0;yt.v4=Ed;yt.isUUID=Gd;yt.parse=tg;yt.generateUuid=ng;var Nn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},cc=class e extends Nn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};yt.empty=new Nn("00000000-0000-0000-0000-000000000000");function Ed(){return new cc}var eg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Gd(e){return eg.test(e)}function tg(e){if(!Gd(e))throw new Error("invalid uuid");return new Nn(e)}function ng(){return Ed().asHex()}});var Nd=I(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.ProgressFeature=void 0;cn.attachWorkDone=og;cn.attachPartialResult=sg;var Tt=Z(),rg=ac(),sn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(Tt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Tt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Tt.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends sn{_source;constructor(t,n){super(t,n),this._source=new Tt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},An=class{constructor(){}begin(){}report(){}done(){}},Er=class extends An{_source;constructor(){super(),this._source=new Tt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function og(e,t){if(t===void 0||t.workDoneToken===void 0)return new An;let n=t.workDoneToken;return delete t.workDoneToken,new sn(e,n)}var ig=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Tt.WorkDoneProgressCancelNotification.type,n=>{let r=sn.Instances.get(n.token);(r instanceof qr||r instanceof Er)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new An:new sn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,rg.generateUuid)();return this.connection.sendRequest(Tt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Er)}};cn.ProgressFeature=ig;var uc;(function(e){e.type=new Tt.ProgressType})(uc||(uc={}));var lc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(uc.type,this._token,t)}};function sg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new lc(e,n)}});var Ad=I(Be=>{"use strict";var cg=Be&&Be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ag=Be&&Be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ug=Be&&Be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?dg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(lg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Be.ConfigurationFeature=fg});var jd=I(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.WorkspaceFoldersFeature=void 0;var Gr=Z(),mg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Gr.Emitter,this.connection.onNotification(Gr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Gr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Gr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Nr.WorkspaceFoldersFeature=mg});var Fd=I(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.CallHierarchyFeature=void 0;var dc=Z(),hg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(dc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=dc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=dc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ar.CallHierarchyFeature=hg});var mc=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.SemanticTokensBuilder=_t.SemanticTokensDiff=_t.SemanticTokensFeature=void 0;var jr=Z(),gg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(jr.SemanticTokensRefreshRequest.type),on:t=>{let n=jr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=jr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=jr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};_t.SemanticTokensFeature=gg;var Fr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let h=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;h[this._dataLen++]=s,h[this._dataLen++]=a,h[this._dataLen++]=r,h[this._dataLen++]=o,h[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let l=t[5*a],_=t[5*h];if(l===_){let b=t[5*a+1],g=t[5*h+1];return b-g}return l-_});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ShowDocumentFeature=void 0;var pg=Z(),yg=e=>class extends e{showDocument(t){return this.connection.sendRequest(pg.ShowDocumentRequest.type,t)}};Lr.ShowDocumentFeature=yg});var Hd=I(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.FileOperationsFeature=void 0;var an=Z(),Tg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(an.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(an.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(an.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(an.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(an.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(an.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Hr.FileOperationsFeature=Tg});var Wd=I(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.LinkedEditingRangeFeature=void 0;var _g=Z(),bg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(_g.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Wr.LinkedEditingRangeFeature=bg});var Ud=I(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.TypeHierarchyFeature=void 0;var hc=Z(),vg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(hc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=hc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=hc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ur.TypeHierarchyFeature=vg});var zd=I(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.InlineValueFeature=void 0;var Bd=Z(),Cg=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Bd.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Bd.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Br.InlineValueFeature=Cg});var Qd=I(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var $d=Z(),Ig=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest($d.FoldingRangeRefreshRequest.type),on:t=>{let n=$d.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=Ig});var Vd=I($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlayHintFeature=void 0;var gc=Z(),Sg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(gc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(gc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(gc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};$r.InlayHintFeature=Sg});var Xd=I(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.DiagnosticFeature=void 0;var jn=Z(),Dg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(jn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(jn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(jn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(jn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(jn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Qr.DiagnosticFeature=Dg});var yc=I(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.TextDocuments=void 0;var Pt=Z(),pc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Pt.Emitter,this._onDidOpen=new Pt.Emitter,this._onDidClose=new Pt.Emitter,this._onDidSave=new Pt.Emitter,this._onWillSave=new Pt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Pt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Pt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Vr.TextDocuments=pc});var bc=I(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.NotebookDocuments=un.NotebookSyncFeature=void 0;var Oe=Z(),Yd=yc(),wg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Oe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Oe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Oe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Oe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};un.NotebookSyncFeature=wg;var Tc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Oe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Oe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Oe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},_c=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof Yd.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Yd.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Oe.Emitter,this._onDidChange=new Oe.Emitter,this._onDidSave=new Oe.Emitter,this._onDidClose=new Oe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Tc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,h=o.change;h.metadata!==void 0&&(a=!0,i.metadata=h.metadata);let l=[],_=[],b=[],g=[];if(h.cells!==void 0){let M=h.cells;if(M.structure!==void 0){let m=M.structure.array;if(i.cells.splice(m.start,m.deleteCount,...m.cells!==void 0?m.cells:[]),M.structure.didOpen!==void 0)for(let f of M.structure.didOpen)await n.openTextDocument({textDocument:f}),l.push(f.uri);if(M.structure.didClose)for(let f of M.structure.didClose)await n.closeTextDocument({textDocument:f}),_.push(f.uri)}if(M.data!==void 0){let m=new Map(M.data.map(f=>[f.document,f]));for(let f=0;f<=i.cells.length;f++){let v=m.get(i.cells[f].document);if(v!==void 0){let x=i.cells.splice(f,1,v);if(b.push({old:x[0],new:v}),m.delete(v.document),m.size===0)break}}}if(M.textContent!==void 0)for(let m of M.textContent)await n.changeTextDocument({textDocument:m.document,contentChanges:m.changes}),g.push(m.document.uri)}this.updateCellMap(i);let D={notebookDocument:i};a&&(D.metadata={old:s,new:i.metadata});let N=[];for(let M of l)N.push(this.getNotebookCell(M));let A=[];for(let M of _)A.push(this.getNotebookCell(M));let B=[];for(let M of g)B.push(this.getNotebookCell(M));(N.length>0||A.length>0||b.length>0||B.length>0)&&(D.cells={added:N,removed:A,changed:{data:b,textContent:B}}),(D.metadata!==void 0||D.cells!==void 0)&&this._onDidChange.fire(D)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Oe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};un.NotebookDocuments=_c});var Jd=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.MonikerFeature=void 0;var Pg=Z(),Rg=e=>class extends e{get moniker(){return{on:t=>{let n=Pg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Xr.MonikerFeature=Rg});var Kd=I(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Og=Z(),kg=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Og.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=kg});var ef=I(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var Zd=Z(),Mg=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Zd.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Zd.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=Mg});var wc=I(U=>{"use strict";var xg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qg=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),af=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Ic;var Kr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(S.MessageType.Error,t)}warn(t){this.send(S.MessageType.Warning,t)}info(t){this.send(S.MessageType.Info,t)}log(t){this.send(S.MessageType.Log,t)}debug(t){this.send(S.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(S.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,S.RAL)().console.error("Sending log message failed")})}},Sc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:S.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(S.ShowMessageRequest.type,r).then(vc)}showWarningMessage(t,...n){let r={type:S.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(S.ShowMessageRequest.type,r).then(vc)}showInformationMessage(t,...n){let r={type:S.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(S.ShowMessageRequest.type,r).then(vc)}},tf=(0,jg.ShowDocumentFeature)((0,k.ProgressFeature)(Sc)),nf;(function(e){function t(){return new Zr}e.create=t})(nf||(U.BulkRegistration=nf={}));var Zr=class{_registrations=[];_registered=new Set;add(t,n){let r=ke.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Cc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},rf;(function(e){function t(){return new Fn(void 0,[])}e.create=t})(rf||(U.BulkUnregistration=rf={}));var Fn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(S.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=ke.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(S.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},eo=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof Zr?this.registerMany(t):t instanceof Fn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=ke.string(n)?n:n.method,i=Cc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(S.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=ke.string(t)?t:t.method,o=Cc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(S.RegistrationRequest.type,i).then(s=>S.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(S.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(S.RegistrationRequest.type,n).then(()=>new Fn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Dc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(S.ApplyWorkspaceEditRequest.type,r)}},of=(0,Xg.TextDocumentContentFeature)((0,Fg.FileOperationsFeature)((0,Gg.WorkspaceFoldersFeature)((0,Eg.ConfigurationFeature)(Dc)))),to=class{_trace;_connection;constructor(){this._trace=S.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==S.Trace.Off&&this.connection.sendNotification(S.LogTraceNotification.type,{message:t,verbose:this._trace===S.Trace.Verbose?n:void 0}).catch(()=>{})}},no=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(S.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=ro;var sf=(0,Vg.InlineCompletionFeature)((0,Ug.FoldingRangeFeature)((0,Qg.MonikerFeature)((0,zg.DiagnosticFeature)((0,Bg.InlayHintFeature)((0,Wg.InlineValueFeature)((0,Hg.TypeHierarchyFeature)((0,Lg.LinkedEditingRangeFeature)((0,Ag.SemanticTokensFeature)((0,Ng.CallHierarchyFeature)(ro)))))))))),oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=oo;var cf=(0,$g.NotebookSyncFeature)(oo);function uf(e,t){return function(n){return t(e(n))}}function lf(e,t){return function(n){return t(e(n))}}function df(e,t){return function(n){return t(e(n))}}function ff(e,t){return function(n){return t(e(n))}}function mf(e,t){return function(n){return t(e(n))}}function hf(e,t){return function(n){return t(e(n))}}function gf(e,t){return function(n){return t(e(n))}}function pf(e,t){return function(n){return t(e(n))}}function Yg(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,uf),tracer:n(e.tracer,t.tracer,df),telemetry:n(e.telemetry,t.telemetry,lf),client:n(e.client,t.client,ff),window:n(e.window,t.window,mf),workspace:n(e.workspace,t.workspace,hf),languages:n(e.languages,t.languages,gf),notebooks:n(e.notebooks,t.notebooks,pf)}}function Jg(e,t,n){let r=n&&n.console?new(n.console(Kr)):new Kr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(to)):new to,s=n&&n.telemetry?new(n.telemetry(no)):new no,a=n&&n.client?new(n.client(eo)):new eo,h=n&&n.window?new(n.window(tf)):new tf,l=n&&n.workspace?new(n.workspace(of)):new of,_=n&&n.languages?new(n.languages(sf)):new sf,b=n&&n.notebooks?new(n.notebooks(cf)):new cf,g=[r,i,s,a,h,l,_,b];function D(m){return m instanceof Promise?m:ke.thenable(m)?new Promise((f,v)=>{m.then(x=>f(x),x=>v(x))}):Promise.resolve(m)}let N,A,B,M={listen:()=>o.listen(),sendRequest:(m,...f)=>o.sendRequest(ke.string(m)?m:m.method,...f),onRequest:(m,f)=>o.onRequest(m,f),sendNotification:(m,f)=>{let v=ke.string(m)?m:m.method;return o.sendNotification(v,f)},onNotification:(m,f)=>o.onNotification(m,f),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:m=>(A=m,{dispose:()=>{A=void 0}}),onInitialized:m=>o.onNotification(S.InitializedNotification.type,m),onShutdown:m=>(N=m,{dispose:()=>{N=void 0}}),onExit:m=>(B=m,{dispose:()=>{B=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return h},get workspace(){return l},get languages(){return _},get notebooks(){return b},onDidChangeConfiguration:m=>o.onNotification(S.DidChangeConfigurationNotification.type,m),onDidChangeWatchedFiles:m=>o.onNotification(S.DidChangeWatchedFilesNotification.type,m),__textDocumentSync:void 0,onDidOpenTextDocument:m=>o.onNotification(S.DidOpenTextDocumentNotification.type,m),onDidChangeTextDocument:m=>o.onNotification(S.DidChangeTextDocumentNotification.type,m),onDidCloseTextDocument:m=>o.onNotification(S.DidCloseTextDocumentNotification.type,m),onWillSaveTextDocument:m=>o.onNotification(S.WillSaveTextDocumentNotification.type,m),onWillSaveTextDocumentWaitUntil:m=>o.onRequest(S.WillSaveTextDocumentWaitUntilRequest.type,m),onDidSaveTextDocument:m=>o.onNotification(S.DidSaveTextDocumentNotification.type,m),sendDiagnostics:m=>o.sendNotification(S.PublishDiagnosticsNotification.type,m),onHover:m=>o.onRequest(S.HoverRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onCompletion:m=>o.onRequest(S.CompletionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onCompletionResolve:m=>o.onRequest(S.CompletionResolveRequest.type,m),onSignatureHelp:m=>o.onRequest(S.SignatureHelpRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onDeclaration:m=>o.onRequest(S.DeclarationRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDefinition:m=>o.onRequest(S.DefinitionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onTypeDefinition:m=>o.onRequest(S.TypeDefinitionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onImplementation:m=>o.onRequest(S.ImplementationRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onReferences:m=>o.onRequest(S.ReferencesRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDocumentHighlight:m=>o.onRequest(S.DocumentHighlightRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDocumentSymbol:m=>o.onRequest(S.DocumentSymbolRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onWorkspaceSymbol:m=>o.onRequest(S.WorkspaceSymbolRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onWorkspaceSymbolResolve:m=>o.onRequest(S.WorkspaceSymbolResolveRequest.type,m),onCodeAction:m=>o.onRequest(S.CodeActionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onCodeActionResolve:m=>o.onRequest(S.CodeActionResolveRequest.type,(f,v)=>m(f,v)),onCodeLens:m=>o.onRequest(S.CodeLensRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onCodeLensResolve:m=>o.onRequest(S.CodeLensResolveRequest.type,(f,v)=>m(f,v)),onDocumentFormatting:m=>o.onRequest(S.DocumentFormattingRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onDocumentRangeFormatting:m=>o.onRequest(S.DocumentRangeFormattingRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onDocumentOnTypeFormatting:m=>o.onRequest(S.DocumentOnTypeFormattingRequest.type,(f,v)=>m(f,v)),onRenameRequest:m=>o.onRequest(S.RenameRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onPrepareRename:m=>o.onRequest(S.PrepareRenameRequest.type,(f,v)=>m(f,v)),onDocumentLinks:m=>o.onRequest(S.DocumentLinkRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDocumentLinkResolve:m=>o.onRequest(S.DocumentLinkResolveRequest.type,(f,v)=>m(f,v)),onDocumentColor:m=>o.onRequest(S.DocumentColorRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onColorPresentation:m=>o.onRequest(S.ColorPresentationRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onFoldingRanges:m=>o.onRequest(S.FoldingRangeRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onSelectionRanges:m=>o.onRequest(S.SelectionRangeRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onExecuteCommand:m=>o.onRequest(S.ExecuteCommandRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),dispose:()=>o.dispose()};for(let m of g)m.attach(M);return o.onRequest(S.InitializeRequest.type,m=>{t.initialize(m),ke.string(m.trace)&&(i.trace=S.Trace.fromString(m.trace));for(let f of g)f.initialize(m.capabilities);if(A){let f=A(m,new S.CancellationTokenSource().token,(0,k.attachWorkDone)(o,m),void 0);return D(f).then(v=>{if(v instanceof S.ResponseError)return v;let x=v;x||(x={capabilities:{}});let G=x.capabilities;G||(G={},x.capabilities=G),G.textDocumentSync===void 0||G.textDocumentSync===null?G.textDocumentSync=ke.number(M.__textDocumentSync)?M.__textDocumentSync:S.TextDocumentSyncKind.None:!ke.number(G.textDocumentSync)&&!ke.number(G.textDocumentSync.change)&&(G.textDocumentSync.change=ke.number(M.__textDocumentSync)?M.__textDocumentSync:S.TextDocumentSyncKind.None);for(let q of g)q.fillServerCapabilities(G);return x})}else{let f={capabilities:{textDocumentSync:S.TextDocumentSyncKind.None}};for(let v of g)v.fillServerCapabilities(f.capabilities);return f}}),o.onRequest(S.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,N)return N(new S.CancellationTokenSource().token)}),o.onNotification(S.ExitNotification.type,()=>{try{if(B)return B()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(S.SetTraceNotification.type,m=>{i.trace=S.Trace.fromString(m.value)}),M}});var yf=I(pe=>{"use strict";var Kg=pe&&pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zg=pe&&pe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mc=pe&&pe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Ae.normalize(n.join("/"))}function Rc(){return process.platform==="win32"}function io(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let h=process.env,l=Object.create(null);Object.keys(h).forEach(_=>l[_]=h[_]),t&&Pc.existsSync(t)&&(l[o]?l[o]=t+Ae.delimiter+l[o]:l[o]=t,r&&r(`NODE_PATH value is: ${l[o]}`)),l.ELECTRON_RUN_AS_NODE="1";try{let _=(0,xc.fork)("",[],{cwd:n,env:l,execArgv:["-e",i]});if(_.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}_.on("error",g=>{a(g)}),_.on("message",g=>{g.c==="r"&&(_.send({c:"e"}),g.s?s(g.r):a(new Error(`Failed to resolve module: ${e}`)))});let b={c:"rs",a:e};_.send(b)}catch(_){a(_)}})}function Oc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Rc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,xc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Rc()?Ae.join(s,"node_modules"):Ae.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function np(e){let t="yarn",n={encoding:"utf8"};Rc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,xc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let h=JSON.parse(a);if(h.type==="log")return Ae.join(h.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var kc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Pc.existsSync(__filename.toUpperCase())||!Pc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Ae.normalize(i).indexOf(Ae.normalize(o))===0:Ae.normalize(i).toLowerCase().indexOf(Ae.normalize(o).toLowerCase())===0}e.isParent=r})(kc||(pe.FileSystem=kc={}));function rp(e,t,n,r){return n?(Ae.isAbsolute(n)||(n=Ae.join(e,n)),io(t,n,n,r).then(o=>kc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>io(t,Oc(r),e,r))):io(t,Oc(r),e,r)}});var bf=I(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Tf=require("util"),et=Xe(),qc=class e extends et.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Tf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Ec=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),et.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),et.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),et.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),et.Disposable.create(()=>this.stream.off("data",t))}},Gc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),et.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),et.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),et.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},_f=Object.freeze({messageBuffer:Object.freeze({create:e=>new qc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Tf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Ec(e),asWritableStream:e=>new Gc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Nc(){return _f}(function(e){function t(){et.RAL.install(_f)}e.install=t})(Nc||(Nc={}));Ac.default=Nc});var Uc=I(E=>{"use strict";var Cf=E&&E.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),op=E&&E.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wc=E&&E.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),we.Disposable.create(()=>this.process.off("message",t))}};E.IPCMessageReader=jc;var Fc=class extends we.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};E.IPCMessageWriter=Fc;var Lc=class extends we.AbstractMessageReader{onData;constructor(t){super(),this.onData=new we.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};E.PortMessageReader=Lc;var Hc=class extends we.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};E.PortMessageWriter=Hc;var Rt=class extends we.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Ln.default)().stream.asReadableStream(t),n)}};E.SocketMessageReader=Rt;var Ot=class extends we.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};E.SocketMessageWriter=Ot;var so=class extends we.ReadableStreamMessageReader{constructor(t,n){super((0,Ln.default)().stream.asReadableStream(t),n)}};E.StreamMessageReader=so;var co=class extends we.WriteableStreamMessageWriter{constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n)}};E.StreamMessageWriter=co;var lp=process.env.XDG_RUNTIME_DIR,dp=new Map([["linux",107],["darwin",102]]);function fp(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,vf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=up.realpathSync(lp??ap.tmpdir()),r=dp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,vf.randomBytes)(Math.floor(e/2)).toString("hex");return cp.join(n,`lsp-${o}.sock`)}function mp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ao.createServer)(a=>{s.close(),n([new Rt(a,t),new Ot(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function hp(e,t="utf-8"){let n=(0,ao.createConnection)(e);return[new Rt(n,t),new Ot(n,t)]}function gp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ao.createServer)(a=>{s.close(),n([new Rt(a,t),new Ot(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function pp(e,t="utf-8"){let n=(0,ao.createConnection)(e,"127.0.0.1");return[new Rt(n,t),new Ot(n,t)]}function yp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Tp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function _p(e,t,n,r){n||(n=we.NullLogger);let o=yp(e)?new so(e):e,i=Tp(t)?new co(t):t;return we.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,we.createMessageConnection)(o,i,n,r)}});var Bc=I(tt=>{"use strict";var bp=tt&&tt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),If=tt&&tt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&bp(t,e,n)};Object.defineProperty(tt,"__esModule",{value:!0});tt.createProtocolConnection=Cp;var vp=Uc();If(Uc(),tt);If(Z(),tt);function Cp(e,t,n,r){return(0,vp.createMessageConnection)(e,t,n,r)}});var zc=I(me=>{"use strict";var Ip=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Df=me&&me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ip(t,e,n)};Object.defineProperty(me,"__esModule",{value:!0});me.ProposedFeatures=me.NotebookDocuments=me.TextDocuments=me.SemanticTokensBuilder=void 0;var Sp=mc();Object.defineProperty(me,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Sp.SemanticTokensBuilder}});Df(Z(),me);var Dp=yc();Object.defineProperty(me,"TextDocuments",{enumerable:!0,get:function(){return Dp.TextDocuments}});var wp=bc();Object.defineProperty(me,"NotebookDocuments",{enumerable:!0,get:function(){return wp.NotebookDocuments}});Df(wc(),me);var Sf;(function(e){e.all={__brand:"features"}})(Sf||(me.ProposedFeatures=Sf={}))});var Qc=I(ye=>{"use strict";var Of=ye&&ye.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kf=ye&&ye.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{uo(),process.exit(ln?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;$c.number(t)&&xf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(ln?0:1)}},3e3)},get shutdownReceived(){return ln},set shutdownReceived(e){ln=e},exit:e=>{uo(),process.exit(e)}};function Mp(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),kt.ConnectionStrategy.is(e)||kt.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),xp(i,s,a,o)}function xp(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,h,l=process.argv.slice(2);for(let _=0;_{uo(),process.exit(ln?0:1)}),a.on("close",()=>{uo(),process.exit(ln?0:1)})}let s=a=>{let h=(0,kt.createProtocolConnection)(e,t,a,n);return o&&qp(a),h};return(0,Rp.createConnection)(s,kp,r)}function qp(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,wf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,wf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Nf={};pa(Nf,{TextDocument:()=>Vc});function Xc(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);Xc(r,t),Xc(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ep(e){let t=Gf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var lo,Vc,Af=ga(()=>{"use strict";lo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Gf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),h=Math.max(o.end.line,0),l=this._lineOffsets,_=qf(r.text,!1,i);if(h-a===_.length)for(let g=0,D=_.length;gt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Ef(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new lo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof lo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=Xc(i.map(Ep),(_,b)=>{let g=_.range.start.line-b.range.start.line;return g===0?_.range.start.character-b.range.start.character:g}),h=0,l=[];for(let _ of a){let b=o.offsetAt(_.range.start);if(bh&&l.push(s.substring(h,b)),_.newText.length&&l.push(_.newText),h=o.offsetAt(_.range.end)}return l.push(s.substr(h)),l.join("")}e.applyEdits=r})(Vc||(Vc={}))});var Wn=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.DATATYPE_SET=he.KEYWORD_SET=he.PUNCTUATION=he.OPERATORS=he.DATATYPES=he.KEYWORDS=void 0;he.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];he.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];he.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];he.PUNCTUATION=["(",")","[","]",";",",",":","."];he.KEYWORD_SET=new Set(he.KEYWORDS);he.DATATYPE_SET=new Set(he.DATATYPES)});var Mt=I(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TokenKind=void 0;var jf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(jf||(fo.TokenKind=jf={}))});var go=I(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.tokenize=Ap;var ho=Wn(),Pe=Mt();function Gp(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function Ff(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function mo(e){return e!==void 0&&/[0-9]/.test(e)}function Np(e){let t=e.toUpperCase();return ho.DATATYPE_SET.has(t)?Pe.TokenKind.Datatype:ho.KEYWORD_SET.has(t)?Pe.TokenKind.Keyword:Pe.TokenKind.Identifier}function Ap(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=l=>{for(;n{let b=n,g=i();s(_),t.push({kind:l,lexeme:e.slice(b,_),span:{start:b,end:_},range:{start:g,end:i()}})};for(;ne.startsWith(g,n));if(_!==void 0){a(Pe.TokenKind.Operator,n+_.length);continue}if(ho.PUNCTUATION.includes(l)){a(Pe.TokenKind.Punctuation,n+1);continue}let b=e.codePointAt(n);a(Pe.TokenKind.Unknown,n+(b!==void 0&&b>65535?2:1))}let h=i();return t.push({kind:Pe.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:h,end:{...h}}}),t}});var po=I(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.positionAt=Kc;Un.offsetAt=Fp;Un.sourceRange=Lp;function Jc(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Lf(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function Hf(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function Kc(e,t){Jc(e,t);let n=Hf(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=jp(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function Lp(e,t){if(Jc(e,t.start),Jc(e,t.end),t.end{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.parseQuickScript=$p;var Hp=Wn(),Zc=po(),bt=Mt(),Wp=go();function Up(e){return e.kind===bt.TokenKind.Whitespace||e.kind===bt.TokenKind.Newline||e.kind===bt.TokenKind.Comment||e.kind===bt.TokenKind.EOF}function xt(e){return e?.kind===bt.TokenKind.Keyword?e.lexeme.toUpperCase():void 0}function Wf(e,t,n=t){return(0,Zc.sourceRange)(e,{start:t.span.start,end:n.span.end})}function yo(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function Bp(e){switch(e){case"DIM":return"dim";case"CALL":return"call";case"IF":return"if";case"ELSE":return"else";case"ENDIF":return"endif";case"FOR":return"for";case"NEXT":return"next";case"WHILE":return"while";default:return"unknown"}}function zp(e,t){return e.filter(n=>n.range.start.line===t&&!Up(n))}function $p(e){let t=(0,Wp.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=[],o=[],i=[],s=[],a=[],h;for(let b=0;bm.kind===bt.TokenKind.Comment&&m.range.end.line>m.range.start.line&&m.range.start.line<=b&&m.range.end.line>=b),N=a.length,A=!1,B=g.map(xt).find(m=>m!==void 0);(B==="ELSE"||B==="ENDIF"||B==="NEXT")&&(N=Math.max(0,N-1),A=!0),h!==void 0&&(N=h.baseDepth+2),s.push({line:b,indentDepth:N,preserveIndent:D});for(let m=0;mFe>G&&xt(ot)==="AS"),hn=se>=0?g[se+1]:void 0;for(let ot of g.slice(G+1,se>=0?se:void 0))ot.kind===bt.TokenKind.Identifier&&(r.push({...rt,name:ot.lexeme,nameRange:ot.range,datatype:hn?.lexeme,datatypeRange:hn?.range}),mn=!0)}else if(v==="CALL"){let se=g[G+1];se?.kind===bt.TokenKind.Identifier&&(rt.name=se.lexeme,rt.nameRange=se.range)}mn||r.push(rt)}let x=xt(g[m-1]);if(!((v==="FOR"||v==="WHILE")&&x==="EXIT")){if(v==="IF"||v==="FOR"||v==="WHILE"){let G=a[a.length-1]?.block,q=Wf(e,f),be={id:o.length,kind:v.toLowerCase(),parentId:G?.id,childIds:[],...q,bodyRange:{start:f.range.end,end:f.range.end},bodySpan:{start:f.span.end,end:f.span.end},opener:f.range};o.push(be),G?.childIds.push(be.id),a.push({block:be,opener:f,hasElse:!1});continue}if(v==="ELSE"){let G=a[a.length-1];G?.block.kind!=="if"?i.push(yo("invalid-nesting","ELSE has no matching IF.",f)):G.hasElse?i.push(yo("duplicate-else","IF block has more than one ELSE.",f)):(G.hasElse=!0,G.block.middle=f.range);continue}if(v==="ENDIF"||v==="NEXT"){let G=v==="ENDIF"?["if"]:["for","while"],q=a[a.length-1];q===void 0||!G.includes(q.block.kind)?i.push(yo("invalid-nesting",`${v} has no matching ${v==="ENDIF"?"IF":"FOR or WHILE"}.`,f)):(a.pop(),q.block.closer=f.range,q.block.span.end=f.span.end,q.block.range.end=f.range.end,q.block.bodySpan.end=f.span.start,q.block.bodyRange.end=f.range.start)}}}let M=g.map(xt);h!==void 0&&M.includes("THEN")?h=void 0:!A&&M.includes("IF")&&!M.includes("THEN")&&["AND","OR","NOT"].includes(M[M.length-1]??"")&&(h={baseDepth:Math.max(0,a.length-1)})}for(let b of a){let g=b.block.kind==="if"?"ENDIF":"NEXT";i.push(yo(`missing-${g.toLowerCase()}`,`${b.block.kind.toUpperCase()} block is missing ${g}.`,b.opener)),b.block.span.end=e.length,b.block.range.end=(0,Zc.sourceRange)(e,{start:e.length,end:e.length}).range.end,b.block.bodySpan.end=e.length,b.block.bodyRange.end=b.block.range.end}let l=new Set;for(let b of r.filter(g=>g.kind==="dim"&&g.datatype!==void 0))if(!Hp.DATATYPE_SET.has(b.datatype.toUpperCase())){let g=b.datatypeRange??b.range,D=`${g.start.line}:${g.start.character}`;if(l.has(D))continue;l.add(D),i.push({code:"unknown-datatype",message:`Unknown datatype '${b.datatype}'.`,severity:"error",range:g})}let _=(0,Zc.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:r,blocks:o,diagnostics:i,lines:s,..._}}});var Vf=I(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=$f;zn.formatQuickScriptStructure=Qf;zn.formatQuickScript=Kp;var L=Mt(),Bf=go(),Qp=To();function Uf(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function na(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function zf(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ta(e){Bn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function Vp(e,t){if(e[t].lexeme!=="-"||zf(e,t)?.kind!==L.TokenKind.Number)return!1;let n=na(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Xp(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function $f(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Bf.tokenize)(r);if(o.some(h=>h.kind===L.TokenKind.String&&!h.lexeme.endsWith('"'))||o.some(h=>h.kind===L.TokenKind.Unknown&&h.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1;for(let h=0;h=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function Jp(e){let t=(0,Bf.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function dn(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function Qf(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Qp.parseQuickScript)(r),i=r.split(n),s=[],a=Yp(t),h=0,l=0,_=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let g=0;g")||dn(A,t.regionBlockCodeBegin??"{region"))&&(h+=1)}let b=s.join(n);return{text:b,changed:b!==e,diagnostics:o.diagnostics}}function Kp(e,t={}){let n=$f(e,t);return Qf(n.text,t)}});var ra=I(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.KNOWN_FUNCTIONS=void 0;_o.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Kf=I($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.completions=ey;$n.hoverAt=ty;$n.documentSymbols=ny;var Jf=ra(),Xf=Wn(),Yf=Mt();function Zp(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of Xf.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of Xf.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of Jf.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function ty(e,t){let n=e.document.tokens.find(i=>Zp(i.range,t));if(n===void 0)return;if(n.kind===Yf.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Yf.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=Jf.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function ny(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var tm=I(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.analyzeQuickScript=iy;Qn.definitionAt=sy;Qn.referencesAt=cy;var ry=To(),Zf=po(),qt=Mt();function em(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![qt.TokenKind.Whitespace,qt.TokenKind.Newline,qt.TokenKind.Comment].includes(e[n].kind))return e[n]}function iy(e){let t=(0,ry.parseQuickScript)(e),n=[...t.diagnostics],r=[],o=new Map;for(let h of t.statements.filter(l=>l.kind==="dim"&&l.name!==void 0&&l.nameRange!==void 0)){let l=h.name.toUpperCase();if(o.get(l)!==void 0){n.push({code:"duplicate-local",message:`Local variable '${h.name}' is already declared.`,severity:"error",range:h.nameRange});continue}let b={id:r.length,name:h.name,kind:"variable",range:h.range,selectionRange:h.nameRange,datatype:h.datatype,scopeId:0};r.push(b),o.set(l,b)}let i=new Map;for(let h of r)i.set((0,Zf.offsetAt)(e,h.selectionRange.start),h);let s=new Map;for(let h of t.statements.filter(l=>l.kind==="call"&&l.name!==void 0&&l.nameRange!==void 0))s.set((0,Zf.offsetAt)(e,h.nameRange.start),h.name);let a=[];for(let h=0;h")continue;let g=o.get(l.lexeme.toUpperCase()),D=s.get(l.span.start);if(g!==void 0||D!==void 0){let N=t.tokens.slice(h+1).find(B=>![qt.TokenKind.Whitespace,qt.TokenKind.Newline,qt.TokenKind.Comment].includes(B.kind)),A=D!==void 0?"call":N?.lexeme==="="?"write":"read";a.push({name:l.lexeme,kind:A,range:l.range,declarationId:g?.id})}}return{document:t,scopes:[{id:0,kind:"document",range:t.range,symbolIds:r.map(h=>h.id)}],symbols:r,references:a,diagnostics:n}}function sy(e,t){let n=e.references.find(r=>em(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function cy(e,t,n=!0){let r=e.references.find(o=>em(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var nm=I(Te=>{"use strict";var ay=Te&&Te.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),nt=Te&&Te.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ay(t,e,n)};Object.defineProperty(Te,"__esModule",{value:!0});nt(Wn(),Te);nt(Vf(),Te);nt(ra(),Te);nt(Kf(),Te);nt(To(),Te);nt(tm(),Te);nt(po(),Te);nt(Mt(),Te);nt(go(),Te)});var rm=I(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.serverCapabilities=uy;ze.diagnosticsFor=dy;ze.formattingEdits=fy;ze.symbolsFor=my;ze.definitionFor=hy;ze.referencesFor=gy;ze.completionsFor=py;ze.hoverFor=yy;var ge=Qc(),Me=nm();function uy(){return{capabilities:{textDocumentSync:ge.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function ly(e){switch(e){case"keyword":return ge.CompletionItemKind.Keyword;case"datatype":return ge.CompletionItemKind.TypeParameter;case"variable":return ge.CompletionItemKind.Variable;case"call-target":return ge.CompletionItemKind.Method;default:return ge.CompletionItemKind.Function}}function dy(e){return(0,Me.analyzeQuickScript)(e.getText()).diagnostics.map(t=>({code:t.code,message:t.message,range:t.range,severity:t.severity==="error"?ge.DiagnosticSeverity.Error:ge.DiagnosticSeverity.Warning,source:"intouch-language"}))}function fy(e,t){let n=(0,Me.formatQuickScript)(e.getText(),t);return n.changed?[ge.TextEdit.replace(ge.Range.create(ge.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function my(e){let t=n=>ge.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ge.SymbolKind.Variable:ge.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Me.documentSymbols)((0,Me.analyzeQuickScript)(e.getText())).map(t)}function hy(e,t){let n=(0,Me.definitionAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ge.Location.create(e.uri,n)}function gy(e,t,n){return(0,Me.referencesAt)((0,Me.analyzeQuickScript)(e.getText()),t,n).map(r=>ge.Location.create(e.uri,r))}function py(e){return(0,Me.completions)((0,Me.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:ly(t.kind),detail:t.detail}))}function yy(e,t){let n=(0,Me.hoverAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** + +${n.detail}`},range:n.range}}});var im=I(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.readSettings=Ty;function Et(e){return typeof e=="object"&&e!==null?e:{}}function om(e){return typeof e=="number"?e:void 0}function oa(e){return typeof e=="boolean"?e:void 0}function fn(e){return typeof e=="string"?e:void 0}function Ty(e){let t=Et(e),n=t.VBI===void 0?t:Et(t.VBI),r=Et(n.formatter),o=Et(r.EmptyLine),i=Et(r.BC),s=Et(r.Region),a=Et(r.Misc);return{allowedNumberOfEmptyLines:om(o.allowedNumberOfEmptyLines),removeEmptyLines:oa(o.RemoveEmptyLines),removeEmptyLinesInComments:oa(o.EmptyLinesAlsoInComment),blockCodeBegin:fn(i.BlockCodeBegin),blockCodeEnd:fn(i.BlockCodeEnd),blockCodeExclude:fn(i.BlockCodeExclude),regionBlockCodeBegin:fn(s.BlockCodeBegin),regionBlockCodeEnd:fn(s.BlockCodeEnd),regionBlockCodeExclude:fn(s.BlockCodeExclude),insertSpaces:oa(a.ReplaceTabToSpaces),indentSize:om(a.IndentSize)}}});Object.defineProperty(exports,"__esModule",{value:!0});var sm=Qc(),_y=(Af(),Vn(Nf)),by=zc(),$e=rm(),vy=im(),_e=(0,sm.createConnection)(sm.ProposedFeatures.all),je=new by.TextDocuments(_y.TextDocument),cm={};_e.onInitialize(()=>(0,$e.serverCapabilities)());_e.onDidChangeConfiguration(e=>{cm=(0,vy.readSettings)(e.settings);for(let t of je.all())_e.sendDiagnostics({uri:t.uri,diagnostics:(0,$e.diagnosticsFor)(t)})});je.onDidOpen(e=>_e.sendDiagnostics({uri:e.document.uri,diagnostics:(0,$e.diagnosticsFor)(e.document)}));je.onDidChangeContent(e=>_e.sendDiagnostics({uri:e.document.uri,diagnostics:(0,$e.diagnosticsFor)(e.document)}));je.onDidClose(e=>_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}));_e.onDocumentFormatting(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.formattingEdits)(t,{...cm,insertSpaces:e.options.insertSpaces,indentSize:e.options.tabSize})});_e.onDocumentSymbol(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.symbolsFor)(t)});_e.onDefinition(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,$e.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.completionsFor)(t)});_e.onHover(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,$e.hoverFor)(t,e.position)});_e.onShutdown(()=>{});je.listen(_e);_e.listen(); +//# sourceMappingURL=server.js.map diff --git a/out/const.js b/out/const.js deleted file mode 100644 index 9f152a2..0000000 --- a/out/const.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.REGEX = exports.KEYWORDS = exports.TRENNER = exports.NO_SPACE_ITEMS = exports.DOUBLE_OPERATORS = exports.SINGLE_OPERATORS = exports.FORMATS = exports.BACKSLASH = exports.SQUOTE = exports.DQUOTE = exports.CRLF = exports.LF = exports.CR = exports.TAB = void 0; -// Character Constants -exports.TAB = "\t"; -exports.CR = "\r"; -exports.LF = "\n"; -exports.CRLF = "\r\n"; -exports.DQUOTE = '\"'; -exports.SQUOTE = "\'"; -exports.BACKSLASH = "\\"; -exports.FORMATS = [exports.TAB, exports.CR, exports.LF, exports.CRLF, exports.DQUOTE, exports.SQUOTE, exports.BACKSLASH]; -exports.SINGLE_OPERATORS = ['=', '+', '-', '<', '>', '*', '/', '%', '!', '~', '|']; -// export const SINGLE_OPERATORS: string[] = ['=', '+', '<', '>', '*', '/', '%', '!', '~', '|'];//23.01.2022 remove - as single Operator, because it can be used in variables -// BUGFIX 2025-09-25: '=>" was mistakenly defined instead of '>=' which caused -// the formatter to produce '> =' (separating '>' and '='). Corrected to '>='. -exports.DOUBLE_OPERATORS = ['==', '<>', '<=', '>=']; -exports.NO_SPACE_ITEMS = ['(', ')', '[', ']', ';']; -exports.TRENNER = [';', ' ']; -exports.KEYWORDS = [ - "NULL", "EOF", "AS", "IF", "ENDIF", "ELSE", "WHILE", "FOR", "next", "DIM", "THEN", - "EXIT", "EACH", "STEP", "IN", "RETURN", "CALL", "MOD", "AND", "NOT", "IS", - "OR", "XOR", "Abs", "TO", "SHL", "SHR", "discrete", "integer", "real", "message", - // Added math / intrinsic style functions for uppercasing in formatter 2025-09-25 - "sqr", "sin", "cos", "tan", "atn", "exp", "log", "int", "frac", "round", "rnd", "sqrt" -]; -/* Misk keywords from .json - MOD|AND|NOT|IS|OR|XOR|Abs|TO|SHL|SHR - IF|ENDIF|ELSE|WHILE|FOR|NEXT|DIM|THEN|EXIT|EACH|STEP|IN|RETURN|CALL - NULL|EOF|AS|True|False - discrete|integer|real|message -*/ -const gm_TAB_NOT_IN_COMMENT = new RegExp(/(?![^{]*})\t/, 'gm'); -const gm_MOR_1_WSP = new RegExp(/\s{1,}/, 'gm'); //more then one whitespace -const gm_MOR_2_WSP = new RegExp(/\s{2,}/, 'gm'); //more then two whitespace -const gm_MOR_2_WSP_NO_TAB = new RegExp(/\s{2,}(?\/\?\s]+)/, 'gm'); -const gm_GET_ALL_Numbers = new RegExp(/-?\d*\d/, 'gm'); -exports.REGEX = { - gm_TAB_NOT_IN_COMMENT, - gm_MOR_1_WSP, - gm_MOR_2_WSP, - g_CHECK_OPEN_COMMENT, - g_CHECK_CLOSE_COMMENT, - gm_GET_NESTING, - gm_GET_STRING, - gm_GET_WSP_IN_STRING, - gm_MOR_2_WSP_NO_TAB, - gm_GET_ALL_WORDS, - gm_GET_ALL_Numbers -}; -//# sourceMappingURL=const.js.map \ No newline at end of file diff --git a/out/extension.js b/out/extension.js deleted file mode 100644 index 38b468b..0000000 --- a/out/extension.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.activate = activate; -exports.deactivate = deactivate; -const vscode = require("vscode"); -const functions_1 = require("./functions"); -function activate(context) { - vscode.commands.registerCommand('vbi-format', () => { - const { activeTextEditor } = vscode.window; - if (activeTextEditor) { - //&& activeTextEditor.document.languageId === 'intouch' - const { document } = activeTextEditor; - let start = new vscode.Position(0, 0); - let end = new vscode.Position(document.lineCount - 1, document.lineAt(document.lineCount - 1).text.length); - let r = new vscode.Range(start, end); - return (0, functions_1.formatTE)(r); - } - }); - //https://vscode-docs.readthedocs.io/en/latest/extensionAPI/vscode-api/ - vscode.languages.registerDocumentFormattingEditProvider({ scheme: 'file', language: 'intouch' }, { - provideDocumentFormattingEdits(document) { - const { activeTextEditor } = vscode.window; - let start = new vscode.Position(0, 0); - let end = new vscode.Position(document.lineCount - 1, document.lineAt(document.lineCount - 1).text.length); - let r = new vscode.Range(start, end); - return (0, functions_1.formatTE)(r); - } - }); -} -//It will be invoked on deactivation -function deactivate() { } -//# sourceMappingURL=extension.js.map \ No newline at end of file diff --git a/out/formatCore.js b/out/formatCore.js deleted file mode 100644 index 3ca4f87..0000000 --- a/out/formatCore.js +++ /dev/null @@ -1,618 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.preFormat = preFormat; -exports.formatNestings = formatNestings; -exports.pureFormatPipeline = pureFormatPipeline; -// Pure formatting core extracted from formats.ts for test fixture generation without vscode dependency -const const_1 = require("./const"); -const nestingdef_1 = require("./nestingdef"); -function preFormat(text, config) { - // Normalize all line endings to CRLF up front while preserving intent of single blank lines. - // Replace any lone CR or LF with CRLF for internal processing. - text = text.replace(/\r\n|\n|\r/g, '\r\n'); - let txt = text.split(""); - let buf = ""; - let modified = 0; - let LineCount = 1; - let ColumnCount = 0; - let inComment = false; - let inString = false; - for (let i = 0; i <= txt.length - 1; i++) { - ColumnCount++; - if (modified > 0) { - modified--; - } - else { - modified = 0; - if (inString && txt[i] === '"') { - inString = false; - } - else if (!inComment && txt[i] === '"') { - inString = true; - } - if (txt[i] === '\n') { - if (inString) { - return text; // abort on multi-line string error - } - LineCount++; - ColumnCount = 0; - } - if (!inComment && txt[i] === '}') { - return text; // malformed comment closure - } - else if (txt[i] === '{') { - inComment = true; - } - else if (inComment && txt[i] === '}') { - inComment = false; - } - if (!inString) { - if (!(modified > 0) && (!inComment || config.KeywordUppercaseAlsoInComment)) { - // Keywords: replace slice with uppercase version WITHOUT consuming the following char ("after"). - // The previous implementation appended the following char and set modified accordingly, which could - // duplicate CR characters or interfere with blank line handling when the next char was a line break. - for (let kw of const_1.KEYWORDS) { - const slice = text.substr(i, kw.length); - const before = text[i - 1]; - const after = text[i + kw.length]; - if (slice.toLowerCase() === kw.toLowerCase()) { - if (CheckCRLForWhitespace(before) && CheckCRLForWhitespace(after)) { - buf += kw.toUpperCase(); - modified = kw.length - 1; // we consumed only the keyword characters - break; - } - } - } - // Double operators - if (!(modified > 0)) { - for (let op of const_1.DOUBLE_OPERATORS) { - const slice = text.substr(i, op.length); - if (slice === op) { - if (text[i - 1] !== ' ') - buf += ' '; - buf += op; - if (text[i + op.length] !== ' ') - buf += ' '; - modified = op.length - 1; - break; - } - } - } - // Single operators (improved spacing rules) - if (!(modified > 0)) { - const isIdentChar = (c) => /[A-Za-z0-9_$]/.test(c || ''); - const isVarStart = (c) => /[A-Za-z]/.test(c || ''); - const isVarBody = (c) => /[A-Za-z0-9$-]/.test(c || ''); - for (let op of const_1.SINGLE_OPERATORS) { - if (txt[i] !== op) - continue; - // Detect multi-segment dashed identifier (e.g. new12-issue-dashed-variable) and keep dashes untouched. - // Clarified rule: even simple letter-dash-letter (a-b) or e-f is a valid variable token and must remain unspaced. - if (op === '-') { - const prevCh = text[i - 1]; - const nextCh = text[i + 1]; - // Determine if dash sits inside a variable token according to rule: - // Variable token pattern: [A-Za-z][A-Za-z0-9$-]* (segments after first letter may start with digits or $) - if (isVarBody(prevCh) && isVarBody(nextCh)) { - let start = i - 1; - while (start >= 0 && isVarBody(text[start])) - start--; - start++; - let end = i + 1; - while (end < text.length && isVarBody(text[end])) - end++; - const token = text.slice(start, end); - if (isVarStart(text[start])) { - // Treat every dash inside such a token as part of variable (including single letter-dash-letter) - buf += '-'; - modified = -1; - break; - } - } - } - // Determine unary minus (attach to number) => previous non-space char is an operator boundary - let unaryMinus = false; - if (op === '-') { - // look backwards for first non-space char already emitted in buf - let k = buf.length - 1; - while (k >= 0 && /[ \t]/.test(buf[k])) - k--; - const prev = k >= 0 ? buf[k] : undefined; - const nextChar = text[i + 1]; - if ((prev === undefined || /[=+\-*/,(;{}]/.test(prev) || prev === '\n' || prev === '\r') && /[0-9]/.test(nextChar)) { - unaryMinus = true; - } - } - // NEW rule: minus between identifiers (letters/underscore) must always be spaced as binary - let isBinary = !(op === '-' && unaryMinus); - // Space before (binary only) - if (isBinary && buf.length > 0 && !/[ \t\r\n]/.test(buf[buf.length - 1])) { - buf += ' '; - } - // Emit operator - buf += op; - // Space after (binary; plus always binary; keep unary minus tight with number) - if (isBinary) { - const next = text[i + 1]; - if (next && !/[ \t\r\n]/.test(next)) { - buf += ' '; - } - } - modified = -1; - break; - } - } - } - } - if (modified === 0) { - buf += txt[i]; - } - } - } - // normalize spaces before semicolon + trim line tails - // Sanitize any duplicated or stray carriage returns that may have been produced by earlier logic - // Examples seen in tests: lines ending with an embedded "\r" (content + \r + CRLF) resulting from prior keyword logic. - buf = buf - .replace(/\r\r\n/g, const_1.CRLF) // collapse CRCRLF -> CRLF - .replace(/\r(?!\n)/g, ''); // remove lone CR not followed by LF - let lines = buf.split(const_1.CRLF).map(l => l.replace(/\s+$/g, '')); - // Preserve single blank lines: collapse only runs >1 here (final pipeline still may apply config rules). - const newLines = []; - let emptyRun = 0; - for (const line of lines) { - if (line === '') { - emptyRun++; - if (emptyRun === 1) - newLines.push(''); // keep exactly one - continue; - } - else { - emptyRun = 0; - newLines.push(line); - } - } - let normalized = newLines.join(const_1.CRLF); - // Post-processing normalizations: - // 1. Ensure binary minus has space after when pattern like 'f -g' (but keep dashed identifiers like a-b-c) - // 2. Collapse accidental double (or more) spaces between '=' and '>' in malformed '= >' sequences - // Apply targeted spacing fix outside of quoted strings only. - normalized = (() => { - let out = ''; - let inStr = false; - let inComment = false; - let inIfDepth = 0; // >0 while inside IF (...) - const isIdentStart = (c) => /[A-Za-z]/.test(c); - for (let i = 0; i < normalized.length; i++) { - let ch = normalized[i]; - if (ch === '"') { - inStr = !inStr; - out += ch; - continue; - } - if (!inStr) { - // Track simple single-line comment braces { ... } - if (ch === '{') { - inComment = true; - out += ch; - continue; - } - if (ch === '}' && inComment) { - inComment = false; /* fall through to spacing rule below */ - } - // IF keyword normalization (only when not in comment) patterns: if( / if ( - if (!inComment && (ch === 'i' || ch === 'I') && (normalized[i + 1] === 'f' || normalized[i + 1] === 'F')) { - // Normalize IF keyword followed by '(': style 'IF (a ... ) THEN' - let j = i + 2; // after 'if' - while (j < normalized.length && normalized[j] === ' ') - j++; - if (normalized[j] === '(') { - out += 'IF ('; - // skip any spaces after '(' - let k = j + 1; - while (k < normalized.length && normalized[k] === ' ') - k++; - inIfDepth = 1; - i = k - 1; // continue from first non-space after '(' - continue; - } - } - // After ')' followed by THEN (case-insensitive, maybe without space) - if (!inComment && ch === ')') { - // If we're closing IF (...), remove any trailing spaces before ')' - if (inIfDepth > 0) { - while (out.length > 0 && out[out.length - 1] === ' ') - out = out.slice(0, -1); - inIfDepth = 0; - } - out += ')'; - // Handle THEN following - let j = i + 1; - while (j < normalized.length && normalized[j] === ' ') - j++; - const ahead = normalized.slice(j, j + 4).toLowerCase(); - if (ahead === 'then') { - out += ' THEN'; - i = j + 3; - continue; - } - // generic: ensure space after ')' if next is identifier - let next = normalized[i + 1]; - if (next && isIdentStart(next)) { - out += ' '; - } - continue; - } - // Ensure space before inline comment brace directly after THEN (THEN{ -> THEN {) - if (!inComment && (ch === 'T' || ch === 't') && normalized.slice(i, i + 4).toLowerCase() === 'then') { - let j = i + 4; - while (j < normalized.length && normalized[j] === ' ') - j++; - if (normalized[j] === '{') { - out += 'THEN '; - i = i + 3; // consumed THEN - continue; - } - } - // Rule: ensure single space after semicolon if next char (non newline) is not space - if (!inComment && ch === ';') { - const next = normalized[i + 1]; - if (next && next !== ' ' && next !== '\r' && next !== '\n') { - out += '; '; - continue; - } - } - // Rule: ensure space after closing '}' of a comment if next non-space is identifier - if (ch === '}') { - let j = i + 1; - while (j < normalized.length && normalized[j] === ' ') - j++; - if (j < normalized.length && isIdentStart(normalized[j]) && normalized[i + 1] !== ' ') { - out += '} '; - continue; - } - } - // Ensure space after pattern X -Y (but not inside dashed identifiers) => convert 'X -Y' to 'X - Y' - if (!inComment && /[A-Za-z0-9_]/.test(ch) && normalized[i + 1] === ' ' && normalized[i + 2] === '-' && /[A-Za-z_]/.test(normalized[i + 3])) { - // Check that this is not inside a multi-dash variable: look backwards to start of run and forwards to end - let back = out.length - 1; - while (back >= 0 && /[A-Za-z0-9$-]/.test(out[back])) - back--; - let forward = i + 3; - while (forward < normalized.length && /[A-Za-z0-9$-]/.test(normalized[forward])) - forward++; - const run = (out.slice(back + 1) + normalized.slice(i, forward)); - if (!/^[A-Za-z][A-Za-z0-9$-]*-[A-Za-z0-9$-]*-[A-Za-z0-9$-]*$/.test(run)) { - out += ch + ' - ' + normalized[i + 3]; - i += 3; - continue; - } - } - // Comma spacing in argument lists: remove preceding spaces, enforce single space after unless next is ) or EOL - if (!inComment && ch === ',') { - while (out.length > 0 && out[out.length - 1] === ' ') - out = out.slice(0, -1); - out += ','; - let next = normalized[i + 1]; - if (next && next !== ' ' && next !== ')' && next !== '\r' && next !== '\n') { - out += ' '; - } - continue; - } - } - out += ch; - } - return out.replace(/= {2,}>/g, '= >'); - })(); - // Final sanitation: remove any spaces directly before semicolons outside strings/comments (strings already preserved above) - // Remove spaces before semicolons only outside of string literals AND outside brace comments - normalized = normalized.split(const_1.CRLF).map(line => { - // Entire line is a single-line brace comment -> leave unchanged - if (/^\s*\{[^{}]*\}\s*$/.test(line)) - return line; - // Split code part and trailing brace comment (if any) - const braceIndex = line.indexOf('{'); - let codePart = line; - let commentPart = ''; - if (braceIndex !== -1) { - codePart = line.slice(0, braceIndex); - commentPart = line.slice(braceIndex); // keep as-is - } - // Within codePart, protect strings, then remove spaces before semicolons - const rebuilt = codePart.split(/("[^"\\]*(?:\\.[^"\\]*)*"?)/g).map(seg => { - if (seg.startsWith('"') && seg.endsWith('"')) - return seg; // string literal - return seg.replace(/(\S)\s+;/g, '$1;'); - }).join(''); - return rebuilt + commentPart; - }).join(const_1.CRLF); - return normalized; -} -function formatNestings(text, config) { - let buf = ""; - let codeFragments = []; - let regex = ""; - let nestingCounter = 0; - let nestingCounterPrevious = 0; - // Simple nesting only; multiline IF experimental logic removed - let multilineComment = false; - let thisLineBack = false; - // Multiline IF expression handling state - let multiIfActive = false; - let multiIfBaseDepth = 0; - let regexCB = `^${config.BlockCodeBegin}`; - let regexCEx = `^${config.BlockCodeExclude}`; - let regexCE = `^${config.BlockCodeEnd}`; - let regexRegionCB = `^${config.RegionBlockCodeBegin}`; - let regexRegionCEx = `^${config.RegionBlockCodeExclude}`; - let regexRegionCE = `^${config.RegionBlockCodeEnd}`; - const hadFinalCRLF = text.endsWith(const_1.CRLF); - codeFragments = text.split(const_1.CRLF); - for (let i = 0; i < codeFragments.length; i++) { - const prevMultilineState = multilineComment; // remember state entering this line - let isEmptyLine = false; - codeFragments[i] = codeFragments[i].replace(/\s+$/g, ""); - if (codeFragments[i] === "") - isEmptyLine = true; - if (codeFragments[i].search(const_1.REGEX.g_CHECK_OPEN_COMMENT) !== -1) - multilineComment = true; - if (codeFragments[i].search(const_1.REGEX.g_CHECK_CLOSE_COMMENT) !== -1) - multilineComment = false; - let str = codeFragments[i].match(const_1.REGEX.gm_GET_STRING); - if (str) { - // Protect ALL string literals on the line by masking spaces/tabs/semicolons - let protectedLine = codeFragments[i]; - for (const item of str) { - let strw = item.replace(/\s(? { - regex = `((?![^{]*})(${item}))`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) - exclude = true; - }); - if (!multiIfActive) { - if (inlineIf) { - // no nesting change - } - else if (continuationTrigger) { - multiIfActive = true; - multiIfBaseDepth = nestingCounterPrevious; // visual base - } - else { - for (let n of nestingdef_1.NESTINGS) { - if (!exclude) { - regex = `((?![^{]*})(\\b${n.keyword})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { - nestingCounter++; - } - } - if (n.multiline !== '') { - regex = `((?![^{]*})(\\b${n.multiline})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { } - } - if (n.middle !== '') { - regex = `((?![^{]*})(\\b${n.middle})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { - thisLineBack = true; - break; - } - } - regex = `((?![^{]*})(\\b${n.end})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { - nestingCounter--; - if (nestingCounter < 0) - nestingCounter = 0; - thisLineBack = true; - break; - } - } - } - } - else { - // multiIfActive - if (hasTHEN) { - nestingCounter++; // start IF body after this line - thisLineBack = true; // keep THEN at expression level - multiIfActive = false; - } - } - } - } - if (!isEmptyLine) { - // If we are inside a multi-line brace comment block OR this is the closing line - // (previous line(s) were multiline comment and this one ends with a closing brace) - // then we preserve indentation exactly as-is (no added / removed indent). - const closesMultiline = prevMultilineState && codeFragments[i].includes('}'); - if (multilineComment || closesMultiline || prevMultilineState) { - // Restore original line (with its original indentation) because we may have trimmed earlier logic - codeFragments[i] = originalLine; - multiIfActive = false; // reset multi-IF state when traversing comment blocks - if (nestingCounterPrevious !== nestingCounter) - nestingCounterPrevious = nestingCounter; - continue; - } - // Determine visual depth for real code lines - let visualDepth = nestingCounterPrevious; - if (multiIfActive) { - // lines after initial IF (continuation lines) show baseDepth+2 now (user request) - const initialLine = /\bIF\b/i.test(codeFragments[i]) && !/\bTHEN\b/i.test(codeFragments[i]); - if (!initialLine) - visualDepth = multiIfBaseDepth + 2; - } - else if (thisLineBack && /\bTHEN\b/i.test(codeFragments[i])) { - // THEN closing expression line: show continuation depth (base+2) and do NOT drop back - visualDepth = (multiIfBaseDepth + 2); - thisLineBack = false; // keep indentation level, prevent getNesting from skipping one level - } - const prefix = getNesting(visualDepth, thisLineBack, config); - codeFragments[i] = prefix + codeFragments[i]; - if (nestingCounterPrevious !== nestingCounter) - nestingCounterPrevious = nestingCounter; - thisLineBack = false; - } - } - // Final trailing whitespace cleanup - codeFragments = codeFragments.map(l => l.replace(/[ \t]+$/g, '')); - for (let i = 0; i < codeFragments.length; i++) { - const isLast = i === codeFragments.length - 1; - if (!isLast) - buf += codeFragments[i] + const_1.CRLF; - else { - if (codeFragments[i] !== '') { - buf += codeFragments[i]; - if (hadFinalCRLF) - buf += const_1.CRLF; - } - } - } - // Collapse multiple inner spaces (not leading indentation) outside of strings and outside single-line brace comments - const collapsed = buf.split(const_1.CRLF).map(line => { - if (line.trim() === '') - return line; - // Mask single-line brace comments { ... } to preserve interior spacing - const comments = line.match(/\{[^{}\r\n]*\}/g) || []; - const commentTokens = []; - let masked = line; - comments.forEach((c, idx) => { - const token = `@@C${idx}@@`; - commentTokens.push(c); - masked = masked.replace(c, token); - }); - // Split by string literals (simple non-escaped quote handling) - const segments = masked.split(/("[^"\\]*(?:\\.[^"\\]*)*"?)/g).filter(s => s !== ''); - let rebuilt = ''; - segments.forEach(seg => { - if (seg.startsWith('"') && seg.endsWith('"')) { - rebuilt += seg; // keep string literal - } - else { - const m = seg.match(/^(\s*)(.*)$/); - if (m) { - const ind = m[1]; - const rest = m[2].replace(/ {2,}/g, ' '); - rebuilt += ind + rest; - } - else { - rebuilt += seg.replace(/ {2,}/g, ' '); - } - } - }); - // Restore comments - commentTokens.forEach((c, idx) => { - rebuilt = rebuilt.replace(`@@C${idx}@@`, c); - }); - return rebuilt; - }).join(const_1.CRLF); - return collapsed; -} -function getNesting(n, thisLineBack, config) { - let temp = ""; - if (n !== 0) { - // Determine indent unit based on configuration - const useSpaces = (config.ReplaceTabToSpaces !== false); // default true - const indentSize = (typeof config.IndentSize === 'number' && config.IndentSize >= 1 && config.IndentSize <= 10) ? config.IndentSize : 4; - const indentUnit = useSpaces ? ' '.repeat(indentSize) : '\t'; - for (let i = 0; i < n; i++) { - if (thisLineBack) { - thisLineBack = false; - } - else { - temp += indentUnit; - } - } - } - return temp; -} -function CheckCRLForWhitespace(s) { - if (s === undefined || s === '' || s === '\n' || s === '\r') - return true; // line/file start boundaries - return const_1.FORMATS.concat(const_1.SINGLE_OPERATORS, const_1.DOUBLE_OPERATORS, const_1.TRENNER).some(item => s === item); -} -function pureFormatPipeline(text, config) { - let formatted = preFormat(text, config); - formatted = formatNestings(formatted, config); - const nEL = (config.allowedNumberOfEmptyLines || 1) + 1.0; - if (config.RemoveEmptyLines) { - let regex; - if (config.EmptyLinesAlsoInComment) { - regex = new RegExp(`(?![^{]*})(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - else { - regex = new RegExp(`(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - formatted = formatted.replace(regex, const_1.CRLF); - } - // Indentation normalization: replace leading tabs with spaces if configured - const useSpaces = (config.ReplaceTabToSpaces !== false); // default true - const indentSize = (typeof config.IndentSize === 'number' && config.IndentSize >= 1 && config.IndentSize <= 10) ? config.IndentSize : 4; - if (useSpaces) { - const tabRegex = /^\t+/gm; - formatted = formatted.replace(tabRegex, (m) => ' '.repeat(m.length * indentSize)); - } - return formatted; -} -//# sourceMappingURL=formatCore.js.map \ No newline at end of file diff --git a/out/formats.js b/out/formats.js deleted file mode 100644 index 9a8ec27..0000000 --- a/out/formats.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -// Delegation wrapper only – real formatting logic lives in formatCore.ts -// Single Source of Truth: modify formatting rules in formatCore.ts -// This file provides stable export names for the rest of the extension. -Object.defineProperty(exports, "__esModule", { value: true }); -exports.preFormat = preFormat; -exports.formatNestings = formatNestings; -exports.fullFormatPipeline = fullFormatPipeline; -const formatCore_1 = require("./formatCore"); -function preFormat(text, config) { - return (0, formatCore_1.preFormat)(text, config); -} -function formatNestings(text, config) { - return (0, formatCore_1.formatNestings)(text, config); -} -function fullFormatPipeline(text, config) { - return (0, formatCore_1.pureFormatPipeline)(text, config); -} -// Note: If VSCode-specific logging or telemetry is needed later, inject it here -// without duplicating core logic. -//# sourceMappingURL=formats.js.map \ No newline at end of file diff --git a/out/functions.js b/out/functions.js deleted file mode 100644 index 7700709..0000000 --- a/out/functions.js +++ /dev/null @@ -1,164 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.info = exports.config = void 0; -exports.formatTE = formatTE; -exports.getConfig = getConfig; -exports.log = log; -exports.cloneArray = cloneArray; -const vscode = require("vscode"); -const vscode_1 = require("vscode"); -const formats_1 = require("./formats"); -const const_1 = require("./const"); -exports.config = {}; -function formatTE(range) { - exports.config = getConfig(); - let document = vscode_1.window.activeTextEditor.document; - const newText = format(range, document, exports.config); - return [vscode.TextEdit.replace(range, newText)]; -} -function format(range, document, config) { - // PURE IMPLEMENTATION (Refactor 2025-09-14): No direct editor side-effects anymore. - let regex; - let formatted = document.getText(range); - // 1. Keyword / Operator Formatting - formatted = (0, formats_1.preFormat)(formatted, config); - // 2. Nestings - formatted = (0, formats_1.formatNestings)(formatted, config); - // 3. Remove EmptyLines - const nEL = (config.allowedNumberOfEmptyLines || 1) + 1.0; - if (config.RemoveEmptyLines) { - if (config.EmptyLinesAlsoInComment) { - regex = new RegExp(`(?![^{]*})(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - else { - regex = new RegExp(`(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - formatted = formatted.replace(regex, const_1.CRLF); - } - return formatted; -} -//---------------------------------------------------------------- -//---------------------------------------------------------------- -function getConfig() { - //https://code.visualstudio.com/api/references/contribution-points - //debug - exports.config.debug = false; //workspace.getConfiguration().get('VBI.formatter.debug.active'); - exports.config.debugToChannel = true; //workspace.getConfiguration().get('VBI.formatter.debug.debugToChannel'); - //Live empty Lines - exports.config.allowedNumberOfEmptyLines = vscode_1.workspace.getConfiguration().get('VBI.formatter.EmptyLine.allowedNumberOfEmptyLines'); - if (exports.config.allowedNumberOfEmptyLines < 0 || exports.config.allowedNumberOfEmptyLines > 50) { - exports.config.allowedNumberOfEmptyLines = 1; - } - exports.config.RemoveEmptyLines = vscode_1.workspace.getConfiguration().get('VBI.formatter.EmptyLine.RemoveEmptyLines'); - exports.config.EmptyLinesAlsoInComment = vscode_1.workspace.getConfiguration().get('VBI.formatter.EmptyLine.EmptyLinesAlsoInComment'); - //codeblock-Nesting settings - exports.config.BlockCodeBegin = vscode_1.workspace.getConfiguration().get('VBI.formatter.BC.BlockCodeBegin'); - exports.config.BlockCodeEnd = vscode_1.workspace.getConfiguration().get('VBI.formatter.BC.BlockCodeEnd'); - exports.config.BlockCodeExclude = vscode_1.workspace.getConfiguration().get('VBI.formatter.BC.BlockCodeExclude'); - //Region codeblock-Nesting settings - exports.config.RegionBlockCodeBegin = vscode_1.workspace.getConfiguration().get('VBI.formatter.Region.BlockCodeBegin'); - exports.config.RegionBlockCodeEnd = vscode_1.workspace.getConfiguration().get('VBI.formatter.Region.BlockCodeEnd'); - exports.config.RegionBlockCodeExclude = vscode_1.workspace.getConfiguration().get('VBI.formatter.Region.BlockCodeExclude'); - //misc - exports.config.ReplaceTabToSpaces = vscode_1.workspace.getConfiguration().get('VBI.formatter.Misc.ReplaceTabToSpaces'); - exports.config.IndentSize = vscode_1.workspace.getConfiguration().get('VBI.formatter.Misc.IndentSize'); - if (typeof exports.config.IndentSize !== 'number' || exports.config.IndentSize < 1 || exports.config.IndentSize > 10) { - exports.config.IndentSize = 4; - } - if (typeof exports.config.ReplaceTabToSpaces !== 'boolean') { - exports.config.ReplaceTabToSpaces = true; // fallback to default from package.json - } - //config.AllowInlineIFClause = workspace.getConfiguration().get('VBI.formatter.AllowInlineIFClause'); - //log this - console.log('getConfig():', exports.config); - return exports.config; -} -/** - * @param cat Type String --> define Category [info,warn,error] - * @param o Rest Parameter, Type Any --> Data to Log - */ -exports.info = vscode.window.createOutputChannel("VBI-Info"); -function log(cat, ...o) { - function mapObject(obj) { - switch (typeof obj) { - case 'undefined': - return 'undefined'; - case 'object': - let ret = ''; - for (const [key, value] of Object.entries(obj)) { - ret += (`${key}: ${value}\n`); - } - return ret; - default: - return obj; //function,symbol,boolean - } - } - if (exports.config.debug) { - if (exports.config.debugToChannel) { - switch (cat.toLowerCase()) { - case 'info': - //info.appendLine('INFO:'); - o.map((args) => { - exports.info.appendLine('INFO:' + mapObject(args)); - }); - exports.info.show(); - return; - case 'warn': - //info.appendLine('WARN:'); - o.map((args) => { - exports.info.appendLine('WARN:' + mapObject(args)); - }); - exports.info.show(); - return; - case 'error': - let err = ''; - //info.appendLine('ERROR: '); - //err += mapObject(cat) + ": \r\n"; - o.map((args) => { - err += mapObject(args); - }); - exports.info.appendLine(err); - vscode.window.showErrorMessage(err); //.replace(/(\r\n|\n|\r)/gm,"") - exports.info.show(); - return; - default: - //info.appendLine('INFO-Other:'); - //info.appendLine('INFO-Other:' + mapObject(cat)); - o.map((args) => { - exports.info.appendLine('INFO-Other:' + mapObject(args)); - }); - exports.info.show(); - return; - } - } - else { - switch (cat.toLowerCase()) { - case 'info': - console.log('INFO:', o); - return; - case 'warn': - console.log('WARNING:', o); - return; - case 'error': - console.error('ERROR:', o); - return; - default: - console.log('log:', cat, o); - return; - } - } - } - else if (cat.toLowerCase() === 'error') { // show Error in vc, and log it to console - let err = ''; - o.map((args) => { - err += mapObject(args); - }); - console.error('ERROR:', o); - vscode.window.showErrorMessage(err); //.replace(/(\r\n|\n|\r)/gm,"") - return; - } -} -function cloneArray(arr) { - return [...arr]; -} -//# sourceMappingURL=functions.js.map \ No newline at end of file diff --git a/out/nestingdef.js b/out/nestingdef.js deleted file mode 100644 index 7cf2270..0000000 --- a/out/nestingdef.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NESTINGS = exports.EXCLUDE_KEYWORDS = void 0; -exports.EXCLUDE_KEYWORDS = ["EXIT FOR"]; -exports.NESTINGS = [ - { - keyword: "if", - middle: "else", - end: "endif", - multiline: "then", - }, - { - keyword: "for", - middle: "", - end: "next", - multiline: "", - }, - { - keyword: "while", - middle: "", - end: "next", - multiline: "", - } -]; -//# sourceMappingURL=nestingdef.js.map \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fb66b19..f2828af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,12 @@ "version": "1.5.0", "hasInstallScript": true, "license": "GPL-3.0-or-later", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "vscode-languageclient": "^10.1.0" + }, "devDependencies": { "@types/mocha": "^10.0.10", "@types/node": "^24.13.3", @@ -726,6 +732,14 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@intouch-language/core": { + "resolved": "packages/core", + "link": true + }, + "node_modules/@intouch-language/language-server": { + "resolved": "packages/language-server", + "link": true + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -3147,7 +3161,6 @@ "version": "7.8.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -3517,6 +3530,100 @@ "dev": true, "license": "MIT" }, + "node_modules/vscode-jsonrpc": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.1.tgz", + "integrity": "sha512-rfuA6T75H6m5EkbhtEPzre9pT0HPcDI2MMy4+nPFIBks5J8JBAUHD4tRYSgaBOijIEC7SRkC1kKyXTLqbmh9jw==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageclient": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.1.0.tgz", + "integrity": "sha512-XXRx6lqVitQy/oOLr9MfNYRG+MbQkhXkDaxbQMiKxEm8zZNfheRFUKNb8UYNh2stn9btl2wQM5wZFJjJvoc+jA==", + "license": "MIT", + "dependencies": { + "minimatch": "^10.2.5", + "semver": "^7.8.1", + "vscode-languageserver-protocol": "3.18.2", + "vscode-languageserver-textdocument": "1.0.13" + }, + "engines": { + "vscode": "^1.91.0" + } + }, + "node_modules/vscode-languageclient/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/vscode-languageclient/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/vscode-languageclient/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/vscode-languageserver": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-10.1.0.tgz", + "integrity": "sha512-9gEWpXkYGXoqG7pBnE8O8hx/yP7+Aabn4+peQ3KDicQv6qunHSWyLTud3OF0w4S2+HfDD+5HqYKiXQW9HAU6mA==", + "license": "MIT", + "dependencies": { + "vscode-languageserver-protocol": "3.18.2" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.18.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.18.2.tgz", + "integrity": "sha512-XRyDbT0Pp3sSNti3JmxVEUMySWCSi1hhM+/KUlCy1hV1zmrqpM1OwO12EAki8blhmLuIMpaJrYbo0OzGVfK2Qg==", + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "9.0.1", + "vscode-languageserver-types": "3.18.0" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.13.tgz", + "integrity": "sha512-nx0ZHwMGIsVkzFG3/VLeJYBLTaFBRuNdGDvevvjuoayU5EOS2fEYazOhtCM3PI9ClMMg5igc0uwXtAq4tJj+Dw==", + "license": "MIT" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.18.0.tgz", + "integrity": "sha512-8TsGPNMIMiiBdkORgRSvLjuiEIiAFtO+KssmYWxQ+uSVvlf7RjK8YKCOjPzZ+YA04jXEV7+7LvkSmHkhpNS99g==", + "license": "MIT" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3757,6 +3864,17 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "packages/core": { + "name": "@intouch-language/core" + }, + "packages/language-server": { + "name": "@intouch-language/language-server", + "dependencies": { + "@intouch-language/core": "*", + "vscode-languageserver": "^10.1.0", + "vscode-languageserver-textdocument": "^1.0.12" + } } } } diff --git a/package.json b/package.json index 0fd01e6..8601959 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,13 @@ "dark" ], "main": "./dist/extension.js", + "activationEvents": [ + "onLanguage:intouch", + "onCommand:vbi-format" + ], + "workspaces": [ + "packages/*" + ], "contributes": { "themes": [ { @@ -157,13 +164,18 @@ "scripts": { "start": "nodemon --watch src src/index.js", "build:theme": "node src/index.js", - "compile": "tsc -p ./ && npm run compile:core", + "compile": "rimraf ./out && npm run generate:language-data && npm run compile:core && npm run compile:language-server && tsc -p ./", "compile:core": "tsc -p ./packages/core", - "bundle": "esbuild ./out/extension.js --bundle --platform=node --external:vscode --format=cjs --minify --sourcemap --outfile=dist/extension.js", + "compile:language-server": "tsc -p ./packages/language-server", + "generate:language-data": "node ./scripts/generate-language-data.js", + "bundle": "npm run bundle:extension && npm run bundle:server", + "bundle:extension": "esbuild ./out/extension.js --bundle --platform=node --external:vscode --format=cjs --minify --sourcemap --outfile=dist/extension.js", + "bundle:server": "esbuild ./out/language-server/src/server.js --bundle --platform=node --format=cjs --minify --sourcemap --outfile=dist/server.js", "vscode:prepublish": "npm run compile && npm run build:theme && npm run bundle", "postinstall": "npm run compile", - "test": "npm run compile && npm run test:core && node ./out/test/runTest.js", + "test": "npm run compile && npm run test:core && npm run test:language-server && npm run bundle && node ./out/test/runTest.js", "test:core": "mocha --ui tdd \"out/core/test/**/*.test.js\"", + "test:language-server": "mocha --ui tdd \"out/language-server/test/**/*.test.js\"", "update:fixtures": "npm run compile && node ./scripts/update-fixtures.js", "watch": "tsc -watch -p ./", "lint": "eslint . --ext .ts,.tsx", @@ -184,6 +196,9 @@ "description": "%ext.capabilities.untrustedWorkspaces.description%" } }, + "dependencies": { + "vscode-languageclient": "^10.1.0" + }, "devDependencies": { "@types/mocha": "^10.0.10", "@types/node": "^24.13.3", diff --git a/packages/core/package.json b/packages/core/package.json index f9c3683..0fb4413 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,7 @@ { "name": "@intouch-language/core", "private": true, - "description": "Editor-independent QuickScript language primitives" + "description": "Editor-independent QuickScript language primitives", + "main": "../../../out/core/src/index.js", + "types": "../../../out/core/src/index.d.ts" } diff --git a/packages/core/src/formatter.ts b/packages/core/src/formatter.ts new file mode 100644 index 0000000..8009258 --- /dev/null +++ b/packages/core/src/formatter.ts @@ -0,0 +1,278 @@ +import { Token, TokenKind } from './token'; +import { tokenize } from './tokenizer'; +import { CoreDiagnostic, parseQuickScript } from './parser'; + +export interface FormatOptions { + lineEnding?: '\n' | '\r\n'; + indentSize?: number; + insertSpaces?: boolean; + removeEmptyLines?: boolean; + removeEmptyLinesInComments?: boolean; + allowedNumberOfEmptyLines?: number; + blockCodeBegin?: string; + blockCodeEnd?: string; + blockCodeExclude?: string; + regionBlockCodeBegin?: string; + regionBlockCodeEnd?: string; + regionBlockCodeExclude?: string; +} + +export interface FormatResult { + text: string; + changed: boolean; + diagnostics?: CoreDiagnostic[]; +} + +function isLineBoundary(token: Token | undefined): boolean { + return token === undefined || token.kind === TokenKind.Newline || token.kind === TokenKind.EOF; +} + +function previousSignificant(tokens: readonly Token[], index: number): Token | undefined { + for (let current = index - 1; current >= 0; current -= 1) { + if (tokens[current].kind !== TokenKind.Whitespace && tokens[current].kind !== TokenKind.Newline) { + return tokens[current]; + } + } + return undefined; +} + +function nextSignificant(tokens: readonly Token[], index: number): Token | undefined { + for (let current = index + 1; current < tokens.length; current += 1) { + if (tokens[current].kind !== TokenKind.Whitespace) { + return tokens[current]; + } + } + return undefined; +} + +function trimHorizontalWhitespace(output: string[]): void { + if (output.length > 0 && /^[ \t\f\v]+$/.test(output[output.length - 1])) { + output.pop(); + } +} + +function appendSingleSpace(output: string[]): void { + trimHorizontalWhitespace(output); + const tail = output[output.length - 1]; + if (tail !== undefined && !tail.endsWith('\n') && !tail.endsWith('\r')) { + output.push(' '); + } +} + +function isUnaryMinus(tokens: readonly Token[], index: number): boolean { + if (tokens[index].lexeme !== '-' || nextSignificant(tokens, index)?.kind !== TokenKind.Number) { + return false; + } + const previous = previousSignificant(tokens, index); + return previous === undefined + || previous.kind === TokenKind.Operator + || (previous.kind === TokenKind.Punctuation && ['(', '[', ',', ';', ':'].includes(previous.lexeme)); +} + +function normalizeLineTails(text: string, lineEnding: '\n' | '\r\n'): string { + const lines = text.split(/\r\n|\r|\n/).map(line => line.replace(/[ \t\f\v]+$/g, '')); + return lines.join(lineEnding); +} + +/** + * Apply lexical QuickScript formatting without editor or file-system dependencies. + * String and comment lexemes are emitted unchanged; all classification comes from the tokenizer. + */ +export function formatQuickScriptLexically(source: string, options: FormatOptions = {}): FormatResult { + const lineEnding = options.lineEnding ?? '\r\n'; + const normalizedSource = source.replace(/\r\n|\r|\n/g, lineEnding); + const tokens = tokenize(normalizedSource); + + // Match the legacy safety behavior for incomplete strings and unmatched closing comments. + if (tokens.some(token => token.kind === TokenKind.String && !token.lexeme.endsWith('"')) + || tokens.some(token => token.kind === TokenKind.Unknown && token.lexeme === '}')) { + return { text: normalizedSource, changed: normalizedSource !== source }; + } + + const output: string[] = []; + let skipWhitespace = false; + for (let index = 0; index < tokens.length; index += 1) { + const token = tokens[index]; + if (token.kind === TokenKind.EOF) { + break; + } + if (token.kind === TokenKind.Newline) { + trimHorizontalWhitespace(output); + output.push(lineEnding); + skipWhitespace = false; + continue; + } + if (token.kind === TokenKind.Whitespace) { + if (!skipWhitespace) { + output.push(token.lexeme); + } + skipWhitespace = false; + continue; + } + skipWhitespace = false; + + const next = nextSignificant(tokens, index); + if (token.kind === TokenKind.Keyword || token.kind === TokenKind.Datatype) { + output.push(token.lexeme.toUpperCase()); + continue; + } + + if (token.kind === TokenKind.Operator) { + if (isUnaryMinus(tokens, index)) { + output.push('-'); + skipWhitespace = true; + continue; + } + appendSingleSpace(output); + output.push(token.lexeme); + if (!isLineBoundary(next)) { + output.push(' '); + } + skipWhitespace = true; + continue; + } + + if (token.kind === TokenKind.Punctuation) { + if (token.lexeme === '(' || token.lexeme === '[') { + const previous = previousSignificant(tokens, index); + trimHorizontalWhitespace(output); + if (token.lexeme === '(' && previous?.kind === TokenKind.Keyword && previous.lexeme.toUpperCase() === 'IF') { + appendSingleSpace(output); + } + output.push(token.lexeme); + skipWhitespace = true; + continue; + } + if (token.lexeme === ')' || token.lexeme === ']') { + trimHorizontalWhitespace(output); + output.push(token.lexeme); + if (next !== undefined && (next.kind === TokenKind.Identifier || next.kind === TokenKind.Keyword || next.kind === TokenKind.Datatype)) { + output.push(' '); + skipWhitespace = true; + } + continue; + } + if (token.lexeme === ',' || token.lexeme === ';') { + trimHorizontalWhitespace(output); + output.push(token.lexeme); + if (!isLineBoundary(next) && !(token.lexeme === ',' && next?.lexeme === ')')) { + output.push(' '); + } + skipWhitespace = true; + continue; + } + } + + if (token.kind === TokenKind.Comment) { + const previous = previousSignificant(tokens, index); + if (previous?.kind === TokenKind.Keyword && previous.lexeme.toUpperCase() === 'THEN') { + appendSingleSpace(output); + } + output.push(token.lexeme); + if (next !== undefined && (next.kind === TokenKind.Identifier || next.kind === TokenKind.Keyword || next.kind === TokenKind.Datatype)) { + output.push(' '); + skipWhitespace = true; + } + continue; + } + + output.push(token.lexeme); + } + + const text = normalizeLineTails(output.join(''), lineEnding); + return { text, changed: text !== source }; +} + +function normalizedIndent(options: FormatOptions): string { + const size = Number.isInteger(options.indentSize) && options.indentSize! >= 1 && options.indentSize! <= 10 + ? options.indentSize! + : 4; + return options.insertSpaces === false ? '\t' : ' '.repeat(size); +} + +function normalizeStructuredLine(line: string): string { + const tokens = tokenize(line); + const output: string[] = []; + for (const token of tokens) { + if (token.kind === TokenKind.EOF || token.kind === TokenKind.Newline) { + continue; + } + if (token.kind === TokenKind.Whitespace) { + if (output.length > 0 && output[output.length - 1] !== ' ') { + output.push(' '); + } + } else { + output.push(token.lexeme); + } + } + return output.join('').replace(/[ \t]+$/g, ''); +} + +function matchesDirective(line: string, marker: string | undefined): boolean { + return marker !== undefined && marker.length > 0 && line.toLowerCase().startsWith(marker.toLowerCase()); +} + +/** Apply parser-driven indentation to lexically normalized QuickScript. */ +export function formatQuickScriptStructure(source: string, options: FormatOptions = {}): FormatResult { + const lineEnding = options.lineEnding ?? '\r\n'; + const normalizedSource = source.replace(/\r\n|\r|\n/g, lineEnding); + const document = parseQuickScript(normalizedSource); + const sourceLines = normalizedSource.split(lineEnding); + const output: string[] = []; + const indent = normalizedIndent(options); + let directiveDepth = 0; + let blankCount = 0; + const maximumBlankLines = options.removeEmptyLines === false + ? Number.POSITIVE_INFINITY + : Math.max(0, options.allowedNumberOfEmptyLines ?? 1); + + for (let lineNumber = 0; lineNumber < sourceLines.length; lineNumber += 1) { + const original = sourceLines[lineNumber].replace(/[ \t]+$/g, ''); + const structure = document.lines[lineNumber]; + if (original.trim().length === 0) { + if (structure?.preserveIndent && options.removeEmptyLinesInComments !== true) { + blankCount = 0; + output.push(original); + continue; + } + blankCount += 1; + if (blankCount <= maximumBlankLines || lineNumber === sourceLines.length - 1) { + output.push(''); + } + continue; + } + blankCount = 0; + + const trimmed = original.trimStart(); + const closesDirective = matchesDirective(trimmed, options.blockCodeEnd ?? '{<') + || matchesDirective(trimmed, options.regionBlockCodeEnd ?? '{endregion'); + const excludesDirective = matchesDirective(trimmed, options.blockCodeExclude ?? '{#') + || matchesDirective(trimmed, options.regionBlockCodeExclude ?? '{#'); + if (closesDirective) { + directiveDepth = Math.max(0, directiveDepth - 1); + } + + if (structure?.preserveIndent) { + output.push(original); + } else { + const back = excludesDirective ? 1 : 0; + const depth = Math.max(0, (structure?.indentDepth ?? 0) + directiveDepth - back); + output.push(indent.repeat(depth) + normalizeStructuredLine(trimmed)); + } + + const opensDirective = matchesDirective(trimmed, options.blockCodeBegin ?? '{>') + || matchesDirective(trimmed, options.regionBlockCodeBegin ?? '{region'); + if (opensDirective) { + directiveDepth += 1; + } + } + + const text = output.join(lineEnding); + return { text, changed: text !== source, diagnostics: document.diagnostics }; +} + +/** Format QuickScript through the canonical tokenizer and structure parser. */ +export function formatQuickScript(source: string, options: FormatOptions = {}): FormatResult { + const lexical = formatQuickScriptLexically(source, options); + return formatQuickScriptStructure(lexical.text, options); +} diff --git a/packages/core/src/generatedFunctionCatalog.ts b/packages/core/src/generatedFunctionCatalog.ts new file mode 100644 index 0000000..669a9d6 --- /dev/null +++ b/packages/core/src/generatedFunctionCatalog.ts @@ -0,0 +1,2191 @@ +// Generated from syntaxes/intouch.tmLanguage.json by scripts/generate-language-data.js. +// Do not edit this file manually. + +export interface KnownFunction { + name: string; + category: string; + sourceComment: string; +} + +export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ + { + "name": "Abs", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "Ack", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "ActivateApp", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "AddPermission", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckAll", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckDisplay", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckGroup", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckRecent", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckSelect", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckSelectedGroup", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckSelectedPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckSelectedTag", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almAckTag", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almDefQuery", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almMoveWindow", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almQuery", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSelectAll", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSelectGroup", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSelectionCount", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSelectItem", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSelectPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSelectTag", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSetQueryByName", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almShowStats", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressAll", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressDisplay", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressGroup", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressRetain", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressSelected", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressSelectedGroup", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressSelectedPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressSelectedTag", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almSuppressTag", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almUnselectAll", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "almUnsuppressAll", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "AnnotateLayout", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUFindAlarmGroupInstance", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUFindFileInstance", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUFindPrinterInstance", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetAlarmGroupText", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetConfigurationFilePath", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetInstanceCount", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetPrinterJobCount", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetPrinterName", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetPrinterStatus", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetQueryAlarmState", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetQueryFromPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetQueryProcessingState", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUGetQueryToPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUIsInstanceUsed", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUSetAlarmGroupText", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUSetQueryAlarmState", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUSetQueryFromPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUSetQueryToPriority", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUSetTimeoutValues", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUStartInstance", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUStartQuery", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUStopInstance", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUStopQuery", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "APUTranslateErrorCode", + "category": "IT-functions Ground Teil 1", + "sourceComment": "IT-functions Ground Teil 1" + }, + { + "name": "ArcCos", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "ArcSin", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "ArcTan", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "AttemptInvisibleLogon", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "BDEDatenLesen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDEDatenSpeichern", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDEDatenSuchen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDESchichtSchreiben", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDESchichtwerteDatenOK", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDESchichtwerteZuweisen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDETageswerteDatenOK", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDETageswerteSchreiben", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BDETageswerteZuweisen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BZBetriebsstunden", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "BZZaehlerAbfragen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "ChangePassword", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "ChangeWindowColor", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "Clip_cursor", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "ConvertTemp", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "Cos", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "CreateFilenameFromDate", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "DateTimeGMT", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "DialogStringEntry", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "DialogValueEntry", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "DText", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "EnableDisableKeys", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "Exp", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "ExterneModuleUeberwachen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "FileCopy", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "FileDelete", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "FileMove", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "FilePrint", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "FileReadFields", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "FileReadMessage", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "FileSelect", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "FileWriteFields", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "FileWriteMessage", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "FUWerte", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "GeoArea", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "GeoEqualSideArea", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "GeoVolume", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "GetAccountStatus", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "GetCursorPosition", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "GetDiscOffMsg", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "GetDiscOnMsg", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "GetNodeName", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "GetPropertyD", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "GetPropertyI", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "GetPropertyM", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "GetSplittByIndex", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "GetWindowName", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HerBACKUP", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "HerGATEWAYanzeigeAktualisieren", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "HerGATEWAYtriggerFreigabe", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "HerGATEWAYueberwachen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "HerProViewStart", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "Hide", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "Hide_cursor", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "HideAllPLS", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "HideSelf", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTGetLastError", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTGetPenName", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTGetTimeAtScooter", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTGetTimeStringAtScooter", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTGetValue", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTGetValueAtScooter", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTGetValueAtZone", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTScrollLeft", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTScrollRight", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTSelectTag", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTSetPenName", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTUpdateToCurrentTime", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTZoomIn", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "HTZoomOut", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "InfoAppActive", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "InfoAppStatus", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "InfoAppTitle", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "InfoAppTitleExpand", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "InfoDisk", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "InfoDosEnv", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "InfoFile", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "InfoInTouchAppDir", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "InfoResources", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "InfoWinEnv", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "INIReadInteger", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "INIReadString", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "INIWriteInteger", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "INIWriteString", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "Int", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "InTouchVersion", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "InvisibleVerifyCredentials", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IODisableFailover", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOForceFailover", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOGetAccessNameStatus", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOGetActiveSourceName", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOGetApplication", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOGetNode", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOGetTopic", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOReinitAccessName", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOReinitialize", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IORRGetItemActiveState", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "IORRGetSystemInfo", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "IORRWriteState", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "IOSetAccessName", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOSetItem", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOSetRemoteReferences", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IOStartUninitConversations", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IsAnyAsyncFunctionBusy", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IsAssignedRole", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "IsNodeAppRunning", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXAppActivate", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "ITXCheckDate", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "ITXConvertDate", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "ITXConvertDateString", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "ITXConvertDateTime", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "ITXConvertDateTimeString", + "category": "IT-functions Ground Teil 2", + "sourceComment": "IT-functions Ground Teil 2" + }, + { + "name": "ITXCreateDate", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ITXCreateDateTime", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ITXCreateDateTimeUTC", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ITXCreateDirectory", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXCreateSubDirectory", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXGetProfileInt", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXGetProfileString", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXPutProfileInt", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXPutProfileString", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXRemoveDirectory", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXRemoveSubDirectory", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXResizeApplication", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXSetLocalTime", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXSetSystemDate", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXSetSystemTime", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXShowHelpByNumber", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ITXShowHelpByString", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ITXStartAppInDirectory", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "ITXWindowCtrl", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "KonfigLesen", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "KonfigSpeichern", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "LaunchTagViewer", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "Log", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "LogMessage", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "LogN", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "Logoff", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "LogonCurrentUser", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "MessageBox", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "MetFromStdFluid", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "MetFromStdLinear", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "MetFromStdWeight", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "MoveWindow", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "NumberRecipes", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "OpenWindowsList", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "Pi", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "PlaySound", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PostLogonDialog", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PrintHT", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PrintScreen", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PrintWindow", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptGetTrendType", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptLoadTrendCfg", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptPanCurrentPen", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptPanTime", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptPauseTrend", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptRefreshTrend", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSaveTrendCfg", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSetCurrentPen", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSetPen", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSetPenEx", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSetTimeAxis", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSetTimeAxisToCurrent", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSetTrend", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptSetTrendType", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptZoomCurrentPen", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ptZoomTime", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PwdUserAdd", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PwdUserDelete", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PwdUserEdit", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PwdUserGetIndex", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "PwdUserRead", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "QFFilter", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "QFFilterRegler15Schritt", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "QFLuftwerte", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "QFRinne", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "QueryGroupMembership", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "RecipeDelete", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "RecipeGetMessage", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "RecipeLoad", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "RecipeSave", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "RecipeSelectNextRecipe", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "RecipeSelectPreviousRecipe", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "RecipeSelectRecipe", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "RecipeSelectUnit", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "ReloadWindowViewer", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "RestartWindowViewer", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "Restore_clip", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "Round", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "SendKeys", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SendMail", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SendSMTPMail", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SendSMTPMailwAttachment", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SessionUserInfoAkt", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetCursorPosition", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "SetPropertyD", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SetPropertyI", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SetPropertyM", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SetReferenceBool", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetReferenceByte", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetReferenceDINT", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetReferenceDINTs", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetReferenceMerkerByte", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetReferenceReal", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetReferenceString", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetReferenceWord", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetTagEU", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SetVarInputBoolsch", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetVarToggleBoolsch", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SetWindowPrinter", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "Sgn", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "Show", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "Show_cursor", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "ShowAt", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ShowHome", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "ShowTopLeftAt", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "Sin", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "Sollwertaenderung", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SPCEXSetDataset", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SPCEXSetEndDate", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SPCEXSetEndTime", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SPCEXSetOutputFile", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SPCEXSetProduct", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SPCEXSetStartDate", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SPCEXSetStartTime", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLAppendStatement", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLClearParam", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLClearStatement", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLClearTable", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLCommit", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLConnect", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLCreateTable", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLDelete", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLDisconnect", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLDropTable", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLEnd", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLErrorMsg", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLExecute", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLFirst", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLGetRecord", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLInsert", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLInsertEnd", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLInsertExecute", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLInsertPrepare", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLLast", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLLoadStatement", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLManageDSN", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLNext", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLNumRows", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLPrepareStatement", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLPrev", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLRollback", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSelect", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamChar", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamDate", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamDateTime", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamDecimal", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamFloat", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamInt", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamLong", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamNull", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetParamTime", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLSetStatement", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLTransact", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLUpdate", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "SQLUpdateCurrent", + "category": "Intouch AddOns functions", + "sourceComment": "Intouch AddOns functions" + }, + { + "name": "Sqrt", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "StartApp", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "StatusExtApp", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "StatusleistenInfofelder", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "StdFromMetFluid", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "StdFromMetLinear", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "StdFromMetWeight", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "StringASCII", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringChar", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringCompare", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringCompareEncrypted", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "StringCompareNoCase", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringFromGMTTimeToLocal", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringFromIntg", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringFromReal", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringFromTime", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringFromTimeLocal", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringInString", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringLeft", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringLen", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringLower", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringMid", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringReplace", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringRight", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringSpace", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringTest", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringToIntg", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringToReal", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringTrim", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "StringUpper", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "SwitchDisplayLanguage", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SWReal", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "SysBeep", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "SystemIsNT", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "TagExists", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "Tan", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "Text", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "Trunc", + "category": "IT-functions-Math", + "sourceComment": "IT-functions-Math" + }, + { + "name": "TseGetClientId", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "TseGetClientNodeName", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "TseQueryRunningOnClient", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "TseQueryRunningOnConsole", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "UTCDateTime", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcAddItem", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcClear", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcDeleteItem", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcDeleteSelection", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcErrorMessage", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcFindItem", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcGetItem", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcGetItemData", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcInsertItem", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcLoadList", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcLoadText", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcSaveList", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcSaveText", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wcSetItemData", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WindowState", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wwalmdbtrigger", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "WWAlwaysOnTop", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWBeep32", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWCntx32", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWContext", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWControl", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWControlPanel", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWDosCommand", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWExecute", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWGetServiceExeName", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "WWGetServiceName", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "WWGetServiceStatus", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "WWIsDayLightSaving", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWMoveWindow", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWMultiMonitorNode", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWPoke", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWPrimaryMonitorHeight", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWPrimaryMonitorWidth", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWRequest", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWServiceControl", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "WWServiceControlError", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "WWShutDownWin95", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "WWShutDownWinNT40", + "category": "IT-functions-System", + "sourceComment": "IT-functions-System" + }, + { + "name": "WWStartApp", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "wwStringFromTime", + "category": "Intouch String functions", + "sourceComment": "Intouch String functions" + }, + { + "name": "WWVirtualMonitorHeight", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "WWVirtualMonitorWidth", + "category": "IT-functions Ground Teil 3", + "sourceComment": "IT-functions Ground Teil 3" + }, + { + "name": "xAnlagenConfig", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xBZVZSettings", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xGatawaySettings", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xHerGATEWAYSettings", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xLoggingConfig", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xSetDateiPfade", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xSetSQLConfig", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xSetTSStation", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xSetUhrzeitserver", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, + { + "name": "xSTATION1BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION2BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION3BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION4BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION5BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION6BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION7BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION8BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + }, + { + "name": "xSTATION9BiosName", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 2" + } +] as const; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index b9ad5ba..65f2293 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,4 +1,9 @@ export * from './languageData'; +export * from './formatter'; +export * from './generatedFunctionCatalog'; +export * from './languageService'; +export * from './parser'; +export * from './semantics'; export * from './source'; export * from './token'; export * from './tokenizer'; diff --git a/packages/core/src/languageService.ts b/packages/core/src/languageService.ts new file mode 100644 index 0000000..445fcd7 --- /dev/null +++ b/packages/core/src/languageService.ts @@ -0,0 +1,103 @@ +import { KNOWN_FUNCTIONS } from './generatedFunctionCatalog'; +import { DATATYPES, KEYWORDS } from './languageData'; +import { SemanticModel } from './semantics'; +import { Position, Range } from './source'; +import { TokenKind } from './token'; + +export type CompletionKind = 'keyword' | 'datatype' | 'function' | 'variable' | 'call-target'; + +export interface CompletionEntry { + label: string; + kind: CompletionKind; + detail: string; +} + +export interface HoverEntry { + label: string; + detail: string; + range: Range; +} + +export interface DocumentSymbolEntry { + name: string; + kind: 'variable' | 'if' | 'for' | 'while'; + range: Range; + selectionRange: Range; + children: DocumentSymbolEntry[]; +} + +function contains(range: Range, position: Position): boolean { + return (position.line > range.start.line || (position.line === range.start.line && position.character >= range.start.character)) + && (position.line < range.end.line || (position.line === range.end.line && position.character < range.end.character)); +} + +/** Return deterministic completion data from canonical language data and the current document. */ +export function completions(model: SemanticModel): CompletionEntry[] { + const entries = new Map(); + const add = (entry: CompletionEntry): void => { + const key = entry.label.toUpperCase(); + if (!entries.has(key)) { + entries.set(key, entry); + } + }; + for (const label of KEYWORDS) add({ label, kind: 'keyword', detail: 'QuickScript keyword' }); + for (const label of DATATYPES) add({ label, kind: 'datatype', detail: 'QuickScript datatype' }); + for (const item of KNOWN_FUNCTIONS) add({ label: item.name, kind: 'function', detail: item.sourceComment || item.category }); + for (const symbol of model.symbols) add({ label: symbol.name, kind: 'variable', detail: symbol.datatype ? `Local ${symbol.datatype} variable` : 'Local variable' }); + for (const statement of model.document.statements.filter(candidate => candidate.kind === 'call' && candidate.name !== undefined)) { + add({ label: statement.name!, kind: 'call-target', detail: 'Document call target' }); + } + return [...entries.values()].sort((left, right) => left.label.localeCompare(right.label, 'en', { sensitivity: 'base' })); +} + +/** Return sourced hover facts only; unknown identifiers intentionally have no hover. */ +export function hoverAt(model: SemanticModel, position: Position): HoverEntry | undefined { + const token = model.document.tokens.find(candidate => contains(candidate.range, position)); + if (token === undefined) { + return undefined; + } + if (token.kind === TokenKind.Keyword) { + return { label: token.lexeme.toUpperCase(), detail: 'QuickScript keyword', range: token.range }; + } + if (token.kind === TokenKind.Datatype) { + return { label: token.lexeme.toUpperCase(), detail: 'QuickScript datatype', range: token.range }; + } + const local = model.symbols.find(symbol => symbol.name.toUpperCase() === token.lexeme.toUpperCase()); + if (local !== undefined) { + return { label: local.name, detail: local.datatype ? `Local ${local.datatype} variable` : 'Local variable', range: token.range }; + } + const known = KNOWN_FUNCTIONS.find(item => item.name.toUpperCase() === token.lexeme.toUpperCase()); + if (known !== undefined) { + return { label: known.name, detail: known.sourceComment || known.category, range: token.range }; + } + if (/^(SYS_|MA_|SMEL_|HER_)/i.test(token.lexeme)) { + return { label: token.lexeme, detail: 'Hermes system variable', range: token.range }; + } + return undefined; +} + +/** Build a hierarchical outline from local declarations and parser block relationships. */ +export function documentSymbols(model: SemanticModel): DocumentSymbolEntry[] { + const blocks = model.document.blocks.map(block => ({ + name: block.kind.toUpperCase(), + kind: block.kind, + range: block.range, + selectionRange: block.opener, + children: [] as DocumentSymbolEntry[], + })); + const roots: DocumentSymbolEntry[] = []; + for (const block of model.document.blocks) { + if (block.parentId === undefined) roots.push(blocks[block.id]); + else blocks[block.parentId].children.push(blocks[block.id]); + } + return [ + ...model.symbols.map(symbol => ({ + name: symbol.name, + kind: 'variable' as const, + range: symbol.range, + selectionRange: symbol.selectionRange, + children: [], + })), + ...roots, + ]; +} diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts new file mode 100644 index 0000000..f000bb1 --- /dev/null +++ b/packages/core/src/parser.ts @@ -0,0 +1,266 @@ +import { DATATYPE_SET } from './languageData'; +import { Range, SourceSpan, sourceRange } from './source'; +import { Token, TokenKind } from './token'; +import { tokenize } from './tokenizer'; + +export type BlockKind = 'if' | 'for' | 'while'; +export type StatementKind = 'dim' | 'call' | 'if' | 'else' | 'endif' | 'for' | 'next' | 'while' | 'unknown'; +export type DiagnosticSeverity = 'error' | 'warning'; + +export interface CoreDiagnostic { + code: string; + message: string; + severity: DiagnosticSeverity; + range: Range; +} + +export interface StatementNode { + kind: StatementKind; + range: Range; + span: SourceSpan; + name?: string; + nameRange?: Range; + datatype?: string; + datatypeRange?: Range; + parentBlockId?: number; +} + +export interface BlockNode { + id: number; + kind: BlockKind; + parentId?: number; + childIds: number[]; + range: Range; + span: SourceSpan; + bodyRange: Range; + bodySpan: SourceSpan; + opener: Range; + middle?: Range; + closer?: Range; +} + +export interface LineStructure { + line: number; + indentDepth: number; + preserveIndent: boolean; +} + +export interface QuickScriptDocument { + source: string; + tokens: Token[]; + statements: StatementNode[]; + blocks: BlockNode[]; + diagnostics: CoreDiagnostic[]; + lines: LineStructure[]; + range: Range; + span: SourceSpan; +} + +interface OpenBlock { + block: BlockNode; + opener: Token; + hasElse: boolean; +} + +function isTrivia(token: Token): boolean { + return token.kind === TokenKind.Whitespace || token.kind === TokenKind.Newline || token.kind === TokenKind.Comment || token.kind === TokenKind.EOF; +} + +function keyword(token: Token | undefined): string | undefined { + return token?.kind === TokenKind.Keyword ? token.lexeme.toUpperCase() : undefined; +} + +function tokenNodeRange(source: string, first: Token, last: Token = first): { span: SourceSpan; range: Range } { + return sourceRange(source, { start: first.span.start, end: last.span.end }); +} + +function diagnostic(code: string, message: string, token: Token): CoreDiagnostic { + return { code, message, severity: 'error', range: token.range }; +} + +function statementKind(value: string): StatementKind { + switch (value) { + case 'DIM': return 'dim'; + case 'CALL': return 'call'; + case 'IF': return 'if'; + case 'ELSE': return 'else'; + case 'ENDIF': return 'endif'; + case 'FOR': return 'for'; + case 'NEXT': return 'next'; + case 'WHILE': return 'while'; + default: return 'unknown'; + } +} + +function lineTokens(tokens: readonly Token[], line: number): Token[] { + return tokens.filter(token => token.range.start.line === line && !isTrivia(token)); +} + +/** Parse recoverable QuickScript structure from the canonical token stream. */ +export function parseQuickScript(source: string): QuickScriptDocument { + const tokens = tokenize(source); + const lineCount = source.length === 0 ? 1 : source.split(/\r\n|\r|\n/).length; + const statements: StatementNode[] = []; + const blocks: BlockNode[] = []; + const diagnostics: CoreDiagnostic[] = []; + const lines: LineStructure[] = []; + const stack: OpenBlock[] = []; + let continuation: { baseDepth: number } | undefined; + + for (let line = 0; line < lineCount; line += 1) { + const significant = lineTokens(tokens, line); + const spanningComment = tokens.some(token => token.kind === TokenKind.Comment + && token.range.end.line > token.range.start.line + && token.range.start.line <= line && token.range.end.line >= line); + let visualDepth = stack.length; + let closesAtStart = false; + const firstKeyword = significant.map(keyword).find(value => value !== undefined); + if (firstKeyword === 'ELSE' || firstKeyword === 'ENDIF' || firstKeyword === 'NEXT') { + visualDepth = Math.max(0, visualDepth - 1); + closesAtStart = true; + } + if (continuation !== undefined) { + visualDepth = continuation.baseDepth + 2; + } + lines.push({ line, indentDepth: visualDepth, preserveIndent: spanningComment }); + + for (let index = 0; index < significant.length; index += 1) { + const token = significant[index]; + const value = keyword(token); + if (value === undefined) { + continue; + } + + if (['DIM', 'CALL', 'IF', 'ELSE', 'ENDIF', 'FOR', 'NEXT', 'WHILE'].includes(value)) { + const startIndex = index; + let last = token; + for (let endIndex = startIndex + 1; endIndex < significant.length && significant[endIndex].lexeme !== ';'; endIndex += 1) { + last = significant[endIndex]; + if (keyword(last) !== undefined && ['IF', 'ELSE', 'ENDIF', 'FOR', 'NEXT', 'WHILE', 'CALL', 'DIM'].includes(keyword(last)!)) { + last = token; + break; + } + } + const located = tokenNodeRange(source, token, last); + const node: StatementNode = { + kind: statementKind(value), + ...located, + parentBlockId: stack[stack.length - 1]?.block.id, + }; + let pushed = false; + if (value === 'DIM') { + const asIndex = significant.findIndex((candidate, candidateIndex) => candidateIndex > startIndex && keyword(candidate) === 'AS'); + const datatype = asIndex >= 0 ? significant[asIndex + 1] : undefined; + for (const name of significant.slice(startIndex + 1, asIndex >= 0 ? asIndex : undefined)) { + if (name.kind === TokenKind.Identifier) { + statements.push({ + ...node, + name: name.lexeme, + nameRange: name.range, + datatype: datatype?.lexeme, + datatypeRange: datatype?.range, + }); + pushed = true; + } + } + } else if (value === 'CALL') { + const target = significant[startIndex + 1]; + if (target?.kind === TokenKind.Identifier) { + node.name = target.lexeme; + node.nameRange = target.range; + } + } + if (!pushed) { + statements.push(node); + } + } + + const previousValue = keyword(significant[index - 1]); + if ((value === 'FOR' || value === 'WHILE') && previousValue === 'EXIT') { + continue; + } + if (value === 'IF' || value === 'FOR' || value === 'WHILE') { + const parent = stack[stack.length - 1]?.block; + const located = tokenNodeRange(source, token); + const block: BlockNode = { + id: blocks.length, + kind: value.toLowerCase() as BlockKind, + parentId: parent?.id, + childIds: [], + ...located, + bodyRange: { start: token.range.end, end: token.range.end }, + bodySpan: { start: token.span.end, end: token.span.end }, + opener: token.range, + }; + blocks.push(block); + parent?.childIds.push(block.id); + stack.push({ block, opener: token, hasElse: false }); + continue; + } + if (value === 'ELSE') { + const open = stack[stack.length - 1]; + if (open?.block.kind !== 'if') { + diagnostics.push(diagnostic('invalid-nesting', 'ELSE has no matching IF.', token)); + } else if (open.hasElse) { + diagnostics.push(diagnostic('duplicate-else', 'IF block has more than one ELSE.', token)); + } else { + open.hasElse = true; + open.block.middle = token.range; + } + continue; + } + if (value === 'ENDIF' || value === 'NEXT') { + const expected = value === 'ENDIF' ? ['if'] : ['for', 'while']; + const open = stack[stack.length - 1]; + if (open === undefined || !expected.includes(open.block.kind)) { + diagnostics.push(diagnostic('invalid-nesting', `${value} has no matching ${value === 'ENDIF' ? 'IF' : 'FOR or WHILE'}.`, token)); + } else { + stack.pop(); + open.block.closer = token.range; + open.block.span.end = token.span.end; + open.block.range.end = token.range.end; + open.block.bodySpan.end = token.span.start; + open.block.bodyRange.end = token.range.start; + } + } + } + + const values = significant.map(keyword); + if (continuation !== undefined && values.includes('THEN')) { + continuation = undefined; + } else if (!closesAtStart && values.includes('IF') && !values.includes('THEN') + && ['AND', 'OR', 'NOT'].includes(values[values.length - 1] ?? '')) { + continuation = { baseDepth: Math.max(0, stack.length - 1) }; + } + } + + for (const open of stack) { + const closer = open.block.kind === 'if' ? 'ENDIF' : 'NEXT'; + diagnostics.push(diagnostic(`missing-${closer.toLowerCase()}`, `${open.block.kind.toUpperCase()} block is missing ${closer}.`, open.opener)); + open.block.span.end = source.length; + open.block.range.end = sourceRange(source, { start: source.length, end: source.length }).range.end; + open.block.bodySpan.end = source.length; + open.block.bodyRange.end = open.block.range.end; + } + + const diagnosedDatatypes = new Set(); + for (const statement of statements.filter(candidate => candidate.kind === 'dim' && candidate.datatype !== undefined)) { + if (!DATATYPE_SET.has(statement.datatype!.toUpperCase())) { + const range = statement.datatypeRange ?? statement.range; + const key = `${range.start.line}:${range.start.character}`; + if (diagnosedDatatypes.has(key)) { + continue; + } + diagnosedDatatypes.add(key); + diagnostics.push({ + code: 'unknown-datatype', + message: `Unknown datatype '${statement.datatype}'.`, + severity: 'error', + range, + }); + } + } + + const documentRange = sourceRange(source, { start: 0, end: source.length }); + return { source, tokens, statements, blocks, diagnostics, lines, ...documentRange }; +} diff --git a/packages/core/src/semantics.ts b/packages/core/src/semantics.ts new file mode 100644 index 0000000..22d08b5 --- /dev/null +++ b/packages/core/src/semantics.ts @@ -0,0 +1,141 @@ +import { CoreDiagnostic, QuickScriptDocument, parseQuickScript } from './parser'; +import { Position, Range, offsetAt } from './source'; +import { Token, TokenKind } from './token'; + +export type SymbolKind = 'variable' | 'call-target'; +export type ReferenceKind = 'declaration' | 'read' | 'write' | 'call'; + +export interface QuickSymbol { + id: number; + name: string; + kind: SymbolKind; + range: Range; + selectionRange: Range; + datatype?: string; + scopeId: number; +} + +export interface QuickReference { + name: string; + kind: ReferenceKind; + range: Range; + declarationId?: number; +} + +export interface Scope { + id: number; + kind: 'document'; + range: Range; + symbolIds: number[]; +} + +export interface SemanticModel { + document: QuickScriptDocument; + scopes: Scope[]; + symbols: QuickSymbol[]; + references: QuickReference[]; + diagnostics: CoreDiagnostic[]; +} + +function contains(range: Range, position: Position): boolean { + return (position.line > range.start.line || (position.line === range.start.line && position.character >= range.start.character)) + && (position.line < range.end.line || (position.line === range.end.line && position.character < range.end.character)); +} + +function precedingSignificant(tokens: readonly Token[], index: number): Token | undefined { + for (let current = index - 1; current >= 0; current -= 1) { + if (![TokenKind.Whitespace, TokenKind.Newline, TokenKind.Comment].includes(tokens[current].kind)) { + return tokens[current]; + } + } + return undefined; +} + +/** Build document-local QuickScript declarations, uses, scopes, and semantic diagnostics. */ +export function analyzeQuickScript(source: string): SemanticModel { + const document = parseQuickScript(source); + const diagnostics = [...document.diagnostics]; + const symbols: QuickSymbol[] = []; + const declarationsByName = new Map(); + + for (const declaration of document.statements.filter(statement => statement.kind === 'dim' && statement.name !== undefined && statement.nameRange !== undefined)) { + const normalized = declaration.name!.toUpperCase(); + const existing = declarationsByName.get(normalized); + if (existing !== undefined) { + diagnostics.push({ + code: 'duplicate-local', + message: `Local variable '${declaration.name}' is already declared.`, + severity: 'error', + range: declaration.nameRange!, + }); + continue; + } + const symbol: QuickSymbol = { + id: symbols.length, + name: declaration.name!, + kind: 'variable', + range: declaration.range, + selectionRange: declaration.nameRange!, + datatype: declaration.datatype, + scopeId: 0, + }; + symbols.push(symbol); + declarationsByName.set(normalized, symbol); + } + + const declarationOffsets = new Map(); + for (const symbol of symbols) { + declarationOffsets.set(offsetAt(source, symbol.selectionRange.start), symbol); + } + const callRanges = new Map(); + for (const call of document.statements.filter(statement => statement.kind === 'call' && statement.name !== undefined && statement.nameRange !== undefined)) { + callRanges.set(offsetAt(source, call.nameRange!.start), call.name!); + } + + const references: QuickReference[] = []; + for (let index = 0; index < document.tokens.length; index += 1) { + const token = document.tokens[index]; + if (token.kind !== TokenKind.Identifier) { + continue; + } + const declaration = declarationOffsets.get(token.span.start); + if (declaration !== undefined) { + references.push({ name: token.lexeme, kind: 'declaration', range: token.range, declarationId: declaration.id }); + continue; + } + const previous = precedingSignificant(document.tokens, index); + if (previous?.lexeme === '.' || previous?.lexeme === '->') { + continue; + } + const resolved = declarationsByName.get(token.lexeme.toUpperCase()); + const callName = callRanges.get(token.span.start); + if (resolved !== undefined || callName !== undefined) { + const next = document.tokens.slice(index + 1).find(candidate => ![TokenKind.Whitespace, TokenKind.Newline, TokenKind.Comment].includes(candidate.kind)); + const kind: ReferenceKind = callName !== undefined ? 'call' : next?.lexeme === '=' ? 'write' : 'read'; + references.push({ name: token.lexeme, kind, range: token.range, declarationId: resolved?.id }); + } + } + + return { + document, + scopes: [{ id: 0, kind: 'document', range: document.range, symbolIds: symbols.map(symbol => symbol.id) }], + symbols, + references, + diagnostics, + }; +} + +export function definitionAt(model: SemanticModel, position: Position): Range | undefined { + const reference = model.references.find(candidate => contains(candidate.range, position)); + return reference?.declarationId === undefined ? undefined : model.symbols[reference.declarationId]?.selectionRange; +} + +export function referencesAt(model: SemanticModel, position: Position, includeDeclaration = true): Range[] { + const occurrence = model.references.find(candidate => contains(candidate.range, position)); + if (occurrence?.declarationId === undefined) { + return []; + } + return model.references + .filter(candidate => candidate.declarationId === occurrence.declarationId && (includeDeclaration || candidate.kind !== 'declaration')) + .map(candidate => candidate.range); +} diff --git a/packages/core/src/tokenizer.ts b/packages/core/src/tokenizer.ts index 965f103..cbd244a 100644 --- a/packages/core/src/tokenizer.ts +++ b/packages/core/src/tokenizer.ts @@ -7,7 +7,7 @@ function isIdentifierStart(character: string | undefined): boolean { } function isIdentifierPart(character: string | undefined): boolean { - return character !== undefined && /[A-Za-z0-9_$#-]/.test(character); + return character !== undefined && /[A-Za-z0-9_$#]/.test(character); } function isDigit(character: string | undefined): boolean { @@ -83,9 +83,7 @@ export function tokenize(source: string): Token[] { if (current === '"') { let end = offset + 1; while (end < source.length && source[end] !== '\r' && source[end] !== '\n') { - if (source[end] === '\\' && end + 1 < source.length && source[end + 1] !== '\r' && source[end + 1] !== '\n') { - end += 2; - } else if (source[end] === '"') { + if (source[end] === '"') { end += 1; break; } else { @@ -128,10 +126,7 @@ export function tokenize(source: string): Token[] { if (isIdentifierStart(current)) { let end = offset + 1; - while (isIdentifierPart(source[end])) { - if (source[end] === '-' && source[end + 1] === '>') { - break; - } + while (isIdentifierPart(source[end]) || (source[end] === '-' && isIdentifierPart(source[end + 1]))) { end += 1; } emit(classifyWord(source.slice(offset, end)), end); diff --git a/packages/core/test/formatter.test.ts b/packages/core/test/formatter.test.ts new file mode 100644 index 0000000..05c38fd --- /dev/null +++ b/packages/core/test/formatter.test.ts @@ -0,0 +1,67 @@ +import * as assert from 'assert'; + +import { formatQuickScript, formatQuickScriptLexically } from '../src/formatter'; + +suite('QuickScript lexical formatter', () => { + test('normalizes tokens while preserving strings and comments', () => { + const string = '"if a==b then {not a comment};"'; + const comment = '{ if a==b then "not a string"; }'; + const result = formatQuickScriptLexically(`dim Value as integer;\nMessageText=${string};\n${comment}`); + + assert.strictEqual(result.text, `DIM Value AS INTEGER;\r\nMessageText = ${string};\r\n${comment}`); + assert.strictEqual(result.changed, true); + }); + + test('keeps dashed identifiers distinct from spaced subtraction', () => { + const result = formatQuickScriptLexically('d- e + SYS-Tag - nextValue;'); + + assert.strictEqual(result.text, 'd - e + SYS-Tag - nextValue;'); + }); + + test('recognizes a closing quote after a trailing path separator', () => { + const result = formatQuickScriptLexically('Path="\\\\share\\"; call Start(Path);'); + + assert.strictEqual(result.text, 'Path = "\\\\share\\"; CALL Start(Path);'); + }); + + test('is idempotent', () => { + const once = formatQuickScriptLexically('if ( Value>=-1 ) then\nLogMessage("a b");\nendif;').text; + const twice = formatQuickScriptLexically(once).text; + + assert.strictEqual(twice, once); + }); + + test('returns normalized but otherwise unchanged malformed source', () => { + const source = 'Message = "unfinished\nIF Value>1 THEN'; + const result = formatQuickScriptLexically(source); + + assert.strictEqual(result.text, 'Message = "unfinished\r\nIF Value>1 THEN'); + }); + + test('uses parser structure for stable indentation', () => { + const source = 'if Ready then\nfor Index=1 to 2\ncall Run(Index);\nnext;\nelse\ncall Stop();\nendif;'; + const once = formatQuickScript(source); + const twice = formatQuickScript(once.text); + + assert.strictEqual(once.text, [ + 'IF Ready THEN', + ' FOR Index = 1 TO 2', + ' CALL Run(Index);', + ' NEXT;', + 'ELSE', + ' CALL Stop();', + 'ENDIF;', + ].join('\r\n')); + assert.strictEqual(twice.text, once.text); + }); + + test('preserves multiline comment blank lines unless explicitly configured', () => { + const source = '{\nfirst\n\n\nsecond\n}\n\n\nValue=1;'; + const preserved = formatQuickScript(source, { allowedNumberOfEmptyLines: 1 }); + const compacted = formatQuickScript(source, { allowedNumberOfEmptyLines: 1, removeEmptyLinesInComments: true }); + + assert.ok(preserved.text.includes('first\r\n\r\n\r\nsecond')); + assert.ok(compacted.text.includes('first\r\n\r\nsecond')); + assert.ok(!compacted.text.includes('first\r\n\r\n\r\nsecond')); + }); +}); diff --git a/packages/core/test/languageService.test.ts b/packages/core/test/languageService.test.ts new file mode 100644 index 0000000..2f2bdc7 --- /dev/null +++ b/packages/core/test/languageService.test.ts @@ -0,0 +1,32 @@ +import * as assert from 'assert'; + +import { completions, documentSymbols, hoverAt } from '../src/languageService'; +import { analyzeQuickScript } from '../src/semantics'; + +suite('QuickScript language service', () => { + const source = 'DIM Counter AS INTEGER;\nIF Counter > 0 THEN\nCALL LogMessage("ok");\nCALL xGatawaySettings();\nENDIF;'; + const model = analyzeQuickScript(source); + + test('offers keywords, datatypes, sourced functions, Hermes helpers, locals, and call targets', () => { + const entries = completions(model); + const byLabel = new Map(entries.map(entry => [entry.label.toUpperCase(), entry])); + + assert.strictEqual(byLabel.get('IF')?.kind, 'keyword'); + assert.strictEqual(byLabel.get('INTEGER')?.kind, 'datatype'); + assert.strictEqual(byLabel.get('LOGMESSAGE')?.kind, 'function'); + assert.strictEqual(byLabel.get('XGATAWAYSETTINGS')?.kind, 'function'); + assert.strictEqual(byLabel.get('COUNTER')?.kind, 'variable'); + }); + + test('returns hover only for facts backed by language or document data', () => { + assert.strictEqual(hoverAt(model, { line: 0, character: 5 })?.detail, 'Local INTEGER variable'); + assert.match(hoverAt(model, { line: 2, character: 8 })?.detail ?? '', /IT-functions/); + assert.strictEqual(hoverAt(analyzeQuickScript('UnknownName;'), { line: 0, character: 2 }), undefined); + }); + + test('builds variable and hierarchical block symbols', () => { + const symbols = documentSymbols(model); + + assert.deepStrictEqual(symbols.map(symbol => symbol.kind), ['variable', 'if']); + }); +}); diff --git a/packages/core/test/parser.test.ts b/packages/core/test/parser.test.ts new file mode 100644 index 0000000..14dc6e0 --- /dev/null +++ b/packages/core/test/parser.test.ts @@ -0,0 +1,57 @@ +import * as assert from 'assert'; + +import { parseQuickScript } from '../src/parser'; + +suite('QuickScript structure parser', () => { + test('builds nested IF and FOR blocks with parent-child ranges', () => { + const source = 'IF Ready THEN\nFOR Index = 1 TO 2\nCALL Run(Index);\nNEXT;\nELSE\nCALL Stop();\nENDIF;'; + const document = parseQuickScript(source); + + assert.deepStrictEqual(document.blocks.map(block => block.kind), ['if', 'for']); + assert.strictEqual(document.blocks[1].parentId, document.blocks[0].id); + assert.deepStrictEqual(document.blocks[0].childIds, [document.blocks[1].id]); + assert.ok(document.blocks.every(block => block.closer !== undefined)); + assert.deepStrictEqual(document.lines.map(line => line.indentDepth), [0, 1, 2, 1, 0, 1, 0]); + assert.deepStrictEqual(document.diagnostics, []); + }); + + test('recovers from invalid nesting and reports missing closers', () => { + const document = parseQuickScript('IF Ready THEN\nFOR Index = 1 TO 2\nENDIF;'); + + assert.ok(document.diagnostics.some(item => item.code === 'invalid-nesting')); + assert.ok(document.diagnostics.some(item => item.code === 'missing-endif')); + assert.ok(document.diagnostics.some(item => item.code === 'missing-next')); + }); + + test('parses DIM and CALL statements and diagnoses unknown datatypes', () => { + const document = parseQuickScript('DIM Counter AS INTEGER;\nDIM Broken AS Bogus;\nCALL Start(Counter);'); + const declarations = document.statements.filter(statement => statement.kind === 'dim'); + const call = document.statements.find(statement => statement.kind === 'call'); + + assert.deepStrictEqual(declarations.map(statement => [statement.name, statement.datatype]), [ + ['Counter', 'INTEGER'], + ['Broken', 'Bogus'], + ]); + assert.strictEqual(call?.name, 'Start'); + assert.ok(document.diagnostics.some(item => item.code === 'unknown-datatype')); + }); + + test('does not treat EXIT FOR as an opener', () => { + const document = parseQuickScript('FOR Index = 1 TO 2\nIF Done THEN EXIT FOR; ENDIF;\nNEXT;'); + + assert.deepStrictEqual(document.blocks.map(block => block.kind), ['for', 'if']); + assert.deepStrictEqual(document.diagnostics, []); + }); + + test('supports multiple DIM names and repository-evidenced WHILE/NEXT blocks', () => { + const document = parseQuickScript('DIM First, Second AS REAL;\nWHILE First < Second\nFirst = First + 1;\nNEXT;'); + + assert.deepStrictEqual( + document.statements.filter(statement => statement.kind === 'dim').map(statement => statement.name), + ['First', 'Second'], + ); + assert.strictEqual(document.blocks[0].kind, 'while'); + assert.deepStrictEqual(document.lines.map(line => line.indentDepth), [0, 0, 1, 0]); + assert.deepStrictEqual(document.diagnostics, []); + }); +}); diff --git a/packages/core/test/semantics.test.ts b/packages/core/test/semantics.test.ts new file mode 100644 index 0000000..1e2c5c3 --- /dev/null +++ b/packages/core/test/semantics.test.ts @@ -0,0 +1,28 @@ +import * as assert from 'assert'; + +import { analyzeQuickScript, definitionAt, referencesAt } from '../src/semantics'; + +suite('QuickScript semantic model', () => { + test('resolves document-local DIM declarations case-insensitively', () => { + const source = 'DIM Counter AS INTEGER;\nCounter = counter + 1;\nCALL Report(Counter);'; + const model = analyzeQuickScript(source); + + assert.deepStrictEqual(model.symbols.map(symbol => [symbol.name, symbol.datatype]), [['Counter', 'INTEGER']]); + assert.strictEqual(model.references.filter(reference => reference.declarationId === 0).length, 4); + assert.deepStrictEqual(definitionAt(model, { line: 1, character: 12 }), model.symbols[0].selectionRange); + assert.strictEqual(referencesAt(model, { line: 0, character: 5 }).length, 4); + }); + + test('reports duplicate local DIM declarations', () => { + const model = analyzeQuickScript('DIM Value AS REAL;\nDIM value AS REAL;'); + + assert.ok(model.diagnostics.some(item => item.code === 'duplicate-local')); + }); + + test('does not guess definitions for unknown names or member accesses', () => { + const model = analyzeQuickScript('DIM Value AS REAL;\nObject.Value = Unknown;'); + + assert.strictEqual(definitionAt(model, { line: 1, character: 7 }), undefined); + assert.strictEqual(definitionAt(model, { line: 1, character: 15 }), undefined); + }); +}); diff --git a/packages/core/test/tokenizer.test.ts b/packages/core/test/tokenizer.test.ts index 09d67f5..4e0c07b 100644 --- a/packages/core/test/tokenizer.test.ts +++ b/packages/core/test/tokenizer.test.ts @@ -56,12 +56,12 @@ suite('QuickScript tokenizer', () => { }); test('keeps syntax-looking text inside strings and comments', () => { - const source = 'Empty = ""; Message = "IF {not a comment} \\"quoted\\""; { IF a >= 1 }\n\' NEXT is a comment'; + const source = 'Empty = ""; Message = "IF {not a comment} then"; { IF a >= 1 }\n\' NEXT is a comment'; const tokens = tokenize(source); assert.deepStrictEqual( tokens.filter(token => token.kind === TokenKind.String).map(token => token.lexeme), - ['""', '"IF {not a comment} \\"quoted\\""'], + ['""', '"IF {not a comment} then"'], ); assert.deepStrictEqual( tokens.filter(token => token.kind === TokenKind.Comment).map(token => token.lexeme), diff --git a/packages/language-server/package.json b/packages/language-server/package.json new file mode 100644 index 0000000..a51e47b --- /dev/null +++ b/packages/language-server/package.json @@ -0,0 +1,12 @@ +{ + "name": "@intouch-language/language-server", + "private": true, + "description": "Editor-independent QuickScript language server", + "main": "../../../out/language-server/src/server.js", + "types": "../../../out/language-server/src/server.d.ts", + "dependencies": { + "@intouch-language/core": "*", + "vscode-languageserver": "^10.1.0", + "vscode-languageserver-textdocument": "^1.0.12" + } +} diff --git a/packages/language-server/src/features.ts b/packages/language-server/src/features.ts new file mode 100644 index 0000000..c6ef3e4 --- /dev/null +++ b/packages/language-server/src/features.ts @@ -0,0 +1,108 @@ +import { + CompletionItem, + CompletionItemKind, + Diagnostic, + DiagnosticSeverity, + DocumentSymbol, + Hover, + InitializeResult, + Location, + Position, + Range, + SymbolKind, + TextEdit, + TextDocumentSyncKind, +} from 'vscode-languageserver/node'; +import { TextDocument } from 'vscode-languageserver-textdocument'; +import { + FormatOptions, + analyzeQuickScript, + completions, + definitionAt, + documentSymbols, + formatQuickScript, + hoverAt, + referencesAt, +} from '@intouch-language/core'; + +export type ServerSettings = FormatOptions; + +export function serverCapabilities(): InitializeResult { + return { + capabilities: { + textDocumentSync: TextDocumentSyncKind.Incremental, + documentFormattingProvider: true, + documentSymbolProvider: true, + definitionProvider: true, + referencesProvider: true, + completionProvider: { resolveProvider: false }, + hoverProvider: true, + }, + }; +} + +function completionKind(kind: string): CompletionItemKind { + switch (kind) { + case 'keyword': return CompletionItemKind.Keyword; + case 'datatype': return CompletionItemKind.TypeParameter; + case 'variable': return CompletionItemKind.Variable; + case 'call-target': return CompletionItemKind.Method; + default: return CompletionItemKind.Function; + } +} + +export function diagnosticsFor(document: TextDocument): Diagnostic[] { + return analyzeQuickScript(document.getText()).diagnostics.map(item => ({ + code: item.code, + message: item.message, + range: item.range, + severity: item.severity === 'error' ? DiagnosticSeverity.Error : DiagnosticSeverity.Warning, + source: 'intouch-language', + })); +} + +export function formattingEdits(document: TextDocument, settings: ServerSettings): TextEdit[] { + const result = formatQuickScript(document.getText(), settings); + if (!result.changed) { + return []; + } + return [TextEdit.replace(Range.create(Position.create(0, 0), document.positionAt(document.getText().length)), result.text)]; +} + +export function symbolsFor(document: TextDocument): DocumentSymbol[] { + const convert = (entry: ReturnType[number]): DocumentSymbol => DocumentSymbol.create( + entry.name, + undefined, + entry.kind === 'variable' ? SymbolKind.Variable : SymbolKind.Struct, + entry.range, + entry.selectionRange, + entry.children.map(convert), + ); + return documentSymbols(analyzeQuickScript(document.getText())).map(convert); +} + +export function definitionFor(document: TextDocument, position: Position): Location | undefined { + const range = definitionAt(analyzeQuickScript(document.getText()), position); + return range === undefined ? undefined : Location.create(document.uri, range); +} + +export function referencesFor(document: TextDocument, position: Position, includeDeclaration: boolean): Location[] { + return referencesAt(analyzeQuickScript(document.getText()), position, includeDeclaration) + .map(range => Location.create(document.uri, range)); +} + +export function completionsFor(document: TextDocument): CompletionItem[] { + return completions(analyzeQuickScript(document.getText())).map(entry => ({ + label: entry.label, + kind: completionKind(entry.kind), + detail: entry.detail, + })); +} + +export function hoverFor(document: TextDocument, position: Position): Hover | undefined { + const hover = hoverAt(analyzeQuickScript(document.getText()), position); + return hover === undefined ? undefined : { + contents: { kind: 'markdown', value: `**${hover.label}**\n\n${hover.detail}` }, + range: hover.range, + }; +} diff --git a/packages/language-server/src/server.ts b/packages/language-server/src/server.ts new file mode 100644 index 0000000..fa84a19 --- /dev/null +++ b/packages/language-server/src/server.ts @@ -0,0 +1,67 @@ +import { + ProposedFeatures, + createConnection, +} from 'vscode-languageserver/node'; +import { TextDocument } from 'vscode-languageserver-textdocument'; +import { TextDocuments } from 'vscode-languageserver'; + +import { + ServerSettings, + completionsFor, + definitionFor, + diagnosticsFor, + formattingEdits, + hoverFor, + referencesFor, + serverCapabilities, + symbolsFor, +} from './features'; +import { readSettings } from './settings'; + +const connection = createConnection(ProposedFeatures.all); +const documents = new TextDocuments(TextDocument); +let settings: ServerSettings = {}; + +connection.onInitialize(() => serverCapabilities()); +connection.onDidChangeConfiguration(change => { + settings = readSettings(change.settings); + for (const document of documents.all()) { + connection.sendDiagnostics({ uri: document.uri, diagnostics: diagnosticsFor(document) }); + } +}); +documents.onDidOpen(change => connection.sendDiagnostics({ uri: change.document.uri, diagnostics: diagnosticsFor(change.document) })); +documents.onDidChangeContent(change => connection.sendDiagnostics({ uri: change.document.uri, diagnostics: diagnosticsFor(change.document) })); +documents.onDidClose(change => connection.sendDiagnostics({ uri: change.document.uri, diagnostics: [] })); + +connection.onDocumentFormatting(params => { + const document = documents.get(params.textDocument.uri); + return document === undefined ? [] : formattingEdits(document, { + ...settings, + insertSpaces: params.options.insertSpaces, + indentSize: params.options.tabSize, + }); +}); +connection.onDocumentSymbol(params => { + const document = documents.get(params.textDocument.uri); + return document === undefined ? [] : symbolsFor(document); +}); +connection.onDefinition(params => { + const document = documents.get(params.textDocument.uri); + return document === undefined ? undefined : definitionFor(document, params.position); +}); +connection.onReferences(params => { + const document = documents.get(params.textDocument.uri); + return document === undefined ? [] : referencesFor(document, params.position, params.context.includeDeclaration); +}); +connection.onCompletion(params => { + const document = documents.get(params.textDocument.uri); + return document === undefined ? [] : completionsFor(document); +}); +connection.onHover(params => { + const document = documents.get(params.textDocument.uri); + return document === undefined ? undefined : hoverFor(document, params.position); +}); +connection.onShutdown(() => undefined); + +documents.listen(connection); +connection.listen(); diff --git a/packages/language-server/src/settings.ts b/packages/language-server/src/settings.ts new file mode 100644 index 0000000..996eed1 --- /dev/null +++ b/packages/language-server/src/settings.ts @@ -0,0 +1,40 @@ +import { ServerSettings } from './features'; + +function asRecord(candidate: unknown): Record { + return typeof candidate === 'object' && candidate !== null ? candidate as Record : {}; +} + +function numberValue(candidate: unknown): number | undefined { + return typeof candidate === 'number' ? candidate : undefined; +} + +function booleanValue(candidate: unknown): boolean | undefined { + return typeof candidate === 'boolean' ? candidate : undefined; +} + +function stringValue(candidate: unknown): string | undefined { + return typeof candidate === 'string' ? candidate : undefined; +} + +export function readSettings(value: unknown): ServerSettings { + const root = asRecord(value); + const vbi = root.VBI === undefined ? root : asRecord(root.VBI); + const formatter = asRecord(vbi.formatter); + const emptyLine = asRecord(formatter.EmptyLine); + const block = asRecord(formatter.BC); + const region = asRecord(formatter.Region); + const misc = asRecord(formatter.Misc); + return { + allowedNumberOfEmptyLines: numberValue(emptyLine.allowedNumberOfEmptyLines), + removeEmptyLines: booleanValue(emptyLine.RemoveEmptyLines), + removeEmptyLinesInComments: booleanValue(emptyLine.EmptyLinesAlsoInComment), + blockCodeBegin: stringValue(block.BlockCodeBegin), + blockCodeEnd: stringValue(block.BlockCodeEnd), + blockCodeExclude: stringValue(block.BlockCodeExclude), + regionBlockCodeBegin: stringValue(region.BlockCodeBegin), + regionBlockCodeEnd: stringValue(region.BlockCodeEnd), + regionBlockCodeExclude: stringValue(region.BlockCodeExclude), + insertSpaces: booleanValue(misc.ReplaceTabToSpaces), + indentSize: numberValue(misc.IndentSize), + }; +} diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts new file mode 100644 index 0000000..184adc3 --- /dev/null +++ b/packages/language-server/test/features.test.ts @@ -0,0 +1,77 @@ +import * as assert from 'assert'; + +import { TextDocument } from 'vscode-languageserver-textdocument'; + +import { + completionsFor, + definitionFor, + diagnosticsFor, + formattingEdits, + hoverFor, + referencesFor, + serverCapabilities, + symbolsFor, +} from '../src/features'; +import { readSettings } from '../src/settings'; + +suite('QuickScript language server features', () => { + const document = TextDocument.create( + 'file:///sample.vbi', + 'intouch', + 1, + 'DIM Counter AS INTEGER;\nIF Counter>0 THEN\nCALL LogMessage("ok");\nENDIF;', + ); + + test('advertises the required protocol capabilities', () => { + const capabilities = serverCapabilities().capabilities; + + assert.strictEqual(capabilities.documentFormattingProvider, true); + assert.strictEqual(capabilities.documentSymbolProvider, true); + assert.strictEqual(capabilities.definitionProvider, true); + assert.strictEqual(capabilities.referencesProvider, true); + assert.strictEqual(capabilities.hoverProvider, true); + assert.ok(capabilities.completionProvider); + }); + + test('serves formatting, symbols, navigation, completion, hover, and diagnostics', () => { + assert.strictEqual(formattingEdits(document, { indentSize: 2 }).length, 1); + assert.ok(symbolsFor(document).some(symbol => symbol.name === 'Counter')); + assert.strictEqual(definitionFor(document, { line: 1, character: 4 })?.uri, document.uri); + assert.ok(referencesFor(document, { line: 0, character: 5 }, true).length >= 2); + assert.ok(completionsFor(document).some(item => item.label === 'LogMessage')); + assert.ok(hoverFor(document, { line: 2, character: 8 })); + assert.deepStrictEqual(diagnosticsFor(document), []); + }); + + test('publishes parser and semantic diagnostics', () => { + const broken = TextDocument.create('file:///broken.vi', 'intouch', 1, 'DIM A AS Bogus;\nDIM a AS REAL;\nIF A THEN'); + const codes = diagnosticsFor(broken).map(item => item.code); + + assert.ok(codes.includes('unknown-datatype')); + assert.ok(codes.includes('duplicate-local')); + assert.ok(codes.includes('missing-endif')); + }); + + test('maps nested VS Code formatter settings to core options', () => { + const settings = readSettings({ VBI: { formatter: { + EmptyLine: { allowedNumberOfEmptyLines: 2, RemoveEmptyLines: true, EmptyLinesAlsoInComment: true }, + BC: { BlockCodeBegin: '{begin', BlockCodeEnd: '{end', BlockCodeExclude: '{back' }, + Region: { BlockCodeBegin: '{r', BlockCodeEnd: '{/r', BlockCodeExclude: '{rb' }, + Misc: { ReplaceTabToSpaces: false, IndentSize: 3 }, + } } }); + + assert.deepStrictEqual(settings, { + allowedNumberOfEmptyLines: 2, + removeEmptyLines: true, + removeEmptyLinesInComments: true, + blockCodeBegin: '{begin', + blockCodeEnd: '{end', + blockCodeExclude: '{back', + regionBlockCodeBegin: '{r', + regionBlockCodeEnd: '{/r', + regionBlockCodeExclude: '{rb', + insertSpaces: false, + indentSize: 3, + }); + }); +}); diff --git a/packages/language-server/test/protocol.test.ts b/packages/language-server/test/protocol.test.ts new file mode 100644 index 0000000..564d909 --- /dev/null +++ b/packages/language-server/test/protocol.test.ts @@ -0,0 +1,85 @@ +import * as assert from 'assert'; +import { ChildProcessWithoutNullStreams, spawn } from 'child_process'; +import * as path from 'path'; + +import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from 'vscode-jsonrpc/node'; +import { CompletionItem, InitializeResult } from 'vscode-languageserver/node'; + +suite('QuickScript language server protocol', () => { + test('handles lifecycle, synchronization, and representative requests without VS Code', async function () { + this.timeout(10_000); + const serverPath = path.resolve(__dirname, '../src/server.js'); + const environment = { ...process.env }; + delete environment.ELECTRON_RUN_AS_NODE; + const child: ChildProcessWithoutNullStreams = spawn(process.execPath, [serverPath, '--stdio'], { + env: environment, + stdio: ['pipe', 'pipe', 'pipe'], + }); + let stderr = ''; + child.stderr.on('data', chunk => { stderr += chunk.toString(); }); + const connection = createMessageConnection(new StreamMessageReader(child.stdout), new StreamMessageWriter(child.stdin)); + connection.listen(); + + try { + const initialize = await connection.sendRequest('initialize', { + processId: null, + rootUri: null, + capabilities: {}, + workspaceFolders: null, + }); + assert.strictEqual((initialize as InitializeResult).capabilities.documentFormattingProvider, true); + connection.sendNotification('initialized', {}); + + const uri = 'file:///protocol-smoke.vbi'; + connection.sendNotification('textDocument/didOpen', { + textDocument: { + uri, + languageId: 'intouch', + version: 1, + text: 'DIM Counter AS INTEGER;\nIF Counter>0 THEN\nCALL LogMessage("ok");\nENDIF;', + }, + }); + connection.sendNotification('textDocument/didChange', { + textDocument: { uri, version: 2 }, + contentChanges: [{ + text: 'DIM Counter AS INTEGER;\nDIM Updated AS REAL;\nIF Counter>0 THEN\nCALL LogMessage("ok");\nENDIF;', + }], + }); + + const edits = await connection.sendRequest('textDocument/formatting', { + textDocument: { uri }, + options: { tabSize: 4, insertSpaces: true }, + }); + assert.ok(Array.isArray(edits) && edits.length === 1); + + const completion = await connection.sendRequest('textDocument/completion', { + textDocument: { uri }, + position: { line: 3, character: 6 }, + }); + assert.ok(Array.isArray(completion) && (completion as CompletionItem[]).some(item => item.label === 'LogMessage')); + assert.ok(Array.isArray(completion) && (completion as CompletionItem[]).some(item => item.label === 'Updated')); + + const hover = await connection.sendRequest('textDocument/hover', { + textDocument: { uri }, + position: { line: 3, character: 8 }, + }); + assert.ok(hover); + + await connection.sendRequest('shutdown'); + connection.sendNotification('exit'); + await new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error(`Language server did not exit. ${stderr}`)), 3_000); + child.once('exit', code => { + clearTimeout(timeout); + if (code === 0) resolve(); + else reject(new Error(`Language server exited with ${code}. ${stderr}`)); + }); + }); + } finally { + connection.dispose(); + if (!child.killed && child.exitCode === null) { + child.kill(); + } + } + }); +}); diff --git a/packages/language-server/tsconfig.json b/packages/language-server/tsconfig.json new file mode 100644 index 0000000..ec44c41 --- /dev/null +++ b/packages/language-server/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "declaration": true, + "lib": ["es2021"], + "module": "Node16", + "moduleResolution": "Node16", + "outDir": "../../out/language-server", + "rootDir": ".", + "sourceMap": true, + "strict": true, + "target": "es2021", + "types": ["mocha", "node"] + }, + "include": ["src/**/*.ts", "test/**/*.ts"] +} diff --git a/scripts/generate-language-data.js b/scripts/generate-language-data.js new file mode 100644 index 0000000..5313eef --- /dev/null +++ b/scripts/generate-language-data.js @@ -0,0 +1,58 @@ +const fs = require('fs'); +const path = require('path'); + +const projectRoot = path.resolve(__dirname, '..'); +const grammarPath = path.join(projectRoot, 'syntaxes', 'intouch.tmLanguage.json'); +const outputPath = path.join(projectRoot, 'packages', 'core', 'src', 'generatedFunctionCatalog.ts'); +const grammar = JSON.parse(fs.readFileSync(grammarPath, 'utf8')); + +function namesFromPattern(pattern) { + const expression = pattern.match; + if (typeof expression !== 'string') { + return []; + } + const start = expression.indexOf('\\b('); + const end = start < 0 ? -1 : expression.indexOf(')\\b', start + 3); + if (start < 0 || end < 0) { + return []; + } + return expression.slice(start + 3, end).split('|').filter(name => /^[A-Za-z_$#][A-Za-z0-9_$#-]*$/.test(name)); +} + +const rows = new Map(); +for (const [repositoryName, repository] of Object.entries(grammar.repository ?? {})) { + for (const pattern of repository.patterns ?? []) { + const sourceComment = typeof pattern.comment === 'string' ? pattern.comment : ''; + const isFunction = /function/i.test(pattern.name ?? '') || /function/i.test(sourceComment) + || repositoryName === 'HermesKeywords'; + if (!isFunction) { + continue; + } + const category = repositoryName === 'HermesKeywords' ? 'Hermes helper' : sourceComment || 'InTouch function'; + for (const name of namesFromPattern(pattern)) { + const key = name.toUpperCase(); + if (!rows.has(key)) { + rows.set(key, { name, category, sourceComment }); + } + } + } +} + +const functions = [...rows.values()].sort((left, right) => left.name.localeCompare(right.name, 'en', { sensitivity: 'base' })); +const generated = [ + '// Generated from syntaxes/intouch.tmLanguage.json by scripts/generate-language-data.js.', + '// Do not edit this file manually.', + '', + "export interface KnownFunction {", + "\tname: string;", + "\tcategory: string;", + "\tsourceComment: string;", + "}", + '', + `export const KNOWN_FUNCTIONS: readonly KnownFunction[] = ${JSON.stringify(functions, null, '\t')} as const;`, + '', +].join('\n'); + +if (!fs.existsSync(outputPath) || fs.readFileSync(outputPath, 'utf8') !== generated) { + fs.writeFileSync(outputPath, generated, 'utf8'); +} diff --git a/scripts/update-fixtures.js b/scripts/update-fixtures.js index ce0f3e8..719f79f 100644 --- a/scripts/update-fixtures.js +++ b/scripts/update-fixtures.js @@ -5,13 +5,13 @@ const path = require("path"); // Use pure pipeline from compiled sources (no vscode dependency) let pure; try { - pure = require('../out/formatCore'); + pure = require('@intouch-language/core'); } catch (e) { console.error('Could not load out/formatCore.js. Run npm run compile first.', e); process.exit(1); } -function getConfigFallback() { return { allowedNumberOfEmptyLines:1, RemoveEmptyLines:true, EmptyLinesAlsoInComment:false, BlockCodeBegin:'{>', BlockCodeEnd:'{<', BlockCodeExclude:'{#', RegionBlockCodeBegin:'{region', RegionBlockCodeEnd:'{endregion', RegionBlockCodeExclude:'{#', FormatAlsoInComment:false }; } +function getConfigFallback() { return { allowedNumberOfEmptyLines:1, removeEmptyLines:true, removeEmptyLinesInComments:false, blockCodeBegin:'{>', blockCodeEnd:'{<', blockCodeExclude:'{#', regionBlockCodeBegin:'{region', regionBlockCodeEnd:'{endregion', regionBlockCodeExclude:'{#', insertSpaces:true, indentSize:4 }; } (function main() { try { const config = getConfigFallback(); @@ -26,19 +26,7 @@ function getConfigFallback() { return { allowedNumberOfEmptyLines:1, RemoveEmpty const testPath = path.join(baseDir, testFile); const expectedPath = path.join(baseDir, testFile.replace('.test.vbi', '.tobe.vbi')); const input = fs.readFileSync(testPath, 'utf8'); - // full pipeline (mirror formats.fixtures.test.ts) - let stage2 = pure.pureFormatPipeline(input, config); - const nEL = (config.allowedNumberOfEmptyLines || 1) + 1.0; - if (config.RemoveEmptyLines) { - let regex; - if (config.EmptyLinesAlsoInComment) { - regex = new RegExp(`(?![^{]*})(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - else { - regex = new RegExp(`(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - stage2 = stage2.replace(regex, '\r\n'); - } + const stage2 = pure.formatQuickScript(input, config).text; if (fs.existsSync(expectedPath)) { const old = fs.readFileSync(expectedPath, 'utf8'); if (old !== stage2) { @@ -59,4 +47,4 @@ function getConfigFallback() { return { allowedNumberOfEmptyLines:1, RemoveEmpty process.exit(1); } })(); -//# sourceMappingURL=update-fixtures.js.map \ No newline at end of file +//# sourceMappingURL=update-fixtures.js.map diff --git a/scripts/update-fixtures.ts b/scripts/update-fixtures.ts index e71f62a..5a6bb2a 100644 --- a/scripts/update-fixtures.ts +++ b/scripts/update-fixtures.ts @@ -1,46 +1,38 @@ import * as fs from 'fs'; import * as path from 'path'; -const fo = require('../src/formats'); -const functions = require('../src/functions'); -(async function main(){ - const config = functions.getConfig(); - const baseDir = path.join(__dirname,'..','src','test','suite','testfiles'); - if(!fs.existsSync(baseDir)){ - console.error('testfiles directory not found:', baseDir); - process.exit(1); - } - const entries = fs.readdirSync(baseDir).filter(f=>f.endsWith('.test.vbi')); - let changed = 0; - for(const testFile of entries){ - const testPath = path.join(baseDir,testFile); - const expectedPath = path.join(baseDir,testFile.replace('.test.vbi','.tobe.vbi')); - const input = fs.readFileSync(testPath,'utf8'); - // full pipeline (mirror formats.fixtures.test.ts) - let stage1 = fo.forFormat(input, config); - let stage2 = fo.formatNestings(stage1, config); - const nEL: number = (config.allowedNumberOfEmptyLines || 1) + 1.0; - if (config.RemoveEmptyLines) { - let regex: RegExp; - if (config.EmptyLinesAlsoInComment) { - regex = new RegExp(`(?![^{]*})(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } else { - regex = new RegExp(`(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - stage2 = stage2.replace(regex, '\r\n'); - } - if(fs.existsSync(expectedPath)){ - const old = fs.readFileSync(expectedPath,'utf8'); - if(old !== stage2){ - fs.writeFileSync(expectedPath, stage2, 'utf8'); - console.log('Updated fixture:', path.basename(expectedPath)); - changed++; - } - }else{ - fs.writeFileSync(expectedPath, stage2, 'utf8'); - console.log('Created missing fixture:', path.basename(expectedPath)); - changed++; - } - } - console.log(`Fixture update complete. Changed: ${changed}`); +import { FormatOptions, formatQuickScript } from '@intouch-language/core'; + +const config: FormatOptions = { + allowedNumberOfEmptyLines: 1, + removeEmptyLines: true, + removeEmptyLinesInComments: false, + blockCodeBegin: '{>', + blockCodeEnd: '{<', + blockCodeExclude: '{#', + regionBlockCodeBegin: '{region', + regionBlockCodeEnd: '{endregion', + regionBlockCodeExclude: '{#', + insertSpaces: true, + indentSize: 4, +}; + +(function main(): void { + const baseDir = path.join(__dirname, '..', 'src', 'test', 'suite', 'testfiles'); + if (!fs.existsSync(baseDir)) { + throw new Error(`testfiles directory not found: ${baseDir}`); + } + const entries = fs.readdirSync(baseDir).filter(file => file.endsWith('.test.vbi')); + let changed = 0; + for (const testFile of entries) { + const testPath = path.join(baseDir, testFile); + const expectedPath = path.join(baseDir, testFile.replace('.test.vbi', '.tobe.vbi')); + const formatted = formatQuickScript(fs.readFileSync(testPath, 'utf8'), config).text; + if (!fs.existsSync(expectedPath) || fs.readFileSync(expectedPath, 'utf8') !== formatted) { + fs.writeFileSync(expectedPath, formatted, 'utf8'); + console.log(`${fs.existsSync(expectedPath) ? 'Updated' : 'Created'} fixture:`, path.basename(expectedPath)); + changed += 1; + } + } + console.log(`Fixture update complete. Changed: ${changed}`); })(); diff --git a/src/const.ts b/src/const.ts deleted file mode 100644 index 2f1a3ab..0000000 --- a/src/const.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Character Constants -export const TAB = "\t"; -export const CR = "\r"; -export const LF = "\n"; -export const CRLF = "\r\n"; -export const DQUOTE = '\"'; -export const SQUOTE = "\'"; -export const BACKSLASH = "\\"; - - -export const FORMATS: string[] = [TAB, CR, LF, CRLF, DQUOTE, SQUOTE, BACKSLASH]; -export const SINGLE_OPERATORS: string[] = ['=', '+', '-', '<', '>', '*', '/', '%', '!', '~', '|']; -// export const SINGLE_OPERATORS: string[] = ['=', '+', '<', '>', '*', '/', '%', '!', '~', '|'];//23.01.2022 remove - as single Operator, because it can be used in variables -// BUGFIX 2025-09-25: '=>" was mistakenly defined instead of '>=' which caused -// the formatter to produce '> =' (separating '>' and '='). Corrected to '>='. -export const DOUBLE_OPERATORS: string[] = ['==', '<>', '<=', '>=']; -export const NO_SPACE_ITEMS: string[] = ['(', ')', '[', ']', ';']; -export const TRENNER: string[] = [';', ' ']; - - -export const KEYWORDS: string[] = [ - "NULL", "EOF", "AS", "IF", "ENDIF", "ELSE", "WHILE", "FOR", "next", "DIM", "THEN", - "EXIT", "EACH", "STEP", "IN", "RETURN", "CALL", "MOD", "AND", "NOT", "IS", - "OR", "XOR", "Abs", "TO", "SHL", "SHR", "discrete", "integer", "real", "message", - // Added math / intrinsic style functions for uppercasing in formatter 2025-09-25 - "sqr", "sin", "cos", "tan", "atn", "exp", "log", "int", "frac", "round", "rnd", "sqrt" -]; - -/* Misk keywords from .json - MOD|AND|NOT|IS|OR|XOR|Abs|TO|SHL|SHR - IF|ENDIF|ELSE|WHILE|FOR|NEXT|DIM|THEN|EXIT|EACH|STEP|IN|RETURN|CALL - NULL|EOF|AS|True|False - discrete|integer|real|message -*/ - -const gm_TAB_NOT_IN_COMMENT = new RegExp(/(?![^{]*})\t/, 'gm'); -const gm_MOR_1_WSP = new RegExp(/\s{1,}/, 'gm'); //more then one whitespace -const gm_MOR_2_WSP = new RegExp(/\s{2,}/, 'gm'); //more then two whitespace -const gm_MOR_2_WSP_NO_TAB = new RegExp(/\s{2,}(?\/\?\s]+)/, 'gm'); -const gm_GET_ALL_Numbers = new RegExp(/-?\d*\d/, 'gm'); - -export const REGEX = { - gm_TAB_NOT_IN_COMMENT, - gm_MOR_1_WSP, - gm_MOR_2_WSP, - g_CHECK_OPEN_COMMENT, - g_CHECK_CLOSE_COMMENT, - gm_GET_NESTING, - gm_GET_STRING, - gm_GET_WSP_IN_STRING, - gm_MOR_2_WSP_NO_TAB, - gm_GET_ALL_WORDS, - gm_GET_ALL_Numbers -}; \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 54e5419..7707093 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,32 +1,41 @@ 'use strict'; +import * as path from 'path'; import * as vscode from 'vscode'; -import { formatTE } from './functions'; +import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient/node'; -export function activate(context: vscode.ExtensionContext) { - vscode.commands.registerCommand('vbi-format', () => { - const { activeTextEditor } = vscode.window; - if (activeTextEditor) { - //&& activeTextEditor.document.languageId === 'intouch' - const { document } = activeTextEditor; - let start = new vscode.Position(0, 0); - let end = new vscode.Position(document.lineCount - 1, document.lineAt(document.lineCount - 1).text.length); - let r = new vscode.Range(start, end); - return formatTE(r); - } - }); +let client: LanguageClient | undefined; - //https://vscode-docs.readthedocs.io/en/latest/extensionAPI/vscode-api/ - vscode.languages.registerDocumentFormattingEditProvider({ scheme: 'file', language: 'intouch' }, { - provideDocumentFormattingEdits(document: vscode.TextDocument): vscode.TextEdit[] { - const { activeTextEditor } = vscode.window; - let start = new vscode.Position(0, 0); - let end = new vscode.Position(document.lineCount - 1, document.lineAt(document.lineCount - 1).text.length); - let r = new vscode.Range(start, end); - return formatTE(r); - } - }); +export async function activate(context: vscode.ExtensionContext): Promise { + const serverModule = context.asAbsolutePath(path.join('dist', 'server.js')); + const serverOptions: ServerOptions = { + run: { module: serverModule, transport: TransportKind.ipc }, + debug: { module: serverModule, transport: TransportKind.ipc }, + }; + const clientOptions: LanguageClientOptions = { + documentSelector: [ + { scheme: 'file', language: 'intouch' }, + { scheme: 'untitled', language: 'intouch' }, + ], + synchronize: { configurationSection: 'VBI' }, + }; + + client = new LanguageClient( + 'intouchLanguageServer', + 'InTouch QuickScript Language Server', + serverOptions, + clientOptions, + ); + context.subscriptions.push(client); + context.subscriptions.push(vscode.commands.registerCommand('vbi-format', async () => { + await vscode.commands.executeCommand('editor.action.formatDocument'); + })); + await client.start(); } -//It will be invoked on deactivation -export function deactivate() { } +export async function deactivate(): Promise { + if (client !== undefined) { + await client.stop(); + client = undefined; + } +} diff --git a/src/formatCore.ts b/src/formatCore.ts deleted file mode 100644 index 849849a..0000000 --- a/src/formatCore.ts +++ /dev/null @@ -1,530 +0,0 @@ -// Pure formatting core extracted from formats.ts for test fixture generation without vscode dependency -import { CRLF, TAB, KEYWORDS, SINGLE_OPERATORS, DOUBLE_OPERATORS, TRENNER, FORMATS, NO_SPACE_ITEMS, REGEX } from './const'; -import { EXCLUDE_KEYWORDS, NESTINGS } from './nestingdef'; - -export interface FormatterConfig { - allowedNumberOfEmptyLines?: number; - RemoveEmptyLines?: boolean; - EmptyLinesAlsoInComment?: boolean; - BlockCodeBegin?: string; - BlockCodeEnd?: string; - BlockCodeExclude?: string; - RegionBlockCodeBegin?: string; - RegionBlockCodeEnd?: string; - RegionBlockCodeExclude?: string; - ReplaceTabToSpaces?: boolean; - IndentSize?: number; -} - -export function preFormat(text: string, config: FormatterConfig): string { // formerly forFormat (renamed to proper English) - // Normalize all line endings to CRLF up front while preserving intent of single blank lines. - // Replace any lone CR or LF with CRLF for internal processing. - text = text.replace(/\r\n|\n|\r/g, '\r\n'); - let txt = text.split(""); - let buf: string = ""; - let modified: number = 0; - let LineCount = 1; - let ColumnCount = 0; - let inComment = false; - let inString = false; - - for (let i = 0; i <= txt.length - 1; i++) { - ColumnCount++; - if (modified > 0) { - modified--; - } else { - modified = 0; - if (inString && txt[i] === '"') { - inString = false; - } else if (!inComment && txt[i] === '"') { - inString = true; - } - if (txt[i] === '\n') { - if (inString) { - return text; // abort on multi-line string error - } - LineCount++; ColumnCount = 0; - } - if (!inComment && txt[i] === '}') { - return text; // malformed comment closure - } else if (txt[i] === '{') { - inComment = true; - } else if (inComment && txt[i] === '}') { - inComment = false; - } - if (!inString) { - if (!(modified > 0) && (!inComment || (config as any).KeywordUppercaseAlsoInComment)) { - // Keywords: replace slice with uppercase version WITHOUT consuming the following char ("after"). - // The previous implementation appended the following char and set modified accordingly, which could - // duplicate CR characters or interfere with blank line handling when the next char was a line break. - for (let kw of KEYWORDS) { - const slice = text.substr(i, kw.length); - const before = text[i - 1]; - const after = text[i + kw.length]; - if (slice.toLowerCase() === kw.toLowerCase()) { - if (CheckCRLForWhitespace(before) && CheckCRLForWhitespace(after)) { - buf += kw.toUpperCase(); - modified = kw.length - 1; // we consumed only the keyword characters - break; - } - } - } - // Double operators - if (!(modified > 0)) { - for (let op of DOUBLE_OPERATORS) { - const slice = text.substr(i, op.length); - if (slice === op) { - if (text[i - 1] !== ' ') buf += ' '; - buf += op; - if (text[i + op.length] !== ' ') buf += ' '; - modified = op.length - 1; - break; - } - } - } - // Single operators (improved spacing rules) - if (!(modified > 0)) { - const isIdentChar = (c: any) => /[A-Za-z0-9_$]/.test(c || ''); - const isVarStart = (c: any) => /[A-Za-z]/.test(c || ''); - const isVarBody = (c: any) => /[A-Za-z0-9$-]/.test(c || ''); - for (let op of SINGLE_OPERATORS) { - if (txt[i] !== op) continue; - - // Detect multi-segment dashed identifier (e.g. new12-issue-dashed-variable) and keep dashes untouched. - // Clarified rule: even simple letter-dash-letter (a-b) or e-f is a valid variable token and must remain unspaced. - if (op === '-') { - const prevCh = text[i - 1]; - const nextCh = text[i + 1]; - // Determine if dash sits inside a variable token according to rule: - // Variable token pattern: [A-Za-z][A-Za-z0-9$-]* (segments after first letter may start with digits or $) - if (isVarBody(prevCh) && isVarBody(nextCh)) { - let start = i - 1; - while (start >= 0 && isVarBody(text[start])) start--; - start++; - let end = i + 1; - while (end < text.length && isVarBody(text[end])) end++; - const token = text.slice(start, end); - if (isVarStart(text[start])) { - // Treat every dash inside such a token as part of variable (including single letter-dash-letter) - buf += '-'; - modified = -1; - break; - } - } - } - - // Determine unary minus (attach to number) => previous non-space char is an operator boundary - let unaryMinus = false; - if (op === '-') { - // look backwards for first non-space char already emitted in buf - let k = buf.length - 1; - while (k >= 0 && /[ \t]/.test(buf[k])) k--; - const prev = k >= 0 ? buf[k] : undefined; - const nextChar = text[i + 1]; - if ((prev === undefined || /[=+\-*/,(;{}]/.test(prev) || prev === '\n' || prev === '\r') && /[0-9]/.test(nextChar)) { - unaryMinus = true; - } - } - - // NEW rule: minus between identifiers (letters/underscore) must always be spaced as binary - let isBinary = !(op === '-' && unaryMinus); - - // Space before (binary only) - if (isBinary && buf.length > 0 && !/[ \t\r\n]/.test(buf[buf.length - 1])) { - buf += ' '; - } - - // Emit operator - buf += op; - - // Space after (binary; plus always binary; keep unary minus tight with number) - if (isBinary) { - const next = text[i + 1]; - if (next && !/[ \t\r\n]/.test(next)) { - buf += ' '; - } - } - - modified = -1; - break; - } - } - } - } - if (modified === 0) { - buf += txt[i]; - } - } - } - // normalize spaces before semicolon + trim line tails - // Sanitize any duplicated or stray carriage returns that may have been produced by earlier logic - // Examples seen in tests: lines ending with an embedded "\r" (content + \r + CRLF) resulting from prior keyword logic. - buf = buf - .replace(/\r\r\n/g, CRLF) // collapse CRCRLF -> CRLF - .replace(/\r(?!\n)/g, ''); // remove lone CR not followed by LF - let lines = buf.split(CRLF).map(l => l.replace(/\s+$/g, '')); - // Preserve single blank lines: collapse only runs >1 here (final pipeline still may apply config rules). - const newLines: string[] = []; - let emptyRun = 0; - for (const line of lines) { - if (line === '') { - emptyRun++; - if (emptyRun === 1) newLines.push(''); // keep exactly one - continue; - } else { - emptyRun = 0; - newLines.push(line); - } - } - let normalized = newLines.join(CRLF); - // Post-processing normalizations: - // 1. Ensure binary minus has space after when pattern like 'f -g' (but keep dashed identifiers like a-b-c) - // 2. Collapse accidental double (or more) spaces between '=' and '>' in malformed '= >' sequences - // Apply targeted spacing fix outside of quoted strings only. - normalized = (() => { - let out = ''; - let inStr = false; - let inComment = false; - let inIfDepth = 0; // >0 while inside IF (...) - const isIdentStart = (c: string) => /[A-Za-z]/.test(c); - for (let i = 0; i < normalized.length; i++) { - let ch = normalized[i]; - if (ch === '"') { inStr = !inStr; out += ch; continue; } - if (!inStr) { - // Track simple single-line comment braces { ... } - if (ch === '{') { inComment = true; out += ch; continue; } - if (ch === '}' && inComment) { inComment = false; /* fall through to spacing rule below */ } - - // IF keyword normalization (only when not in comment) patterns: if( / if ( - if (!inComment && (ch === 'i' || ch === 'I') && (normalized[i+1] === 'f' || normalized[i+1] === 'F')) { - // Normalize IF keyword followed by '(': style 'IF (a ... ) THEN' - let j = i + 2; // after 'if' - while (j < normalized.length && normalized[j] === ' ') j++; - if (normalized[j] === '(') { - out += 'IF ('; - // skip any spaces after '(' - let k = j + 1; - while (k < normalized.length && normalized[k] === ' ') k++; - inIfDepth = 1; - i = k - 1; // continue from first non-space after '(' - continue; - } - } - // After ')' followed by THEN (case-insensitive, maybe without space) - if (!inComment && ch === ')') { - // If we're closing IF (...), remove any trailing spaces before ')' - if (inIfDepth > 0) { - while (out.length > 0 && out[out.length - 1] === ' ') out = out.slice(0, -1); - inIfDepth = 0; - } - out += ')'; - // Handle THEN following - let j = i + 1; while (j < normalized.length && normalized[j] === ' ') j++; - const ahead = normalized.slice(j, j + 4).toLowerCase(); - if (ahead === 'then') { out += ' THEN'; i = j + 3; continue; } - // generic: ensure space after ')' if next is identifier - let next = normalized[i+1]; - if (next && isIdentStart(next)) { out += ' '; } - continue; - } - // Ensure space before inline comment brace directly after THEN (THEN{ -> THEN {) - if (!inComment && (ch === 'T' || ch === 't') && normalized.slice(i, i+4).toLowerCase() === 'then') { - let j = i + 4; while (j < normalized.length && normalized[j] === ' ') j++; - if (normalized[j] === '{') { - out += 'THEN '; - i = i + 3; // consumed THEN - continue; - } - } - // Rule: ensure single space after semicolon if next char (non newline) is not space - if (!inComment && ch === ';') { - const next = normalized[i+1]; - if (next && next !== ' ' && next !== '\r' && next !== '\n') { out += '; '; continue; } - } - // Rule: ensure space after closing '}' of a comment if next non-space is identifier - if (ch === '}' ) { - let j = i + 1; while (j < normalized.length && normalized[j] === ' ') j++; - if (j < normalized.length && isIdentStart(normalized[j]) && normalized[i+1] !== ' ') { out += '} '; continue; } - } - // Ensure space after pattern X -Y (but not inside dashed identifiers) => convert 'X -Y' to 'X - Y' - if (!inComment && /[A-Za-z0-9_]/.test(ch) && normalized[i+1] === ' ' && normalized[i+2] === '-' && /[A-Za-z_]/.test(normalized[i+3])) { - // Check that this is not inside a multi-dash variable: look backwards to start of run and forwards to end - let back = out.length - 1; while (back >= 0 && /[A-Za-z0-9$-]/.test(out[back])) back--; - let forward = i + 3; while (forward < normalized.length && /[A-Za-z0-9$-]/.test(normalized[forward])) forward++; - const run = (out.slice(back + 1) + normalized.slice(i, forward)); - if (!/^[A-Za-z][A-Za-z0-9$-]*-[A-Za-z0-9$-]*-[A-Za-z0-9$-]*$/.test(run)) { out += ch + ' - ' + normalized[i+3]; i += 3; continue; } - } - // Comma spacing in argument lists: remove preceding spaces, enforce single space after unless next is ) or EOL - if (!inComment && ch === ',') { - while (out.length > 0 && out[out.length - 1] === ' ') out = out.slice(0, -1); - out += ','; - let next = normalized[i+1]; - if (next && next !== ' ' && next !== ')' && next !== '\r' && next !== '\n') { out += ' '; } - continue; - } - } - out += ch; - } - return out.replace(/= {2,}>/g, '= >'); - })(); - // Final sanitation: remove any spaces directly before semicolons outside strings/comments (strings already preserved above) - // Remove spaces before semicolons only outside of string literals AND outside brace comments - normalized = normalized.split(CRLF).map(line => { - // Entire line is a single-line brace comment -> leave unchanged - if (/^\s*\{[^{}]*\}\s*$/.test(line)) return line; - // Split code part and trailing brace comment (if any) - const braceIndex = line.indexOf('{'); - let codePart = line; - let commentPart = ''; - if (braceIndex !== -1) { - codePart = line.slice(0, braceIndex); - commentPart = line.slice(braceIndex); // keep as-is - } - // Within codePart, protect strings, then remove spaces before semicolons - const rebuilt = codePart.split(/("[^"\\]*(?:\\.[^"\\]*)*"?)/g).map(seg => { - if (seg.startsWith('"') && seg.endsWith('"')) return seg; // string literal - return seg.replace(/(\S)\s+;/g, '$1;'); - }).join(''); - return rebuilt + commentPart; - }).join(CRLF); - return normalized; -} - -export function formatNestings(text: string, config: FormatterConfig): string { - let buf = ""; - let codeFragments: string[] = []; - let regex = ""; - let nestingCounter = 0; - let nestingCounterPrevious = 0; - // Simple nesting only; multiline IF experimental logic removed - let multilineComment = false; - let thisLineBack = false; - // Multiline IF expression handling state - let multiIfActive = false; - let multiIfBaseDepth = 0; - let regexCB = `^${config.BlockCodeBegin}`; - let regexCEx = `^${config.BlockCodeExclude}`; - let regexCE = `^${config.BlockCodeEnd}`; - let regexRegionCB = `^${config.RegionBlockCodeBegin}`; - let regexRegionCEx = `^${config.RegionBlockCodeExclude}`; - let regexRegionCE = `^${config.RegionBlockCodeEnd}`; - const hadFinalCRLF = text.endsWith(CRLF); - codeFragments = text.split(CRLF); - for (let i = 0; i < codeFragments.length; i++) { - const prevMultilineState = multilineComment; // remember state entering this line - let isEmptyLine = false; - codeFragments[i] = codeFragments[i].replace(/\s+$/g, ""); - if (codeFragments[i] === "") isEmptyLine = true; - if (codeFragments[i].search(REGEX.g_CHECK_OPEN_COMMENT) !== -1) multilineComment = true; - if (codeFragments[i].search(REGEX.g_CHECK_CLOSE_COMMENT) !== -1) multilineComment = false; - let str = codeFragments[i].match(REGEX.gm_GET_STRING); - if (str) { - // Protect ALL string literals on the line by masking spaces/tabs/semicolons - let protectedLine = codeFragments[i]; - for (const item of str) { - let strw = item.replace(/\s(? { - regex = `((?![^{]*})(${item}))`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) exclude = true; - }); - if (!multiIfActive) { - if (inlineIf) { - // no nesting change - } else if (continuationTrigger) { - multiIfActive = true; - multiIfBaseDepth = nestingCounterPrevious; // visual base - } else { - for (let n of NESTINGS) { - if (!exclude) { - regex = `((?![^{]*})(\\b${n.keyword})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { nestingCounter++; } - } - if (n.multiline !== '') { - regex = `((?![^{]*})(\\b${n.multiline})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { } - } - if (n.middle !== '') { - regex = `((?![^{]*})(\\b${n.middle})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { thisLineBack = true; break; } - } - regex = `((?![^{]*})(\\b${n.end})\\b)`; - if (codeFragments[i].search(new RegExp(regex, 'i')) !== -1) { nestingCounter--; if (nestingCounter < 0) nestingCounter = 0; thisLineBack = true; break; } - } - } - } else { - // multiIfActive - if (hasTHEN) { - nestingCounter++; // start IF body after this line - thisLineBack = true; // keep THEN at expression level - multiIfActive = false; - } - } - } - } - if (!isEmptyLine) { - // If we are inside a multi-line brace comment block OR this is the closing line - // (previous line(s) were multiline comment and this one ends with a closing brace) - // then we preserve indentation exactly as-is (no added / removed indent). - const closesMultiline = prevMultilineState && codeFragments[i].includes('}'); - if (multilineComment || closesMultiline || prevMultilineState) { - // Restore original line (with its original indentation) because we may have trimmed earlier logic - codeFragments[i] = originalLine; - multiIfActive = false; // reset multi-IF state when traversing comment blocks - if (nestingCounterPrevious !== nestingCounter) nestingCounterPrevious = nestingCounter; - continue; - } - - // Determine visual depth for real code lines - let visualDepth = nestingCounterPrevious; - if (multiIfActive) { - // lines after initial IF (continuation lines) show baseDepth+2 now (user request) - const initialLine = /\bIF\b/i.test(codeFragments[i]) && !/\bTHEN\b/i.test(codeFragments[i]); - if (!initialLine) visualDepth = multiIfBaseDepth + 2; - } else if (thisLineBack && /\bTHEN\b/i.test(codeFragments[i])) { - // THEN closing expression line: show continuation depth (base+2) and do NOT drop back - visualDepth = (multiIfBaseDepth + 2); - thisLineBack = false; // keep indentation level, prevent getNesting from skipping one level - } - const prefix = getNesting(visualDepth, thisLineBack, config); - codeFragments[i] = prefix + codeFragments[i]; - if (nestingCounterPrevious !== nestingCounter) nestingCounterPrevious = nestingCounter; - thisLineBack = false; - } - } - // Final trailing whitespace cleanup - codeFragments = codeFragments.map(l => l.replace(/[ \t]+$/g, '')); - for (let i = 0; i < codeFragments.length; i++) { - const isLast = i === codeFragments.length - 1; - if (!isLast) buf += codeFragments[i] + CRLF; else { - if (codeFragments[i] !== '') { buf += codeFragments[i]; if (hadFinalCRLF) buf += CRLF; } - } - } - // Collapse multiple inner spaces (not leading indentation) outside of strings and outside single-line brace comments - const collapsed = buf.split(CRLF).map(line => { - if (line.trim() === '') return line; - // Mask single-line brace comments { ... } to preserve interior spacing - const comments = line.match(/\{[^{}\r\n]*\}/g) || []; - const commentTokens: string[] = []; - let masked = line; - comments.forEach((c, idx) => { - const token = `@@C${idx}@@`; - commentTokens.push(c); - masked = masked.replace(c, token); - }); - // Split by string literals (simple non-escaped quote handling) - const segments = masked.split(/("[^"\\]*(?:\\.[^"\\]*)*"?)/g).filter(s => s !== ''); - let rebuilt = ''; - segments.forEach(seg => { - if (seg.startsWith('"') && seg.endsWith('"')) { - rebuilt += seg; // keep string literal - } else { - const m = seg.match(/^(\s*)(.*)$/); - if (m) { - const ind = m[1]; - const rest = m[2].replace(/ {2,}/g, ' '); - rebuilt += ind + rest; - } else { - rebuilt += seg.replace(/ {2,}/g, ' '); - } - } - }); - // Restore comments - commentTokens.forEach((c, idx) => { - rebuilt = rebuilt.replace(`@@C${idx}@@`, c); - }); - return rebuilt; - }).join(CRLF); - return collapsed; -} - -function getNesting(n: number, thisLineBack: boolean, config: FormatterConfig): string { - let temp = ""; - if (n !== 0) { - // Determine indent unit based on configuration - const useSpaces = (config.ReplaceTabToSpaces !== false); // default true - const indentSize = (typeof config.IndentSize === 'number' && config.IndentSize >= 1 && config.IndentSize <= 10) ? config.IndentSize : 4; - const indentUnit = useSpaces ? ' '.repeat(indentSize) : '\t'; - for (let i = 0; i < n; i++) { - if (thisLineBack) { thisLineBack = false; } else { temp += indentUnit; } - } - } - return temp; -} - -function CheckCRLForWhitespace(s: string): boolean { - if (s === undefined || s === '' || s === '\n' || s === '\r') return true; // line/file start boundaries - return FORMATS.concat(SINGLE_OPERATORS, DOUBLE_OPERATORS, TRENNER).some(item => s === item); -} - -export function pureFormatPipeline(text: string, config: FormatterConfig) { - let formatted = preFormat(text, config); - formatted = formatNestings(formatted, config); - const nEL = (config.allowedNumberOfEmptyLines || 1) + 1.0; - if (config.RemoveEmptyLines) { - let regex: RegExp; - if (config.EmptyLinesAlsoInComment) { - regex = new RegExp(`(?![^{]*})(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } else { - regex = new RegExp(`(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - formatted = formatted.replace(regex, CRLF); - } - // Indentation normalization: replace leading tabs with spaces if configured - const useSpaces = (config.ReplaceTabToSpaces !== false); // default true - const indentSize = (typeof config.IndentSize === 'number' && config.IndentSize >= 1 && config.IndentSize <= 10) ? config.IndentSize : 4; - if (useSpaces) { - const tabRegex = /^\t+/gm; - formatted = formatted.replace(tabRegex, (m) => ' '.repeat(m.length * indentSize)); - } - return formatted; -} - diff --git a/src/formats.ts b/src/formats.ts deleted file mode 100644 index 53065df..0000000 --- a/src/formats.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Delegation wrapper only – real formatting logic lives in formatCore.ts -// Single Source of Truth: modify formatting rules in formatCore.ts -// This file provides stable export names for the rest of the extension. - -import { preFormat as corePreFormat, formatNestings as coreFormatNestings, pureFormatPipeline } from './formatCore'; - -export function preFormat(text: string, config: any) { - return corePreFormat(text, config); -} - -export function formatNestings(text: string, config: any) { - return coreFormatNestings(text, config); -} - -export function fullFormatPipeline(text: string, config: any) { - return pureFormatPipeline(text, config); -} - -// Note: If VSCode-specific logging or telemetry is needed later, inject it here -// without duplicating core logic. diff --git a/src/functions.ts b/src/functions.ts deleted file mode 100644 index 108729a..0000000 --- a/src/functions.ts +++ /dev/null @@ -1,191 +0,0 @@ - -import * as vscode from 'vscode'; -import { workspace, window } from 'vscode'; -import { preFormat, formatNestings } from './formats'; -import { CRLF } from "./const"; - -export let config: any = {}; - -export function formatTE(range: vscode.Range): vscode.TextEdit[] { - config = getConfig(); - let document = window.activeTextEditor.document; - - const newText = format(range, document, config); - return [vscode.TextEdit.replace(range, newText)]; -} - -function format(range: vscode.Range, document: vscode.TextDocument, config: any): string { - // PURE IMPLEMENTATION (Refactor 2025-09-14): No direct editor side-effects anymore. - let regex: RegExp; - let formatted: string = document.getText(range); - - // 1. Keyword / Operator Formatting - formatted = preFormat(formatted, config); - // 2. Nestings - formatted = formatNestings(formatted, config); - - // 3. Remove EmptyLines - const nEL: number = (config.allowedNumberOfEmptyLines || 1) + 1.0; - if (config.RemoveEmptyLines) { - if (config.EmptyLinesAlsoInComment) { - regex = new RegExp(`(?![^{]*})(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } else { - regex = new RegExp(`(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - formatted = formatted.replace(regex, CRLF); - } - - return formatted; -} - -//---------------------------------------------------------------- -//---------------------------------------------------------------- - -export function getConfig() { - //https://code.visualstudio.com/api/references/contribution-points - //debug - config.debug = false; //workspace.getConfiguration().get('VBI.formatter.debug.active'); - config.debugToChannel = true; //workspace.getConfiguration().get('VBI.formatter.debug.debugToChannel'); - - //Live empty Lines - config.allowedNumberOfEmptyLines = workspace.getConfiguration().get('VBI.formatter.EmptyLine.allowedNumberOfEmptyLines'); - if (config.allowedNumberOfEmptyLines < 0 || config.allowedNumberOfEmptyLines > 50) { - config.allowedNumberOfEmptyLines = 1; - } - - config.RemoveEmptyLines = workspace.getConfiguration().get('VBI.formatter.EmptyLine.RemoveEmptyLines'); - config.EmptyLinesAlsoInComment = workspace.getConfiguration().get('VBI.formatter.EmptyLine.EmptyLinesAlsoInComment'); - - //codeblock-Nesting settings - config.BlockCodeBegin = workspace.getConfiguration().get('VBI.formatter.BC.BlockCodeBegin'); - config.BlockCodeEnd = workspace.getConfiguration().get('VBI.formatter.BC.BlockCodeEnd'); - config.BlockCodeExclude = workspace.getConfiguration().get('VBI.formatter.BC.BlockCodeExclude'); - - - //Region codeblock-Nesting settings - config.RegionBlockCodeBegin = workspace.getConfiguration().get('VBI.formatter.Region.BlockCodeBegin'); - config.RegionBlockCodeEnd = workspace.getConfiguration().get('VBI.formatter.Region.BlockCodeEnd'); - config.RegionBlockCodeExclude = workspace.getConfiguration().get('VBI.formatter.Region.BlockCodeExclude'); - - - //misc - config.ReplaceTabToSpaces = workspace.getConfiguration().get('VBI.formatter.Misc.ReplaceTabToSpaces'); - config.IndentSize = workspace.getConfiguration().get('VBI.formatter.Misc.IndentSize'); - if (typeof config.IndentSize !== 'number' || config.IndentSize < 1 || config.IndentSize > 10) { - config.IndentSize = 4; - } - if (typeof config.ReplaceTabToSpaces !== 'boolean') { - config.ReplaceTabToSpaces = true; // fallback to default from package.json - } - //config.AllowInlineIFClause = workspace.getConfiguration().get('VBI.formatter.AllowInlineIFClause'); - - //log this - console.log('getConfig():', config); - return config; -} - -/** - * @param cat Type String --> define Category [info,warn,error] - * @param o Rest Parameter, Type Any --> Data to Log - */ -export let info = vscode.window.createOutputChannel("VBI-Info"); -export function log(cat: string, ...o: any) { - - function mapObject(obj: any) { - - switch (typeof obj) { - case 'undefined': - return 'undefined'; - - case 'object': - let ret: string = ''; - for (const [key, value] of Object.entries(obj)) { - ret += (`${key}: ${value}\n`); - } - return ret; - - default: - return obj; //function,symbol,boolean - - } - - } - - if (config.debug) { - if (config.debugToChannel) { - switch (cat.toLowerCase()) { - case 'info': - - //info.appendLine('INFO:'); - o.map((args: any) => { - info.appendLine('INFO:' + mapObject(args)); - }); - info.show(); - return; - - case 'warn': - //info.appendLine('WARN:'); - o.map((args: any) => { - info.appendLine('WARN:' + mapObject(args)); - }); - info.show(); - return; - - case 'error': - let err: string = ''; - //info.appendLine('ERROR: '); - //err += mapObject(cat) + ": \r\n"; - o.map((args: any) => { - err += mapObject(args); - }); - info.appendLine(err); - vscode.window.showErrorMessage(err); //.replace(/(\r\n|\n|\r)/gm,"") - info.show(); - return; - - default: - - //info.appendLine('INFO-Other:'); - //info.appendLine('INFO-Other:' + mapObject(cat)); - o.map((args: any) => { - info.appendLine('INFO-Other:' + mapObject(args)); - }); - info.show(); - return; - } - - } - else { - switch (cat.toLowerCase()) { - case 'info': - console.log('INFO:', o); - return; - case 'warn': - console.log('WARNING:', o); - return; - case 'error': - console.error('ERROR:', o); - return; - default: - console.log('log:', cat, o); - return; - } - } - } - else if (cat.toLowerCase() === 'error') { // show Error in vc, and log it to console - - let err: string = ''; - o.map((args: any) => { - err += mapObject(args); - }); - console.error('ERROR:',o); - vscode.window.showErrorMessage(err); //.replace(/(\r\n|\n|\r)/gm,"") - return; - } - - -} - -export function cloneArray(arr){ - return [...arr] -} \ No newline at end of file diff --git a/src/nestingdef.ts b/src/nestingdef.ts deleted file mode 100644 index eaba680..0000000 --- a/src/nestingdef.ts +++ /dev/null @@ -1,29 +0,0 @@ -interface NestingInterface { - keyword: string; //begin of the Nesting (IF) - middle: string; //eg else in if-then-else-endif (ELSE) - end: string; //end of this Nesting (ENDIF) - multiline: string; //can contain Multiline Keyword (THEN) -} - -export const EXCLUDE_KEYWORDS: string[] = ["EXIT FOR"]; - -export const NESTINGS: NestingInterface[] = [ - { - keyword: "if", - middle: "else", - end: "endif", - multiline: "then", - }, - { - keyword: "for", - middle: "", - end: "next", - multiline: "", - }, - { - keyword: "while", - middle: "", - end: "next", - multiline: "", - } -]; diff --git a/src/test/runTest.ts b/src/test/runTest.ts index 6ba2c6b..47d0370 100644 --- a/src/test/runTest.ts +++ b/src/test/runTest.ts @@ -4,6 +4,10 @@ import { runTests } from '@vscode/test-electron'; async function main() { try { + // Codex and VS Code extension hosts set this for their own child processes. + // The test runner must launch Code as Electron, not as a Node.js process. + delete process.env.ELECTRON_RUN_AS_NODE; + // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath` const extensionDevelopmentPath = path.resolve(__dirname, '../../'); @@ -18,7 +22,7 @@ async function main() { extensionDevelopmentPath, extensionTestsPath, }); - } catch (err) { + } catch { console.error('Failed to run tests'); process.exit(1); } diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts index 7584151..5537735 100644 --- a/src/test/suite/extension.test.ts +++ b/src/test/suite/extension.test.ts @@ -9,4 +9,30 @@ suite('Extension Test Suite', () => { assert.strictEqual([1, 2, 3].indexOf(5), -1); assert.strictEqual([1, 2, 3].indexOf(0), -1); }); + + test('registers the formatter command through the language client', async () => { + const extension = vscode.extensions.getExtension('Vitaly-ruhl.intouch-language'); + assert.ok(extension); + await extension.activate(); + assert.ok((await vscode.commands.getCommands(true)).includes('vbi-format')); + }); + + test('routes document formatting through the language server', async () => { + const document = await vscode.workspace.openTextDocument({ + language: 'intouch', + content: 'if Ready>0 then\ncall LogMessage("ok");\nendif;', + }); + const edits = await vscode.commands.executeCommand( + 'vscode.executeFormatDocumentProvider', + document.uri, + { insertSpaces: true, tabSize: 4 }, + ); + + assert.ok(edits); + assert.ok(edits.length > 0); + const workspaceEdit = new vscode.WorkspaceEdit(); + workspaceEdit.set(document.uri, edits); + assert.strictEqual(await vscode.workspace.applyEdit(workspaceEdit), true); + assert.match(document.getText(), /^IF Ready > 0 THEN\r?\n {4}CALL LogMessage\("ok"\);\r?\nENDIF;$/); + }); }); diff --git a/src/test/suite/formats.comments.test.ts b/src/test/suite/formats.comments.test.ts index a0515e7..acd68c4 100644 --- a/src/test/suite/formats.comments.test.ts +++ b/src/test/suite/formats.comments.test.ts @@ -1,8 +1,8 @@ import * as assert from "assert"; // import * as vscode from "vscode"; -const fo = require("../../formats") -const functions = require("../../functions") +const fo = require('./formatterTestSupport') +const functions = require('./formatterTestSupport') let config = functions.getConfig() diff --git a/src/test/suite/formats.eof.test.ts b/src/test/suite/formats.eof.test.ts index cc0bb06..0db3619 100644 --- a/src/test/suite/formats.eof.test.ts +++ b/src/test/suite/formats.eof.test.ts @@ -1,7 +1,7 @@ import * as assert from 'assert'; -const fo = require('../../formats'); -const functions = require('../../functions'); +const fo = require('./formatterTestSupport'); +const functions = require('./formatterTestSupport'); let config = functions.getConfig(); diff --git a/src/test/suite/formats.fixtures.test.ts b/src/test/suite/formats.fixtures.test.ts index 2b2a14f..fd0f547 100644 --- a/src/test/suite/formats.fixtures.test.ts +++ b/src/test/suite/formats.fixtures.test.ts @@ -1,9 +1,9 @@ import * as assert from 'assert'; import * as fs from 'fs'; import * as path from 'path'; -// Use the same formatting pipeline as the real editor command: preFormat -> formatNestings -> empty line normalization. -const fo = require('../../formats'); -const functions = require('../../functions'); +// Use the same editor-independent formatting pipeline as the language server. +const fo = require('./formatterTestSupport'); +const functions = require('./formatterTestSupport'); let config = functions.getConfig(); // Automatically validate every pair *.test.vbi -> *.tobe.vbi in testfiles folder. @@ -43,21 +43,7 @@ suite('formatter fixture pairs (*.test.vbi -> *.tobe.vbi)', () => { const input = fs.readFileSync(testPath, 'utf8'); const expected = fs.readFileSync(expectedPath, 'utf8'); - // Stage 1: keyword/operator spacing & semicolon/trailing whitespace normalization - let stage1 = fo.preFormat(input, config); - // Stage 2: nesting / indentation logic - let stage2 = fo.formatNestings(stage1, config); - // Stage 3: replicate empty line reduction exactly like functions.format() - const nEL: number = (config.allowedNumberOfEmptyLines || 1) + 1.0; - if (config.RemoveEmptyLines) { - let regex: RegExp; - if (config.EmptyLinesAlsoInComment) { - regex = new RegExp(`(?![^{]*})(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } else { - regex = new RegExp(`(^[\t]*$\r?\n){${nEL},}`, 'gm'); - } - stage2 = stage2.replace(regex, '\r\n'); - } + const stage2 = fo.fullFormatPipeline(input, config); // Normalize both sides to CRLF + trim potential trailing spaces (fixtures canonicalized with CRLF) const normalize = (s: string) => s diff --git a/src/test/suite/formats.idempotent.test.ts b/src/test/suite/formats.idempotent.test.ts index 03dac58..cf9ce33 100644 --- a/src/test/suite/formats.idempotent.test.ts +++ b/src/test/suite/formats.idempotent.test.ts @@ -1,8 +1,8 @@ import * as assert from 'assert'; import * as fs from 'fs'; import * as path from 'path'; -const fo = require('../../formats'); -const functions = require('../../functions'); +const fo = require('./formatterTestSupport'); +const functions = require('./formatterTestSupport'); const config = functions.getConfig(); /* diff --git a/src/test/suite/formats.misc.test.ts b/src/test/suite/formats.misc.test.ts index b651cc1..904c451 100644 --- a/src/test/suite/formats.misc.test.ts +++ b/src/test/suite/formats.misc.test.ts @@ -1,8 +1,8 @@ import * as assert from "assert"; // import * as vscode from "vscode"; -const fo = require("../../formats") -const functions = require("../../functions") +const fo = require('./formatterTestSupport') +const functions = require('./formatterTestSupport') let config = functions.getConfig() diff --git a/src/test/suite/formats.operators.test.ts b/src/test/suite/formats.operators.test.ts index 6b7ee82..438a8bc 100644 --- a/src/test/suite/formats.operators.test.ts +++ b/src/test/suite/formats.operators.test.ts @@ -1,6 +1,6 @@ import * as assert from 'assert'; -const fo = require('../../formats'); -const functions = require('../../functions'); +const fo = require('./formatterTestSupport'); +const functions = require('./formatterTestSupport'); let config = functions.getConfig(); suite('test formats.ts - double operators spacing', () => { diff --git a/src/test/suite/formatterTestSupport.ts b/src/test/suite/formatterTestSupport.ts new file mode 100644 index 0000000..3e18514 --- /dev/null +++ b/src/test/suite/formatterTestSupport.ts @@ -0,0 +1,36 @@ +import { + FormatOptions, + formatQuickScript, + formatQuickScriptLexically, + formatQuickScriptStructure, +} from '@intouch-language/core'; + +export const config: FormatOptions = { + allowedNumberOfEmptyLines: 1, + removeEmptyLines: true, + removeEmptyLinesInComments: false, + blockCodeBegin: '{>', + blockCodeEnd: '{<', + blockCodeExclude: '{#', + regionBlockCodeBegin: '{region', + regionBlockCodeEnd: '{endregion', + regionBlockCodeExclude: '{#', + insertSpaces: true, + indentSize: 4, +}; + +export function getConfig(): FormatOptions { + return { ...config }; +} + +export function preFormat(text: string, options: FormatOptions = config): string { + return formatQuickScriptLexically(text, options).text; +} + +export function formatNestings(text: string, options: FormatOptions = config): string { + return formatQuickScriptStructure(text, options).text; +} + +export function fullFormatPipeline(text: string, options: FormatOptions = config): string { + return formatQuickScript(text, options).text; +} diff --git a/src/test/suite/functions.test.ts b/src/test/suite/functions.test.ts deleted file mode 100644 index 8e09d30..0000000 --- a/src/test/suite/functions.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as assert from "assert"; -import * as vscode from "vscode"; - -const fu = require("../../functions"); -// import {cloneArray} from "../functions" - -suite("test functions.ts", () => { - vscode.window.showInformationMessage("Start all functions.ts tests."); - - test("test clone array", () => { - const arr = [1, 2, 3]; - assert.deepEqual(fu.cloneArray(arr), arr); - assert.notEqual(fu.cloneArray(arr), arr); - }); -}); diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts index 68f9a6a..68c9009 100644 --- a/src/test/suite/index.ts +++ b/src/test/suite/index.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import * as Mocha from 'mocha'; +import Mocha = require('mocha'); import { glob } from 'glob'; export function run(): Promise { diff --git a/src/test/suite/keywords.uppercase.test.ts b/src/test/suite/keywords.uppercase.test.ts index ce8449d..846ed48 100644 --- a/src/test/suite/keywords.uppercase.test.ts +++ b/src/test/suite/keywords.uppercase.test.ts @@ -1,6 +1,6 @@ import * as assert from 'assert'; -import { preFormat } from '../../formats'; -const functions = require('../../functions'); +import { preFormat } from './formatterTestSupport'; +const functions = require('./formatterTestSupport'); const config = functions.getConfig(); const KEYWORDS = [ diff --git a/src/test/suite/language.behavior-baseline.test.ts b/src/test/suite/language.behavior-baseline.test.ts index 80a9a83..731bbe2 100644 --- a/src/test/suite/language.behavior-baseline.test.ts +++ b/src/test/suite/language.behavior-baseline.test.ts @@ -1,7 +1,6 @@ import * as assert from 'assert'; -import { formatNestings, preFormat } from '../../formats'; -import { getConfig } from '../../functions'; +import { formatNestings, getConfig, preFormat } from './formatterTestSupport'; const config = getConfig(); diff --git a/src/test/suite/testfiles/03.spacing.other.tobe.vbi b/src/test/suite/testfiles/03.spacing.other.tobe.vbi index fcf3b7a..d73a13e 100644 --- a/src/test/suite/testfiles/03.spacing.other.tobe.vbi +++ b/src/test/suite/testfiles/03.spacing.other.tobe.vbi @@ -18,6 +18,7 @@ a = b; { comment } c = d; a = 1; ENDIF; + test for removing extra empty lines in comment blocks (this line should be moved up) } diff --git a/src/test/suite/testfiles/04.indentation.basic.nesting.tobe.vbi b/src/test/suite/testfiles/04.indentation.basic.nesting.tobe.vbi index 5a256b0..628aa3d 100644 --- a/src/test/suite/testfiles/04.indentation.basic.nesting.tobe.vbi +++ b/src/test/suite/testfiles/04.indentation.basic.nesting.tobe.vbi @@ -10,7 +10,7 @@ FOR i = 1 TO j a = StringTrim(b, 3); wcAddItem("text", a); - LogMessage("DEBUG: " + StringLeft(abc, 4)+ "\. /abc\def; oha:;" + aa); + LogMessage("DEBUG: " + StringLeft(abc, 4) + "\. /abc\def; oha:;" + aa); IF StringLeft(SYS_TopicTemp, 4) == SYS_S7CPU_anlagenteil THEN WU_AuswahlTemp = SYS_S7CPU_name; ENDIF; @@ -73,10 +73,10 @@ FOR i = 1 TO StringLen(inS) STEP 2 IF Splitt == iIndex THEN {comment close after then} {test much brackets in the next line} - IF Sys_Debug_info > 0 THEN LogMessage(Funkt + "True Splitt(" + text(Splitt, "#")+ ")/i:(" + text(i, "#")+ "):[" + Temp_Return + "]"); ENDIF; + IF Sys_Debug_info > 0 THEN LogMessage(Funkt + "True Splitt(" + text(Splitt, "#") + ")/i:(" + text(i, "#") + "):[" + Temp_Return + "]"); ENDIF; EXIT FOR; {remember do not change nesting on exit for} ELSE - IF Sys_Debug_info > 0 THEN LogMessage(Funkt + " Splitt(" + text(i, "#")+ "):[" + Temp_Return + "]"); ENDIF; + IF Sys_Debug_info > 0 THEN LogMessage(Funkt + " Splitt(" + text(i, "#") + "):[" + Temp_Return + "]"); ENDIF; Temp_Return = ""; ENDIF; ELSE diff --git a/src/test/suite/testfiles/05.comment_rules.nesting.tobe.vbi b/src/test/suite/testfiles/05.comment_rules.nesting.tobe.vbi index 2e423fe..562539d 100644 --- a/src/test/suite/testfiles/05.comment_rules.nesting.tobe.vbi +++ b/src/test/suite/testfiles/05.comment_rules.nesting.tobe.vbi @@ -7,7 +7,7 @@ ANLAGE = StringTrim(SYS_S7CPU_name, 3); wcAddItem("WUAuswahl", ANLAGE); - LogMessage("DEBUG: " + StringLeft(SYS_TopicTemp, 4)+ " / " + SYS_S7CPU_anlagenteil); + LogMessage("DEBUG: " + StringLeft(SYS_TopicTemp, 4) + " / " + SYS_S7CPU_anlagenteil); IF StringLeft(SYS_TopicTemp, 4) == SYS_S7CPU_anlagenteil THEN WU_AuswahlTemp = SYS_S7CPU_name; ENDIF; diff --git a/src/test/suite/testfiles/all.tobe.vbi b/src/test/suite/testfiles/all.tobe.vbi index 2a2381d..d6c83a2 100644 --- a/src/test/suite/testfiles/all.tobe.vbi +++ b/src/test/suite/testfiles/all.tobe.vbi @@ -38,11 +38,11 @@ Changelog: {>------------------------------------------------------------------------------} {Test wrong Nesting and inline if - then and Spacings on +/-/<> and other Keywords un strings} - IF sys_Debug_info > 0 THEN LogMessage(eof Funkt + "if one of the keywords is big, and spacing or tab is removed, then its Wrong! | [" + Text(iErsteMA, "#")"]"); ENDIF; - IF sys_Debug_info > 0 THEN LogMessage(Funkt + "eof if one of eof is big -> its Wrong! | [" + Text(iErsteMA, "#")"]"); ENDIF; + IF sys_Debug_info > 0 THEN LogMessage(EOF Funkt + "if one of the keywords is big, and spacing or tab is removed, then its Wrong! | [" + Text(iErsteMA, "#") "]"); ENDIF; + IF sys_Debug_info > 0 THEN LogMessage(Funkt + "eof if one of eof is big -> its Wrong! | [" + Text(iErsteMA, "#") "]"); ENDIF; {# Test codeblock backline} - IF sys_Debug_info > 0 THEN LogMessage(Funkt + "eof if one of eof is big -> its Wrong! | [" + Text(iErsteMA, "#")"]"); ENDIF; - IF sys_Debug_info > 0 THEN LogMessage(Funkt + "eof if one of eof is big -> its Wrong! | [" + Text(iErsteMA, "#")"]"); ENDIF; + IF sys_Debug_info > 0 THEN LogMessage(Funkt + "eof if one of eof is big -> its Wrong! | [" + Text(iErsteMA, "#") "]"); ENDIF; + IF sys_Debug_info > 0 THEN LogMessage(Funkt + "eof if one of eof is big -> its Wrong! | [" + Text(iErsteMA, "#") "]"); ENDIF; {<------------------------------------------------------------------------------} {------------------------------------------------------------------------------} diff --git a/tsconfig.json b/tsconfig.json index 348e5a6..006de62 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { - "module": "commonjs", + "module": "Node16", + "moduleResolution": "Node16", "target": "es2021", "outDir": "out", "lib": [ From edb9590358215892aac0f4d2965c6375a1885a02 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 15:19:28 +0200 Subject: [PATCH 10/40] docs(architecture): document language pipeline and HIL --- CHANGELOG.md | 11 + README.md | 18 +- docs/architecture/intouch-core-preparation.md | 230 +++++++----------- docs/language/quickscript.md | 79 +++--- docs/testing/manual-hil.md | 70 ++++++ 5 files changed, 222 insertions(+), 186 deletions(-) create mode 100644 docs/testing/manual-hil.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 9812e5e..f40353f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ +## Unreleased + +- Replace the legacy formatter lexers with the shared QuickScript tokenizer and + recoverable structure parser. +- Add a native language server with diagnostics, symbols, completion, hover, + and document-local definition/reference support. +- Route VS Code formatting through the language client while preserving the + existing grammar, snippets, theme, and formatter command. +- Add editor-independent core tests, language-server protocol smoke tests, and + a manual `.vbi`/`.vi` HIL gate. + ### V1.4.0 - 29.11.2022 VitalyRuhl diff --git a/README.md b/README.md index ee7fc2b..6fd2329 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ # Intouch-Language -- **Intouch-Language** is an open source extension created for **Visual Studio Code** (**Not official!**). It provides `syntax highlighting`, `snippets` and `auto-format` function for Intouch Basic. New since 2022.11.28 - own darkmode theme for VSC, names Intouch Dark. +- **Intouch-Language** is an open source extension created for **Visual Studio Code** (**Not official!**). It provides syntax highlighting, snippets, parser-based formatting, diagnostics, symbols, completion, hover, and local definition/reference support for Intouch Basic. It also includes the Intouch Dark theme. - **Intouch** is a programming language for AVEVA (Wonderware) SCADA Intouch Applications.

@@ -129,13 +129,14 @@ NOTE: The default VS Code theme does not color much. Switch to intouch theme (in ## Development and agent workflow Repository governance starts at [AGENTS.md](AGENTS.md). QuickScript language -boundaries and the planned language-server architecture are documented in +boundaries and the language-server architecture are documented in [docs/language/quickscript.md](docs/language/quickscript.md) and [docs/architecture/intouch-core-preparation.md](docs/architecture/intouch-core-preparation.md). -The current extension does not include a language server. Until a native -InTouch language server exists, `.vbi` and `.vi` are not semantically analysed -by a foreign language server. +The extension uses its own QuickScript language server for `.vbi` and `.vi`. +Formatting and semantic features share the editor-independent core tokenizer +and parser. Manual validation against real project files remains the release +gate; see [Manual QuickScript HIL](docs/testing/manual-hil.md). --- @@ -163,8 +164,11 @@ by a foreign language server. The following items are either recently resolved or planned but not yet implemented: - PLANNED: Range (selection) formatting. Current command formats the entire document. -- PLANNED: Diagnostics (unclosed IF/FOR, unexpected ENDIF/NEXT) – tracked in modernization plan. -- PLANNED: Tokenizer-based nesting & keyword uppercasing refactor for improved robustness. +- Diagnostics cover unclosed or invalid block nesting, duplicate local `DIM` + declarations, and unknown datatypes. +- Formatting uses the shared tokenizer and recoverable structure parser. +- Definition and references are intentionally document-local; project-wide + indexing and range formatting remain planned. - NOTE: Multiline IF continuation indentation intentionally uses base + 2 spaces before THEN; THEN line stays aligned with expression by design. - NOTE: Spacing inside string literals and single-line brace comments is preserved intentionally; only outer code regions are normalized. diff --git a/docs/architecture/intouch-core-preparation.md b/docs/architecture/intouch-core-preparation.md index 9db4189..38ad3bf 100644 --- a/docs/architecture/intouch-core-preparation.md +++ b/docs/architecture/intouch-core-preparation.md @@ -1,149 +1,101 @@ -# InTouch Core Foundation +# InTouch Language Architecture -## Current extension shape - -The repository remains an npm-managed VS Code extension. `package.json` -registers language ID `intouch` for `.vbi` and `.vi`, a TextMate grammar, -snippets, a formatter command, and the theme. `src/extension.ts` remains the VS -Code activation boundary; its compiled output is `out/` and its published -bundle is `dist/extension.js`. - -`packages/core` now provides editor-independent source positions, token types, -lexical language data, and a deterministic QuickScript tokenizer. It compiles -strictly to the ignored `out/core` directory, is tested through -`npm run test:core`, and is excluded from the VSIX until an extension runtime -consumer is introduced. - -No parser, language server, LSP transport, semantic definition/reference -provider, or diagnostics provider exists yet. - -The target dependency direction is: +## Dependency direction ```text QuickScript source | v -packages/core tokenizer and structure model - |----------------------| - v v -QuickScript formatter language server +packages/core + tokenizer -> parser -> symbols/diagnostics/language features + | | + | +-> structural formatter + | | + v v +packages/language-server (LSP transport and protocol conversion) | v -VS Code formatter adapter +src/extension.ts (thin VS Code language client) ``` -The formatter and language server are independent core consumers. The language -server is not an intermediary for formatting, and VS Code remains a client -adapter rather than a language-semantics layer. - -## Migration inventory - -| Current source | Current responsibility | Future target module | Dependencies | Risk | -| --- | --- | --- | --- | --- | -| `src/extension.ts` | Activates VS Code command and formatting provider | `packages/vscode-extension` | VS Code API, formatter adapter | Keep VS Code effects at this boundary. | -| `src/functions.ts` | Reads editor configuration, creates `TextEdit`s, invokes formatting | `packages/vscode-extension` plus thin adapter | VS Code API and formatter pipeline | Separate editor I/O from pure formatting without changing output. | -| `src/formatCore.ts` | Whitespace, keyword, string/comment preservation, and indentation pipeline | `packages/core/formatter` | `const.ts`, `nestingdef.ts`, formatter tests | Regex ordering and fixture compatibility are behavior-sensitive. | -| `src/const.ts` | Formatter keywords and operators | `packages/core/language-data` | Formatter pipeline | Grammar has overlapping but not identical vocabulary. | -| `src/nestingdef.ts` | Nesting/exclusion definitions | `packages/core/syntax` | Formatter pipeline | Existing blocks must be characterized by tests before extraction. | -| `syntaxes/intouch.tmLanguage.json` | TextMate lexical highlighting, functions, data types, and scopes | Retain in `packages/vscode-extension` initially; later generate/shared language data only after validation | VS Code TextMate grammar | Highlighting patterns are not a parser specification. | -| `language-configuration.json`, `snippets/vbi.json` | Editor rules and authoring snippets | `packages/vscode-extension` | VS Code contribution model | Keep declarative assets out of core. | -| `src/test/suite/*.test.ts` and `testfiles/` | Extension-host tests and formatter golden fixtures | Core formatter test suite plus extension integration tests | Mocha, VS Code test host | Fixtures should stay byte-for-byte stable unless behavior intentionally changes. | -| `packages/core/src/source.ts` | Zero-based UTF-16 positions and half-open offset/position ranges | Established core source model | TypeScript only | Keep position semantics aligned with the later LSP boundary. | -| `packages/core/src/token.ts` | Editor-independent token contract | Established core token model | Core source model | Preserve source lexemes and locations; diagnostics do not belong in tokens. | -| `packages/core/src/tokenizer.ts` | QuickScript lexical scanning | Established core tokenizer | Core language data and token model | Stay resilient to incomplete input without guessing parser semantics. | - -## Language knowledge and duplication - -The core now owns the typed lexical sets needed by the tokenizer: control -keywords, data types, operators, and punctuation. Matching is case-insensitive -while tokens preserve the original source text. The tokenizer is the canonical -lexical interpretation that the future parser, formatter, diagnostics, and -language server must consume; those components must not add parallel lexers. - -The formatter constants and TextMate grammar remain compatibility sources for -their existing consumers. The grammar's large InTouch and Hermes function -inventories intentionally remain there; the tokenizer represents function -names as identifiers followed by punctuation rather than copying a partial -function list into core. Block and indentation data also remain in the -formatter until a structure parser can replace that responsibility safely. - -These remaining overlaps are deliberate migration boundaries, not a third -canonical language model. - -## Source and token semantics - -- Offsets, lines, and characters are zero-based UTF-16 units. -- Source spans and position ranges are half-open: start is inclusive and end is - exclusive. -- CRLF, LF, and CR are recognized as line boundaries. -- Tokens retain their original lexeme, offset span, and position range. -- The tokenizer emits identifiers, keywords, data types, numbers, strings, - operators, punctuation, comments, whitespace, newlines, unknown input, and a - zero-width EOF token. -- Concatenating every non-EOF lexeme reconstructs the original source exactly; - fixture invariants enforce this for both `.vbi` and `.vi` input. -- Double-quoted strings, brace comments, apostrophe line comments, established - identifier forms, and decimal numbers are based on repository grammar, - formatter, and fixture evidence. -- Block metadata such as `{>`, `{<`, `{#`, `{region`, and `{endregion` remains - losslessly available in comment lexemes for later formatting decisions. -- Unclosed strings/comments and unknown characters remain tokenizable; parser - diagnostics are intentionally deferred. - -## Formatter coupling - -`src/formatCore.ts` is a legacy implementation, not the future formatting -contract. Its ordered mutations currently mix lexical protection, structural -heuristics, and output decisions. The production formatter does not consume -core tokens yet because replacing all three responsibilities in the tokenizer -milestone would be a behavior-sensitive rewrite. - -| Current component | Current responsibility | Responsibility type | Future target | -| --- | --- | --- | --- | -| `preFormat` orchestration | Applies ordered keyword, operator, punctuation, and whitespace mutations | Mixed lexical and output | Token-aware QuickScript formatter engine consuming core tokens | -| String and comment protection in `preFormat` | Prevents regex formatting inside quoted or commented text | Lexical | Core `String` and `Comment` tokens with original ranges | -| Keyword and operator recognition in `preFormat` | Finds case-insensitive words and longest operators | Lexical | Core token kinds and language data | -| Whitespace normalization | Adjusts spaces, tabs, semicolons, and trailing whitespace | Output | Formatter rules over lossless whitespace/newline tokens | -| `formatNestings` | Infers indentation from lines, keywords, and configured comment markers | Structural and output | Structure-parser blocks plus formatter indentation rules | -| Block keyword recognition | Detects `IF`/`ELSE`/`ENDIF`, `FOR`/`NEXT`, `WHILE`, and comment blocks | Structural | Shared core structure model derived from tokens | -| Output generation | Rebuilds a formatted source string for the VS Code edit | Output | Editor-independent `formatQuickScript(source, options)` result | -| `src/functions.ts` formatting entry | Reads VS Code settings and creates `TextEdit` values | Editor adapter | Thin VS Code adapter over the shared formatter engine | - -Migration is planned in two controlled stages: - -1. Lexical formatter integration: use core string, comment, keyword, operator, - punctuation, whitespace, newline, and source-range information so - `preFormat` no longer performs a second lexical analysis. -2. Structural formatter integration: after the structure parser is stable, - drive nesting and indentation from shared `DIM`, `IF`/`ELSE`/`ENDIF`, - `FOR`/`NEXT`, `WHILE`, `CALL`, block, and scope information. - -Existing characterization tests and golden fixtures protect already-correct -behavior; they do not declare every historical formatter result optimal. Later -improvements may replace poor legacy output when their intended behavior is -covered by focused tests. - -## Diagnostics and semantic navigation - -The README lists diagnostics such as unmatched `IF`/`ENDIF` and `FOR`/`NEXT` as -planned. No diagnostics implementation was found. A future tokenizer and -structure parser should first support formatter-safe token boundaries, block -matching, declarations, and scopes; only then should diagnostics, document -symbols, definitions, and references be implemented. - -## Recommended next autonomous block - -The next block is **Core Integration + Structure Parser + Formatter Refactor**, -split into safe internal phases when needed: - -1. Prepare tokenizer integration in the formatter and remove duplicated - lexical protection from `preFormat` behind focused equivalence tests. -2. Add a formatting-capable QuickScript structure parser over core tokens for - `DIM`, `IF`/`ELSE`/`ENDIF`, `FOR`/`NEXT`, `WHILE`, and `CALL`. -3. Establish shared block, statement, nesting, and local-scope information. -4. Move formatter nesting and indentation incrementally onto that structure. -5. Add focused expectations for known weak formatter cases instead of - preserving them as accidental contracts. -6. Only then extend symbols and parser-based diagnostics; continue to defer - LSP transport, definitions, references, completion, and hover until the - shared parser and formatter contracts are stable. +`packages/core` is editor-independent. The formatter directly consumes core +tokens and parser structure; it does not depend on LSP types or transport. +`packages/language-server` converts core results into LSP responses. The VS +Code extension starts that server, synchronizes `intouch` documents and `VBI` +settings, and retains the existing grammar, snippets, theme, and formatter +command contributions. + +## Canonical language layers + +The tokenizer is the only lexical interpretation used by the parser, +formatter, and semantic services. Tokens retain their original lexemes and +zero-based UTF-16, half-open offset and position ranges. Strings, brace +comments, apostrophe comments, incomplete input, dashed identifiers, and +QuickScript operators therefore pass through one shared scanner. + +The recoverable parser is the only structural interpretation. It represents +`DIM`, `CALL`, `IF`/`ELSE`/`ENDIF`, `FOR`/`NEXT`, and the repository-evidenced +`WHILE`/`NEXT` form. Blocks expose opener, body, middle, closer, parent, child, +and full ranges. Invalid nesting and missing closers produce diagnostics +without preventing later lines from being parsed or formatted. + +The formatter exposes `formatQuickScript(source, options)` and returns a +`FormatResult`. Its first stage formats lexical tokens while emitting string +and comment lexemes unchanged. Its second stage uses parser line structure for +indentation and configured comment block markers. Formatting is deterministic, +document-wide, and idempotent. Historical regex and character-scanning +formatter implementations have been removed. + +## Semantic model and language features + +Each `.vbi` or `.vi` document is currently one local scope. `DIM` declarations +provide local variable symbols and case-insensitive uses. Navigation resolves +only those declarations; unknown identifiers, member accesses, and external +call targets are not guessed. + +Core diagnostics currently cover: + +- missing `ENDIF` and `NEXT`; +- invalid block nesting and duplicate `ELSE`; +- duplicate local `DIM` declarations; +- unknown `DIM` datatypes. + +The language service provides document symbols, local definition and reference +results, completion, and hover. Completion includes QuickScript keywords and +datatypes, document locals and call targets, and known InTouch/Hermes function +names. The function catalog is generated from +`syntaxes/intouch.tmLanguage.json`; it is not maintained as a parallel manual +list. Hover descriptions use only document facts or labels already present in +that source grammar. + +## Language server and VS Code boundary + +The language server supports initialize/shutdown, incremental text document +synchronization, document formatting, document symbols, definition, +references, completion, hover, and publish diagnostics. Feature conversion is +unit-tested independently, and a child-process protocol test exercises the +server lifecycle and representative requests without a VS Code process. + +`src/extension.ts` contains no parser, formatter, or semantic logic. It starts +`dist/server.js` through `vscode-languageclient`, registers `vbi-format` as a +request to VS Code's standard format command, and lets the language client own +all providers. The TextMate grammar remains the syntax-highlighting surface; +snippets and the theme remain declarative VS Code assets. + +## Deliberate limits before manual HIL + +- Formatting is document-wide; selection/range formatting is not advertised. +- Definition and references are document-local and require a proven `DIM` + declaration. +- QuickScript function declarations are not invented because repository + evidence models each file as a script/function body rather than declaring a + function in source syntax. +- Project-wide symbol indexing and cross-file call-target resolution are not + implemented. +- `.vbi` and `.vi` remain excluded from Serena semantic indexing; the native + language server provides their semantics. + +The automated implementation is considered ready for manual HIL only after +compile, core tests, protocol tests, VS Code extension-host tests, lint, +prepublish bundling, VSIX packaging, and repository freshness checks pass. The +manual procedure is documented in [Manual QuickScript HIL](../testing/manual-hil.md). diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index 8a660bd..43841f0 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -9,51 +9,50 @@ semantic approximation. ## Current repository evidence -The current language knowledge is distributed deliberately across the extension: - -- `syntaxes/intouch.tmLanguage.json`: lexical highlighting patterns, built-in - functions, data types, dot fields, and language scopes. -- `src/const.ts`: formatter keywords and operators. -- `src/nestingdef.ts` and `src/formatCore.ts`: block and indentation behavior. -- `language-configuration.json` and `snippets/vbi.json`: editor behavior and - authoring templates. -- `src/test/suite/testfiles/`: formatter fixtures that capture supported - formatting behavior. - -The runtime vendor documentation remains authoritative when it conflicts with -repository evidence. Any semantic uncertainty is an escalation point; do not -guess from a similar language. +Language knowledge is divided by responsibility: + +- `syntaxes/intouch.tmLanguage.json` provides lexical highlighting patterns, + built-in functions, Hermes helpers, dot fields, and presentation scopes. +- `packages/core/src/languageData.ts` provides canonical lexical keywords, + datatypes, operators, and punctuation. +- `packages/core/src/tokenizer.ts` and `parser.ts` provide canonical lexical + and structural interpretation. +- `packages/core/src/generatedFunctionCatalog.ts` is generated from the + TextMate grammar for completion and hover; it is not edited manually. +- `language-configuration.json` and `snippets/vbi.json` provide editor behavior + and authoring templates. +- core tests and `src/test/suite/testfiles/` capture parser and formatter + behavior, including incomplete input and real-world formatting cases. + +Runtime vendor documentation remains authoritative when it conflicts with +repository evidence. Semantic uncertainty is an escalation point; do not guess +from a similar language. ## Tooling boundary -Serena excludes QuickScript until a native InTouch language server exists. -ProjectAtlas can index these files as neutral text for repository navigation -and lexical search only. Neither tool currently supplies QuickScript symbols, -definitions, references, or diagnostics. - -## Target architecture +Serena excludes QuickScript because it does not natively support this language. +ProjectAtlas may index `.vbi` and `.vi` as neutral text for repository +navigation and lexical search. The extension's native language server supplies +QuickScript symbols, document-local definitions/references, completion, hover, +formatting, and diagnostics. -The approved target is: +## Implemented architecture ```text -packages/ - core/ - language-server/ - vscode-extension/ +packages/core -> packages/language-server -> src/extension.ts ``` -`packages/core` now establishes the editor-independent source and tokenizer -boundary. The language server must also remain independent of the VS Code API. -`packages/language-server` and `packages/vscode-extension` are still planned; -no language-server implementation or transport exists yet. - -The core tokenizer is the canonical lexical interpretation for every future -consumer. The structure parser, formatter, diagnostics, and language server -must reuse its lossless tokens instead of implementing independent string, -comment, keyword, operator, or whitespace recognition. - -The formatter is a direct core consumer, not a language-server consumer. Its -planned editor-independent engine will serve both a thin VS Code formatter -adapter and later LSP formatting. Migration happens first at the lexical layer -and then, after a formatting-capable structure parser exists, at the block and -indentation layer. +`packages/core` owns the editor-independent tokenizer, recoverable parser, +formatter, and semantic model. `packages/language-server` exposes those +features through LSP without depending on the VS Code API. `src/extension.ts` +is a thin VS Code language client. + +The tokenizer is the only lexical interpretation. The parser is the only block +and statement interpretation. Formatter and semantics reuse those models rather +than implementing independent string, comment, keyword, operator, whitespace, +or nesting recognition. + +The formatter directly consumes core tokens and parser structure. The language +server exposes the same engine through LSP formatting, and the VS Code client +uses that standard request. TextMate grammar, snippets, and themes remain +secondary presentation assets rather than semantic parsers. diff --git a/docs/testing/manual-hil.md b/docs/testing/manual-hil.md new file mode 100644 index 0000000..90c1e86 --- /dev/null +++ b/docs/testing/manual-hil.md @@ -0,0 +1,70 @@ +# Manual QuickScript HIL + +## Purpose + +This checklist validates the local extension against real, user-selected +`.vbi` and `.vi` files. Automated fixtures cannot confirm compatibility with +the user's production QuickScript corpus, so completion of this checklist is a +manual release gate. + +## Preparation + +1. Keep an untouched backup or use disposable copies of the real files. +2. Build the local extension with `npm run vscode:prepublish`. +3. Start the Extension Development Host with the repository's VS Code launch + configuration, or install the locally generated VSIX from `npm run makePackage`. +4. Open one representative `.vbi` and one representative `.vi` file and verify + that the language mode is `Intouch`. + +## Language-server checks + +For each file: + +1. Confirm that activation completes without an extension-host or language + server error. +2. Open the Outline view and confirm that local `DIM` variables and nested + `IF`, `FOR`, and evidenced `WHILE` blocks appear with plausible ranges. +3. Trigger completion in code and verify representative keywords, datatypes, + InTouch functions, Hermes helpers, local variables, and existing `CALL` + targets. +4. Hover a local variable, a known InTouch function, and a known Hermes helper; + verify that unknown project identifiers do not receive invented details. +5. Use Go to Definition and Find All References on a local `DIM` variable. + Confirm that results stay within the document and do not jump to unrelated + member fields or similarly named identifiers. +6. Review diagnostics. Confirm that valid files do not show false missing-block, + duplicate-local, or datatype errors. + +## Formatter safety checks + +Use disposable copies and review the full diff after formatting: + +1. Run **Format Document** once. +2. Confirm expected keyword casing, operator spacing, comma/semicolon spacing, + blank-line policy, and indentation for nested `IF`/`ELSE`/`ENDIF`, + `FOR`/`NEXT`, and configured comment/region blocks. +3. Confirm that string contents, brace-comment contents, apostrophe-comment + contents, dashed identifiers, instance prefixes, UNC paths, and a final line + without a newline retain their meaning and content. +4. Confirm that inline `IF ... ENDIF`, `EXIT FOR`, multiline IF expressions, + and incomplete trailing statements are not dropped or structurally moved. +5. Run **Format Document** a second time and confirm that it produces no diff. + +## Diagnostic recovery check + +In a separate disposable document, introduce one case at a time: + +- an `IF` without `ENDIF`; +- a `FOR` without `NEXT`; +- an unexpected `ELSE`, `ENDIF`, or `NEXT`; +- a duplicate local `DIM` name with different casing; +- an unknown datatype. + +Confirm that the expected diagnostic appears at a useful range, later symbols +and completion remain available, and removing the error clears the diagnostic. + +## Result recording + +Record the tested file types, representative constructs, any formatter diff, +and pass/fail status. Do not change the extension version, merge, publish, or +release until the user confirms this HIL gate. From a6180c09e06e0df380a850418eba36d11539d9b8 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 16:04:46 +0200 Subject: [PATCH 11/40] chore(extension): prepare HIL fix round 1 version --- package-lock.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2828af..f1219c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.0", + "version": "1.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.0", + "version": "1.5.1", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index 8601959..d6b60ed 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "intouch-language", - "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2025 vitalyruhl", + "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.0", + "version": "1.5.1", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { From 0855a0ed0942ed07f91d60ed5ce99200d6a058d4 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 16:07:06 +0200 Subject: [PATCH 12/40] fix(language): restore HIL formatter and function diagnostics --- dist/extension.js | 20 ++-- dist/server.js | 44 ++++---- packages/core/src/formatter.ts | 12 ++ packages/core/src/generatedFunctionCatalog.ts | 5 + packages/core/src/semantics.ts | 46 +++++++- packages/core/src/tokenizer.ts | 6 +- packages/core/test/tokenizer.test.ts | 8 ++ packages/language-server/src/features.ts | 4 +- packages/language-server/src/server.ts | 84 ++++++++++++-- .../language-server/src/workspaceFunctions.ts | 34 ++++++ .../language-server/test/features.test.ts | 104 ++++++++++++++++++ src/extension.ts | 5 +- syntaxes/intouch.tmLanguage.json | 2 +- 13 files changed, 328 insertions(+), 46 deletions(-) create mode 100644 packages/language-server/src/workspaceFunctions.ts diff --git a/dist/extension.js b/dist/extension.js index 1455886..da0f1b1 100644 --- a/dist/extension.js +++ b/dist/extension.js @@ -1,22 +1,22 @@ -"use strict";var Ea=Object.defineProperty;var pb=Object.getOwnPropertyDescriptor;var gb=Object.getOwnPropertyNames;var mb=Object.prototype.hasOwnProperty;var Nh=(n,e,t)=>()=>{if(t)throw t[0];try{return n&&(e=n(n=0)),e}catch(r){throw t=[r],r}};var P=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},jh=(n,e)=>{for(var t in e)Ea(n,t,{get:e[t],enumerable:!0})},_b=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gb(e))!mb.call(n,i)&&i!==t&&Ea(n,i,{get:()=>e[i],enumerable:!(r=pb(e,i))||r.enumerable});return n};var Hs=n=>_b(Ea({},"__esModule",{value:!0}),n);var Ft=P(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.boolean=yb;jt.string=Fh;jt.number=vb;jt.error=bb;jt.func=Lh;jt.array=Ah;jt.stringArray=Cb;jt.typedArray=wb;jt.thenable=kh;jt.asPromise=Db;function yb(n){return n===!0||n===!1}function Fh(n){return typeof n=="string"||n instanceof String}function vb(n){return typeof n=="number"||n instanceof Number}function bb(n){return n instanceof Error}function Lh(n){return typeof n=="function"}function Ah(n){return Array.isArray(n)}function Cb(n){return Ah(n)&&n.every(e=>Fh(e))}function wb(n,e){return Array.isArray(n)&&n.every(e)}function kh(n){return n&&Lh(n.then)}function Db(n){return n instanceof Promise?n:kh(n)?new Promise((e,t)=>{n.then(r=>e(r),r=>t(r))}):Promise.resolve(n)}});var oi=P(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.boolean=Sb;In.string=$h;In.number=Pb;In.error=Rb;In.func=Tb;In.array=Hh;In.stringArray=Ob;function Sb(n){return n===!0||n===!1}function $h(n){return typeof n=="string"||n instanceof String}function Pb(n){return typeof n=="number"||n instanceof Number}function Rb(n){return n instanceof Error}function Tb(n){return typeof n=="function"}function Hh(n){return Array.isArray(n)}function Ob(n){return Hh(n)&&n.every(e=>$h(e))}});var ec=P(W=>{"use strict";var Eb=W&&W.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qb=W&&W.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Mb=W&&W.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.LRUCache=hr.LinkedMap=hr.Touch=void 0;var it;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(it||(hr.Touch=it={}));var Us=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let t=this._map.get(e);return t?t.previous?.value:void 0}after(e){let t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=it.None){let r=this._map.get(e);if(r)return t!==it.None&&this.touch(r,t),r.value}set(e,t,r=it.None){let i=this._map.get(e);if(i)i.value=t,r!==it.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case it.None:this.addItemLast(i);break;case it.First:this.addItemFirst(i);break;case it.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 new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==it.First&&t!==it.Last)){if(t===it.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===it.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};hr.LinkedMap=Us;var tc=class extends Us{_limit;_ratio;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=it.AsNew){return super.get(e,t)}peek(e){return super.get(e,it.None)}set(e,t){return super.set(e,t,it.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};hr.LRUCache=tc});var zh=P(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.Disposable=void 0;var Wh;(function(n){function e(t){return{dispose:t}}n.create=e})(Wh||(Ws.Disposable=Wh={}))});var pr=P(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var rc;function ic(){if(rc===void 0)throw new Error("No runtime abstraction layer installed");return rc}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");rc=t}n.install=e})(ic||(ic={}));sc.default=ic});var ai=P(gr=>{"use strict";var xb=gr&&gr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gr,"__esModule",{value:!0});gr.Emitter=gr.Event=void 0;var Ib=xb(pr()),Kh;(function(n){let e={dispose(){}};n.None=function(){return e}})(Kh||(gr.Event=Kh={}));var oc=class{_callbacks;_contexts;add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new oc),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};gr.Emitter=ac});var Bs=P(_t=>{"use strict";var Nb=_t&&_t.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jb=_t&&_t.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Fb=_t&&_t.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.SharedArrayReceiverStrategy=ci.SharedArraySenderStrategy=void 0;var Hb=Bs(),Bi;(function(n){n.Continue=0,n.Cancelled=1})(Bi||(Bi={}));var lc=class{buffers;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]=Bi.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,Bi.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};ci.SharedArraySenderStrategy=lc;var dc=class{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Bi.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fc=class{token;constructor(e){this.token=new dc(e)}cancel(){}dispose(){}},hc=class{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new Hb.CancellationTokenSource:new fc(t)}};ci.SharedArrayReceiverStrategy=hc});var gc=P(ui=>{"use strict";var Ub=ui&&ui.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ui,"__esModule",{value:!0});ui.Semaphore=void 0;var Wb=Ub(pr()),pc=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Wb.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};ui.Semaphore=pc});var Vh=P(st=>{"use strict";var zb=st&&st.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Kb=st&&st.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Bb=st&&st.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let s=parseInt(i);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_c.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))}};st.ReadableStreamMessageReader=vc});var Zh=P(ot=>{"use strict";var Xb=ot&&ot.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Jb=ot&&ot.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Qb=ot&&ot.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(eC,r.byteLength.toString(),Qh),i.push(Qh),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};ot.WriteableStreamMessageWriter=Cc});var ep=P(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.AbstractMessageBuffer=void 0;var tC=13,nC=10,rC=`\r +"use strict";var Ea=Object.defineProperty;var pb=Object.getOwnPropertyDescriptor;var gb=Object.getOwnPropertyNames;var mb=Object.prototype.hasOwnProperty;var jh=(n,e,t)=>()=>{if(t)throw t[0];try{return n&&(e=n(n=0)),e}catch(r){throw t=[r],r}};var P=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},Fh=(n,e)=>{for(var t in e)Ea(n,t,{get:e[t],enumerable:!0})},_b=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gb(e))!mb.call(n,i)&&i!==t&&Ea(n,i,{get:()=>e[i],enumerable:!(r=pb(e,i))||r.enumerable});return n};var Hs=n=>_b(Ea({},"__esModule",{value:!0}),n);var Ft=P(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.boolean=yb;jt.string=Lh;jt.number=vb;jt.error=bb;jt.func=Ah;jt.array=kh;jt.stringArray=Cb;jt.typedArray=wb;jt.thenable=$h;jt.asPromise=Db;function yb(n){return n===!0||n===!1}function Lh(n){return typeof n=="string"||n instanceof String}function vb(n){return typeof n=="number"||n instanceof Number}function bb(n){return n instanceof Error}function Ah(n){return typeof n=="function"}function kh(n){return Array.isArray(n)}function Cb(n){return kh(n)&&n.every(e=>Lh(e))}function wb(n,e){return Array.isArray(n)&&n.every(e)}function $h(n){return n&&Ah(n.then)}function Db(n){return n instanceof Promise?n:$h(n)?new Promise((e,t)=>{n.then(r=>e(r),r=>t(r))}):Promise.resolve(n)}});var oi=P(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.boolean=Sb;In.string=Hh;In.number=Pb;In.error=Rb;In.func=Tb;In.array=Uh;In.stringArray=Ob;function Sb(n){return n===!0||n===!1}function Hh(n){return typeof n=="string"||n instanceof String}function Pb(n){return typeof n=="number"||n instanceof Number}function Rb(n){return n instanceof Error}function Tb(n){return typeof n=="function"}function Uh(n){return Array.isArray(n)}function Ob(n){return Uh(n)&&n.every(e=>Hh(e))}});var ec=P(W=>{"use strict";var Eb=W&&W.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qb=W&&W.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Mb=W&&W.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.LRUCache=hr.LinkedMap=hr.Touch=void 0;var it;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(it||(hr.Touch=it={}));var Us=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let t=this._map.get(e);return t?t.previous?.value:void 0}after(e){let t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=it.None){let r=this._map.get(e);if(r)return t!==it.None&&this.touch(r,t),r.value}set(e,t,r=it.None){let i=this._map.get(e);if(i)i.value=t,r!==it.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case it.None:this.addItemLast(i);break;case it.First:this.addItemFirst(i);break;case it.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 new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==it.First&&t!==it.Last)){if(t===it.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===it.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};hr.LinkedMap=Us;var tc=class extends Us{_limit;_ratio;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=it.AsNew){return super.get(e,t)}peek(e){return super.get(e,it.None)}set(e,t){return super.set(e,t,it.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};hr.LRUCache=tc});var Kh=P(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.Disposable=void 0;var zh;(function(n){function e(t){return{dispose:t}}n.create=e})(zh||(Ws.Disposable=zh={}))});var pr=P(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var rc;function ic(){if(rc===void 0)throw new Error("No runtime abstraction layer installed");return rc}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");rc=t}n.install=e})(ic||(ic={}));sc.default=ic});var ai=P(gr=>{"use strict";var xb=gr&&gr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gr,"__esModule",{value:!0});gr.Emitter=gr.Event=void 0;var Ib=xb(pr()),Bh;(function(n){let e={dispose(){}};n.None=function(){return e}})(Bh||(gr.Event=Bh={}));var oc=class{_callbacks;_contexts;add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new oc),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};gr.Emitter=ac});var Bs=P(_t=>{"use strict";var Nb=_t&&_t.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jb=_t&&_t.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Fb=_t&&_t.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.SharedArrayReceiverStrategy=ci.SharedArraySenderStrategy=void 0;var Hb=Bs(),Bi;(function(n){n.Continue=0,n.Cancelled=1})(Bi||(Bi={}));var lc=class{buffers;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]=Bi.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,Bi.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};ci.SharedArraySenderStrategy=lc;var dc=class{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Bi.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fc=class{token;constructor(e){this.token=new dc(e)}cancel(){}dispose(){}},hc=class{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new Hb.CancellationTokenSource:new fc(t)}};ci.SharedArrayReceiverStrategy=hc});var gc=P(ui=>{"use strict";var Ub=ui&&ui.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ui,"__esModule",{value:!0});ui.Semaphore=void 0;var Wb=Ub(pr()),pc=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Wb.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};ui.Semaphore=pc});var Xh=P(st=>{"use strict";var zb=st&&st.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Kb=st&&st.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Bb=st&&st.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let s=parseInt(i);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_c.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))}};st.ReadableStreamMessageReader=vc});var ep=P(ot=>{"use strict";var Xb=ot&&ot.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Jb=ot&&ot.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Qb=ot&&ot.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(eC,r.byteLength.toString(),Yh),i.push(Yh),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};ot.WriteableStreamMessageWriter=Cc});var tp=P(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.AbstractMessageBuffer=void 0;var tC=13,nC=10,rC=`\r `,wc=class{_encoding;_chunks;_totalLength;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 t=0,r=0,i=0,s=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],o=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,o}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let s=this._chunks[i];if(s.byteLength>e){let o=s.slice(0,e);t.set(o,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else t.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return t}};Xs.AbstractMessageBuffer=wc});var ip=P(K=>{"use strict";var iC=K&&K.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sC=K&&K.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oC=K&&K.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{},warn:()=>{},info:()=>{},log:()=>{}});var ue;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(ue||(K.Trace=ue={}));var Tc;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(Tc||(K.TraceValue=Tc={}));K.TraceValues=Tc;(function(n){function e(r){if(!Me.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(ue||(K.Trace=ue={}));var St;(function(n){n.Text="text",n.JSON="json"})(St||(K.TraceFormat=St={}));(function(n){function e(t){return Me.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(St||(K.TraceFormat=St={}));var Oc;(function(n){n.type=new X.NotificationType("$/setTrace")})(Oc||(K.SetTraceNotification=Oc={}));var Js;(function(n){n.type=new X.NotificationType("$/logTrace")})(Js||(K.LogTraceNotification=Js={}));var Ji;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ji||(K.ConnectionErrors=Ji={}));var di=class n extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};K.ConnectionError=di;var Ec;(function(n){function e(t){let r=t;return r&&Me.func(r.cancelUndispatched)}n.is=e})(Ec||(K.ConnectionStrategy=Ec={}));var Qs;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(Qs||(K.IdCancellationReceiverStrategy=Qs={}));var qc;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(qc||(K.RequestCancellationReceiverStrategy=qc={}));var Ys;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Dc.CancellationTokenSource}});function e(t){return Qs.is(t)||qc.is(t)}n.is=e})(Ys||(K.CancellationReceiverStrategy=Ys={}));var Zs;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(Qi.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Me.func(r.sendCancellation)&&Me.func(r.cleanup)}n.is=e})(Zs||(K.CancellationSenderStrategy=Zs={}));var eo;(function(n){n.Message=Object.freeze({receiver:Ys.Message,sender:Zs.Message});function e(t){let r=t;return r&&Ys.is(r.receiver)&&Zs.is(r.sender)}n.is=e})(eo||(K.CancellationStrategy=eo={}));var to;(function(n){function e(t){let r=t;return r&&Me.func(r.handleMessage)}n.is=e})(to||(K.MessageStrategy=to={}));var rp;(function(n){function e(t){let r=t;return r&&(eo.is(r.cancellationStrategy)||Ec.is(r.connectionStrategy)||to.is(r.messageStrategy)||Me.number(r.maxParallelism))}n.is=e})(rp||(K.ConnectionOptions=rp={}));var Wt;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(Wt||(Wt={}));function cC(n,e,t,r){let i=t!==void 0?t:K.NullLogger,s=0,o=0,a=0,u="2.0",l=r?.maxParallelism??-1,f=0,p,h=new Map,g,_=new Map,v=new Map,R,q=new np.LinkedMap,w=new Map,M=new Set,j=new Map,F=ue.Off,oe=St.Text,te,Te=Wt.New,Pn=new Vi.Emitter,Qr=new Vi.Emitter,rr=new Vi.Emitter,Yr=new Vi.Emitter,Zr=new Vi.Emitter,Mt=r&&r.cancellationStrategy?r.cancellationStrategy:eo.Message;function Rn(y){}function xt(){return Te===Wt.Listening}function Tn(){return Te===Wt.Closed}function Ht(){return Te===Wt.Disposed}function Oe(){(Te===Wt.New||Te===Wt.Listening)&&(Te=Wt.Closed,Qr.fire(void 0))}function Ui(y){Pn.fire([y,void 0,void 0])}function Zt(y){Pn.fire(y)}n.onClose(Oe),n.onError(Ui),e.onClose(Oe),e.onError(Zt);function ir(y){if(y===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}function ei(y){return y===null?"res-unknown-"+(++a).toString():"res-"+y.toString()}function Mr(){return"not-"+(++o).toString()}function en(y,E){X.Message.isRequest(E)?y.set(ir(E.id),E):X.Message.isResponse(E)?l===-1?y.set(ei(E.id),E):ar(E):y.set(Mr(),E)}function xr(){R||q.size===0||l!==-1&&f>=l||(R=(0,tp.default)().timer.setImmediate(async()=>{if(R=void 0,q.size===0||l!==-1&&f>=l)return;let y=q.shift(),E;try{f++;let I=r?.messageStrategy;to.is(I)?E=I.handleMessage(y,ti):E=ti(y)}catch(I){i.error(`Processing message queue failed: ${I.toString()}`)}finally{E instanceof Promise?E.then(()=>{f--,xr()}).catch(I=>{i.error(`Processing message queue failed: ${I.toString()}`)}):f--,xr()}}))}async function ti(y){return X.Message.isRequest(y)?or(y):X.Message.isNotification(y)?Wi(y):X.Message.isResponse(y)?ar(y):ni(y)}let sr=y=>{try{if(X.Message.isNotification(y)&&y.method===Qi.type.method){let E=y.params.id,I=ir(E),H=q.get(I);if(X.Message.isRequest(H)){let ae=r?.connectionStrategy,ie=ae&&ae.cancelUndispatched?ae.cancelUndispatched(H,Rn):void 0;if(ie&&(ie.error!==void 0||ie.result!==void 0)){q.delete(I),j.delete(E),ie.id=H.id,cr(ie,y.method,Date.now()),e.write(ie).catch(()=>i.error("Sending response for canceled message failed."));return}}let Z=j.get(E);if(Z!==void 0){Z.cancel(),On(y);return}else M.add(E)}en(q,y)}finally{xr()}};async function or(y){if(Ht())return Promise.resolve();function E(Ee,ke,pe){let ye={jsonrpc:u,id:y.id};return Ee instanceof X.ResponseError?ye.error=Ee.toJson():ye.result=Ee===void 0?null:Ee,cr(ye,ke,pe),e.write(ye)}function I(Ee,ke,pe){let ye={jsonrpc:u,id:y.id,error:Ee.toJson()};return cr(ye,ke,pe),e.write(ye)}ur(y);let H=h.get(y.method),Z,ae;H&&(Z=H.type,ae=H.handler);let ie=Date.now();if(ae||p){let Ee=y.id??String(Date.now()),ke=Qs.is(Mt.receiver)?Mt.receiver.createCancellationTokenSource(Ee):Mt.receiver.createCancellationTokenSource(y);y.id!==null&&M.has(y.id)&&ke.cancel(),y.id!==null&&j.set(Ee,ke);try{let pe;if(ae)if(y.params===void 0){if(Z!==void 0&&Z.numberOfParams!==0)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines ${Z.numberOfParams} params but received none.`),y.method,ie);pe=ae(ke.token)}else if(Array.isArray(y.params)){if(Z!==void 0&&Z.parameterStructures===X.ParameterStructures.byName)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,ie);pe=ae(...y.params,ke.token)}else{if(Z!==void 0&&Z.parameterStructures===X.ParameterStructures.byPosition)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,ie);pe=ae(y.params,ke.token)}else p&&(pe=p(y.method,y.params,ke.token));let ye=await pe;await E(ye,y.method,ie)}catch(pe){pe instanceof X.ResponseError?await E(pe,y.method,ie):pe&&Me.string(pe.message)?await I(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${pe.message}`),y.method,ie):await I(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,ie)}finally{j.delete(Ee)}}else await I(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,ie)}function ar(y){if(!Ht())if(y.id===null)y.error?i.error(`Received response message without id: Error is: +${f}`);let h=f.substr(0,p),g=f.substr(p+1).trim();a.set(e?h.toLowerCase():h,g)}return a}tryReadBody(e){if(!(this._totalLengththis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],o=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,o}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let s=this._chunks[i];if(s.byteLength>e){let o=s.slice(0,e);t.set(o,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else t.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return t}};Xs.AbstractMessageBuffer=wc});var sp=P(K=>{"use strict";var iC=K&&K.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sC=K&&K.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oC=K&&K.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{},warn:()=>{},info:()=>{},log:()=>{}});var ue;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(ue||(K.Trace=ue={}));var Tc;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(Tc||(K.TraceValue=Tc={}));K.TraceValues=Tc;(function(n){function e(r){if(!Me.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(ue||(K.Trace=ue={}));var St;(function(n){n.Text="text",n.JSON="json"})(St||(K.TraceFormat=St={}));(function(n){function e(t){return Me.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(St||(K.TraceFormat=St={}));var Oc;(function(n){n.type=new X.NotificationType("$/setTrace")})(Oc||(K.SetTraceNotification=Oc={}));var Js;(function(n){n.type=new X.NotificationType("$/logTrace")})(Js||(K.LogTraceNotification=Js={}));var Ji;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ji||(K.ConnectionErrors=Ji={}));var di=class n extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};K.ConnectionError=di;var Ec;(function(n){function e(t){let r=t;return r&&Me.func(r.cancelUndispatched)}n.is=e})(Ec||(K.ConnectionStrategy=Ec={}));var Qs;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(Qs||(K.IdCancellationReceiverStrategy=Qs={}));var qc;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(qc||(K.RequestCancellationReceiverStrategy=qc={}));var Ys;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Dc.CancellationTokenSource}});function e(t){return Qs.is(t)||qc.is(t)}n.is=e})(Ys||(K.CancellationReceiverStrategy=Ys={}));var Zs;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(Qi.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Me.func(r.sendCancellation)&&Me.func(r.cleanup)}n.is=e})(Zs||(K.CancellationSenderStrategy=Zs={}));var eo;(function(n){n.Message=Object.freeze({receiver:Ys.Message,sender:Zs.Message});function e(t){let r=t;return r&&Ys.is(r.receiver)&&Zs.is(r.sender)}n.is=e})(eo||(K.CancellationStrategy=eo={}));var to;(function(n){function e(t){let r=t;return r&&Me.func(r.handleMessage)}n.is=e})(to||(K.MessageStrategy=to={}));var ip;(function(n){function e(t){let r=t;return r&&(eo.is(r.cancellationStrategy)||Ec.is(r.connectionStrategy)||to.is(r.messageStrategy)||Me.number(r.maxParallelism))}n.is=e})(ip||(K.ConnectionOptions=ip={}));var Wt;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(Wt||(Wt={}));function cC(n,e,t,r){let i=t!==void 0?t:K.NullLogger,s=0,o=0,a=0,u="2.0",l=r?.maxParallelism??-1,f=0,p,h=new Map,g,_=new Map,v=new Map,R,q=new rp.LinkedMap,w=new Map,M=new Set,j=new Map,F=ue.Off,oe=St.Text,te,Te=Wt.New,Pn=new Vi.Emitter,Qr=new Vi.Emitter,rr=new Vi.Emitter,Yr=new Vi.Emitter,Zr=new Vi.Emitter,Mt=r&&r.cancellationStrategy?r.cancellationStrategy:eo.Message;function Rn(y){}function xt(){return Te===Wt.Listening}function Tn(){return Te===Wt.Closed}function Ht(){return Te===Wt.Disposed}function Oe(){(Te===Wt.New||Te===Wt.Listening)&&(Te=Wt.Closed,Qr.fire(void 0))}function Ui(y){Pn.fire([y,void 0,void 0])}function Zt(y){Pn.fire(y)}n.onClose(Oe),n.onError(Ui),e.onClose(Oe),e.onError(Zt);function ir(y){if(y===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}function ei(y){return y===null?"res-unknown-"+(++a).toString():"res-"+y.toString()}function Mr(){return"not-"+(++o).toString()}function en(y,E){X.Message.isRequest(E)?y.set(ir(E.id),E):X.Message.isResponse(E)?l===-1?y.set(ei(E.id),E):ar(E):y.set(Mr(),E)}function xr(){R||q.size===0||l!==-1&&f>=l||(R=(0,np.default)().timer.setImmediate(async()=>{if(R=void 0,q.size===0||l!==-1&&f>=l)return;let y=q.shift(),E;try{f++;let I=r?.messageStrategy;to.is(I)?E=I.handleMessage(y,ti):E=ti(y)}catch(I){i.error(`Processing message queue failed: ${I.toString()}`)}finally{E instanceof Promise?E.then(()=>{f--,xr()}).catch(I=>{i.error(`Processing message queue failed: ${I.toString()}`)}):f--,xr()}}))}async function ti(y){return X.Message.isRequest(y)?or(y):X.Message.isNotification(y)?Wi(y):X.Message.isResponse(y)?ar(y):ni(y)}let sr=y=>{try{if(X.Message.isNotification(y)&&y.method===Qi.type.method){let E=y.params.id,I=ir(E),H=q.get(I);if(X.Message.isRequest(H)){let ae=r?.connectionStrategy,ie=ae&&ae.cancelUndispatched?ae.cancelUndispatched(H,Rn):void 0;if(ie&&(ie.error!==void 0||ie.result!==void 0)){q.delete(I),j.delete(E),ie.id=H.id,cr(ie,y.method,Date.now()),e.write(ie).catch(()=>i.error("Sending response for canceled message failed."));return}}let Z=j.get(E);if(Z!==void 0){Z.cancel(),On(y);return}else M.add(E)}en(q,y)}finally{xr()}};async function or(y){if(Ht())return Promise.resolve();function E(Ee,ke,pe){let ye={jsonrpc:u,id:y.id};return Ee instanceof X.ResponseError?ye.error=Ee.toJson():ye.result=Ee===void 0?null:Ee,cr(ye,ke,pe),e.write(ye)}function I(Ee,ke,pe){let ye={jsonrpc:u,id:y.id,error:Ee.toJson()};return cr(ye,ke,pe),e.write(ye)}ur(y);let H=h.get(y.method),Z,ae;H&&(Z=H.type,ae=H.handler);let ie=Date.now();if(ae||p){let Ee=y.id??String(Date.now()),ke=Qs.is(Mt.receiver)?Mt.receiver.createCancellationTokenSource(Ee):Mt.receiver.createCancellationTokenSource(y);y.id!==null&&M.has(y.id)&&ke.cancel(),y.id!==null&&j.set(Ee,ke);try{let pe;if(ae)if(y.params===void 0){if(Z!==void 0&&Z.numberOfParams!==0)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines ${Z.numberOfParams} params but received none.`),y.method,ie);pe=ae(ke.token)}else if(Array.isArray(y.params)){if(Z!==void 0&&Z.parameterStructures===X.ParameterStructures.byName)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,ie);pe=ae(...y.params,ke.token)}else{if(Z!==void 0&&Z.parameterStructures===X.ParameterStructures.byPosition)return I(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,ie);pe=ae(y.params,ke.token)}else p&&(pe=p(y.method,y.params,ke.token));let ye=await pe;await E(ye,y.method,ie)}catch(pe){pe instanceof X.ResponseError?await E(pe,y.method,ie):pe&&Me.string(pe.message)?await I(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${pe.message}`),y.method,ie):await I(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,ie)}finally{j.delete(Ee)}}else await I(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,ie)}function ar(y){if(!Ht())if(y.id===null)y.error?i.error(`Received response message without id: Error is: ${JSON.stringify(y.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let E=y.id,I=w.get(E);if(ri(y,I),I!==void 0){w.delete(E);try{if(y.error){let H=y.error;I.reject(new X.ResponseError(H.code,H.message,H.data))}else if(y.result!==void 0)I.resolve(y.result);else throw new Error("Should never happen.")}catch(H){H.message?i.error(`Response handler '${I.method}' failed with message: ${H.message}`):i.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}async function Wi(y){if(Ht())return;let E,I;if(y.method===Qi.type.method){let H=y.params.id;M.delete(H),On(y);return}else{let H=_.get(y.method);H&&(I=H.handler,E=H.type)}if(I||g)try{if(On(y),I)if(y.params===void 0)E!==void 0&&E.numberOfParams!==0&&E.parameterStructures!==X.ParameterStructures.byName&&i.error(`Notification ${y.method} defines ${E.numberOfParams} params but received none.`),await I();else if(Array.isArray(y.params)){let H=y.params;y.method===Xi.type.method&&H.length===2&&Sc.is(H[0])?await I({token:H[0],value:H[1]}):(E!==void 0&&(E.parameterStructures===X.ParameterStructures.byName&&i.error(`Notification ${y.method} defines parameters by name but received parameters by position`),E.numberOfParams!==y.params.length&&i.error(`Notification ${y.method} defines ${E.numberOfParams} params but received ${H.length} arguments`)),await I(...H))}else E!==void 0&&E.parameterStructures===X.ParameterStructures.byPosition&&i.error(`Notification ${y.method} defines parameters by position but received parameters by name`),await I(y.params);else g&&await g(y.method,y.params)}catch(H){H.message?i.error(`Notification handler '${y.method}' failed with message: ${H.message}`):i.error(`Notification handler '${y.method}' failed unexpectedly.`)}else rr.fire(y)}function ni(y){if(!y){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(y,null,4)}`);let E=y;if(Me.string(E.id)||Me.number(E.id)){let I=E.id,H=w.get(I);H&&H.reject(new Error("The received response has neither a result nor an error property."))}}function wt(y){if(y!=null)switch(F){case ue.Verbose:return JSON.stringify(y,null,4);case ue.Compact:return JSON.stringify(y);default:return}}function zi(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&y.params&&(E=`Params: ${wt(y.params)}`),te.log(`Sending request '${y.method} - (${y.id})'.`,E)}else tt("send-request",y)}function tn(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&(y.params?E=`Params: ${wt(y.params)}`:E="No parameters provided."),te.log(`Sending notification '${y.method}'.`,E)}else tt("send-notification",y)}function cr(y,E,I){if(!(F===ue.Off||!te))if(oe===St.Text){let H;(F===ue.Verbose||F===ue.Compact)&&(y.error&&y.error.data?H=`Error data: ${wt(y.error.data)}`:y.result?H=`Result: ${wt(y.result)}`:y.error===void 0&&(H="No result returned.")),te.log(`Sending response '${E} - (${y.id})'. Processing request took ${Date.now()-I}ms`,H)}else tt("send-response",y)}function ur(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&y.params&&(E=`Params: ${wt(y.params)}`),te.log(`Received request '${y.method} - (${y.id})'.`,E)}else tt("receive-request",y)}function On(y){if(!(F===ue.Off||!te||y.method===Js.type.method))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&(y.params?E=`Params: ${wt(y.params)}`:E="No parameters provided."),te.log(`Received notification '${y.method}'.`,E)}else tt("receive-notification",y)}function ri(y,E){if(!(F===ue.Off||!te))if(oe===St.Text){let I;if((F===ue.Verbose||F===ue.Compact)&&(y.error&&y.error.data?I=`Error data: ${wt(y.error.data)}`:y.result?I=`Result: ${wt(y.result)}`:y.error===void 0&&(I="No result returned.")),E){let H=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";te.log(`Received response '${E.method} - (${y.id})' in ${Date.now()-E.timerStart}ms.${H}`,I)}else te.log(`Received response ${y.id} without active response promise.`,I)}else tt("receive-response",y)}function tt(y,E){if(!te||F===ue.Off)return;let I={isLSPMessage:!0,type:y,message:E,timestamp:Date.now()};te.log(I)}function Ut(){if(Tn())throw new di(Ji.Closed,"Connection is closed.");if(Ht())throw new di(Ji.Disposed,"Connection is disposed.")}function nt(){if(xt())throw new di(Ji.AlreadyListening,"Connection is already listening")}function Ki(){if(!xt())throw new Error("Call listen() first.")}function Ye(y){return y===void 0?null:y}function En(y){if(y!==null)return y}function ii(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}function Ir(y,E){switch(y){case X.ParameterStructures.auto:return ii(E)?En(E):[Ye(E)];case X.ParameterStructures.byName:if(!ii(E))throw new Error("Received parameters by name but param is not an object literal.");return En(E);case X.ParameterStructures.byPosition:return[Ye(E)];default:throw new Error(`Unknown parameter structure ${y.toString()}`)}}function lr(y,E){let I,H=y.numberOfParams;switch(H){case 0:I=void 0;break;case 1:I=Ir(y.parameterStructures,E[0]);break;default:I=[];for(let Z=0;Z{Ut();let I,H;if(Me.string(y)){I=y;let ae=E[0],ie=0,Ee=X.ParameterStructures.auto;X.ParameterStructures.is(ae)&&(ie=1,Ee=ae);let ke=E.length,pe=ke-ie;switch(pe){case 0:H=void 0;break;case 1:H=Ir(Ee,E[ie]);break;default:if(Ee===X.ParameterStructures.byName)throw new Error(`Received ${pe} parameters for 'by Name' notification parameter structure.`);H=E.slice(ie,ke).map(ye=>Ye(ye));break}}else{let ae=E;I=y.method,H=lr(y,ae)}let Z={jsonrpc:u,method:I,params:H};return tn(Z),e.write(Z).catch(ae=>{throw i.error("Sending notification failed."),ae})},onNotification:(y,E)=>{Ut();let I;return Me.func(y)?g=y:E&&(Me.string(y)?(I=y,_.set(y,{type:void 0,handler:E})):(I=y.method,_.set(y.method,{type:y,handler:E}))),{dispose:()=>{I!==void 0?_.get(I)?.handler===E&&_.delete(I):g===y&&(g=void 0)}}},onProgress:(y,E,I)=>{if(v.has(E))throw new Error(`Progress handler for token ${E} already registered`);return v.set(E,I),{dispose:()=>{v.get(E)===I&&v.delete(E)}}},sendProgress:(y,E,I)=>It.sendNotification(Xi.type,{token:E,value:I}),onUnhandledProgress:Yr.event,sendRequest:(y,...E)=>{Ut(),Ki();function I(ye,rt){let pt=Mt.sender.sendCancellation(ye,rt);pt===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${rt}`):pt.catch(()=>{i.log(`Sending cancellation messages for id ${rt} failed.`)})}let H,Z,ae;if(Me.string(y)){H=y;let ye=E[0],rt=E[E.length-1],pt=0,qn=X.ParameterStructures.auto;X.ParameterStructures.is(ye)&&(pt=1,qn=ye);let Dt=E.length;Dc.CancellationToken.is(rt)&&(Dt=Dt-1,ae=rt);let gt=Dt-pt;switch(gt){case 0:Z=void 0;break;case 1:Z=Ir(qn,E[pt]);break;default:if(qn===X.ParameterStructures.byName)throw new Error(`Received ${gt} parameters for 'by Name' request parameter structure.`);Z=E.slice(pt,Dt).map(si=>Ye(si));break}}else{let ye=E;H=y.method,Z=lr(y,ye);let rt=y.numberOfParams;ae=Dc.CancellationToken.is(ye[rt])?ye[rt]:void 0}let ie=s++,Ee,ke=!1;ae!==void 0&&(ae.isCancellationRequested?ke=!0:Ee=ae.onCancellationRequested(()=>{I(It,ie)}));let pe={jsonrpc:u,id:ie,method:H,params:Z};return zi(pe),typeof Mt.sender.enableCancellation=="function"&&Mt.sender.enableCancellation(pe),new Promise(async(ye,rt)=>{let pt=gt=>{ye(gt),Mt.sender.cleanup(ie),Ee?.dispose()},qn=gt=>{rt(gt),Mt.sender.cleanup(ie),Ee?.dispose()},Dt={method:H,timerStart:Date.now(),resolve:pt,reject:qn};try{w.set(ie,Dt),await e.write(pe),ke&&I(It,ie)}catch(gt){throw w.delete(ie),Dt.reject(new X.ResponseError(X.ErrorCodes.MessageWriteError,gt.message?gt.message:"Unknown reason")),i.error("Sending request failed."),gt}})},onRequest:(y,E)=>{Ut();let I=null;return Rc.is(y)?(I=void 0,p=y):Me.string(y)?(I=null,E!==void 0&&(I=y,h.set(y,{handler:E,type:void 0}))):E!==void 0&&(I=y.method,h.set(y.method,{type:y,handler:E})),{dispose:()=>{I!==null&&(I!==void 0?h.get(I)?.handler===E&&h.delete(I):p===y&&(p=void 0))}}},hasPendingResponse:()=>w.size>0,trace:async(y,E,I)=>{let H=!1,Z=St.Text;I!==void 0&&(Me.boolean(I)?H=I:(H=I.sendNotification||!1,Z=I.traceFormat||St.Text)),F=y,oe=Z,F===ue.Off?te=void 0:te=E,H&&!Tn()&&!Ht()&&await It.sendNotification(Oc.type,{value:ue.toString(y)})},onError:Pn.event,onClose:Qr.event,onUnhandledNotification:rr.event,onDispose:Zr.event,end:()=>{e.end()},dispose:()=>{if(Ht())return;Te=Wt.Disposed,Zr.fire(void 0);let y=new X.ResponseError(X.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let E of w.values())E.reject(y);w=new Map,j=new Map,M=new Set,q=new np.LinkedMap,Me.func(e.dispose)&&e.dispose(),Me.func(n.dispose)&&n.dispose()},listen:()=>{Ut(),nt(),Te=Wt.Listening,n.listen(sr)},inspect:()=>{(0,tp.default)().console.log("inspect")}};return It.onNotification(Js.type,y=>{if(F===ue.Off||!te)return;let E=F===ue.Verbose||F===ue.Compact;te.log(y.message,E?y.verbose:void 0)}),It.onNotification(Xi.type,async y=>{let E=v.get(y.token);E?await E(y.value):Yr.fire(y)}),It}});var Nn=P(S=>{"use strict";var uC=S&&S.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(S,"__esModule",{value:!0});S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.AbstractMessageBuffer=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.SharedArrayReceiverStrategy=S.SharedArraySenderStrategy=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.MessageStrategy=S.CancellationStrategy=S.CancellationSenderStrategy=S.RequestCancellationReceiverStrategy=S.IdCancellationReceiverStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=S.SetTraceNotification=S.TraceFormat=S.TraceValues=S.TraceValue=S.Trace=void 0;var ve=ec();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return ve.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return ve.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return ve.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return ve.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return ve.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return ve.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return ve.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return ve.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return ve.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return ve.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return ve.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return ve.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return ve.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return ve.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return ve.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return ve.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return ve.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return ve.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return ve.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return ve.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return ve.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return ve.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return ve.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return ve.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return ve.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return ve.ParameterStructures}});var Mc=nc();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return Mc.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return Mc.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return Mc.Touch}});var lC=zh();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return lC.Disposable}});var sp=ai();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return sp.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return sp.Emitter}});var op=Bs();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return op.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return op.CancellationToken}});var ap=Bh();Object.defineProperty(S,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return ap.SharedArraySenderStrategy}});Object.defineProperty(S,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return ap.SharedArrayReceiverStrategy}});var xc=Vh();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return xc.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return xc.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return xc.ReadableStreamMessageReader}});var Ic=Zh();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return Ic.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ic.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ic.WriteableStreamMessageWriter}});var dC=ep();Object.defineProperty(S,"AbstractMessageBuffer",{enumerable:!0,get:function(){return dC.AbstractMessageBuffer}});var He=ip();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return He.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return He.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return He.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return He.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return He.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return He.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return He.Trace}});Object.defineProperty(S,"TraceValue",{enumerable:!0,get:function(){return He.TraceValue}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return He.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return He.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return He.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return He.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return He.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return He.CancellationReceiverStrategy}});Object.defineProperty(S,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return He.IdCancellationReceiverStrategy}});Object.defineProperty(S,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return He.RequestCancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return He.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return He.CancellationStrategy}});Object.defineProperty(S,"MessageStrategy",{enumerable:!0,get:function(){return He.MessageStrategy}});Object.defineProperty(S,"TraceValues",{enumerable:!0,get:function(){return He.TraceValues}});var fC=uC(pr());S.RAL=fC.default});var ho={};jh(ho,{AnnotatedTextEdit:()=>jn,ApplyKind:()=>tu,ChangeAnnotation:()=>mr,ChangeAnnotationIdentifier:()=>Be,CodeAction:()=>_u,CodeActionContext:()=>mu,CodeActionKind:()=>gu,CodeActionTag:()=>co,CodeActionTriggerKind:()=>is,CodeDescription:()=>Wc,CodeLens:()=>yu,Color:()=>ro,ColorInformation:()=>Lc,ColorPresentation:()=>Ac,Command:()=>jr,CompletionItem:()=>ru,CompletionItemKind:()=>Jc,CompletionItemLabelDetails:()=>nu,CompletionItemTag:()=>Yc,CompletionList:()=>iu,CreateFile:()=>hi,DeleteFile:()=>gi,Diagnostic:()=>es,DiagnosticRelatedInformation:()=>io,DiagnosticSeverity:()=>Hc,DiagnosticTag:()=>Uc,DocumentHighlight:()=>uu,DocumentHighlightKind:()=>cu,DocumentLink:()=>bu,DocumentSymbol:()=>pu,DocumentUri:()=>Nc,EOL:()=>hC,FoldingRange:()=>$c,FoldingRangeKind:()=>kc,FormattingOptions:()=>vu,Hover:()=>su,InlayHint:()=>Eu,InlayHintKind:()=>uo,InlayHintLabelPart:()=>lo,InlineCompletionContext:()=>Nu,InlineCompletionItem:()=>qu,InlineCompletionList:()=>Mu,InlineCompletionTriggerKind:()=>xu,InlineValueContext:()=>Ou,InlineValueEvaluatableExpression:()=>Tu,InlineValueText:()=>Pu,InlineValueVariableLookup:()=>Ru,InsertReplaceEdit:()=>Zc,InsertTextFormat:()=>Qc,InsertTextMode:()=>eu,LanguageKind:()=>Vc,Location:()=>Zi,LocationLink:()=>Fc,MarkedString:()=>rs,MarkupContent:()=>_r,MarkupKind:()=>ao,OptionalVersionedTextDocumentIdentifier:()=>ns,ParameterInformation:()=>ou,Position:()=>Lt,Range:()=>xe,RenameFile:()=>pi,SelectedCompletionInfo:()=>Iu,SelectionRange:()=>Cu,SemanticTokenModifiers:()=>Du,SemanticTokenTypes:()=>wu,SemanticTokens:()=>Su,SignatureInformation:()=>au,SnippetTextEdit:()=>zc,StringValue:()=>fo,SymbolInformation:()=>fu,SymbolKind:()=>lu,SymbolTag:()=>du,TextDocument:()=>Fu,TextDocumentEdit:()=>ts,TextDocumentIdentifier:()=>Bc,TextDocumentItem:()=>Xc,TextEdit:()=>nn,URI:()=>no,VersionedTextDocumentIdentifier:()=>Gc,WorkspaceChange:()=>Kc,WorkspaceEdit:()=>so,WorkspaceFolder:()=>ju,WorkspaceSymbol:()=>hu,integer:()=>jc,uinteger:()=>Yi});var Nc,no,jc,Yi,Lt,xe,Zi,Fc,ro,Lc,Ac,kc,$c,io,Hc,Uc,Wc,es,jr,nn,mr,Be,jn,ts,hi,pi,gi,so,fi,zc,oo,Kc,Bc,Gc,ns,Vc,Xc,ao,_r,Jc,Qc,Yc,Zc,eu,tu,nu,ru,iu,rs,su,ou,au,cu,uu,lu,du,fu,hu,pu,gu,is,mu,co,_u,yu,vu,bu,Cu,wu,Du,Su,Pu,Ru,Tu,Ou,uo,lo,Eu,fo,qu,Mu,xu,Iu,Nu,ju,hC,Fu,Lu,C,po=Nh(()=>{"use strict";(function(n){function e(t){return typeof t=="string"}n.is=e})(Nc||(Nc={}));(function(n){function e(t){return typeof t=="string"}n.is=e})(no||(no={}));(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(jc||(jc={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Yi||(Yi={}));(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Yi.MAX_VALUE),i===Number.MAX_VALUE&&(i=Yi.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}n.is=t})(Lt||(Lt={}));(function(n){function e(r,i,s,o){if(C.uinteger(r)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(o))return{start:Lt.create(r,i),end:Lt.create(s,o)};if(Lt.is(r)&&Lt.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Lt.is(i.start)&&Lt.is(i.end)}n.is=t})(xe||(xe={}));(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}n.is=t})(Zi||(Zi={}));(function(n){function e(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.targetRange)&&C.string(i.targetUri)&&xe.is(i.targetSelectionRange)&&(xe.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}n.is=t})(Fc||(Fc={}));(function(n){function e(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}n.is=t})(ro||(ro={}));(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&ro.is(i.color)}n.is=t})(Lc||(Lc={}));(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.undefined(i.textEdit)||nn.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,nn.is))}n.is=t})(Ac||(Ac={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(kc||(kc={}));(function(n){function e(r,i,s,o,a,u){let l={startLine:r,endLine:i};return C.defined(s)&&(l.startCharacter=s),C.defined(o)&&(l.endCharacter=o),C.defined(a)&&(l.kind=a),C.defined(u)&&(l.collapsedText=u),l}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}n.is=t})($c||($c={}));(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&Zi.is(i.location)&&C.string(i.message)}n.is=t})(io||(io={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Hc||(Hc={}));(function(n){n.Unnecessary=1,n.Deprecated=2})(Uc||(Uc={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&C.string(r.href)}n.is=e})(Wc||(Wc={}));(function(n){function e(s,o,a,u,l,f){let p={range:s,message:o};return C.defined(a)&&(p.severity=a),C.defined(u)&&(p.code=u),C.defined(l)&&(p.source=l),C.defined(f)&&(p.relatedInformation=f),p}n.create=e;function t(s){var o;let a=s;return C.defined(a)&&xe.is(a.range)&&(C.string(a.message)||_r.is(a.message))&&(C.number(a.severity)||C.undefined(a.severity))&&(C.integer(a.code)||C.string(a.code)||C.undefined(a.code))&&(C.undefined(a.codeDescription)||C.string((o=a.codeDescription)===null||o===void 0?void 0:o.href))&&(C.string(a.source)||C.undefined(a.source))&&(C.undefined(a.relatedInformation)||C.typedArray(a.relatedInformation,io.is))}n.is=t;function r(s){return C.string(s.message)}n.is3_17=r;function i(s){if(C.string(s.message))return s.message;if(_r.is(s.message))return s.message.value;throw new Error(`Unknown message type ${typeof s.message}`)}n.getMessageString=i})(es||(es={}));(function(n){function e(r,i,...s){let o={title:r,command:i};return C.defined(s)&&s.length>0&&(o.arguments=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.title)&&(i.tooltip===void 0||C.string(i.tooltip))&&C.string(i.command)}n.is=t})(jr||(jr={}));(function(n){function e(s,o){return{range:s,newText:o}}n.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){let o=s;return C.objectLiteral(o)&&C.string(o.newText)&&xe.is(o.range)}n.is=i})(nn||(nn={}));(function(n){function e(r,i,s){let o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}n.is=t})(mr||(mr={}));(function(n){function e(t){let r=t;return C.string(r)}n.is=e})(Be||(Be={}));(function(n){function e(s,o,a){return{range:s,newText:o,annotationId:a}}n.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}n.insert=t;function r(s,o){return{range:s,newText:"",annotationId:o}}n.del=r;function i(s){let o=s;return nn.is(o)&&(mr.is(o.annotationId)||Be.is(o.annotationId))}n.is=i})(jn||(jn={}));(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&ns.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(ts||(ts={}));(function(n){function e(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(hi||(hi={}));(function(n){function e(r,i,s,o){let a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(pi||(pi={}));(function(n){function e(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(gi||(gi={}));(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>C.string(i.kind)?hi.is(i)||pi.is(i)||gi.is(i):ts.is(i)))}n.is=e})(so||(so={}));fi=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,s;if(r===void 0?i=nn.insert(e,t):Be.is(r)?(s=r,i=jn.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=jn.insert(e,t,s)),this.edits.push(i),s!==void 0)return s}replace(e,t,r){let i,s;if(r===void 0?i=nn.replace(e,t):Be.is(r)?(s=r,i=jn.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=jn.replace(e,t,s)),this.edits.push(i),s!==void 0)return s}delete(e,t){let r,i;if(t===void 0?r=nn.del(e):Be.is(t)?(i=t,r=jn.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=jn.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(n){function e(t){let r=t;return C.objectLiteral(r)&&xe.is(r.range)&&fo.isSnippet(r.snippet)&&(r.annotationId===void 0||mr.is(r.annotationId)||Be.is(r.annotationId))}n.is=e})(zc||(zc={}));oo=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Be.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Kc=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new oo(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(ts.is(t)){let r=new fi(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new fi(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(ns.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let i=[],s={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(s),r=new fi(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new fi(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new oo,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mr.is(t)||Be.is(t)?i=t:r=t;let s,o;if(i===void 0?s=hi.create(e,r):(o=Be.is(i)?i:this._changeAnnotations.manage(i),s=hi.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}renameFile(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;mr.is(r)||Be.is(r)?s=r:i=r;let o,a;if(s===void 0?o=pi.create(e,t,i):(a=Be.is(s)?s:this._changeAnnotations.manage(s),o=pi.create(e,t,i,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mr.is(t)||Be.is(t)?i=t:r=t;let s,o;if(i===void 0?s=gi.create(e,r):(o=Be.is(i)?i:this._changeAnnotations.manage(i),s=gi.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}};(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)}n.is=t})(Bc||(Bc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}n.is=t})(Gc||(Gc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}n.is=t})(ns||(ns={}));(function(n){n.ABAP="abap",n.WindowsBat="bat",n.BibTeX="bibtex",n.Clojure="clojure",n.Coffeescript="coffeescript",n.C="c",n.CPP="cpp",n.CSharp="csharp",n.CSS="css",n.D="d",n.Delphi="pascal",n.Diff="diff",n.Dart="dart",n.Dockerfile="dockerfile",n.Elixir="elixir",n.Erlang="erlang",n.FSharp="fsharp",n.GitCommit="git-commit",n.GitRebase="git-rebase",n.Go="go",n.Groovy="groovy",n.Handlebars="handlebars",n.Haskell="haskell",n.HTML="html",n.Ini="ini",n.Java="java",n.JavaScript="javascript",n.JavaScriptReact="javascriptreact",n.JSON="json",n.LaTeX="latex",n.Less="less",n.Lua="lua",n.Makefile="makefile",n.Markdown="markdown",n.ObjectiveC="objective-c",n.ObjectiveCPP="objective-cpp",n.Pascal="pascal",n.Perl="perl",n.Perl6="perl6",n.PHP="php",n.Plaintext="plaintext",n.Powershell="powershell",n.Pug="jade",n.Python="python",n.R="r",n.Razor="razor",n.Ruby="ruby",n.Rust="rust",n.SCSS="scss",n.SASS="sass",n.Scala="scala",n.ShaderLab="shaderlab",n.ShellScript="shellscript",n.SQL="sql",n.Swift="swift",n.TypeScript="typescript",n.TypeScriptReact="typescriptreact",n.TeX="tex",n.VisualBasic="vb",n.XML="xml",n.XSL="xsl",n.YAML="yaml"})(Vc||(Vc={}));(function(n){function e(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}n.is=t})(Xc||(Xc={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){let r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(ao||(ao={}));(function(n){function e(t){let r=t;return C.objectLiteral(t)&&ao.is(r.kind)&&C.string(r.value)}n.is=e})(_r||(_r={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(Jc||(Jc={}));(function(n){n.PlainText=1,n.Snippet=2})(Qc||(Qc={}));(function(n){n.Deprecated=1})(Yc||(Yc={}));(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){let i=r;return i&&C.string(i.newText)&&xe.is(i.insert)&&xe.is(i.replace)}n.is=t})(Zc||(Zc={}));(function(n){n.asIs=1,n.adjustIndentation=2})(eu||(eu={}));(function(n){n.Replace=1,n.Merge=2})(tu||(tu={}));(function(n){function e(t){let r=t;return r&&(C.string(r.detail)||r.detail===void 0)&&(C.string(r.description)||r.description===void 0)}n.is=e})(nu||(nu={}));(function(n){function e(t){return{label:t}}n.create=e})(ru||(ru={}));(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(iu||(iu={}));(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){let i=r;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}n.is=t})(rs||(rs={}));(function(n){function e(t){let r=t;return!!r&&C.objectLiteral(r)&&(_r.is(r.contents)||rs.is(r.contents)||C.typedArray(r.contents,rs.is))&&(t.range===void 0||xe.is(t.range))}n.is=e})(su||(su={}));(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(ou||(ou={}));(function(n){function e(t,r,...i){let s={label:t};return C.defined(r)&&(s.documentation=r),C.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(au||(au={}));(function(n){n.Text=1,n.Read=2,n.Write=3})(cu||(cu={}));(function(n){function e(t,r){let i={range:t};return C.number(r)&&(i.kind=r),i}n.create=e})(uu||(uu={}));(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(lu||(lu={}));(function(n){n.Deprecated=1})(du||(du={}));(function(n){function e(t,r,i,s,o){let a={name:t,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}n.create=e})(fu||(fu={}));(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(hu||(hu={}));(function(n){function e(r,i,s,o,a,u){let l={name:r,detail:i,kind:s,range:o,selectionRange:a};return u!==void 0&&(l.children=u),l}n.create=e;function t(r){let i=r;return i&&C.string(i.name)&&C.number(i.kind)&&xe.is(i.range)&&xe.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(pu||(pu={}));(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorMove="refactor.move",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll",n.Notebook="notebook"})(gu||(gu={}));(function(n){n.Invoked=1,n.Automatic=2})(is||(is={}));(function(n){function e(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.typedArray(i.diagnostics,es.is)&&(i.only===void 0||C.typedArray(i.only,C.string))&&(i.triggerKind===void 0||i.triggerKind===is.Invoked||i.triggerKind===is.Automatic)}n.is=t})(mu||(mu={}));(function(n){n.LLMGenerated=1;function e(t){return C.defined(t)&&t===n.LLMGenerated}n.is=e})(co||(co={}));(function(n){function e(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):jr.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,es.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||jr.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||so.is(i.edit))&&(i.tags===void 0||C.typedArray(i.tags,co.is))}n.is=t})(_u||(_u={}));(function(n){function e(r,i){let s={range:r};return C.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(i.range)&&(C.undefined(i.command)||jr.is(i.command))}n.is=t})(yu||(yu={}));(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}n.is=t})(vu||(vu={}));(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}n.is=t})(bu||(bu={}));(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Cu||(Cu={}));(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator",n.label="label"})(wu||(wu={}));(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Du||(Du={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(Su||(Su={}));(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&C.string(i.text)}n.is=t})(Pu||(Pu={}));(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&C.boolean(i.caseSensitiveLookup)&&(C.string(i.variableName)||i.variableName===void 0)}n.is=t})(Ru||(Ru={}));(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&(C.string(i.expression)||i.expression===void 0)}n.is=t})(Tu||(Tu={}));(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(r.stoppedLocation)}n.is=t})(Ou||(Ou={}));(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(uo||(uo={}));(function(n){function e(r){return{value:r}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&(i.tooltip===void 0||C.string(i.tooltip)||_r.is(i.tooltip))&&(i.location===void 0||Zi.is(i.location))&&(i.command===void 0||jr.is(i.command))}n.is=t})(lo||(lo={}));(function(n){function e(r,i,s){let o={position:r,label:i};return s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Lt.is(i.position)&&(C.string(i.label)||C.typedArray(i.label,lo.is))&&(i.kind===void 0||uo.is(i.kind))&&i.textEdits===void 0||C.typedArray(i.textEdits,nn.is)&&(i.tooltip===void 0||C.string(i.tooltip)||_r.is(i.tooltip))&&(i.paddingLeft===void 0||C.boolean(i.paddingLeft))&&(i.paddingRight===void 0||C.boolean(i.paddingRight))}n.is=t})(Eu||(Eu={}));(function(n){function e(r){return{kind:"snippet",value:r}}n.createSnippet=e;function t(r){let i=r;return C.objectLiteral(i)&&i.kind==="snippet"&&C.string(i.value)}n.isSnippet=t})(fo||(fo={}));(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(qu||(qu={}));(function(n){function e(t){return{items:t}}n.create=e})(Mu||(Mu={}));(function(n){n.Invoked=1,n.Automatic=2})(xu||(xu={}));(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(Iu||(Iu={}));(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(Nu||(Nu={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&no.is(r.uri)&&C.string(r.name)}n.is=e})(ju||(ju={}));hC=[` +${JSON.stringify(y,null,4)}`);let E=y;if(Me.string(E.id)||Me.number(E.id)){let I=E.id,H=w.get(I);H&&H.reject(new Error("The received response has neither a result nor an error property."))}}function wt(y){if(y!=null)switch(F){case ue.Verbose:return JSON.stringify(y,null,4);case ue.Compact:return JSON.stringify(y);default:return}}function zi(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&y.params&&(E=`Params: ${wt(y.params)}`),te.log(`Sending request '${y.method} - (${y.id})'.`,E)}else tt("send-request",y)}function tn(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&(y.params?E=`Params: ${wt(y.params)}`:E="No parameters provided."),te.log(`Sending notification '${y.method}'.`,E)}else tt("send-notification",y)}function cr(y,E,I){if(!(F===ue.Off||!te))if(oe===St.Text){let H;(F===ue.Verbose||F===ue.Compact)&&(y.error&&y.error.data?H=`Error data: ${wt(y.error.data)}`:y.result?H=`Result: ${wt(y.result)}`:y.error===void 0&&(H="No result returned.")),te.log(`Sending response '${E} - (${y.id})'. Processing request took ${Date.now()-I}ms`,H)}else tt("send-response",y)}function ur(y){if(!(F===ue.Off||!te))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&y.params&&(E=`Params: ${wt(y.params)}`),te.log(`Received request '${y.method} - (${y.id})'.`,E)}else tt("receive-request",y)}function On(y){if(!(F===ue.Off||!te||y.method===Js.type.method))if(oe===St.Text){let E;(F===ue.Verbose||F===ue.Compact)&&(y.params?E=`Params: ${wt(y.params)}`:E="No parameters provided."),te.log(`Received notification '${y.method}'.`,E)}else tt("receive-notification",y)}function ri(y,E){if(!(F===ue.Off||!te))if(oe===St.Text){let I;if((F===ue.Verbose||F===ue.Compact)&&(y.error&&y.error.data?I=`Error data: ${wt(y.error.data)}`:y.result?I=`Result: ${wt(y.result)}`:y.error===void 0&&(I="No result returned.")),E){let H=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";te.log(`Received response '${E.method} - (${y.id})' in ${Date.now()-E.timerStart}ms.${H}`,I)}else te.log(`Received response ${y.id} without active response promise.`,I)}else tt("receive-response",y)}function tt(y,E){if(!te||F===ue.Off)return;let I={isLSPMessage:!0,type:y,message:E,timestamp:Date.now()};te.log(I)}function Ut(){if(Tn())throw new di(Ji.Closed,"Connection is closed.");if(Ht())throw new di(Ji.Disposed,"Connection is disposed.")}function nt(){if(xt())throw new di(Ji.AlreadyListening,"Connection is already listening")}function Ki(){if(!xt())throw new Error("Call listen() first.")}function Ye(y){return y===void 0?null:y}function En(y){if(y!==null)return y}function ii(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}function Ir(y,E){switch(y){case X.ParameterStructures.auto:return ii(E)?En(E):[Ye(E)];case X.ParameterStructures.byName:if(!ii(E))throw new Error("Received parameters by name but param is not an object literal.");return En(E);case X.ParameterStructures.byPosition:return[Ye(E)];default:throw new Error(`Unknown parameter structure ${y.toString()}`)}}function lr(y,E){let I,H=y.numberOfParams;switch(H){case 0:I=void 0;break;case 1:I=Ir(y.parameterStructures,E[0]);break;default:I=[];for(let Z=0;Z{Ut();let I,H;if(Me.string(y)){I=y;let ae=E[0],ie=0,Ee=X.ParameterStructures.auto;X.ParameterStructures.is(ae)&&(ie=1,Ee=ae);let ke=E.length,pe=ke-ie;switch(pe){case 0:H=void 0;break;case 1:H=Ir(Ee,E[ie]);break;default:if(Ee===X.ParameterStructures.byName)throw new Error(`Received ${pe} parameters for 'by Name' notification parameter structure.`);H=E.slice(ie,ke).map(ye=>Ye(ye));break}}else{let ae=E;I=y.method,H=lr(y,ae)}let Z={jsonrpc:u,method:I,params:H};return tn(Z),e.write(Z).catch(ae=>{throw i.error("Sending notification failed."),ae})},onNotification:(y,E)=>{Ut();let I;return Me.func(y)?g=y:E&&(Me.string(y)?(I=y,_.set(y,{type:void 0,handler:E})):(I=y.method,_.set(y.method,{type:y,handler:E}))),{dispose:()=>{I!==void 0?_.get(I)?.handler===E&&_.delete(I):g===y&&(g=void 0)}}},onProgress:(y,E,I)=>{if(v.has(E))throw new Error(`Progress handler for token ${E} already registered`);return v.set(E,I),{dispose:()=>{v.get(E)===I&&v.delete(E)}}},sendProgress:(y,E,I)=>It.sendNotification(Xi.type,{token:E,value:I}),onUnhandledProgress:Yr.event,sendRequest:(y,...E)=>{Ut(),Ki();function I(ye,rt){let pt=Mt.sender.sendCancellation(ye,rt);pt===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${rt}`):pt.catch(()=>{i.log(`Sending cancellation messages for id ${rt} failed.`)})}let H,Z,ae;if(Me.string(y)){H=y;let ye=E[0],rt=E[E.length-1],pt=0,qn=X.ParameterStructures.auto;X.ParameterStructures.is(ye)&&(pt=1,qn=ye);let Dt=E.length;Dc.CancellationToken.is(rt)&&(Dt=Dt-1,ae=rt);let gt=Dt-pt;switch(gt){case 0:Z=void 0;break;case 1:Z=Ir(qn,E[pt]);break;default:if(qn===X.ParameterStructures.byName)throw new Error(`Received ${gt} parameters for 'by Name' request parameter structure.`);Z=E.slice(pt,Dt).map(si=>Ye(si));break}}else{let ye=E;H=y.method,Z=lr(y,ye);let rt=y.numberOfParams;ae=Dc.CancellationToken.is(ye[rt])?ye[rt]:void 0}let ie=s++,Ee,ke=!1;ae!==void 0&&(ae.isCancellationRequested?ke=!0:Ee=ae.onCancellationRequested(()=>{I(It,ie)}));let pe={jsonrpc:u,id:ie,method:H,params:Z};return zi(pe),typeof Mt.sender.enableCancellation=="function"&&Mt.sender.enableCancellation(pe),new Promise(async(ye,rt)=>{let pt=gt=>{ye(gt),Mt.sender.cleanup(ie),Ee?.dispose()},qn=gt=>{rt(gt),Mt.sender.cleanup(ie),Ee?.dispose()},Dt={method:H,timerStart:Date.now(),resolve:pt,reject:qn};try{w.set(ie,Dt),await e.write(pe),ke&&I(It,ie)}catch(gt){throw w.delete(ie),Dt.reject(new X.ResponseError(X.ErrorCodes.MessageWriteError,gt.message?gt.message:"Unknown reason")),i.error("Sending request failed."),gt}})},onRequest:(y,E)=>{Ut();let I=null;return Rc.is(y)?(I=void 0,p=y):Me.string(y)?(I=null,E!==void 0&&(I=y,h.set(y,{handler:E,type:void 0}))):E!==void 0&&(I=y.method,h.set(y.method,{type:y,handler:E})),{dispose:()=>{I!==null&&(I!==void 0?h.get(I)?.handler===E&&h.delete(I):p===y&&(p=void 0))}}},hasPendingResponse:()=>w.size>0,trace:async(y,E,I)=>{let H=!1,Z=St.Text;I!==void 0&&(Me.boolean(I)?H=I:(H=I.sendNotification||!1,Z=I.traceFormat||St.Text)),F=y,oe=Z,F===ue.Off?te=void 0:te=E,H&&!Tn()&&!Ht()&&await It.sendNotification(Oc.type,{value:ue.toString(y)})},onError:Pn.event,onClose:Qr.event,onUnhandledNotification:rr.event,onDispose:Zr.event,end:()=>{e.end()},dispose:()=>{if(Ht())return;Te=Wt.Disposed,Zr.fire(void 0);let y=new X.ResponseError(X.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let E of w.values())E.reject(y);w=new Map,j=new Map,M=new Set,q=new rp.LinkedMap,Me.func(e.dispose)&&e.dispose(),Me.func(n.dispose)&&n.dispose()},listen:()=>{Ut(),nt(),Te=Wt.Listening,n.listen(sr)},inspect:()=>{(0,np.default)().console.log("inspect")}};return It.onNotification(Js.type,y=>{if(F===ue.Off||!te)return;let E=F===ue.Verbose||F===ue.Compact;te.log(y.message,E?y.verbose:void 0)}),It.onNotification(Xi.type,async y=>{let E=v.get(y.token);E?await E(y.value):Yr.fire(y)}),It}});var Nn=P(S=>{"use strict";var uC=S&&S.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(S,"__esModule",{value:!0});S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.AbstractMessageBuffer=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.SharedArrayReceiverStrategy=S.SharedArraySenderStrategy=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.MessageStrategy=S.CancellationStrategy=S.CancellationSenderStrategy=S.RequestCancellationReceiverStrategy=S.IdCancellationReceiverStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=S.SetTraceNotification=S.TraceFormat=S.TraceValues=S.TraceValue=S.Trace=void 0;var ve=ec();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return ve.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return ve.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return ve.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return ve.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return ve.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return ve.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return ve.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return ve.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return ve.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return ve.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return ve.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return ve.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return ve.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return ve.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return ve.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return ve.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return ve.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return ve.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return ve.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return ve.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return ve.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return ve.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return ve.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return ve.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return ve.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return ve.ParameterStructures}});var Mc=nc();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return Mc.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return Mc.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return Mc.Touch}});var lC=Kh();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return lC.Disposable}});var op=ai();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return op.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return op.Emitter}});var ap=Bs();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return ap.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return ap.CancellationToken}});var cp=Gh();Object.defineProperty(S,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return cp.SharedArraySenderStrategy}});Object.defineProperty(S,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return cp.SharedArrayReceiverStrategy}});var xc=Xh();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return xc.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return xc.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return xc.ReadableStreamMessageReader}});var Ic=ep();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return Ic.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ic.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ic.WriteableStreamMessageWriter}});var dC=tp();Object.defineProperty(S,"AbstractMessageBuffer",{enumerable:!0,get:function(){return dC.AbstractMessageBuffer}});var He=sp();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return He.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return He.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return He.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return He.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return He.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return He.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return He.Trace}});Object.defineProperty(S,"TraceValue",{enumerable:!0,get:function(){return He.TraceValue}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return He.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return He.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return He.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return He.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return He.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return He.CancellationReceiverStrategy}});Object.defineProperty(S,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return He.IdCancellationReceiverStrategy}});Object.defineProperty(S,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return He.RequestCancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return He.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return He.CancellationStrategy}});Object.defineProperty(S,"MessageStrategy",{enumerable:!0,get:function(){return He.MessageStrategy}});Object.defineProperty(S,"TraceValues",{enumerable:!0,get:function(){return He.TraceValues}});var fC=uC(pr());S.RAL=fC.default});var ho={};Fh(ho,{AnnotatedTextEdit:()=>jn,ApplyKind:()=>tu,ChangeAnnotation:()=>mr,ChangeAnnotationIdentifier:()=>Be,CodeAction:()=>_u,CodeActionContext:()=>mu,CodeActionKind:()=>gu,CodeActionTag:()=>co,CodeActionTriggerKind:()=>is,CodeDescription:()=>Wc,CodeLens:()=>yu,Color:()=>ro,ColorInformation:()=>Lc,ColorPresentation:()=>Ac,Command:()=>jr,CompletionItem:()=>ru,CompletionItemKind:()=>Jc,CompletionItemLabelDetails:()=>nu,CompletionItemTag:()=>Yc,CompletionList:()=>iu,CreateFile:()=>hi,DeleteFile:()=>gi,Diagnostic:()=>es,DiagnosticRelatedInformation:()=>io,DiagnosticSeverity:()=>Hc,DiagnosticTag:()=>Uc,DocumentHighlight:()=>uu,DocumentHighlightKind:()=>cu,DocumentLink:()=>bu,DocumentSymbol:()=>pu,DocumentUri:()=>Nc,EOL:()=>hC,FoldingRange:()=>$c,FoldingRangeKind:()=>kc,FormattingOptions:()=>vu,Hover:()=>su,InlayHint:()=>Eu,InlayHintKind:()=>uo,InlayHintLabelPart:()=>lo,InlineCompletionContext:()=>Nu,InlineCompletionItem:()=>qu,InlineCompletionList:()=>Mu,InlineCompletionTriggerKind:()=>xu,InlineValueContext:()=>Ou,InlineValueEvaluatableExpression:()=>Tu,InlineValueText:()=>Pu,InlineValueVariableLookup:()=>Ru,InsertReplaceEdit:()=>Zc,InsertTextFormat:()=>Qc,InsertTextMode:()=>eu,LanguageKind:()=>Vc,Location:()=>Zi,LocationLink:()=>Fc,MarkedString:()=>rs,MarkupContent:()=>_r,MarkupKind:()=>ao,OptionalVersionedTextDocumentIdentifier:()=>ns,ParameterInformation:()=>ou,Position:()=>Lt,Range:()=>xe,RenameFile:()=>pi,SelectedCompletionInfo:()=>Iu,SelectionRange:()=>Cu,SemanticTokenModifiers:()=>Du,SemanticTokenTypes:()=>wu,SemanticTokens:()=>Su,SignatureInformation:()=>au,SnippetTextEdit:()=>zc,StringValue:()=>fo,SymbolInformation:()=>fu,SymbolKind:()=>lu,SymbolTag:()=>du,TextDocument:()=>Fu,TextDocumentEdit:()=>ts,TextDocumentIdentifier:()=>Bc,TextDocumentItem:()=>Xc,TextEdit:()=>nn,URI:()=>no,VersionedTextDocumentIdentifier:()=>Gc,WorkspaceChange:()=>Kc,WorkspaceEdit:()=>so,WorkspaceFolder:()=>ju,WorkspaceSymbol:()=>hu,integer:()=>jc,uinteger:()=>Yi});var Nc,no,jc,Yi,Lt,xe,Zi,Fc,ro,Lc,Ac,kc,$c,io,Hc,Uc,Wc,es,jr,nn,mr,Be,jn,ts,hi,pi,gi,so,fi,zc,oo,Kc,Bc,Gc,ns,Vc,Xc,ao,_r,Jc,Qc,Yc,Zc,eu,tu,nu,ru,iu,rs,su,ou,au,cu,uu,lu,du,fu,hu,pu,gu,is,mu,co,_u,yu,vu,bu,Cu,wu,Du,Su,Pu,Ru,Tu,Ou,uo,lo,Eu,fo,qu,Mu,xu,Iu,Nu,ju,hC,Fu,Lu,C,po=jh(()=>{"use strict";(function(n){function e(t){return typeof t=="string"}n.is=e})(Nc||(Nc={}));(function(n){function e(t){return typeof t=="string"}n.is=e})(no||(no={}));(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(jc||(jc={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Yi||(Yi={}));(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Yi.MAX_VALUE),i===Number.MAX_VALUE&&(i=Yi.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}n.is=t})(Lt||(Lt={}));(function(n){function e(r,i,s,o){if(C.uinteger(r)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(o))return{start:Lt.create(r,i),end:Lt.create(s,o)};if(Lt.is(r)&&Lt.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Lt.is(i.start)&&Lt.is(i.end)}n.is=t})(xe||(xe={}));(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}n.is=t})(Zi||(Zi={}));(function(n){function e(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.targetRange)&&C.string(i.targetUri)&&xe.is(i.targetSelectionRange)&&(xe.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}n.is=t})(Fc||(Fc={}));(function(n){function e(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}n.is=t})(ro||(ro={}));(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&ro.is(i.color)}n.is=t})(Lc||(Lc={}));(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.undefined(i.textEdit)||nn.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,nn.is))}n.is=t})(Ac||(Ac={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(kc||(kc={}));(function(n){function e(r,i,s,o,a,u){let l={startLine:r,endLine:i};return C.defined(s)&&(l.startCharacter=s),C.defined(o)&&(l.endCharacter=o),C.defined(a)&&(l.kind=a),C.defined(u)&&(l.collapsedText=u),l}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}n.is=t})($c||($c={}));(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&Zi.is(i.location)&&C.string(i.message)}n.is=t})(io||(io={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Hc||(Hc={}));(function(n){n.Unnecessary=1,n.Deprecated=2})(Uc||(Uc={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&C.string(r.href)}n.is=e})(Wc||(Wc={}));(function(n){function e(s,o,a,u,l,f){let p={range:s,message:o};return C.defined(a)&&(p.severity=a),C.defined(u)&&(p.code=u),C.defined(l)&&(p.source=l),C.defined(f)&&(p.relatedInformation=f),p}n.create=e;function t(s){var o;let a=s;return C.defined(a)&&xe.is(a.range)&&(C.string(a.message)||_r.is(a.message))&&(C.number(a.severity)||C.undefined(a.severity))&&(C.integer(a.code)||C.string(a.code)||C.undefined(a.code))&&(C.undefined(a.codeDescription)||C.string((o=a.codeDescription)===null||o===void 0?void 0:o.href))&&(C.string(a.source)||C.undefined(a.source))&&(C.undefined(a.relatedInformation)||C.typedArray(a.relatedInformation,io.is))}n.is=t;function r(s){return C.string(s.message)}n.is3_17=r;function i(s){if(C.string(s.message))return s.message;if(_r.is(s.message))return s.message.value;throw new Error(`Unknown message type ${typeof s.message}`)}n.getMessageString=i})(es||(es={}));(function(n){function e(r,i,...s){let o={title:r,command:i};return C.defined(s)&&s.length>0&&(o.arguments=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.title)&&(i.tooltip===void 0||C.string(i.tooltip))&&C.string(i.command)}n.is=t})(jr||(jr={}));(function(n){function e(s,o){return{range:s,newText:o}}n.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){let o=s;return C.objectLiteral(o)&&C.string(o.newText)&&xe.is(o.range)}n.is=i})(nn||(nn={}));(function(n){function e(r,i,s){let o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}n.is=t})(mr||(mr={}));(function(n){function e(t){let r=t;return C.string(r)}n.is=e})(Be||(Be={}));(function(n){function e(s,o,a){return{range:s,newText:o,annotationId:a}}n.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}n.insert=t;function r(s,o){return{range:s,newText:"",annotationId:o}}n.del=r;function i(s){let o=s;return nn.is(o)&&(mr.is(o.annotationId)||Be.is(o.annotationId))}n.is=i})(jn||(jn={}));(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&ns.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(ts||(ts={}));(function(n){function e(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(hi||(hi={}));(function(n){function e(r,i,s,o){let a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(pi||(pi={}));(function(n){function e(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Be.is(i.annotationId))}n.is=t})(gi||(gi={}));(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>C.string(i.kind)?hi.is(i)||pi.is(i)||gi.is(i):ts.is(i)))}n.is=e})(so||(so={}));fi=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,s;if(r===void 0?i=nn.insert(e,t):Be.is(r)?(s=r,i=jn.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=jn.insert(e,t,s)),this.edits.push(i),s!==void 0)return s}replace(e,t,r){let i,s;if(r===void 0?i=nn.replace(e,t):Be.is(r)?(s=r,i=jn.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=jn.replace(e,t,s)),this.edits.push(i),s!==void 0)return s}delete(e,t){let r,i;if(t===void 0?r=nn.del(e):Be.is(t)?(i=t,r=jn.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=jn.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(n){function e(t){let r=t;return C.objectLiteral(r)&&xe.is(r.range)&&fo.isSnippet(r.snippet)&&(r.annotationId===void 0||mr.is(r.annotationId)||Be.is(r.annotationId))}n.is=e})(zc||(zc={}));oo=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Be.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Kc=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new oo(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(ts.is(t)){let r=new fi(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new fi(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(ns.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let i=[],s={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(s),r=new fi(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new fi(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new oo,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mr.is(t)||Be.is(t)?i=t:r=t;let s,o;if(i===void 0?s=hi.create(e,r):(o=Be.is(i)?i:this._changeAnnotations.manage(i),s=hi.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}renameFile(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;mr.is(r)||Be.is(r)?s=r:i=r;let o,a;if(s===void 0?o=pi.create(e,t,i):(a=Be.is(s)?s:this._changeAnnotations.manage(s),o=pi.create(e,t,i,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mr.is(t)||Be.is(t)?i=t:r=t;let s,o;if(i===void 0?s=gi.create(e,r):(o=Be.is(i)?i:this._changeAnnotations.manage(i),s=gi.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}};(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)}n.is=t})(Bc||(Bc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}n.is=t})(Gc||(Gc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}n.is=t})(ns||(ns={}));(function(n){n.ABAP="abap",n.WindowsBat="bat",n.BibTeX="bibtex",n.Clojure="clojure",n.Coffeescript="coffeescript",n.C="c",n.CPP="cpp",n.CSharp="csharp",n.CSS="css",n.D="d",n.Delphi="pascal",n.Diff="diff",n.Dart="dart",n.Dockerfile="dockerfile",n.Elixir="elixir",n.Erlang="erlang",n.FSharp="fsharp",n.GitCommit="git-commit",n.GitRebase="git-rebase",n.Go="go",n.Groovy="groovy",n.Handlebars="handlebars",n.Haskell="haskell",n.HTML="html",n.Ini="ini",n.Java="java",n.JavaScript="javascript",n.JavaScriptReact="javascriptreact",n.JSON="json",n.LaTeX="latex",n.Less="less",n.Lua="lua",n.Makefile="makefile",n.Markdown="markdown",n.ObjectiveC="objective-c",n.ObjectiveCPP="objective-cpp",n.Pascal="pascal",n.Perl="perl",n.Perl6="perl6",n.PHP="php",n.Plaintext="plaintext",n.Powershell="powershell",n.Pug="jade",n.Python="python",n.R="r",n.Razor="razor",n.Ruby="ruby",n.Rust="rust",n.SCSS="scss",n.SASS="sass",n.Scala="scala",n.ShaderLab="shaderlab",n.ShellScript="shellscript",n.SQL="sql",n.Swift="swift",n.TypeScript="typescript",n.TypeScriptReact="typescriptreact",n.TeX="tex",n.VisualBasic="vb",n.XML="xml",n.XSL="xsl",n.YAML="yaml"})(Vc||(Vc={}));(function(n){function e(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}n.is=t})(Xc||(Xc={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){let r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(ao||(ao={}));(function(n){function e(t){let r=t;return C.objectLiteral(t)&&ao.is(r.kind)&&C.string(r.value)}n.is=e})(_r||(_r={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(Jc||(Jc={}));(function(n){n.PlainText=1,n.Snippet=2})(Qc||(Qc={}));(function(n){n.Deprecated=1})(Yc||(Yc={}));(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){let i=r;return i&&C.string(i.newText)&&xe.is(i.insert)&&xe.is(i.replace)}n.is=t})(Zc||(Zc={}));(function(n){n.asIs=1,n.adjustIndentation=2})(eu||(eu={}));(function(n){n.Replace=1,n.Merge=2})(tu||(tu={}));(function(n){function e(t){let r=t;return r&&(C.string(r.detail)||r.detail===void 0)&&(C.string(r.description)||r.description===void 0)}n.is=e})(nu||(nu={}));(function(n){function e(t){return{label:t}}n.create=e})(ru||(ru={}));(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(iu||(iu={}));(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){let i=r;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}n.is=t})(rs||(rs={}));(function(n){function e(t){let r=t;return!!r&&C.objectLiteral(r)&&(_r.is(r.contents)||rs.is(r.contents)||C.typedArray(r.contents,rs.is))&&(t.range===void 0||xe.is(t.range))}n.is=e})(su||(su={}));(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(ou||(ou={}));(function(n){function e(t,r,...i){let s={label:t};return C.defined(r)&&(s.documentation=r),C.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(au||(au={}));(function(n){n.Text=1,n.Read=2,n.Write=3})(cu||(cu={}));(function(n){function e(t,r){let i={range:t};return C.number(r)&&(i.kind=r),i}n.create=e})(uu||(uu={}));(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(lu||(lu={}));(function(n){n.Deprecated=1})(du||(du={}));(function(n){function e(t,r,i,s,o){let a={name:t,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}n.create=e})(fu||(fu={}));(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(hu||(hu={}));(function(n){function e(r,i,s,o,a,u){let l={name:r,detail:i,kind:s,range:o,selectionRange:a};return u!==void 0&&(l.children=u),l}n.create=e;function t(r){let i=r;return i&&C.string(i.name)&&C.number(i.kind)&&xe.is(i.range)&&xe.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(pu||(pu={}));(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorMove="refactor.move",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll",n.Notebook="notebook"})(gu||(gu={}));(function(n){n.Invoked=1,n.Automatic=2})(is||(is={}));(function(n){function e(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}n.create=e;function t(r){let i=r;return C.defined(i)&&C.typedArray(i.diagnostics,es.is)&&(i.only===void 0||C.typedArray(i.only,C.string))&&(i.triggerKind===void 0||i.triggerKind===is.Invoked||i.triggerKind===is.Automatic)}n.is=t})(mu||(mu={}));(function(n){n.LLMGenerated=1;function e(t){return C.defined(t)&&t===n.LLMGenerated}n.is=e})(co||(co={}));(function(n){function e(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):jr.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,es.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||jr.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||so.is(i.edit))&&(i.tags===void 0||C.typedArray(i.tags,co.is))}n.is=t})(_u||(_u={}));(function(n){function e(r,i){let s={range:r};return C.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(i.range)&&(C.undefined(i.command)||jr.is(i.command))}n.is=t})(yu||(yu={}));(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}n.is=t})(vu||(vu={}));(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}n.is=t})(bu||(bu={}));(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&xe.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Cu||(Cu={}));(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator",n.label="label"})(wu||(wu={}));(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Du||(Du={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(Su||(Su={}));(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&C.string(i.text)}n.is=t})(Pu||(Pu={}));(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&C.boolean(i.caseSensitiveLookup)&&(C.string(i.variableName)||i.variableName===void 0)}n.is=t})(Ru||(Ru={}));(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){let i=r;return i!=null&&xe.is(i.range)&&(C.string(i.expression)||i.expression===void 0)}n.is=t})(Tu||(Tu={}));(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){let i=r;return C.defined(i)&&xe.is(r.stoppedLocation)}n.is=t})(Ou||(Ou={}));(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(uo||(uo={}));(function(n){function e(r){return{value:r}}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&(i.tooltip===void 0||C.string(i.tooltip)||_r.is(i.tooltip))&&(i.location===void 0||Zi.is(i.location))&&(i.command===void 0||jr.is(i.command))}n.is=t})(lo||(lo={}));(function(n){function e(r,i,s){let o={position:r,label:i};return s!==void 0&&(o.kind=s),o}n.create=e;function t(r){let i=r;return C.objectLiteral(i)&&Lt.is(i.position)&&(C.string(i.label)||C.typedArray(i.label,lo.is))&&(i.kind===void 0||uo.is(i.kind))&&i.textEdits===void 0||C.typedArray(i.textEdits,nn.is)&&(i.tooltip===void 0||C.string(i.tooltip)||_r.is(i.tooltip))&&(i.paddingLeft===void 0||C.boolean(i.paddingLeft))&&(i.paddingRight===void 0||C.boolean(i.paddingRight))}n.is=t})(Eu||(Eu={}));(function(n){function e(r){return{kind:"snippet",value:r}}n.createSnippet=e;function t(r){let i=r;return C.objectLiteral(i)&&i.kind==="snippet"&&C.string(i.value)}n.isSnippet=t})(fo||(fo={}));(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(qu||(qu={}));(function(n){function e(t){return{items:t}}n.create=e})(Mu||(Mu={}));(function(n){n.Invoked=1,n.Automatic=2})(xu||(xu={}));(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(Iu||(Iu={}));(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(Nu||(Nu={}));(function(n){function e(t){let r=t;return C.objectLiteral(r)&&no.is(r.uri)&&C.string(r.name)}n.is=e})(ju||(ju={}));hC=[` `,`\r `,"\r"];(function(n){function e(s,o,a,u){return new Lu(s,o,a,u)}n.create=e;function t(s){let o=s;return!!(C.defined(o)&&C.string(o.uri)&&(C.undefined(o.languageId)||C.string(o.languageId))&&C.uinteger(o.lineCount)&&C.func(o.getText)&&C.func(o.positionAt)&&C.func(o.offsetAt))}n.is=t;function r(s,o){let a=s.getText(),u=i(o,(f,p)=>{let h=f.range.start.line-p.range.start.line;return h===0?f.range.start.character-p.range.start.character:h}),l=a.length;for(let f=u.length-1;f>=0;f--){let p=u[f],h=s.offsetAt(p.range.start),g=s.offsetAt(p.range.end);if(g<=l)a=a.substring(0,h)+p.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");l=h}return a}n.applyEdits=r;function i(s,o){if(s.length<=1)return s;let a=s.length/2|0,u=s.slice(0,a),l=s.slice(a);i(u,o),i(l,o);let f=0,p=0,h=0;for(;f0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return Lt.create(0,e);for(;re?i=o:r=o+1}let s=r-1;return Lt.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(g){return g===!0||g===!1}n.boolean=i;function s(g){return e.call(g)==="[object String]"}n.string=s;function o(g){return e.call(g)==="[object Number]"}n.number=o;function a(g,_,v){return e.call(g)==="[object Number]"&&_<=g&&g<=v}n.numberRange=a;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}n.integer=u;function l(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}n.uinteger=l;function f(g){return e.call(g)==="[object Function]"}n.func=f;function p(g){return g!==null&&typeof g=="object"}n.objectLiteral=p;function h(g,_){return Array.isArray(g)&&g.every(_)}n.typedArray=h})(C||(C={}))});var Ce=P(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.CM=at.ProtocolNotificationType=at.ProtocolNotificationType0=at.ProtocolRequestType=at.ProtocolRequestType0=at.RegistrationType=at.MessageDirection=void 0;var mi=Nn(),cp;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(cp||(at.MessageDirection=cp={}));var Au=class{____;method;constructor(e){this.method=e}};at.RegistrationType=Au;var ku=class extends mi.RequestType0{__;___;____;_pr;constructor(e){super(e)}};at.ProtocolRequestType0=ku;var $u=class extends mi.RequestType{__;___;____;_pr;constructor(e){super(e,mi.ParameterStructures.byName)}};at.ProtocolRequestType=$u;var Hu=class extends mi.NotificationType0{___;____;constructor(e){super(e)}};at.ProtocolNotificationType0=Hu;var Uu=class extends mi.NotificationType{___;____;constructor(e){super(e,mi.ParameterStructures.byName)}};at.ProtocolNotificationType=Uu;var up;(function(n){function e(t,r){return{client:t,server:r}}n.create=e})(up||(at.CM=up={}))});var go=P(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.boolean=pC;zt.string=lp;zt.number=gC;zt.error=mC;zt.func=_C;zt.array=dp;zt.stringArray=yC;zt.typedArray=vC;zt.objectLiteral=bC;function pC(n){return n===!0||n===!1}function lp(n){return typeof n=="string"||n instanceof String}function gC(n){return typeof n=="number"||n instanceof Number}function mC(n){return n instanceof Error}function _C(n){return typeof n=="function"}function dp(n){return Array.isArray(n)}function yC(n){return dp(n)&&n.every(e=>lp(e))}function vC(n,e){return Array.isArray(n)&&n.every(e)}function bC(n){return n!==null&&typeof n=="object"}});var hp=P(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.ImplementationRequest=void 0;var Wu=Ce(),fp;(function(n){n.method="textDocument/implementation",n.messageDirection=Wu.MessageDirection.clientToServer,n.type=new Wu.ProtocolRequestType(n.method),n.capabilities=Wu.CM.create("textDocument.implementation","implementationProvider")})(fp||(mo.ImplementationRequest=fp={}))});var gp=P(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.TypeDefinitionRequest=void 0;var zu=Ce(),pp;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=zu.MessageDirection.clientToServer,n.type=new zu.ProtocolRequestType(n.method),n.capabilities=zu.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(pp||(_o.TypeDefinitionRequest=pp={}))});var yp=P(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.DidChangeWorkspaceFoldersNotification=yi.WorkspaceFoldersRequest=void 0;var _i=Ce(),mp;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=_i.MessageDirection.serverToClient,n.type=new _i.ProtocolRequestType0(n.method),n.capabilities=_i.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(mp||(yi.WorkspaceFoldersRequest=mp={}));var _p;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=_i.MessageDirection.clientToServer,n.type=new _i.ProtocolNotificationType(n.method),n.capabilities=_i.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(_p||(yi.DidChangeWorkspaceFoldersNotification=_p={}))});var bp=P(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.ConfigurationRequest=void 0;var Ku=Ce(),vp;(function(n){n.method="workspace/configuration",n.messageDirection=Ku.MessageDirection.serverToClient,n.type=new Ku.ProtocolRequestType(n.method),n.capabilities=Ku.CM.create("workspace.configuration",void 0)})(vp||(yo.ConfigurationRequest=vp={}))});var Dp=P(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.ColorPresentationRequest=bi.DocumentColorRequest=void 0;var vi=Ce(),Cp;(function(n){n.method="textDocument/documentColor",n.messageDirection=vi.MessageDirection.clientToServer,n.type=new vi.ProtocolRequestType(n.method),n.capabilities=vi.CM.create("textDocument.colorProvider","colorProvider")})(Cp||(bi.DocumentColorRequest=Cp={}));var wp;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=vi.MessageDirection.clientToServer,n.type=new vi.ProtocolRequestType(n.method),n.capabilities=vi.CM.create("textDocument.colorProvider","colorProvider")})(wp||(bi.ColorPresentationRequest=wp={}))});var Rp=P(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.FoldingRangeRefreshRequest=wi.FoldingRangeRequest=void 0;var Ci=Ce(),Sp;(function(n){n.method="textDocument/foldingRange",n.messageDirection=Ci.MessageDirection.clientToServer,n.type=new Ci.ProtocolRequestType(n.method),n.capabilities=Ci.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Sp||(wi.FoldingRangeRequest=Sp={}));var Pp;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=Ci.MessageDirection.serverToClient,n.type=new Ci.ProtocolRequestType0(n.method),n.capabilities=Ci.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Pp||(wi.FoldingRangeRefreshRequest=Pp={}))});var Op=P(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.DeclarationRequest=void 0;var Bu=Ce(),Tp;(function(n){n.method="textDocument/declaration",n.messageDirection=Bu.MessageDirection.clientToServer,n.type=new Bu.ProtocolRequestType(n.method),n.capabilities=Bu.CM.create("textDocument.declaration","declarationProvider")})(Tp||(vo.DeclarationRequest=Tp={}))});var qp=P(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.SelectionRangeRequest=void 0;var Gu=Ce(),Ep;(function(n){n.method="textDocument/selectionRange",n.messageDirection=Gu.MessageDirection.clientToServer,n.type=new Gu.ProtocolRequestType(n.method),n.capabilities=Gu.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Ep||(bo.SelectionRangeRequest=Ep={}))});var Np=P(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.WorkDoneProgressCancelNotification=yr.WorkDoneProgressCreateRequest=yr.WorkDoneProgress=void 0;var CC=Nn(),ss=Ce(),Mp;(function(n){n.type=new CC.ProgressType;function e(t){return t===n.type}n.is=e})(Mp||(yr.WorkDoneProgress=Mp={}));var xp;(function(n){n.method="window/workDoneProgress/create",n.messageDirection=ss.MessageDirection.serverToClient,n.type=new ss.ProtocolRequestType(n.method),n.capabilities=ss.CM.create("window.workDoneProgress",void 0)})(xp||(yr.WorkDoneProgressCreateRequest=xp={}));var Ip;(function(n){n.method="window/workDoneProgress/cancel",n.messageDirection=ss.MessageDirection.clientToServer,n.type=new ss.ProtocolNotificationType(n.method)})(Ip||(yr.WorkDoneProgressCancelNotification=Ip={}))});var Ap=P(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.CallHierarchyOutgoingCallsRequest=vr.CallHierarchyIncomingCallsRequest=vr.CallHierarchyPrepareRequest=void 0;var Fn=Ce(),jp;(function(n){n.method="textDocument/prepareCallHierarchy",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(jp||(vr.CallHierarchyPrepareRequest=jp={}));var Fp;(function(n){n.method="callHierarchy/incomingCalls",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Fp||(vr.CallHierarchyIncomingCallsRequest=Fp={}));var Lp;(function(n){n.method="callHierarchy/outgoingCalls",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Lp||(vr.CallHierarchyOutgoingCallsRequest=Lp={}))});var zp=P(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.SemanticTokensRefreshRequest=yt.SemanticTokensRangeRequest=yt.SemanticTokensDeltaRequest=yt.SemanticTokensRequest=yt.SemanticTokensRegistrationType=yt.TokenFormat=void 0;var Pt=Ce(),kp;(function(n){n.Relative="relative"})(kp||(yt.TokenFormat=kp={}));var os;(function(n){n.method="textDocument/semanticTokens",n.type=new Pt.RegistrationType(n.method)})(os||(yt.SemanticTokensRegistrationType=os={}));var $p;(function(n){n.method="textDocument/semanticTokens/full",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens","semanticTokensProvider")})($p||(yt.SemanticTokensRequest=$p={}));var Hp;(function(n){n.method="textDocument/semanticTokens/full/delta",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Hp||(yt.SemanticTokensDeltaRequest=Hp={}));var Up;(function(n){n.method="textDocument/semanticTokens/range",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Up||(yt.SemanticTokensRangeRequest=Up={}));var Wp;(function(n){n.method="workspace/semanticTokens/refresh",n.messageDirection=Pt.MessageDirection.serverToClient,n.type=new Pt.ProtocolRequestType0(n.method),n.capabilities=Pt.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Wp||(yt.SemanticTokensRefreshRequest=Wp={}))});var Bp=P(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.ShowDocumentRequest=void 0;var Vu=Ce(),Kp;(function(n){n.method="window/showDocument",n.messageDirection=Vu.MessageDirection.serverToClient,n.type=new Vu.ProtocolRequestType(n.method),n.capabilities=Vu.CM.create("window.showDocument.support",void 0)})(Kp||(Co.ShowDocumentRequest=Kp={}))});var Vp=P(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.LinkedEditingRangeRequest=void 0;var Xu=Ce(),Gp;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=Xu.MessageDirection.clientToServer,n.type=new Xu.ProtocolRequestType(n.method),n.capabilities=Xu.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Gp||(wo.LinkedEditingRangeRequest=Gp={}))});var ng=P(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.WillDeleteFilesRequest=ct.DidDeleteFilesNotification=ct.DidRenameFilesNotification=ct.WillRenameFilesRequest=ct.DidCreateFilesNotification=ct.WillCreateFilesRequest=ct.FileOperationPatternKind=void 0;var Ge=Ce(),Xp;(function(n){n.file="file",n.folder="folder"})(Xp||(ct.FileOperationPatternKind=Xp={}));var Jp;(function(n){n.method="workspace/willCreateFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Jp||(ct.WillCreateFilesRequest=Jp={}));var Qp;(function(n){n.method="workspace/didCreateFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Qp||(ct.DidCreateFilesNotification=Qp={}));var Yp;(function(n){n.method="workspace/willRenameFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Yp||(ct.WillRenameFilesRequest=Yp={}));var Zp;(function(n){n.method="workspace/didRenameFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Zp||(ct.DidRenameFilesNotification=Zp={}));var eg;(function(n){n.method="workspace/didDeleteFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(eg||(ct.DidDeleteFilesNotification=eg={}));var tg;(function(n){n.method="workspace/willDeleteFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(tg||(ct.WillDeleteFilesRequest=tg={}))});var og=P(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.MonikerRequest=br.MonikerKind=br.UniquenessLevel=void 0;var Ju=Ce(),rg;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(rg||(br.UniquenessLevel=rg={}));var ig;(function(n){n.$import="import",n.$export="export",n.local="local"})(ig||(br.MonikerKind=ig={}));var sg;(function(n){n.method="textDocument/moniker",n.messageDirection=Ju.MessageDirection.clientToServer,n.type=new Ju.ProtocolRequestType(n.method),n.capabilities=Ju.CM.create("textDocument.moniker","monikerProvider")})(sg||(br.MonikerRequest=sg={}))});var lg=P(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.TypeHierarchySubtypesRequest=Cr.TypeHierarchySupertypesRequest=Cr.TypeHierarchyPrepareRequest=void 0;var Fr=Ce(),ag;(function(n){n.method="textDocument/prepareTypeHierarchy",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method),n.capabilities=Fr.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(ag||(Cr.TypeHierarchyPrepareRequest=ag={}));var cg;(function(n){n.method="typeHierarchy/supertypes",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method)})(cg||(Cr.TypeHierarchySupertypesRequest=cg={}));var ug;(function(n){n.method="typeHierarchy/subtypes",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method)})(ug||(Cr.TypeHierarchySubtypesRequest=ug={}))});var hg=P(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.InlineValueRefreshRequest=Si.InlineValueRequest=void 0;var Di=Ce(),dg;(function(n){n.method="textDocument/inlineValue",n.messageDirection=Di.MessageDirection.clientToServer,n.type=new Di.ProtocolRequestType(n.method),n.capabilities=Di.CM.create("textDocument.inlineValue","inlineValueProvider")})(dg||(Si.InlineValueRequest=dg={}));var fg;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=Di.MessageDirection.serverToClient,n.type=new Di.ProtocolRequestType0(n.method),n.capabilities=Di.CM.create("workspace.inlineValue.refreshSupport",void 0)})(fg||(Si.InlineValueRefreshRequest=fg={}))});var _g=P(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.InlayHintRefreshRequest=wr.InlayHintResolveRequest=wr.InlayHintRequest=void 0;var Ln=Ce(),pg;(function(n){n.method="textDocument/inlayHint",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint","inlayHintProvider")})(pg||(wr.InlayHintRequest=pg={}));var gg;(function(n){n.method="inlayHint/resolve",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(gg||(wr.InlayHintResolveRequest=gg={}));var mg;(function(n){n.method="workspace/inlayHint/refresh",n.messageDirection=Ln.MessageDirection.serverToClient,n.type=new Ln.ProtocolRequestType0(n.method),n.capabilities=Ln.CM.create("workspace.inlayHint.refreshSupport",void 0)})(mg||(wr.InlayHintRefreshRequest=mg={}))});var Sg=P(Ve=>{"use strict";var wC=Ve&&Ve.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),DC=Ve&&Ve.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),SC=Ve&&Ve.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var RC=de&&de.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),TC=de&&de.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),OC=de&&de.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.InlineCompletionRequest=void 0;var Zu=Ce(),xg;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=Zu.MessageDirection.clientToServer,n.type=new Zu.ProtocolRequestType(n.method),n.capabilities=Zu.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(xg||(So.InlineCompletionRequest=xg={}))});var Fg=P(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.TextDocumentContentRefreshRequest=Ri.TextDocumentContentRequest=void 0;var cs=Ce(),Ng;(function(n){n.method="workspace/textDocumentContent",n.messageDirection=cs.MessageDirection.clientToServer,n.type=new cs.ProtocolRequestType(n.method),n.capabilities=cs.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Ng||(Ri.TextDocumentContentRequest=Ng={}));var jg;(function(n){n.method="workspace/textDocumentContent/refresh",n.messageDirection=cs.MessageDirection.serverToClient,n.type=new cs.ProtocolRequestType(n.method)})(jg||(Ri.TextDocumentContentRefreshRequest=jg={}))});var Jm=P(m=>{"use strict";var EC=m&&m.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qC=m&&m.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),MC=m&&m.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}n.hasId=e})(zg||(m.StaticRegistrationOptions=zg={}));var Kg;(function(n){function e(t){let r=t;return r&&(r.documentSelector===null||rl.is(r.documentSelector))}n.is=e})(Kg||(m.TextDocumentRegistrationOptions=Kg={}));var Bg;(function(n){function e(r){let i=r;return Xe.objectLiteral(i)&&(i.workDoneProgress===void 0||Xe.boolean(i.workDoneProgress))}n.is=e;function t(r){let i=r;return i&&Xe.boolean(i.workDoneProgress)}n.hasWorkDoneProgress=t})(Bg||(m.WorkDoneProgressOptions=Bg={}));var Gg;(function(n){n.method="initialize",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method)})(Gg||(m.InitializeRequest=Gg={}));var Vg;(function(n){n.unknownProtocolVersion=1})(Vg||(m.InitializeErrorCodes=Vg={}));var Xg;(function(n){n.method="initialized",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method)})(Xg||(m.InitializedNotification=Xg={}));var Jg;(function(n){n.method="shutdown",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType0(n.method)})(Jg||(m.ShutdownRequest=Jg={}));var Qg;(function(n){n.method="exit",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType0(n.method)})(Qg||(m.ExitNotification=Qg={}));var Yg;(function(n){n.method="workspace/didChangeConfiguration",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("workspace.didChangeConfiguration",void 0)})(Yg||(m.DidChangeConfigurationNotification=Yg={}));var Zg;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4,n.Debug=5})(Zg||(m.MessageType=Zg={}));var em;(function(n){n.method="window/showMessage",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("window.showMessage",void 0)})(em||(m.ShowMessageNotification=em={}));var tm;(function(n){n.method="window/showMessageRequest",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("window.showMessage",void 0)})(tm||(m.ShowMessageRequest=tm={}));var nm;(function(n){n.method="window/logMessage",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method)})(nm||(m.LogMessageNotification=nm={}));var rm;(function(n){n.method="telemetry/event",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method)})(rm||(m.TelemetryEventNotification=rm={}));var im;(function(n){n.None=0,n.Full=1,n.Incremental=2})(im||(m.TextDocumentSyncKind=im={}));var sm;(function(n){n.method="textDocument/didOpen",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(sm||(m.DidOpenTextDocumentNotification=sm={}));var om;(function(n){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}n.isIncremental=e;function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}n.isFull=t})(om||(m.TextDocumentContentChangeEvent=om={}));var am;(function(n){n.method="textDocument/didChange",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync")})(am||(m.DidChangeTextDocumentNotification=am={}));var cm;(function(n){n.method="textDocument/didClose",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(cm||(m.DidCloseTextDocumentNotification=cm={}));var um;(function(n){n.method="textDocument/didSave",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(um||(m.DidSaveTextDocumentNotification=um={}));var lm;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(lm||(m.TextDocumentSaveReason=lm={}));var dm;(function(n){n.method="textDocument/willSave",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(dm||(m.WillSaveTextDocumentNotification=dm={}));var fm;(function(n){n.method="textDocument/willSaveWaitUntil",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(fm||(m.WillSaveTextDocumentWaitUntilRequest=fm={}));var hm;(function(n){n.method="workspace/didChangeWatchedFiles",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("workspace.didChangeWatchedFiles",void 0)})(hm||(m.DidChangeWatchedFilesNotification=hm={}));var pm;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(pm||(m.FileChangeType=pm={}));var il;(function(n){function e(t){let r=t;return Xe.objectLiteral(r)&&(Lg.URI.is(r.baseUri)||Lg.WorkspaceFolder.is(r.baseUri))&&Xe.string(r.pattern)}n.is=e})(il||(m.RelativePattern=il={}));var sl;(function(n){function e(t){let r=t;return Xe.string(r)||il.is(r)}n.is=e})(sl||(m.GlobPattern=sl={}));var gm;(function(n){n.Create=1,n.Change=2,n.Delete=4})(gm||(m.WatchKind=gm={}));var mm;(function(n){n.method="textDocument/publishDiagnostics",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.publishDiagnostics",void 0)})(mm||(m.PublishDiagnosticsNotification=mm={}));var _m;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(_m||(m.CompletionTriggerKind=_m={}));var ym;(function(n){n.method="textDocument/completion",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.completion","completionProvider")})(ym||(m.CompletionRequest=ym={}));var vm;(function(n){n.method="completionItem/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(vm||(m.CompletionResolveRequest=vm={}));var bm;(function(n){n.method="textDocument/hover",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.hover","hoverProvider")})(bm||(m.HoverRequest=bm={}));var Cm;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(Cm||(m.SignatureHelpTriggerKind=Cm={}));var wm;(function(n){n.method="textDocument/signatureHelp",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(wm||(m.SignatureHelpRequest=wm={}));var Dm;(function(n){n.method="textDocument/definition",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.definition","definitionProvider")})(Dm||(m.DefinitionRequest=Dm={}));var Sm;(function(n){n.method="textDocument/references",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.references","referencesProvider")})(Sm||(m.ReferencesRequest=Sm={}));var Pm;(function(n){n.method="textDocument/documentHighlight",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Pm||(m.DocumentHighlightRequest=Pm={}));var Rm;(function(n){n.method="textDocument/documentSymbol",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Rm||(m.DocumentSymbolRequest=Rm={}));var Tm;(function(n){n.method="textDocument/codeAction",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeAction","codeActionProvider")})(Tm||(m.CodeActionRequest=Tm={}));var Om;(function(n){n.method="codeAction/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Om||(m.CodeActionResolveRequest=Om={}));var Em;(function(n){n.method="workspace/symbol",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.symbol","workspaceSymbolProvider")})(Em||(m.WorkspaceSymbolRequest=Em={}));var qm;(function(n){n.method="workspaceSymbol/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(qm||(m.WorkspaceSymbolResolveRequest=qm={}));var Mm;(function(n){n.method="textDocument/codeLens",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeLens","codeLensProvider")})(Mm||(m.CodeLensRequest=Mm={}));var xm;(function(n){n.method="codeLens/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(xm||(m.CodeLensResolveRequest=xm={}));var Im;(function(n){n.method="workspace/codeLens/refresh",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType0(n.method),n.capabilities=O.CM.create("workspace.codeLens",void 0)})(Im||(m.CodeLensRefreshRequest=Im={}));var Nm;(function(n){n.method="textDocument/documentLink",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentLink","documentLinkProvider")})(Nm||(m.DocumentLinkRequest=Nm={}));var jm;(function(n){n.method="documentLink/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(jm||(m.DocumentLinkResolveRequest=jm={}));var Fm;(function(n){n.method="textDocument/formatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.formatting","documentFormattingProvider")})(Fm||(m.DocumentFormattingRequest=Fm={}));var Lm;(function(n){n.method="textDocument/rangeFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Lm||(m.DocumentRangeFormattingRequest=Lm={}));var Am;(function(n){n.method="textDocument/rangesFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Am||(m.DocumentRangesFormattingRequest=Am={}));var km;(function(n){n.method="textDocument/onTypeFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(km||(m.DocumentOnTypeFormattingRequest=km={}));var $m;(function(n){n.Identifier=1})($m||(m.PrepareSupportDefaultBehavior=$m={}));var Hm;(function(n){n.method="textDocument/rename",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rename","renameProvider")})(Hm||(m.RenameRequest=Hm={}));var Um;(function(n){n.method="textDocument/prepareRename",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Um||(m.PrepareRenameRequest=Um={}));var Wm;(function(n){n.method="workspace/executeCommand",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.executeCommand","executeCommandProvider")})(Wm||(m.ExecuteCommandRequest=Wm={}));var zm;(function(n){n.method="workspace/applyEdit",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType("workspace/applyEdit"),n.capabilities=O.CM.create("workspace.applyEdit",void 0)})(zm||(m.ApplyWorkspaceEditRequest=zm={}))});var Ym=P(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.createProtocolConnection=$C;var Qm=Nn();function $C(n,e,t,r){return Qm.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Qm.createMessageConnection)(n,e,t,r)}});var V=P(vt=>{"use strict";var HC=vt&&vt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Po=vt&&vt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&HC(e,n,t)};Object.defineProperty(vt,"__esModule",{value:!0});vt.LSPErrorCodes=vt.createProtocolConnection=void 0;Po(Nn(),vt);Po((po(),Hs(ho)),vt);Po(Ce(),vt);Po(Jm(),vt);var UC=Ym();Object.defineProperty(vt,"createProtocolConnection",{enumerable:!0,get:function(){return UC.createProtocolConnection}});var Zm;(function(n){n.lspReservedErrorRangeStart=-32899,n.RequestFailed=-32803,n.ServerCancelled=-32802,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(Zm||(vt.LSPErrorCodes=Zm={}))});var Ro=P(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.Semaphore=Bt.Delayer=void 0;Bt.setTestMode=WC;Bt.clearTestMode=zC;Bt.map=KC;Bt.mapAsync=BC;Bt.forEach=GC;var ds=V(),fl=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(r=>{this.onSuccess=r}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let r=this.task();return this.task=void 0,r})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,ds.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};Bt.Delayer=fl;var hl=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ds.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Bt.Semaphore=hl;var pl=!1;function WC(){pl=!0}function zC(){pl=!1}var e_=15,ls=class{yieldAfter;startTime;counter;total;counterInterval;constructor(e=e_){this.yieldAfter=pl===!0?Math.max(e,2):Math.max(e,e_),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}};async function KC(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new ls(r?.yieldAfter);function o(u){s.start();for(let l=u;l{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function BC(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new ls(r?.yieldAfter);async function o(u){s.start();for(let l=u;l{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function GC(n,e,t,r){if(n.length===0)return;let i=new ls(r?.yieldAfter);function s(a){i.start();for(let u=a;u{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?a(-1):a(s(o))})})}});var ml=P(kn=>{"use strict";var VC=kn&&kn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XC=kn&&kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),JC=kn&&kn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var YC=$n&&$n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ZC=$n&&$n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ew=$n&&$n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var nw=Hn&&Hn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),rw=Hn&&Hn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),iw=Hn&&Hn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var ow=Un&&Un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),aw=Un&&Un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),cw=Un&&Un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var lw=At&&At.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),dw=At&&At.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),n_=At&&At.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var hw=Wn&&Wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pw=Wn&&Wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gw=Wn&&Wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var _w=zn&&zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),yw=zn&&zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),vw=zn&&zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Cw=Kn&&Kn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ww=Kn&&Kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Dw=Kn&&Kn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Sw=Bn&&Bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Pw=Bn&&Bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Rw=Bn&&Bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Ow=Gt&&Gt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Ew=Gt&&Gt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Oo=Gt&&Gt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;id.toString());function r(d){return t(d)}function i(d){return{uri:t(d.uri)}}function s(d){return{uri:t(d.uri),languageId:d.languageId,version:d.version,text:d.getText()}}function o(d){return{uri:t(d.uri),version:d.version}}function a(d){return{textDocument:s(d)}}function u(d){let D=d;return!!D.document&&!!D.contentChanges}function l(d){let D=d;return!!D.uri&&!!D.version}function f(d,D,$){if(l(d))return{textDocument:{uri:t(d.uri),version:d.version},contentChanges:[{text:d.getText()}]};if(u(d)){let ge=D,ce=$;return{textDocument:{uri:t(ge),version:ce},contentChanges:d.contentChanges.map(mt=>{let Mn=mt.range;return{range:{start:{line:Mn.start.line,character:Mn.start.character},end:{line:Mn.end.line,character:Mn.end.character}},rangeLength:mt.rangeLength,text:mt.text}})}}else throw Error("Unsupported text document change parameter")}function p(d){return{textDocument:i(d)}}function h(d,D=!1){let $={textDocument:i(d)};return D&&($.text=d.getText()),$}function g(d){switch(d){case Fe.TextDocumentSaveReason.Manual:return B.TextDocumentSaveReason.Manual;case Fe.TextDocumentSaveReason.AfterDelay:return B.TextDocumentSaveReason.AfterDelay;case Fe.TextDocumentSaveReason.FocusOut:return B.TextDocumentSaveReason.FocusOut}return B.TextDocumentSaveReason.Manual}function _(d){return{textDocument:i(d.document),reason:g(d.reason)}}function v(d){return{files:d.files.map(D=>({uri:t(D)}))}}function R(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function q(d){return{files:d.files.map(D=>({uri:t(D)}))}}function w(d){return{files:d.files.map(D=>({uri:t(D)}))}}function M(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function j(d){return{files:d.files.map(D=>({uri:t(D)}))}}function F(d,D){return{textDocument:i(d),position:Rn(D)}}function oe(d){switch(d){case Fe.CompletionTriggerKind.TriggerCharacter:return B.CompletionTriggerKind.TriggerCharacter;case Fe.CompletionTriggerKind.TriggerForIncompleteCompletions:return B.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return B.CompletionTriggerKind.Invoked}}function te(d,D,$){return{textDocument:i(d),position:Rn(D),context:{triggerKind:oe($.triggerKind),triggerCharacter:$.triggerCharacter}}}function Te(d){switch(d){case Fe.SignatureHelpTriggerKind.Invoke:return B.SignatureHelpTriggerKind.Invoked;case Fe.SignatureHelpTriggerKind.TriggerCharacter:return B.SignatureHelpTriggerKind.TriggerCharacter;case Fe.SignatureHelpTriggerKind.ContentChange:return B.SignatureHelpTriggerKind.ContentChange}}function Pn(d){return{label:d.label}}function Qr(d){return d.map(Pn)}function rr(d){return{label:d.label,parameters:Qr(d.parameters)}}function Yr(d){return d.map(rr)}function Zr(d){return d===void 0?d:{signatures:Yr(d.signatures),activeSignature:d.activeSignature,activeParameter:d.activeParameter}}function Mt(d,D,$){return{textDocument:i(d),position:Rn(D),context:{isRetrigger:$.isRetrigger,triggerCharacter:$.triggerCharacter,triggerKind:Te($.triggerKind),activeSignatureHelp:Zr($.activeSignatureHelp)}}}function Rn(d){return{line:d.line,character:d.character}}function xt(d){return d==null?d:{line:d.line>B.uinteger.MAX_VALUE?B.uinteger.MAX_VALUE:d.line,character:d.character>B.uinteger.MAX_VALUE?B.uinteger.MAX_VALUE:d.character}}function Tn(d,D){return r_.map(d,xt,D)}function Ht(d){return d.map(xt)}function Oe(d){return d==null?d:{start:xt(d.start),end:xt(d.end)}}function Ui(d){return d.map(Oe)}function Zt(d){return d==null?d:B.Location.create(r(d.uri),Oe(d.range))}function ir(d){switch(d){case Fe.DiagnosticSeverity.Error:return B.DiagnosticSeverity.Error;case Fe.DiagnosticSeverity.Warning:return B.DiagnosticSeverity.Warning;case Fe.DiagnosticSeverity.Information:return B.DiagnosticSeverity.Information;case Fe.DiagnosticSeverity.Hint:return B.DiagnosticSeverity.Hint}}function ei(d){if(!d)return;let D=[];for(let $ of d){let ge=Mr($);ge!==void 0&&D.push(ge)}return D.length>0?D:void 0}function Mr(d){switch(d){case Fe.DiagnosticTag.Unnecessary:return B.DiagnosticTag.Unnecessary;case Fe.DiagnosticTag.Deprecated:return B.DiagnosticTag.Deprecated;default:return}}function en(d){return{message:d.message,location:Zt(d.location)}}function xr(d){return d.map(en)}function ti(d){if(d!=null)return Ar.number(d)||Ar.string(d)?d:{value:d.value,target:r(d.target)}}function sr(d){let D=B.Diagnostic.create(Oe(d.range),d.message),$=d instanceof s_.ProtocolDiagnostic?d:void 0;$!==void 0&&$.data!==void 0&&(D.data=$.data);let ge=ti(d.code);return s_.DiagnosticCode.is(ge)?$!==void 0&&$.hasDiagnosticCode?D.code=ge:(D.code=ge.value,D.codeDescription={href:ge.target}):D.code=ge,Ar.number(d.severity)&&(D.severity=ir(d.severity)),Array.isArray(d.tags)&&(D.tags=ei(d.tags)),d.relatedInformation&&(D.relatedInformation=xr(d.relatedInformation)),d.source&&(D.source=d.source),D}function or(d,D){return d==null?d:r_.map(d,sr,D)}function ar(d){return d==null?d:d.map(sr)}function Wi(d,D){switch(d){case"$string":return D;case B.MarkupKind.PlainText:return{kind:d,value:D};case B.MarkupKind.Markdown:return{kind:d,value:D.value};default:return`Unsupported Markup content received. Kind is: ${d}`}}function ni(d){if(d===Fe.CompletionItemTag.Deprecated)return B.CompletionItemTag.Deprecated}function wt(d){if(d===void 0)return d;let D=[];for(let $ of d){let ge=ni($);ge!==void 0&&D.push(ge)}return D}function zi(d,D){return D!==void 0?D:d+1}function tn(d,D=!1){let $,ge;Ar.string(d.label)?$=d.label:($=d.label.label,D&&(d.label.detail!==void 0||d.label.description!==void 0)&&(ge={detail:d.label.detail,description:d.label.description}));let ce={label:$};ge!==void 0&&(ce.labelDetails=ge);let Ze=d instanceof qw.default?d:void 0;d.detail&&(ce.detail=d.detail),d.documentation&&(!Ze||Ze.documentationFormat==="$string"?ce.documentation=d.documentation:ce.documentation=Wi(Ze.documentationFormat,d.documentation)),d.filterText&&(ce.filterText=d.filterText),cr(ce,d),Ar.number(d.kind)&&(ce.kind=zi(d.kind,Ze&&Ze.originalItemKind)),d.sortText&&(ce.sortText=d.sortText),d.additionalTextEdits&&(ce.additionalTextEdits=ri(d.additionalTextEdits)),d.commitCharacters&&(ce.commitCharacters=d.commitCharacters.slice()),d.command&&(ce.command=ae(d.command)),(d.preselect===!0||d.preselect===!1)&&(ce.preselect=d.preselect);let mt=wt(d.tags);if(Ze){if(Ze.data!==void 0&&(ce.data=Ze.data),Ze.deprecated===!0||Ze.deprecated===!1){if(Ze.deprecated===!0&&mt!==void 0&&mt.length>0){let Mn=mt.indexOf(Fe.CompletionItemTag.Deprecated);Mn!==-1&&mt.splice(Mn,1)}ce.deprecated=Ze.deprecated}Ze.insertTextMode!==void 0&&(ce.insertTextMode=Ze.insertTextMode)}return mt!==void 0&&mt.length>0&&(ce.tags=mt),ce.insertTextMode===void 0&&d.keepWhitespace===!0&&(ce.insertTextMode=B.InsertTextMode.adjustIndentation),ce}function cr(d,D){let $=B.InsertTextFormat.PlainText,ge,ce;D.textEdit?(ge=D.textEdit.newText,ce=D.textEdit.range):D.insertText instanceof Fe.SnippetString?($=B.InsertTextFormat.Snippet,ge=D.insertText.value):ge=D.insertText,D.range&&(ce=D.range),d.insertTextFormat=$,D.fromEdit&&ge!==void 0&&ce!==void 0?d.textEdit=ur(ge,ce):d.insertText=ge}function ur(d,D){return Nl.is(D)?B.InsertReplaceEdit.create(d,Oe(D.inserting),Oe(D.replacing)):{newText:d,range:Oe(D)}}function On(d){return{range:Oe(d.range),newText:d.newText}}function ri(d){return d==null?d:d.map(On)}function tt(d){return d<=Fe.SymbolKind.TypeParameter?d+1:B.SymbolKind.Property}function Ut(d){return d}function nt(d){return d.map(Ut)}function Ki(d,D,$){return{textDocument:i(d),position:Rn(D),context:{includeDeclaration:$.includeDeclaration}}}async function Ye(d,D){let $=B.CodeAction.create(d.title);if(d instanceof i_.default&&d.data!==void 0&&($.data=d.data),d.kind!==void 0&&($.kind=It(d.kind)),d.diagnostics!==void 0&&($.diagnostics=await or(d.diagnostics,D)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&($.command=ae(d.command)),d.isPreferred!==void 0&&($.isPreferred=d.isPreferred),d.disabled!==void 0&&($.disabled={reason:d.disabled.reason}),d.isAI&&($.tags??=[],$.tags.push(B.CodeActionTag.LLMGenerated)),$}function En(d){let D=B.CodeAction.create(d.title);if(d instanceof i_.default&&d.data!==void 0&&(D.data=d.data),d.kind!==void 0&&(D.kind=It(d.kind)),d.diagnostics!==void 0&&(D.diagnostics=ar(d.diagnostics)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(D.command=ae(d.command)),d.isPreferred!==void 0&&(D.isPreferred=d.isPreferred),d.disabled!==void 0&&(D.disabled={reason:d.disabled.reason}),d.isAI&&(D.tags??=[],D.tags.push(B.CodeActionTag.LLMGenerated)),D}async function ii(d,D){if(d==null)return d;let $;return d.only&&Ar.string(d.only.value)&&($=[d.only.value]),B.CodeActionContext.create(await or(d.diagnostics,D),$,lr(d.triggerKind))}function Ir(d){if(d==null)return d;let D;return d.only&&Ar.string(d.only.value)&&(D=[d.only.value]),B.CodeActionContext.create(ar(d.diagnostics),D,lr(d.triggerKind))}function lr(d){switch(d){case Fe.CodeActionTriggerKind.Invoke:return B.CodeActionTriggerKind.Invoked;case Fe.CodeActionTriggerKind.Automatic:return B.CodeActionTriggerKind.Automatic;default:return}}function It(d){if(d!=null)return d.value}function y(d){return B.InlineValueContext.create(d.frameId,Oe(d.stoppedLocation))}function E(d,D,$){return{textDocument:i(d),position:xt(D),context:I($)}}function I(d){return{triggerKind:H(d.triggerKind),selectedCompletionInfo:Z(d.selectedCompletionInfo)}}function H(d){switch(d){case Fe.InlineCompletionTriggerKind.Invoke:return B.InlineCompletionTriggerKind.Invoked;case Fe.InlineCompletionTriggerKind.Automatic:return B.InlineCompletionTriggerKind.Automatic}}function Z(d){if(d!=null)return{range:Oe(d.range),text:d.text}}function ae(d){let D=B.Command.create(d.title,d.command);return d.tooltip&&(D.tooltip=d.tooltip),d.arguments&&(D.arguments=d.arguments),D}function ie(d){let D=B.CodeLens.create(Oe(d.range));return d.command&&(D.command=ae(d.command)),d instanceof Mw.default&&d.data&&(D.data=d.data),D}function Ee(d,D){let $={tabSize:d.tabSize,insertSpaces:d.insertSpaces};return D.trimTrailingWhitespace&&($.trimTrailingWhitespace=!0),D.trimFinalNewlines&&($.trimFinalNewlines=!0),D.insertFinalNewline&&($.insertFinalNewline=!0),$}function ke(d){return{textDocument:i(d)}}function pe(d){return{textDocument:i(d)}}function ye(d){let D=B.DocumentLink.create(Oe(d.range));d.target&&(D.target=r(d.target)),d.tooltip!==void 0&&(D.tooltip=d.tooltip);let $=d instanceof xw.default?d:void 0;return $&&$.data&&(D.data=$.data),D}function rt(d){return{textDocument:i(d)}}function pt(d){let D={name:d.name,kind:tt(d.kind),uri:r(d.uri),range:Oe(d.range),selectionRange:Oe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=nt(d.tags)),d instanceof Iw.default&&d.data!==void 0&&(D.data=d.data),D}function qn(d){let D={name:d.name,kind:tt(d.kind),uri:r(d.uri),range:Oe(d.range),selectionRange:Oe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=nt(d.tags)),d instanceof Nw.default&&d.data!==void 0&&(D.data=d.data),D}function Dt(d){let D=d instanceof jw.default?{name:d.name,kind:tt(d.kind),location:d.hasRange?Zt(d.location):{uri:t(d.location.uri)},data:d.data}:{name:d.name,kind:tt(d.kind),location:Zt(d.location)};return d.tags!==void 0&&(D.tags=nt(d.tags)),d.containerName!==""&&(D.containerName=d.containerName),D}function gt(d){let D=typeof d.label=="string"?d.label:d.label.map(si),$=B.InlayHint.create(xt(d.position),D);return d.kind!==void 0&&($.kind=d.kind),d.textEdits!==void 0&&($.textEdits=ri(d.textEdits)),d.tooltip!==void 0&&($.tooltip=ks(d.tooltip)),d.paddingLeft!==void 0&&($.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&($.paddingRight=d.paddingRight),d instanceof Fw.default&&d.data!==void 0&&($.data=d.data),$}function si(d){let D=B.InlayHintLabelPart.create(d.value);return d.location!==void 0&&(D.location=Zt(d.location)),d.command!==void 0&&(D.command=ae(d.command)),d.tooltip!==void 0&&(D.tooltip=ks(d.tooltip)),D}function ks(d){return typeof d=="string"?d:{kind:B.MarkupKind.Markdown,value:d.value}}return{asUri:r,asTextDocumentIdentifier:i,asTextDocumentItem:s,asVersionedTextDocumentIdentifier:o,asOpenTextDocumentParams:a,asChangeTextDocumentParams:f,asCloseTextDocumentParams:p,asSaveTextDocumentParams:h,asWillSaveTextDocumentParams:_,asDidCreateFilesParams:v,asDidRenameFilesParams:R,asDidDeleteFilesParams:q,asWillCreateFilesParams:w,asWillRenameFilesParams:M,asWillDeleteFilesParams:j,asTextDocumentPositionParams:F,asCompletionParams:te,asSignatureHelpParams:Mt,asWorkerPosition:Rn,asRange:Oe,asRanges:Ui,asPosition:xt,asPositions:Tn,asPositionsSync:Ht,asLocation:Zt,asDiagnosticSeverity:ir,asDiagnosticTag:Mr,asDiagnostic:sr,asDiagnostics:or,asDiagnosticsSync:ar,asCompletionItem:tn,asTextEdit:On,asSymbolKind:tt,asSymbolTag:Ut,asSymbolTags:nt,asReferenceParams:Ki,asCodeAction:Ye,asCodeActionSync:En,asCodeActionContext:ii,asCodeActionContextSync:Ir,asInlineValueContext:y,asCommand:ae,asCodeLens:ie,asFormattingOptions:Ee,asDocumentSymbolParams:ke,asCodeLensParams:pe,asDocumentLink:ye,asDocumentLinkParams:rt,asCallHierarchyItem:pt,asTypeHierarchyItem:qn,asInlayHint:gt,asWorkspaceSymbol:Dt,asInlineCompletionParams:E,asInlineCompletionContext:I}}});var u_=P(Vt=>{"use strict";var Aw=Vt&&Vt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kw=Vt&&Vt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qo=Vt&&Vt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;iN.Uri.parse(c));function o(c){return s(c)}function a(c){let b=[];for(let T of c)if(typeof T=="string")b.push(T);else if(c_.NotebookCellTextDocumentFilter.is(T))if(typeof T.notebook=="string")b.push({notebookType:T.notebook,language:T.language});else{let L=T.notebook.notebookType??"*";b.push({notebookType:L,scheme:T.notebook.scheme,pattern:Ra(T.notebook.pattern),language:T.language})}else c_.TextDocumentFilter.is(T)&&b.push({language:T.language,scheme:T.scheme,pattern:Ra(T.pattern)});return b}async function u(c,b){return se.map(c,f,b)}function l(c){let b=new Array(c.length);for(let T=0;T0?b:void 0}function g(c){switch(c){case z.DiagnosticTag.Unnecessary:return N.DiagnosticTag.Unnecessary;case z.DiagnosticTag.Deprecated:return N.DiagnosticTag.Deprecated;default:return}}function _(c){return c?new N.Position(c.line,c.character):void 0}function v(c){return c?new N.Range(c.start.line,c.start.character,c.end.line,c.end.character):void 0}async function R(c,b){return se.map(c,T=>new N.Range(T.start.line,T.start.character,T.end.line,T.end.character),b)}function q(c){if(c==null)return N.DiagnosticSeverity.Error;switch(c){case z.DiagnosticSeverity.Error:return N.DiagnosticSeverity.Error;case z.DiagnosticSeverity.Warning:return N.DiagnosticSeverity.Warning;case z.DiagnosticSeverity.Information:return N.DiagnosticSeverity.Information;case z.DiagnosticSeverity.Hint:return N.DiagnosticSeverity.Hint}return N.DiagnosticSeverity.Error}function w(c){if(Rt.string(c))return j(c);if(Eo.is(c))return j().appendCodeblock(c.value,c.language);if(Array.isArray(c)){let b=[];for(let T of c){let L=j();Eo.is(T)?L.appendCodeblock(T.value,T.language):L.appendMarkdown(T),b.push(L)}return b}else return j(c)}function M(c){if(Rt.string(c))return c;switch(c.kind){case z.MarkupKind.Markdown:return j(c.value);case z.MarkupKind.PlainText:return c.value;default:return`Unsupported Markup content received. Kind is: ${c.kind}`}}function j(c){let b;if(c===void 0||typeof c=="string")b=new N.MarkdownString(c);else switch(c.kind){case z.MarkupKind.Markdown:b=new N.MarkdownString(c.value);break;case z.MarkupKind.PlainText:b=new N.MarkdownString,b.appendText(c.value);break;default:b=new N.MarkdownString,b.appendText(`Unsupported Markup content received. Kind is: ${c.kind}`);break}return b.isTrusted=e,b.supportHtml=t,b.supportThemeIcons=r,b}function F(c){if(c)return new N.Hover(w(c.contents),v(c.range))}async function oe(c,b,T){if(!c)return;if(Array.isArray(c))return se.map(c,xn=>rr(xn,b),T);let L=c,{defaultRange:qe,commitCharacters:Le}=te(L,b),me=await se.map(L.items,xn=>rr(xn,Le,L.applyKind?.commitCharacters,qe,L.itemDefaults?.insertTextMode,L.itemDefaults?.insertTextFormat,L.itemDefaults?.data,L.applyKind?.data),T);return new N.CompletionList(me,L.isIncomplete)}function te(c,b){let T=c.itemDefaults?.editRange,L=c.itemDefaults?.commitCharacters??b;return z.Range.is(T)?{defaultRange:v(T),commitCharacters:L}:T!==void 0?{defaultRange:{inserting:v(T.insert),replacing:v(T.replace)},commitCharacters:L}:{defaultRange:void 0,commitCharacters:L}}function Te(c){return z.CompletionItemKind.Text<=c&&c<=z.CompletionItemKind.TypeParameter?[c-1,void 0]:[N.CompletionItemKind.Text,c]}function Pn(c){if(c===z.CompletionItemTag.Deprecated)return N.CompletionItemTag.Deprecated}function Qr(c){if(c==null)return[];let b=[];for(let T of c){let L=Pn(T);L!==void 0&&b.push(L)}return b}function rr(c,b,T,L,qe,Le,me,xn){let dr=Qr(c.tags),Nt=Mt(c),$e=new $w.default(Nt);c.detail&&($e.detail=c.detail),c.documentation&&($e.documentation=M(c.documentation),$e.documentationFormat=Rt.string(c.documentation)?"$string":c.documentation.kind),c.filterText&&($e.filterText=c.filterText);let $s=Rn(c,L,Le);if($s&&($e.insertText=$s.text,$e.range=$s.range,$e.fromEdit=$s.fromEdit),Rt.number(c.kind)){let[hb,Ih]=Te(c.kind);$e.kind=hb,Ih&&($e.originalItemKind=Ih)}c.sortText&&($e.sortText=c.sortText),c.additionalTextEdits&&($e.additionalTextEdits=Oe(c.additionalTextEdits));let Mh=Yr(c,b,T);Mh&&($e.commitCharacters=Mh.slice()),c.command&&($e.command=nt(c.command)),(c.deprecated===!0||c.deprecated===!1)&&($e.deprecated=c.deprecated,c.deprecated===!0&&dr.push(N.CompletionItemTag.Deprecated)),(c.preselect===!0||c.preselect===!1)&&($e.preselect=c.preselect);let xh=Zr(c,me,xn);xh!==void 0&&($e.data=xh),dr.length>0&&($e.tags=dr);let Oa=c.insertTextMode??qe;return Oa!==void 0&&($e.insertTextMode=Oa,Oa===z.InsertTextMode.asIs&&($e.keepWhitespace=!0)),$e}function Yr(c,b,T){if(T===z.ApplyKind.Merge){if(!b&&!c.commitCharacters)return;let L=new Set;if(b)for(let qe of b)L.add(qe);if(Rt.stringArray(c.commitCharacters))for(let qe of c.commitCharacters)L.add(qe);return Array.from(L)}return c.commitCharacters!==void 0?Rt.stringArray(c.commitCharacters)?c.commitCharacters:void 0:b}function Zr(c,b,T){if(T===z.ApplyKind.Merge){let L={...b};return c.data&&Object.entries(c.data).forEach(([qe,Le])=>{Le!=null&&(L[qe]=Le)}),L}return c.data??b}function Mt(c){return z.CompletionItemLabelDetails.is(c.labelDetails)?{label:c.label,detail:c.labelDetails.detail,description:c.labelDetails.description}:c.label}function Rn(c,b,T){let L=c.insertTextFormat??T;if(c.textEdit!==void 0||b!==void 0){let[qe,Le]=c.textEdit!==void 0?xt(c.textEdit):[b,c.textEditText??c.label];return L===z.InsertTextFormat.Snippet?{text:new N.SnippetString(Le),range:qe,fromEdit:!0}:{text:Le,range:qe,fromEdit:!0}}else return c.insertText?L===z.InsertTextFormat.Snippet?{text:new N.SnippetString(c.insertText),fromEdit:!1}:{text:c.insertText,fromEdit:!1}:void 0}function xt(c){return z.InsertReplaceEdit.is(c)?[{inserting:v(c.insert),replacing:v(c.replace)},c.newText]:[v(c.range),c.newText]}function Tn(c){if(c)return new N.TextEdit(v(c.range),c.newText)}async function Ht(c,b){if(c)return se.map(c,Tn,b)}function Oe(c){if(!c)return;let b=new Array(c.length);for(let T=0;T0){let T=[];for(let L of c.children)T.push(tt(L));b.children=T}return b}function Ut(c,b){c.tags=ur(b.tags),b.deprecated&&(c.tags?c.tags.includes(N.SymbolTag.Deprecated)||(c.tags=c.tags.concat(N.SymbolTag.Deprecated)):c.tags=[N.SymbolTag.Deprecated])}function nt(c){let b={title:c.title,command:c.command};return c.tooltip&&(b.tooltip=c.tooltip),c.arguments&&(b.arguments=c.arguments),b}async function Ki(c,b){if(c)return se.map(c,nt,b)}let Ye=new Map;Ye.set(z.CodeActionKind.Empty,N.CodeActionKind.Empty),Ye.set(z.CodeActionKind.QuickFix,N.CodeActionKind.QuickFix),Ye.set(z.CodeActionKind.Refactor,N.CodeActionKind.Refactor),Ye.set(z.CodeActionKind.RefactorExtract,N.CodeActionKind.RefactorExtract),Ye.set(z.CodeActionKind.RefactorInline,N.CodeActionKind.RefactorInline),Ye.set(z.CodeActionKind.RefactorRewrite,N.CodeActionKind.RefactorRewrite),Ye.set(z.CodeActionKind.Source,N.CodeActionKind.Source),Ye.set(z.CodeActionKind.SourceOrganizeImports,N.CodeActionKind.SourceOrganizeImports);function En(c){if(c==null)return;let b=Ye.get(c);if(b)return b;let T=c.split(".");b=N.CodeActionKind.Empty;for(let L of T)b=b.append(L);return b}function ii(c){if(c!=null)return c.map(b=>En(b))}function Ir(c){if(c!=null)return c.map(b=>({kind:En(b.kind),command:nt(b.command)}))}async function lr(c,b){if(c==null)return;let T=new Ww.default(c.title,c.data);return c.kind!==void 0&&(T.kind=En(c.kind)),c.diagnostics!==void 0&&(T.diagnostics=l(c.diagnostics)),c.edit!==void 0&&(T.edit=await I(c.edit,b)),c.command!==void 0&&(T.command=nt(c.command)),c.isPreferred!==void 0&&(T.isPreferred=c.isPreferred),c.disabled!==void 0&&(T.disabled={reason:c.disabled.reason}),c.tags?.includes(z.CodeActionTag.LLMGenerated)&&(T.isAI=!0),T}function It(c,b){return se.mapAsync(c,async T=>z.Command.is(T)?nt(T):lr(T,b),b)}function y(c){if(!c)return;let b=new Hw.default(v(c.range));return c.command&&(b.command=nt(c.command)),c.data!==void 0&&c.data!==null&&(b.data=c.data),b}async function E(c,b){if(c)return se.map(c,y,b)}async function I(c,b){if(!c)return;let T=new Map;if(c.changeAnnotations!==void 0){let Le=c.changeAnnotations;await se.forEach(Object.keys(Le),me=>{let xn=H(Le[me]);T.set(me,xn)},b)}let L=Le=>{if(Le!==void 0)return T.get(Le)},qe=new N.WorkspaceEdit;if(c.documentChanges){let Le=c.documentChanges;await se.forEach(Le,me=>{if(z.CreateFile.is(me))qe.createFile(s(me.uri),me.options,L(me.annotationId));else if(z.RenameFile.is(me))qe.renameFile(s(me.oldUri),s(me.newUri),me.options,L(me.annotationId));else if(z.DeleteFile.is(me))qe.deleteFile(s(me.uri),me.options,L(me.annotationId));else if(z.TextDocumentEdit.is(me)){let xn=s(me.textDocument.uri),dr=[];for(let Nt of me.edits)z.AnnotatedTextEdit.is(Nt)?dr.push([new N.TextEdit(v(Nt.range),Nt.newText),L(Nt.annotationId)]):z.SnippetTextEdit.is(Nt)?dr.push([new N.SnippetTextEdit(v(Nt.range),new N.SnippetString(Nt.snippet.value)),L(Nt.annotationId)]):dr.push([new N.TextEdit(v(Nt.range),Nt.newText),void 0]);qe.set(xn,dr)}else throw new Error(`Unknown workspace edit change received: -${JSON.stringify(me,void 0,4)}`)},b)}else if(c.changes){let Le=c.changes;await se.forEach(Object.keys(Le),me=>{qe.set(s(me),Oe(Le[me]))},b)}return qe}function H(c){if(c!==void 0)return{label:c.label,needsConfirmation:!!c.needsConfirmation,description:c.description}}function Z(c){let b=v(c.range),T=c.target?o(c.target):void 0,L=new Uw.default(b,T);return c.tooltip!==void 0&&(L.tooltip=c.tooltip),c.data!==void 0&&c.data!==null&&(L.data=c.data),L}async function ae(c,b){if(c)return se.map(c,Z,b)}function ie(c){return new N.Color(c.red,c.green,c.blue,c.alpha)}function Ee(c){return new N.ColorInformation(v(c.range),ie(c.color))}async function ke(c,b){if(c)return se.map(c,Ee,b)}function pe(c){let b=new N.ColorPresentation(c.label);return b.additionalTextEdits=Oe(c.additionalTextEdits),c.textEdit&&(b.textEdit=Tn(c.textEdit)),b}async function ye(c,b){if(c)return se.map(c,pe,b)}function rt(c){if(c)switch(c){case z.FoldingRangeKind.Comment:return N.FoldingRangeKind.Comment;case z.FoldingRangeKind.Imports:return N.FoldingRangeKind.Imports;case z.FoldingRangeKind.Region:return N.FoldingRangeKind.Region}}function pt(c){return new N.FoldingRange(c.startLine,c.endLine,rt(c.kind))}async function qn(c,b){if(c)return se.map(c,pt,b)}function Dt(c){return new N.SelectionRange(v(c.range),c.parent?Dt(c.parent):void 0)}async function gt(c,b){return Array.isArray(c)?se.map(c,Dt,b):[]}function si(c){return z.InlineValueText.is(c)?new N.InlineValueText(v(c.range),c.text):z.InlineValueVariableLookup.is(c)?new N.InlineValueVariableLookup(v(c.range),c.variableName,c.caseSensitiveLookup):new N.InlineValueEvaluatableExpression(v(c.range),c.expression)}async function ks(c,b){return Array.isArray(c)?se.map(c,si,b):[]}async function d(c,b){let T=typeof c.label=="string"?c.label:await se.map(c.label,D,b),L=new Gw.default(_(c.position),T);return c.kind!==void 0&&(L.kind=c.kind),c.textEdits!==void 0&&(L.textEdits=await Ht(c.textEdits,b)),c.tooltip!==void 0&&(L.tooltip=$(c.tooltip)),c.paddingLeft!==void 0&&(L.paddingLeft=c.paddingLeft),c.paddingRight!==void 0&&(L.paddingRight=c.paddingRight),c.data!==void 0&&(L.data=c.data),L}function D(c){let b=new N.InlayHintLabelPart(c.value);return c.location!==void 0&&(b.location=en(c.location)),c.tooltip!==void 0&&(b.tooltip=$(c.tooltip)),c.command!==void 0&&(b.command=nt(c.command)),b}function $(c){return typeof c=="string"?c:j(c)}async function ge(c,b){if(Array.isArray(c))return se.mapAsync(c,d,b)}function ce(c){if(c===null)return;let b=new zw.default(tn(c.kind),c.name,c.detail||"",o(c.uri),v(c.range),v(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=ur(c.tags)),b}async function Ze(c,b){if(c!==null)return se.map(c,ce,b)}async function mt(c,b){return new N.CallHierarchyIncomingCall(ce(c.from),await R(c.fromRanges,b))}async function Mn(c,b){if(c!==null)return se.mapAsync(c,mt,b)}async function Oh(c,b){return new N.CallHierarchyOutgoingCall(ce(c.to),await R(c.fromRanges,b))}async function sb(c,b){if(c!==null)return se.mapAsync(c,Oh,b)}async function ob(c,b){if(c!=null)return new N.SemanticTokens(new Uint32Array(c.data),c.resultId)}function Eh(c){return new N.SemanticTokensEdit(c.start,c.deleteCount,c.data!==void 0?new Uint32Array(c.data):void 0)}async function ab(c,b){if(c!=null)return new N.SemanticTokensEdits(c.edits.map(Eh),c.resultId)}function cb(c){return c}async function ub(c,b){if(c!=null)return new N.LinkedEditingRanges(await R(c.ranges,b),lb(c.wordPattern))}function lb(c){if(c!=null)return new RegExp(c)}function qh(c){if(c===null)return;let b=new Kw.default(tn(c.kind),c.name,c.detail||"",o(c.uri),v(c.range),v(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=ur(c.tags)),b}async function db(c,b){if(c!==null)return se.map(c,qh,b)}function Ra(c){if(Rt.string(c))return c;if(z.RelativePattern.is(c)){if(z.URI.is(c.baseUri))return new N.RelativePattern(o(c.baseUri),c.pattern);if(z.WorkspaceFolder.is(c.baseUri)){let b=N.workspace.getWorkspaceFolder(o(c.baseUri.uri));return b!==void 0?new N.RelativePattern(b,c.pattern):void 0}}}async function fb(c,b){if(!c)return;if(Array.isArray(c))return se.map(c,qe=>Ta(qe),b);let T=c,L=await se.map(T.items,qe=>Ta(qe),b);return new N.InlineCompletionList(L)}function Ta(c){let b;typeof c.insertText=="string"?b=c.insertText:b=new N.SnippetString(c.insertText.value);let T;c.command&&(T=nt(c.command));let L=new N.InlineCompletionItem(b,v(c.range),T);return c.filterText&&(L.filterText=c.filterText),L}return{asUri:o,asDocumentSelector:a,asDiagnostics:u,asDiagnostic:f,asRange:v,asRanges:R,asPosition:_,asDiagnosticSeverity:q,asDiagnosticTag:g,asHover:F,asCompletionResult:oe,asCompletionItem:rr,asTextEdit:Tn,asTextEdits:Ht,asSignatureHelp:Ui,asSignatureInformations:Zt,asSignatureInformation:ir,asParameterInformations:ei,asParameterInformation:Mr,asDeclarationResult:xr,asDefinitionResult:ti,asLocation:en,asReferences:ar,asDocumentHighlights:Wi,asDocumentHighlight:ni,asDocumentHighlightKind:wt,asSymbolKind:tn,asSymbolTag:cr,asSymbolTags:ur,asSymbolInformations:zi,asSymbolInformation:On,asDocumentSymbols:ri,asDocumentSymbol:tt,asCommand:nt,asCommands:Ki,asCodeAction:lr,asCodeActionKind:En,asCodeActionKinds:ii,asCodeActionDocumentations:Ir,asCodeActionResult:It,asCodeLens:y,asCodeLenses:E,asWorkspaceEdit:I,asDocumentLink:Z,asDocumentLinks:ae,asFoldingRangeKind:rt,asFoldingRange:pt,asFoldingRanges:qn,asColor:ie,asColorInformation:Ee,asColorInformations:ke,asColorPresentation:pe,asColorPresentations:ye,asSelectionRange:Dt,asSelectionRanges:gt,asInlineValue:si,asInlineValues:ks,asInlayHint:d,asInlayHints:ge,asSemanticTokensLegend:cb,asSemanticTokens:ob,asSemanticTokensEdit:Eh,asSemanticTokensEdits:ab,asCallHierarchyItem:ce,asCallHierarchyItems:Ze,asCallHierarchyIncomingCall:mt,asCallHierarchyIncomingCalls:Mn,asCallHierarchyOutgoingCall:Oh,asCallHierarchyOutgoingCalls:sb,asLinkedEditingRanges:ub,asTypeHierarchyItem:qh,asTypeHierarchyItems:db,asGlobPattern:Ra,asInlineCompletionResult:fb,asInlineCompletionItem:Ta}}});var we=P(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.empty=void 0;Pr.v4=l_;Pr.isUUID=d_;Pr.parse=Jw;Pr.generateUuid=Qw;var fs=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},jl=class n extends fs{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}};Pr.empty=new fs("00000000-0000-0000-0000-000000000000");function l_(){return new jl}var Xw=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function d_(n){return Xw.test(n)}function Jw(n){if(!d_(n))throw new Error("invalid uuid");return new fs(n)}function Qw(){return l_().asHex()}});var Ll=P(on=>{"use strict";var Yw=on&&on.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Zw=on&&on.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),eD=on&&on.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{switch(i.kind){case"begin":this.begin(i);break;case"report":this.report(i);break;case"end":this.done(),r&&r(this);break}})}begin(e){this._infinite=e.percentage===void 0,this._lspProgressDisposable!==void 0&&f_.window.withProgress({location:f_.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(t,r)=>{if(this._lspProgressDisposable!==void 0)return this._progress=t,this._cancellationToken=r,this._tokenDisposable=this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(h_.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((i,s)=>{this._resolve=i,this._reject=s})})}report(e){if(this._infinite&&p_.string(e.message))this._progress!==void 0&&this._progress.report({message:e.message});else if(p_.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),r=Math.max(0,t-this._reported);this._reported+=r,this._progress!==void 0&&this._progress.report({message:e.message,increment:r})}}cancel(){this.cleanup(),this._reject!==void 0&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),this._resolve!==void 0&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){this._lspProgressDisposable!==void 0&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),this._tokenDisposable!==void 0&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}};on.ProgressPart=Fl});var ne=P(_e=>{"use strict";var tD=_e&&_e.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),nD=_e&&_e.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),v_=_e&&_e.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}let r=t>0;return{kind:"document",id:this.registrationType.method,registrations:r,matches:!1}}};_e.DynamicDocumentFeature=hs;var $l=class extends hs{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onAboutToSendNotification;_onNotificationSent;static textDocumentFilter(e,t){for(let r of e)if(Xt.languages.match(r,t)>0)return!0;return!1}constructor(e,t,r,i,s,o,a){super(e),this._event=t,this._type=r,this._middleware=i,this._createParams=s,this._textDocument=o,this._selectorFilter=a,this._selectors=new Map,this._onAboutToSendNotification=new Xt.EventEmitter,this._onNotificationSent=new Xt.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(t=>{this.callback(t).catch(r=>{this._client.error(`Sending document notification ${this._type.method} failed.`,r)})})),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){let t=async r=>{let i=this.getTextDocument(r),s=this._createParams(r);this.aboutToSendNotification(i,this._type,s),await this._client.sendNotification(this._type,s),this.notificationSent(i,this._type,s)};if(this.matches(e)){let r=this._middleware();return r?r(e,i=>t(i)):t(e)}}matches(e){return this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))?!1:!this._selectorFilter||this._selectorFilter(this._selectors.values(),e)}get onAboutToSendNotification(){return this._onAboutToSendNotification.event}aboutToSendNotification(e,t,r){this._onAboutToSendNotification.fire({textDocument:e,type:t,params:r})}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._onNotificationSent=new Xt.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(Xt.languages.match(t,e)>0)return{send:r=>this.callback(r)}}};_e.TextDocumentEventFeature=$l;var Hl=class extends hs{_registrationType;_registrations;constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(let e of this._registrations.values()){let t=e.data.registerOptions.documentSelector;t!==null&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(Al.TextDocumentRegistrationOptions.is(t)){let r=Al.StaticRegistrationOptions.hasId(t)?t.id:g_.generateUuid(),i=t.documentSelector??e;if(i)return[r,Object.assign({},t,{documentSelector:i})]}else if(ft.boolean(t)&&t===!0||Al.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let r=ft.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[g_.generateUuid(),r]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return ft.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let r=t.data.registerOptions.documentSelector;if(r!==null&&Xt.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(r),e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};_e.TextDocumentLanguageFeature=Hl;var Ul=class{_client;_registrationType;_registrations;constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};_e.WorkspaceFeature=Ul;var y_;(function(n){n.push="push",n.pull="pull"})(y_||(_e.DiagnosticCollectionSource=y_={}));var Wl=class{create(e,t){return e!==void 0?Xt.languages.createDiagnosticCollection(e):Xt.languages.createDiagnosticCollection()}dispose(e,t){e.dispose()}};_e.DefaultDiagnosticCollectionProvider=Wl});var C_=P(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.range=kr.balanced=void 0;var iD=(n,e,t)=>{let r=n instanceof RegExp?b_(n,t):n,i=e instanceof RegExp?b_(e,t):e,s=r!==null&&i!=null&&(0,kr.range)(r,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+r.length,s[1]),post:t.slice(s[1]+i.length)}};kr.balanced=iD;var b_=(n,e)=>{let t=e.match(n);return t?t[0]:null},sD=(n,e,t)=>{let r,i,s,o,a,u=t.indexOf(n),l=t.indexOf(e,u+1),f=u;if(u>=0&&l>0){if(n===e)return[u,l];for(r=[],s=t.length;f>=0&&!a;){if(f===u)r.push(f),u=t.indexOf(n,f+1);else if(r.length===1){let p=r.pop();p!==void 0&&(a=[p,l])}else i=r.pop(),i!==void 0&&i=0?u:l}r.length&&o!==void 0&&(a=[s,o])}return a};kr.range=sD});var O_=P(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.EXPANSION_MAX_LENGTH=Gn.EXPANSION_MAX=void 0;Gn.expand=yD;var w_=C_(),D_="\0SLASH"+Math.random()+"\0",S_="\0OPEN"+Math.random()+"\0",Bl="\0CLOSE"+Math.random()+"\0",P_="\0COMMA"+Math.random()+"\0",R_="\0PERIOD"+Math.random()+"\0",oD=new RegExp(D_,"g"),aD=new RegExp(S_,"g"),cD=new RegExp(Bl,"g"),uD=new RegExp(P_,"g"),lD=new RegExp(R_,"g"),dD=/\\\\/g,fD=/\\{/g,hD=/\\}/g,pD=/\\,/g,gD=/\\\./g;Gn.EXPANSION_MAX=1e5;Gn.EXPANSION_MAX_LENGTH=4e6;function zl(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function mD(n){return n.replace(dD,D_).replace(fD,S_).replace(hD,Bl).replace(pD,P_).replace(gD,R_)}function _D(n){return n.replace(oD,"\\").replace(aD,"{").replace(cD,"}").replace(uD,",").replace(lD,".")}function T_(n){if(!n)return[""];let e=[],t=(0,w_.balanced)("{","}",n);if(!t)return n.split(",");let{pre:r,body:i,post:s}=t,o=r.split(",");o[o.length-1]+="{"+i+"}";let a=T_(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function yD(n,e={}){if(!n)return[];let{max:t=Gn.EXPANSION_MAX,maxLength:r=Gn.EXPANSION_MAX_LENGTH}=e;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),Kl(mD(n),t,r,!0).map(_D)}function vD(n){return"{"+n+"}"}function bD(n){return/^-?0\d/.test(n)}function CD(n,e){return n<=e}function wD(n,e){return n>=e}function ps(n,e,t,r,i,s){let o=[],a=0;for(let u=0;u=r)return o;let f=n[u]+e+t[l];if(!(s&&!f)){if(a+f.length>i)return o;o.push(f),a+=f.length}}return o}function DD(n,e,t,r){let i=n.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=zl(i[0]),a=zl(i[1]),u=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(zl(i[2])),1):1,f=CD;a0){let q=new Array(R+1).join("0");_<0?v="-"+q+v.slice(1):v=q+v}}if(g+v.length>r)break;s.push(v),g+=v.length}return s}function Kl(n,e,t,r){let i=[""],s=!1,o=!0;for(;;){let a=(0,w_.balanced)("{","}",n);if(!a)return ps(i,n,[""],e,t,s);let u=a.pre;if(/\$$/.test(u)){if(i=ps(i,u+"{"+a.body+"}",[""],e,t,s&&!a.post.length),o=!1,!a.post.length)break;n=a.post;continue}let l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),p=l||f,h=a.body.indexOf(",")>=0;if(!p&&!h){if(a.post.match(/,(?!,).*\}/)){n=a.pre+"{"+a.body+Bl+a.post,r=!0;continue}return ps(i,u+"{"+a.body+"}"+a.post,[""],e,t,s)}o&&(s=r&&!p,o=!1);let g;if(p)g=DD(a.body,f,e,t);else{let _=T_(a.body);if(_.length===1&&_[0]!==void 0&&(_=Kl(_[0],e,t,!1).map(vD),_.length===1)){if(i=ps(i,u+_[0],[""],e,t,s&&!a.post.length),!a.post.length)break;n=a.post;continue}let v=s&&!a.post.length&&!u;for(let q=0;v&&q=e||R+j.length>t)break e;g.push(j),R+=j.length}}}}if(i=ps(i,u,g,e,t,s&&!a.post.length),!a.post.length)break;n=a.post}return i}});var E_=P(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.assertValidPattern=void 0;var SD=1024*64,PD=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>SD)throw new TypeError("pattern is too long")};Mo.assertValidPattern=PD});var M_=P(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.parseClass=void 0;var RD={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},gs=n=>n.replace(/[[\]\\-]/g,"\\$&"),TD=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),q_=n=>n.join(""),OD=(n,e)=>{let t=e;if(n.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=t+1,o=!1,a=!1,u=!1,l=!1,f=t,p="";e:for(;sp?r.push(gs(p)+"-"+gs(v)):v===p&&r.push(gs(v)),p="",s++;continue}if(n.startsWith("-]",s+1)){r.push(gs(v+"-")),s+=2;continue}if(n.startsWith("-",s+1)){p=v,s+=2;continue}r.push(gs(v)),s++}if(f{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.unescape=void 0;var ED=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?n.replace(/\[([^/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?n.replace(/\[([^/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");Io.unescape=ED});var Xl=P(Ao=>{"use strict";var bt;Object.defineProperty(Ao,"__esModule",{value:!0});Ao.AST=void 0;var qD=M_(),jo=No(),MD=new Set(["!","?","+","*","@"]),Gl=n=>MD.has(n),x_=n=>Gl(n.type),xD=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),ID=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),ND=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),I_=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),jD="(?!(?:^|/)\\.\\.?(?:$|/))",Fo="(?!\\.)",FD=new Set(["[","."]),LD=new Set(["..","."]),AD=new Set("().*{}+?[]^$\\!"),kD=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Vl="[^/]",N_=Vl+"*?",j_=Vl+"+?",$D=0,Lo=class{type;#n;#r;#i=!1;#e=[];#t;#a;#u;#c=!1;#s;#o;#l=!1;id=++$D;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,r={}){this.type=e,e&&(this.#r=!0),this.#t=t,this.#n=this.#t?this.#t.#n:this,this.#s=this.#n===this?r:this.#n.#s,this.#u=this.#n===this?[]:this.#n.#u,e==="!"&&!this.#n.#c&&this.#u.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#o=this.#e.map(e=>String(e)).join("")}#_(){if(this!==this.#n)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,r=t.#t;for(;r;){for(let i=t.#a+1;!r.type&&itypeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#c&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let e=this.#t;for(let t=0;ttypeof g!="string"),l=this.#e.map(g=>{let[_,v,R,q]=typeof g=="string"?bt.#D(g,this.#r,u):g.toRegExpSource(e);return this.#r=this.#r||R,this.#i=this.#i||q,_}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&LD.has(this.#e[0]))){let _=FD,v=t&&_.has(l.charAt(0))||l.startsWith("\\.")&&_.has(l.charAt(2))||l.startsWith("\\.\\.")&&_.has(l.charAt(4)),R=!t&&!e&&_.has(l.charAt(0));f=v?jD:R?Fo:""}let p="";return this.isEnd()&&this.#n.#c&&this.#t?.type==="!"&&(p="(?:$|\\/)"),[f+l+p,(0,jo.unescape)(l),this.#r=!!this.#r,this.#i]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#m(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),l=this;return l.#e=[u],l.type=null,l.#r=void 0,[u,(0,jo.unescape)(this.toString()),!1,!1]}let o=!r||e||t||!Fo?"":this.#m(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!t?Fo:"")+j_;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Fo:"")+N_+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+u}return[a,(0,jo.unescape)(s),this.#r=!!this.#r,this.#i]}#h(){if(x_(this)){let e=0,t=!1;do{t=!0;for(let r=0;r{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,s,o]=t.toRegExpSource(e);return this.#i=this.#i||o,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#D(e,t,r=!1){let i=!1,s="",o=!1,a=!1;for(let u=0;u{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.escape=void 0;var HD=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):e?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");ko.escape=HD});var Ql=P(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.unescape=U.escape=U.AST=U.Minimatch=U.match=U.makeRe=U.braceExpand=U.defaults=U.filter=U.GLOBSTAR=U.sep=U.minimatch=void 0;var UD=O_(),$o=E_(),A_=Xl(),WD=Jl(),zD=No(),KD=(n,e,t={})=>((0,$o.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new $r(e,t).match(n));U.minimatch=KD;var BD=/^\*+([^+@!?*[(]*)$/,GD=n=>e=>!e.startsWith(".")&&e.endsWith(n),VD=n=>e=>e.endsWith(n),XD=n=>(n=n.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(n)),JD=n=>(n=n.toLowerCase(),e=>e.toLowerCase().endsWith(n)),QD=/^\*+\.\*+$/,YD=n=>!n.startsWith(".")&&n.includes("."),ZD=n=>n!=="."&&n!==".."&&n.includes("."),eS=/^\.\*+$/,tS=n=>n!=="."&&n!==".."&&n.startsWith("."),nS=/^\*+$/,rS=n=>n.length!==0&&!n.startsWith("."),iS=n=>n.length!==0&&n!=="."&&n!=="..",sS=/^\?+([^+@!?*[(]*)?$/,oS=([n,e=""])=>{let t=k_([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},aS=([n,e=""])=>{let t=$_([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},cS=([n,e=""])=>{let t=$_([n]);return e?r=>t(r)&&r.endsWith(e):t},uS=([n,e=""])=>{let t=k_([n]);return e?r=>t(r)&&r.endsWith(e):t},k_=([n])=>{let e=n.length;return t=>t.length===e&&!t.startsWith(".")},$_=([n])=>{let e=n.length;return t=>t.length===e&&t!=="."&&t!==".."},H_=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",F_={win32:{sep:"\\"},posix:{sep:"/"}};U.sep=H_==="win32"?F_.win32.sep:F_.posix.sep;U.minimatch.sep=U.sep;U.GLOBSTAR=Symbol("globstar **");U.minimatch.GLOBSTAR=U.GLOBSTAR;var lS="[^/]",dS=lS+"*?",fS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",hS="(?:(?!(?:\\/|^)\\.).)*?",pS=(n,e={})=>t=>(0,U.minimatch)(t,n,e);U.filter=pS;U.minimatch.filter=U.filter;var kt=(n,e={})=>Object.assign({},n,e),gS=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return U.minimatch;let e=U.minimatch;return Object.assign((r,i,s={})=>e(r,i,kt(n,s)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,kt(n,s))}static defaults(i){return e.defaults(kt(n,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,o={}){super(i,s,kt(n,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,kt(n,s))}},unescape:(r,i={})=>e.unescape(r,kt(n,i)),escape:(r,i={})=>e.escape(r,kt(n,i)),filter:(r,i={})=>e.filter(r,kt(n,i)),defaults:r=>e.defaults(kt(n,r)),makeRe:(r,i={})=>e.makeRe(r,kt(n,i)),braceExpand:(r,i={})=>e.braceExpand(r,kt(n,i)),match:(r,i,s={})=>e.match(r,i,kt(n,s)),sep:e.sep,GLOBSTAR:U.GLOBSTAR})};U.defaults=gS;U.minimatch.defaults=U.defaults;var mS=(n,e={})=>((0,$o.assertValidPattern)(n),e.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,UD.expand)(n,{max:e.braceExpandMax}));U.braceExpand=mS;U.minimatch.braceExpand=U.braceExpand;var _S=(n,e={})=>new $r(n,e).makeRe();U.makeRe=_S;U.minimatch.makeRe=U.makeRe;var yS=(n,e,t={})=>{let r=new $r(e,t);return n=n.filter(i=>r.match(i)),r.options.nonull&&!n.length&&n.push(e),n};U.match=yS;U.minimatch.match=U.match;var L_=/[?*]|[+@!]\(.*?\)|\[|\]/,vS=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$r=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,$o.assertValidPattern)(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||H_,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!L_.test(s[2]))&&!L_.test(s[3]),l=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(l)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&r.splice(i+1,o-i);let a=r[i+1],u=r[i+2],l=r[i+3];if(a!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(i,1);let f=r.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;ot.length)}partsMatch(e,t,r=!1){let i=0,s=0,o=[],a="";for(;i=2&&(e=this.levelTwoFileOptimize(e)),t.includes(U.GLOBSTAR)?this.#n(e,t,r,i,s):this.#i(e,t,r,i,s)}#n(e,t,r,i,s){let o=t.indexOf(U.GLOBSTAR,s),a=t.lastIndexOf(U.GLOBSTAR),[u,l,f]=r?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(u.length){let w=e.slice(i,i+u.length);if(!this.#i(w,u,r,0,0))return!1;i+=u.length,s+=u.length}let p=0;if(f.length){if(f.length+i>e.length)return!1;let w=e.length-f.length;if(this.#i(e,f,r,w,0))p=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(w--,!this.#i(e,f,r,w,0)))return!1;p=f.length+1}}if(!l.length){let w=!!p;for(let M=i;M{let l=u.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?vS(p):p===U.GLOBSTAR?U.GLOBSTAR:p._src});l.forEach((p,h)=>{let g=l[h+1],_=l[h-1];p!==U.GLOBSTAR||_===U.GLOBSTAR||(_===void 0?g!==void 0&&g!==U.GLOBSTAR?l[h+1]="(?:\\/|"+r+"\\/)?"+g:l[h]=r:g===void 0?l[h-1]=_+"(?:\\/|\\/"+r+")?":g!==U.GLOBSTAR&&(l[h-1]=_+"(?:\\/|\\/"+r+"\\/)"+g,l[h+1]=U.GLOBSTAR))});let f=l.filter(p=>p!==U.GLOBSTAR);if(this.partial&&f.length>=1){let p=[];for(let h=1;h<=f.length;h++)p.push(f.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a of s){let u=i;if(r.matchBase&&a.length===1&&(u=[o]),this.matchOne(u,a,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return U.minimatch.defaults(e).Minimatch}};U.Minimatch=$r;var bS=Xl();Object.defineProperty(U,"AST",{enumerable:!0,get:function(){return bS.AST}});var CS=Jl();Object.defineProperty(U,"escape",{enumerable:!0,get:function(){return CS.escape}});var wS=No();Object.defineProperty(U,"unescape",{enumerable:!0,get:function(){return wS.unescape}});U.minimatch.AST=A_.AST;U.minimatch.Minimatch=$r;U.minimatch.escape=WD.escape;U.minimatch.unescape=zD.unescape});var Yl=P(Vn=>{"use strict";var DS=Vn&&Vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SS=Vn&&Vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PS=Vn&&Vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.DiagnosticFeature=Rr.DiagnosticPullMode=Rr.vsdiag=void 0;var De=require("vscode"),Se=V(),ES=we(),qS=Yl(),ms=ne();function Ho(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var Tt;(function(n){let e;(function(t){t.full="full",t.unChanged="unChanged"})(e=n.DocumentDiagnosticReportKind||(n.DocumentDiagnosticReportKind={}))})(Tt||(Rr.vsdiag=Tt={}));var _s;(function(n){n.onType="onType",n.onSave="onSave",n.onFocus="onFocus"})(_s||(Rr.DiagnosticPullMode=_s={}));var Je;(function(n){n.active="open",n.reschedule="reschedule",n.outDated="drop"})(Je||(Je={}));var Ue;(function(n){n[n.document=1]="document",n[n.workspace=2]="workspace"})(Ue||(Ue={}));var Xn;(function(n){function e(t){return t instanceof De.Uri?t.toString():t.uri.toString()}n.asKey=e})(Xn||(Xn={}));var Zl=class{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,r){let i=e===Ue.document?this.documentPullStates:this.workspacePullStates,[s,o,a]=t instanceof De.Uri?[t.toString(),t,r]:[t.uri.toString(),t.uri,t.version],u=i.get(s);return u===void 0&&(u={document:o,pulledVersion:a,resultId:void 0},i.set(s,u)),u}update(e,t,r,i){let s=e===Ue.document?this.documentPullStates:this.workspacePullStates,[o,a,u,l]=t instanceof De.Uri?[t.toString(),t,r,i]:[t.uri.toString(),t.uri,t.version,r],f=s.get(o);f===void 0?(f={document:a,pulledVersion:u,resultId:l},s.set(o,f)):(f.pulledVersion=u,f.resultId=l)}unTrack(e,t){let r=Xn.asKey(t);(e===Ue.document?this.documentPullStates:this.workspacePullStates).delete(r)}tracks(e,t){let r=Xn.asKey(t);return(e===Ue.document?this.documentPullStates:this.workspacePullStates).has(r)}tracksSameVersion(e,t){let r=t.uri.toString(),s=(e===Ue.document?this.documentPullStates:this.workspacePullStates).get(r);return s!==void 0&&s.pulledVersion===t.version}getResultId(e,t){let r=Xn.asKey(t);return(e===Ue.document?this.documentPullStates:this.workspacePullStates).get(r)?.resultId}getAllResultIds(){let e=[];for(let[t,r]of this.workspacePullStates)this.documentPullStates.has(t)&&(r=this.documentPullStates.get(t)),r.resultId!==void 0&&e.push({uri:t,value:r.resultId});return e}},ed=class{isDisposed;client;visibleDocuments;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,t,r){this.client=e,this.visibleDocuments=t,this.options=r,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new De.EventEmitter,this.provider=this.createProvider(),this.diagnostics=this.createDiagnosticCollection(),this.openRequests=new Map,this.documentStates=new Zl,this.workspaceErrorCounter=0}createDiagnosticCollection(){return this.client.clientOptions.diagnosticCollectionProvider===void 0?De.languages.createDiagnosticCollection(this.options.identifier):this.client.clientOptions.diagnosticCollectionProvider.create(this.options.identifier,ms.DiagnosticCollectionSource.pull)}knows(e,t){let r=t instanceof De.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(r.toString())}knowsSameVersion(e,t){let r=this.openRequests.get(t.uri.toString());return r===void 0?this.documentStates.tracksSameVersion(e,t):r.state===Je.reschedule?!0:r.state===Je.outDated?!1:r.version===t.version}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;let r=e instanceof De.Uri?e:e.uri;this.pullAsync(e).then(()=>{t&&t()},i=>{this.client.error(`Document pull failed for text document ${r.toString()}`,i,!1)})}async pullAsync(e,t){if(this.isDisposed)return;let r=e instanceof De.Uri,i=r?e:e.uri,s=i.toString();t=r?t:e.version;let o=this.openRequests.get(s),a=r?this.documentStates.track(Ue.document,e,t):this.documentStates.track(Ue.document,e);if(o===void 0){let u=new De.CancellationTokenSource;this.openRequests.set(s,{state:Je.active,document:e,version:t,tokenSource:u});let l,f;try{l=await this.provider.provideDiagnostics(e,a.resultId,u.token)??{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}}catch(p){if(p instanceof ms.LSPCancellationError&&Se.DiagnosticServerCancellationData.is(p.data)&&p.data.retriggerRequest===!1&&(f={state:Je.outDated,document:e}),f===void 0&&p instanceof De.CancellationError)f={state:Je.reschedule,document:e};else throw p}if(f=f??this.openRequests.get(s),f===void 0){this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),this.diagnostics.delete(i);return}if(this.openRequests.delete(s),!this.visibleDocuments.isVisible(e)){this.documentStates.unTrack(Ue.document,e);return}if(f.state===Je.outDated)return;l!==void 0&&(l.kind===Tt.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,l.items),a.pulledVersion=t,a.resultId=l.resultId),f.state===Je.reschedule&&this.pull(e)}else o.state===Je.active?(o.tokenSource.cancel(),this.openRequests.set(s,{state:Je.reschedule,document:o.document})):o.state===Je.outDated&&this.openRequests.set(s,{state:Je.reschedule,document:o.document})}forgetDocument(e){if(this.isDisposed)return;let t=e instanceof De.Uri?e:e.uri,r=t.toString(),i=this.openRequests.get(r);this.options.workspaceDiagnostics&&t.scheme!=="untitled"?(i!==void 0?this.openRequests.set(r,{state:Je.reschedule,document:e}):this.pull(e,()=>{this.forget(Ue.document,e)}),this.forget(Ue.workspace,e)):(i!==void 0&&(i.state===Je.active&&i.tokenSource.cancel(),this.openRequests.set(r,{state:Je.outDated,document:e})),this.diagnostics.delete(t),this.forget(Ue.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then(()=>{this.workspaceTimeout=(0,Se.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3)},e=>{!(e instanceof ms.LSPCancellationError)&&!Se.DiagnosticServerCancellationData.is(e.data)&&(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,Se.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3))})}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;this.workspaceCancellation!==void 0&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new De.CancellationTokenSource;let e=this.documentStates.getAllResultIds().map(t=>({uri:this.client.protocol2CodeConverter.asUri(t.uri),value:t.value}));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,t=>{if(!(!t||this.isDisposed))for(let r of t.items)r.kind===Tt.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(Ue.document,r.uri)||this.diagnostics.set(r.uri,r.items)),this.documentStates.update(Ue.workspace,r.uri,r.version??void 0,r.resultId)})}createProvider(){let e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(t,r,i)=>{let s=(a,u,l)=>{let f={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(a instanceof De.Uri?a:a.uri)},previousResultId:u};return this.isDisposed===!0||!this.client.isRunning()?{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}:this.client.sendRequest(Se.DocumentDiagnosticRequest.type,f,l).then(async p=>{if(this.isDisposed)return{kind:Tt.DocumentDiagnosticReportKind.full,items:[]};if(l.isCancellationRequested)throw new De.CancellationError;return p==null?{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}:p.kind===Se.DocumentDiagnosticReportKind.Full?{kind:Tt.DocumentDiagnosticReportKind.full,resultId:p.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(p.items,l)}:{kind:Tt.DocumentDiagnosticReportKind.unChanged,resultId:p.resultId}},p=>this.client.handleFailedRequest(Se.DocumentDiagnosticRequest.type,l,p,{kind:Tt.DocumentDiagnosticReportKind.full,items:[]},!0,!0))},o=this.client.middleware;return o.provideDiagnostics?o.provideDiagnostics(t,r,i,s):s(t,r,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(t,r,i)=>{let s=async l=>l.kind===Se.DocumentDiagnosticReportKind.Full?{kind:Tt.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version,items:await this.client.protocol2CodeConverter.asDiagnostics(l.items,r)}:{kind:Tt.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version},o=l=>{let f=[];for(let p of l)f.push({uri:this.client.code2ProtocolConverter.asUri(p.uri),value:p.value});return f},a=(l,f,p)=>{let h=(0,ES.generateUuid)(),g=this.client.onProgress(Se.WorkspaceDiagnosticRequest.partialResult,h,async v=>{if(v==null){p(null);return}let R={items:[]};for(let q of v.items)try{R.items.push(await s(q))}catch(w){this.client.error("Converting workspace diagnostics failed.",w)}p(R)}),_={identifier:this.options.identifier,previousResultIds:o(l),partialResultToken:h};return this.isDisposed===!0||!this.client.isRunning()?{items:[]}:this.client.sendRequest(Se.WorkspaceDiagnosticRequest.type,_,f).then(async v=>{if(f.isCancellationRequested)return{items:[]};let R={items:[]};for(let q of v.items)R.items.push(await s(q));return g.dispose(),p(R),{items:[]}},v=>(g.dispose(),this.client.handleFailedRequest(Se.DocumentDiagnosticRequest.type,f,v,{items:[]})))},u=this.client.middleware;return u.provideWorkspaceDiagnostics?u.provideWorkspaceDiagnostics(t,r,i,a):a(t,r,i)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(let[e,t]of this.openRequests)t.state===Je.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:Je.outDated,document:t.document});this.client.clientOptions.diagnosticCollectionProvider!==void 0?this.client.clientOptions.diagnosticCollectionProvider.dispose(this.diagnostics,ms.DiagnosticCollectionSource.pull):this.diagnostics.dispose()}},td=class{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,t){this.client=e,this.diagnosticRequestor=t,this.documents=new Se.LinkedMap,this.isDisposed=!1}add(e){if(this.isDisposed===!0)return;let t=Xn.asKey(e);this.documents.has(t)||(this.documents.set(t,e,Se.Touch.Last),this.lastDocumentToPull=e)}remove(e){let t=Xn.asKey(e);if(this.documents.delete(t),this.documents.size===0){this.stop();return}else if(t===this.lastDocumentToPullKey()){let r=this.documents.before(t);r===void 0?this.stop():this.lastDocumentToPull=r}}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){if(this.isDisposed!==!0){if(this.documents.size===0){this.stop();return}this.lastDocumentToPull!==void 0&&this.timeoutHandle===void 0&&(this.timeoutHandle=(0,Se.RAL)().timer.setTimeout(()=>{let e=this.documents.first;if(e===void 0)return;let t=Xn.asKey(e);this.diagnosticRequestor.pullAsync(e).catch(r=>{this.client.error(`Document pull failed for text document ${t}`,r,!1)}).finally(()=>{this.timeoutHandle=void 0,this.documents.set(t,e,Se.Touch.Last),t!==this.lastDocumentToPullKey()&&this.runLoop()})},500))}}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return this.lastDocumentToPull!==void 0?Xn.asKey(this.lastDocumentToPull):void 0}},nd=class{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,t,r){let i=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),s=e.protocol2CodeConverter.asDocumentSelector(r.documentSelector),o=[],a=(w,M)=>!(typeof w=="string"||w.language!==void 0&&w.language!=="*"||w.scheme!==void 0&&w.scheme!=="*"&&w.scheme!==M.scheme||w.pattern!==void 0&&!(0,qS.matchGlobPattern)(w.pattern,M)),u=w=>{let M=r.documentSelector;if(i.match!==void 0)return i.match(M,w);for(let j of M)if(Se.TextDocumentFilter.is(j)&&a(j,w))return!0;return!1},l=w=>w instanceof De.Uri?u(w):De.languages.match(s,w)>0&&t.isVisible(w),f=w=>De.languages.match(s,w.document)>0&&t.isVisible(w.notebook.uri),p=w=>w instanceof De.Uri?this.activeTextDocument?.uri.toString()===w.toString():this.activeTextDocument===w;this.diagnosticRequestor=new ed(e,t,r),this.backgroundScheduler=new td(e,this.diagnosticRequestor);let h=w=>{!l(w)||!r.interFileDependencies||p(w)||i.onChange===!1||this.backgroundScheduler.add(w)},g=(w,M)=>(i.filter===void 0||!i.filter(w,M))&&this.diagnosticRequestor.knows(Ue.document,w);this.activeTextDocument=De.window.activeTextEditor?.document,o.push(De.window.onDidChangeActiveTextEditor(w=>{let M=this.activeTextDocument;this.activeTextDocument=w?.document,M!==void 0&&h(M),this.activeTextDocument!==void 0&&(this.backgroundScheduler.remove(this.activeTextDocument),i.onFocus===!0&&l(this.activeTextDocument)&&g(this.activeTextDocument,_s.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))}));let _=e.getFeature(Se.DidOpenTextDocumentNotification.method);o.push(_.onNotificationSent(w=>{let M=w.textDocument;this.diagnosticRequestor.knowsSameVersion(Ue.document,M)||l(M)&&this.diagnosticRequestor.pull(M,()=>{h(M)})}));let v=e.getFeature(Se.NotebookDocumentSyncRegistrationType.method);o.push(v.onOpenNotificationSent(w=>{for(let M of w.getCells())f(M)&&this.diagnosticRequestor.pull(M.document,()=>{h(M.document)})})),o.push(t.onOpen(w=>{for(let M of w){if(this.diagnosticRequestor.knows(Ue.document,M))continue;let j=M.toString(),F;for(let oe of De.workspace.textDocuments)if(j===oe.uri.toString()){F=oe;break}F!==void 0&&l(F)&&this.diagnosticRequestor.pull(F,()=>{h(F)})}}));let R=new Set;for(let w of De.workspace.textDocuments)l(w)&&(this.diagnosticRequestor.pull(w,()=>{h(w)}),R.add(w.uri.toString()));for(let w of De.workspace.notebookDocuments)for(let M of w.getCells())f(M)&&(this.diagnosticRequestor.pull(M.document,()=>{h(M.document)}),R.add(M.document.uri.toString()));if(i.onTabs===!0)for(let w of t.getResources())!R.has(w.toString())&&l(w)&&this.diagnosticRequestor.pull(w,()=>{h(w)});if(i.onChange===!0){let w=e.getFeature(Se.DidChangeTextDocumentNotification.method);o.push(w.onNotificationSent(async M=>{let j=M.textDocument;g(j,_s.onType)&&this.diagnosticRequestor.pull(j,()=>{this.backgroundScheduler.trigger()})})),o.push(v.onChangeNotificationSent(async M=>{let F=(M.cells?.textContent||[]).map(Te=>M.notebook.getCells().find(Pn=>Pn.document.uri.toString()===Te.document.uri.toString()));for(let Te of F)Te&&f(Te)&&this.diagnosticRequestor.pull(Te.document,()=>{this.backgroundScheduler.trigger()});let oe=M.cells?.structure?.didClose||[];for(let Te of oe)this.diagnosticRequestor.forgetDocument(Te.document);let te=M.cells?.structure?.didOpen||[];for(let Te of te)f(Te)&&this.diagnosticRequestor.pull(Te.document,()=>{this.backgroundScheduler.trigger()})}))}if(i.onSave===!0){let w=e.getFeature(Se.DidSaveTextDocumentNotification.method);o.push(w.onNotificationSent(M=>{let j=M.textDocument;g(j,_s.onSave)&&this.diagnosticRequestor.pull(M.textDocument)})),o.push(v.onSaveNotificationSent(M=>{for(let j of M.getCells())f(j)&&this.diagnosticRequestor.pull(j.document)}))}let q=e.getFeature(Se.DidCloseTextDocumentNotification.method);o.push(q.onAboutToSendNotification(w=>{this.cleanUpDocument(w.textDocument)})),o.push(v.onCloseNotificationSent(w=>{for(let M of w.getCells())this.cleanUpDocument(M.document)})),o.push(t.onClose(w=>{for(let M of w)this.cleanUpDocument(M)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(let w of De.workspace.textDocuments)l(w)&&this.diagnosticRequestor.pull(w)}),r.workspaceDiagnostics===!0&&r.identifier!=="da348dc5-c30a-4515-9d98-31ff3be38d14"&&this.diagnosticRequestor.pullWorkspace(),this.disposable=De.Disposable.from(...o,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(Ue.document,e)&&this.diagnosticRequestor.forgetDocument(e)}},rd=class extends ms.TextDocumentLanguageFeature{constructor(e){super(e,Se.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=Ho(Ho(e,"textDocument"),"diagnostic");t.relatedInformation=!0,t.tagSupport={valueSet:[Se.DiagnosticTag.Unnecessary,Se.DiagnosticTag.Deprecated]},t.codeDescriptionSupport=!0,t.dataSupport=!0,t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,t.markupMessageSupport=!1,Ho(Ho(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(Se.DiagnosticRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeDiagnosticsEmitter.fire()});let[i,s]=this.getRegistration(t,e.diagnosticProvider);!i||!s||this.register({id:i,registerOptions:s})}clear(){super.clear()}refresh(){for(let e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){let t=new nd(this._client,this._client.visibleDocuments,e);return[t.disposable,t]}};Rr.DiagnosticFeature=rd});var z_=P(an=>{"use strict";var MS=an&&an.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),xS=an&&an.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ko=an&&an.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(v.metadata=o(h.metadata)),v}t.asNotebookDocument=i;function s(h,g){return h.map(_=>a(_,g))}t.asNotebookCells=s;function o(h){return l(new Set,h)}t.asMetadata=o;function a(h,g){let _=Jn.NotebookCell.create(u(h.kind),g.asUri(h.document.uri));return Object.keys(h.metadata).length>0&&(_.metadata=o(h.metadata)),h.executionSummary!==void 0&&U_.number(h.executionSummary.executionOrder)&&U_.boolean(h.executionSummary.success)&&(_.executionSummary={executionOrder:h.executionSummary.executionOrder,success:h.executionSummary.success}),_}t.asNotebookCell=a;function u(h){switch(h){case Re.NotebookCellKind.Markup:return Jn.NotebookCellKind.Markup;case Re.NotebookCellKind.Code:return Jn.NotebookCellKind.Code}}function l(h,g){if(h.has(g))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(g)){let _=[];for(let v of g)if(v!==null&&typeof v=="object"||Array.isArray(v))_.push(l(h,v));else{if(v instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");_.push(v)}return _}else{let _=Object.keys(g),v=Object.create(null);for(let R of _){let q=g[R];if(q!==null&&typeof q=="object"||Array.isArray(q))v[R]=l(h,q);else{if(q instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");v[R]=q}}return v}}function f(h,g){let _=g.asChangeTextDocumentParams(h,h.document.uri,h.document.version);return{document:_.textDocument,changes:_.contentChanges}}t.asTextContentChange=f;function p(h,g){let _=Object.create(null);if(h.metadata&&(_.metadata=n.c2p.asMetadata(h.metadata)),h.cells!==void 0){let v=Object.create(null),R=h.cells;R.structure&&(v.structure={array:{start:R.structure.array.start,deleteCount:R.structure.array.deleteCount,cells:R.structure.array.cells!==void 0?R.structure.array.cells.map(q=>n.c2p.asNotebookCell(q,g)):void 0},didOpen:R.structure.didOpen!==void 0?R.structure.didOpen.map(q=>g.asOpenTextDocumentParams(q.document).textDocument):void 0,didClose:R.structure.didClose!==void 0?R.structure.didClose.map(q=>g.asCloseTextDocumentParams(q.document).textDocument):void 0}),R.data!==void 0&&(v.data=R.data.map(q=>n.c2p.asNotebookCell(q,g))),R.textContent!==void 0&&(v.textContent=R.textContent.map(q=>n.c2p.asTextContentChange(q,g))),Object.keys(v).length>0&&(_.cells=v)}return _}t.asNotebookDocumentChangeEvent=p})(e=n.c2p||(n.c2p={}))})(Oi||(Oi={}));var sd;(function(n){function e(a,u,l){let f=a.length,p=u.length,h=0;for(;h=0&&_>=0&&t(a[g],u[_],l);)g--,_--;let v=g+1-h,R=h===_+1?void 0:u.slice(h,_+1);return R!==void 0?{start:h,deleteCount:v,cells:R}:{start:h,deleteCount:v}}else return hr.document.uri.toString()))}}n.create=e})(zo||(zo={}));var Ei=class{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,t,r,i,s,o){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(Wo.asDocumentSelector(t)),this.onChangeNotificationSent=r,this.onOpenNotificationSent=i,this.onCloseNotificationSent=s,this.onSaveNotificationSent=o,Re.workspace.onDidOpenNotebookDocument(a=>{this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a)},void 0,this.disposables);for(let a of Re.workspace.notebookDocuments)this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a);Re.workspace.onDidChangeNotebookDocument(a=>this.didChangeNotebookDocument(a),void 0,this.disposables),this.options.save===!0&&Re.workspace.onDidSaveNotebookDocument(a=>this.didSave(a),void 0,this.disposables),Re.workspace.onDidCloseNotebookDocument(a=>{this.didClose(a),this.notebookDidOpen.delete(a.uri.toString())},void 0,this.disposables)}getState(){for(let e of Re.workspace.notebookDocuments)if(this.getMatchingCellsConsideringSyncInfo(e)!==void 0)return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){if(Re.languages.match(this.selector,e)>0)return!0;let t=e.uri.toString();for(let r of this.notebookSyncInfo.values())if(r.uris.has(t))return!0;return!1}didOpenNotebookCellTextDocument(e,t){if(Re.languages.match(this.selector,t.document)===0||!this.notebookDidOpen.has(e.uri.toString()))return;let r=this.getSyncInfo(e),i=this.cellMatches(e,t);if(r!==void 0){let s=r.uris.has(t.document.uri.toString());if(i&&s||!i&&!s)return;if(i){let o=this.mergeCells(e,r,[t]);if(o!==void 0){let a=this.asNotebookDocumentChangeEvent(e,void 0,r,o);a!==void 0&&this.doSendChange(a,o).catch(()=>{})}}}else i&&this.doSendOpen(e,[t]).catch(()=>{})}didChangeNotebookCellTextDocument(e,t,r){if(Re.languages.match(this.selector,r.document)===0)return;let i=this.getSyncInfo(e);i===void 0||!i.uris.has(t.document.uri.toString())||this.doSendChange({notebook:e,cells:{textContent:[r]}},i.cells).catch(()=>{})}didCloseNotebookCellTextDocument(e,t){let r=this.getSyncInfo(e);if(r===void 0)return;let i=t.document.uri,s=r.cells.findIndex(o=>o.document.uri.toString()===i.toString());if(s!==-1)if(s===0&&r.cells.length===1)this.doSendClose(e,r.cells).catch(()=>{});else{let o=r.cells.slice(),a=o.splice(s,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:s,deleteCount:1},didClose:a}}},o).catch(()=>{})}}dispose(){for(let e of this.disposables)e.dispose()}didOpen(e,t,r=this.getSyncInfo(e)){if(r!==void 0)if(t===void 0&&(t=r.cells.slice()),t!==void 0){let i=this.asNotebookDocumentChangeEvent(e,void 0,r,t);i!==void 0&&this.doSendChange(i,t).catch(()=>{})}else this.doSendClose(e,[]).catch(()=>{});else{if(t=this.getMatchingCells(e),t===void 0)return;this.doSendOpen(e,t).catch(()=>{})}}didChangeNotebookDocument(e){let t=e.notebook,r=this.getSyncInfo(t);if(r===void 0){if(e.contentChanges.length===0)return;let i=this.getMatchingCells(t);if(i===void 0)return;this.didOpen(t,i,r)}else{let i=this.getMatchingCellsFromEvent(t,r,e);if(i===void 0){this.didClose(t,r);return}let s=this.asNotebookDocumentChangeEvent(e.notebook,e,r,i);s!==void 0&&this.doSendChange(s,i).catch(()=>{})}}didSave(e){this.getSyncInfo(e)!==void 0&&this.doSendSave(e).catch(()=>{})}didClose(e,t=this.getSyncInfo(e)){if(t===void 0)return;let r=e.getCells().filter(i=>t.uris.has(i.document.uri.toString()));this.doSendClose(e,r).catch(()=>{})}async sendDidOpenNotebookDocument(e){if(this.getSyncInfo(e)!==void 0)throw new Error(`Notebook document ${e.uri.toString()} is already open`);let r=this.getMatchingCells(e);if(r!==void 0)return this.doSendOpen(e,r)}async doSendOpen(e,t){let r=async(s,o)=>{let a=o.map(u=>this.client.code2ProtocolConverter.asTextDocumentItem(u.document));try{await this.client.sendNotification(Jn.DidOpenNotebookDocumentNotification.type,{notebookDocument:Oi.c2p.asNotebookDocument(s,o,this.client.code2ProtocolConverter),cellTextDocuments:a}),this.onOpenNotificationSent.fire(s)}catch(u){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",u),u}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),zo.create(t)),i?.didOpen!==void 0?i.didOpen(e,t,r):r(e,t)}async sendDidChangeNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e.notebook);if(t===void 0)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,t)}async doSendChange(e,t){let r=async s=>{try{await this.client.sendNotification(Jn.DidChangeNotebookDocumentNotification.type,{notebookDocument:Oi.c2p.asVersionedNotebookDocumentIdentifier(s.notebook,this.client.code2ProtocolConverter),change:Oi.c2p.asNotebookDocumentChangeEvent(s,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(s)}catch(o){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",o),o}},i=this.client.middleware?.notebooks;return e.cells?.structure!==void 0&&this.notebookSyncInfo.set(e.notebook.uri.toString(),zo.create(t)),i?.didChange!==void 0?i?.didChange(e,r):r(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){let t=async i=>{try{await this.client.sendNotification(Jn.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(i.uri)}}),this.onSaveNotificationSent.fire(i)}catch(s){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",s),s}},r=this.client.middleware?.notebooks;return r?.didSave!==void 0?r.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e);if(t===void 0)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,t)}async doSendClose(e,t){let r=async(s,o)=>{try{await this.client.sendNotification(Jn.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(s.uri)},cellTextDocuments:o.map(a=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(a.document))}),this.onCloseNotificationSent.fire(s)}catch(a){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",a),a}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),i?.didClose!==void 0?i.didClose(e,t,r):r(e,t)}getSynchronizedCells(e){return this.getSyncInfo(e)?.cells}asNotebookDocumentChangeEvent(e,t,r,i){if(t!==void 0&&t.notebook!==e)throw new Error("Notebook must be identical");let s={notebook:e};t?.metadata!==void 0&&(s.metadata=Oi.c2p.asMetadata(t.metadata));let o;if(t?.cellChanges!==void 0&&t.cellChanges.length>0){let a=[];o=new Set(i.map(u=>u.document.uri.toString()));for(let u of t.cellChanges)o.has(u.cell.document.uri.toString())&&(u.executionSummary!==void 0||u.metadata!==void 0)&&a.push(u.cell);a.length>0&&(s.cells=s.cells??{},s.cells.data=a)}if((t?.contentChanges!==void 0&&t.contentChanges.length>0||t===void 0)&&r!==void 0&&i!==void 0){let a=r.cells,u=i,l=sd.computeDiff(a,u,!1),f,p;if(l!==void 0){f=l.cells===void 0?new Map:new Map(l.cells.map(_=>[_.document.uri.toString(),_])),p=l.deleteCount===0?new Map:new Map(a.slice(l.start,l.start+l.deleteCount).map(_=>[_.document.uri.toString(),_]));for(let _ of Array.from(p.keys()))f.has(_)&&(p.delete(_),f.delete(_));s.cells=s.cells??{};let h=[],g=[];if(f.size>0||p.size>0){for(let _ of f.values())h.push(_);for(let _ of p.values())g.push(_)}s.cells.structure={array:l,didOpen:h,didClose:g}}}return Object.keys(s).length>1?s:void 0}getMatchingCells(e,t=e.getCells()){if(this.options.notebookSelector!==void 0){for(let r of this.options.notebookSelector)if(r.notebook===void 0||Uo.matchNotebook(r.notebook,e)){let i=this.filterCells(e,t,r.cells);return i.length===0?void 0:i}}}getMatchingCellsFromEvent(e,t,r){if(this.options.notebookSelector===void 0)return;let i;for(let u of this.options.notebookSelector)if(u.notebook===void 0||Uo.matchNotebook(u.notebook,e)){i=u;break}if(i===void 0)return;if((r.cellChanges===void 0||r.cellChanges.length===0)&&(r.contentChanges===void 0||r.contentChanges.length===0))return t.cells;let s;if(r.cellChanges!==void 0&&r.cellChanges.length>0){let u=r.cellChanges.map(f=>f.cell),l=this.filterCells(e,u,i.cells);if(l.length!==u.length){s=new Set(t.uris);for(let f of u)s.delete(f.document.uri.toString());for(let f of l)s.add(f.document.uri.toString())}}if(r.contentChanges!==void 0&&r.contentChanges.length>0){s===void 0&&(s=new Set(t.uris));for(let u of r.contentChanges){for(let f of u.removedCells)s.delete(f.document.uri.toString());let l=this.filterCells(e,new Array(...u.addedCells),i.cells);for(let f of l)s.add(f.document.uri.toString())}}if(s===void 0)return t.cells;let o=[],a=e.getCells();for(let u of a)s.has(u.document.uri.toString())&&o.push(u);return o}getMatchingCellsFromSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:void 0}getMatchingCellsConsideringSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:this.getMatchingCells(e)}mergeCells(e,t,r){let i=[],s=new Set(t.uris);for(let o of r)s.add(o.document.uri.toString());for(let o of e.getCells())s.has(o.document.uri.toString())&&i.push(o);return i}cellMatches(e,t){let r=this.getMatchingCells(e,[t]);return r!==void 0&&r[0]===t}filterCells(e,t,r){let i=r!==void 0?t.filter(s=>{let o=s.document.languageId;return r.some((a=>a.language==="*"||o===a.language))}):t;return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells=="function"?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}},od=class n{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=Jn.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new Re.EventEmitter,this._onOpenNotificationSent=new Re.EventEmitter,this._onCloseNotificationSent=new Re.EventEmitter,this._onSaveNotificationSent=new Re.EventEmitter,Re.workspace.onDidOpenTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Ei&&s.didOpenNotebookCellTextDocument(r,i)}),Re.workspace.onDidChangeTextDocument(t=>{if(t.contentChanges.length===0)return;let r=t.document;if(r.uri.scheme!==n.CellScheme)return;let[i,s]=this.findNotebookDocumentAndCell(r);if(!(i===void 0||s===void 0))for(let o of this.registrations.values())o instanceof Ei&&o.didChangeNotebookCellTextDocument(i,s,t)}),Re.workspace.onDidCloseTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Ei&&s.didCloseNotebookCellTextDocument(r,i)})}getState(){if(this.registrations.size===0)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(let e of this.registrations.values()){let t=e.getState();if(t.kind==="document"&&t.registrations===!0&&t.matches===!0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){let t=W_(W_(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){let t=e.notebookDocumentSync;t!==void 0&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(Wo.asDocumentSelector(t)))}initialize(e){let t=e.notebookDocumentSync;if(t===void 0)return;let r=t.id??IS.generateUuid();this.register({id:r,registerOptions:t})}register(e){let t=new Ei(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,t)}unregister(e){let t=this.registrations.get(e);t!==void 0&&(this.registrations.delete(e),t.dispose())}clear(){for(let e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new Re.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new Re.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new Re.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new Re.EventEmitter}handles(e){if(e.uri.scheme!==n.CellScheme)return!1;if(this.dedicatedChannel!==void 0&&Re.languages.match(this.dedicatedChannel,e)>0)return!0;for(let t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(let t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){let t=e.uri.toString();for(let r of Re.workspace.notebookDocuments)for(let i of r.getCells())if(i.document.uri.toString()===t)return[r,i];return[void 0,void 0]}};an.NotebookDocumentSyncFeature=od});var G_=P(Ot=>{"use strict";var jS=Ot&&Ot.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),FS=Ot&&Ot.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),B_=Ot&&Ot.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let i=o=>{let a=[];for(let u of o.items){let l=u.scopeUri!==void 0&&u.scopeUri!==null?this._client.protocol2CodeConverter.asUri(u.scopeUri):void 0;a.push(this.getConfiguration(l,u.section!==null?u.section:void 0))}return a},s=e.middleware.workspace;return s&&s.configuration?s.configuration(t,r,i):i(t,r)})}getConfiguration(e,t){let r=null;if(t){let i=t.lastIndexOf(".");if(i===-1)r=Hr(qi.workspace.getConfiguration(void 0,e).get(t));else{let s=qi.workspace.getConfiguration(t.substr(0,i),e);s&&(r=Hr(s.get(t.substr(i+1))))}}else{let i=qi.workspace.getConfiguration(void 0,e);r={};for(let s of Object.keys(i))i.has(s)&&(r[s]=Hr(i.get(s)))}return r===void 0&&(r=null),r}clear(){}};Ot.ConfigurationFeature=ad;function Hr(n){if(n){if(Array.isArray(n))return n.map(Hr);if(typeof n=="object"){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=Hr(n[t]));return e}}return n}var cd=class{_client;isCleared;_listeners;constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return ys.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,K_.ensure)((0,K_.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;e!==void 0&&this.register({id:AS.generateUuid(),registerOptions:{section:e}})}register(e){let t=qi.workspace.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,t),e.registerOptions.section!==void 0&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let r;if(LS.string(e)?r=[e]:r=e,r!==void 0&&t!==void 0&&!r.some(a=>t.affectsConfiguration(a)))return;let i=async o=>o===void 0?this._client.sendNotification(ys.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(ys.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(o)}),s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(r,i):i(r)).catch(o=>{this._client.error(`Sending notification ${ys.DidChangeConfigurationNotification.type.method} failed`,o)})}extractSettingsInformation(e){function t(s,o){let a=s;for(let u=0;u=0?u=qi.workspace.getConfiguration(o.substr(0,a),r).get(o.substr(a+1)):u=qi.workspace.getConfiguration(void 0,r).get(o),u){let l=e[s].split(".");t(i,l)[l[l.length-1]]=Hr(u)}}return i}};Ot.SyncConfigurationFeature=cd});var Q_={};jh(Q_,{TextDocument:()=>ud});function ld(n,e){if(n.length<=1)return n;let t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);ld(r,e),ld(i,e);let s=0,o=0,a=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function kS(n){let e=J_(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var Bo,ud,Y_=Nh(()=>{"use strict";Bo=class n{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let r of e)if(n.isIncremental(r)){let i=J_(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),u=Math.max(i.end.line,0),l=this._lineOffsets,f=V_(r.text,!1,s);if(u-a===f.length)for(let h=0,g=f.length;he?i=o:r=o+1}let s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line];if(e.character<=0)return r;let i=e.line+1=t.length){let o=t.length-1;return{start:{line:o,character:0},end:{line:o,character:this._content.length-t[o]}}}else if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=t[e],i=e+1=t.length)return"";if(e<0)return"";let r=e+1t&&X_(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}};(function(n){function e(i,s,o,a){return new Bo(i,s,o,a)}n.create=e;function t(i,s,o){if(i instanceof Bo)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){let o=i.getText(),a=ld(s.map(kS),(f,p)=>{let h=f.range.start.line-p.range.start.line;return h===0?f.range.start.character-p.range.start.character:h}),u=0,l=[];for(let f of a){let p=i.offsetAt(f.range.start);if(pu&&l.push(o.substring(u,p)),f.newText.length&&l.push(f.newText),u=i.offsetAt(f.range.end)}return l.push(o.substr(u)),l.join("")}n.applyEdits=r})(ud||(ud={}))});var Z_=P(We=>{"use strict";var $S=We&&We.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),HS=We&&We.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),US=We&&We.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.middleware.didOpen,r=>e.code2ProtocolConverter.asOpenTextDocumentParams(r),r=>r,Ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){if(this._delayOpen){if(!this.matches(e))return;if(this._client.visibleDocuments.isVisible(e))return super.callback(e);{let r=new _d(e);this._pendingOpenNotifications.set(r.uri.toString(),r)}}else return super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return fe.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(Ae.workspace.textDocuments.forEach(r=>{let i=r.uri.toString();if(!this._syncedDocuments.has(i)&&Ae.languages.match(t,r)>0&&!this._client.hasDedicatedTextSynchronizationFeature(r))if(this._client.visibleDocuments.isVisible(r)){let o=this._client.middleware,a=u=>this._client.sendNotification(this._type,this._createParams(u));(o.didOpen?o.didOpen(r,a):a(r)).catch(u=>{this._client.error(`Sending document notification ${this._type.method} failed`,u)}),this._syncedDocuments.set(i,r)}else this._pendingOpenNotifications.set(i,r)}),this._delayOpen&&this._pendingOpenListeners===void 0){this._pendingOpenListeners=[];let r=this._client.visibleDocuments;this._pendingOpenListeners.push(r.onClose(i=>{for(let s of i)this._pendingOpenNotifications.delete(s.toString())})),this._pendingOpenListeners.push(r.onOpen(i=>{for(let s of i){let o=this._pendingOpenNotifications.get(s.toString());o!==void 0&&(super.callback(o).catch((a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})),this._pendingOpenNotifications.delete(s.toString()))}})),this._pendingOpenListeners.push(Ae.workspace.onDidCloseTextDocument(i=>{this._pendingOpenNotifications.delete(i.uri.toString())}))}}async sendPendingOpenNotifications(e){let t=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();let r=!1;for(let i of t){if(e!==void 0&&i.uri.toString()===e){r=!0;continue}await super.callback(i)}return r}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,r)}clear(){if(this._pendingOpenNotifications.clear(),this._pendingOpenListeners!==void 0){for(let e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}};We.DidOpenTextDocumentFeature=dd;var fd=class extends Ie.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,t,r){super(e,Ae.workspace.onDidCloseTextDocument,fe.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,i=>e.code2ProtocolConverter.asCloseTextDocumentParams(i),i=>i,Ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=r}get registrationType(){return fe.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,r)}unregister(e){let t=this._selectors.get(e);if(t===void 0)return;super.unregister(e);let r=this._selectors.values();this._syncedDocuments.forEach(i=>{if(Ae.languages.match(t,i)>0&&!this._selectorFilter(r,i)&&!this._client.hasDedicatedTextSynchronizationFeature(i)){let s=this._client.middleware,o=a=>this._client.sendNotification(this._type,this._createParams(a));this._syncedDocuments.delete(i.uri.toString()),(s.didClose?s.didClose(i,o):o(i)).catch(a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})}})}};We.DidCloseTextDocumentFeature=fd;var hd=class extends Ie.DynamicDocumentFeature{_listener;_changeData;_onAboutToSendNotification;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,t){super(e),this._changeData=new Map,this._onAboutToSendNotification=new Ae.EventEmitter,this._onNotificationSent=new Ae.EventEmitter,this._onPendingChangeAdded=new Ae.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=fe.TextDocumentSyncKind.None}get onAboutToSendNotification(){return this._onAboutToSendNotification.event}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return fe.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.change!==void 0&&r.change!==fe.TextDocumentSyncKind.None&&this.register({id:Mi.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:r.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ae.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(let e of this._changeData.values())yield e.documentSelector}async callback(e){if(e.contentChanges.length===0)return;let t=e.document.uri,r=e.document.version,i=[];for(let s of this._changeData.values())if(Ae.languages.match(s.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let o=this._client.middleware;if(s.syncKind===fe.TextDocumentSyncKind.Incremental){let a=async u=>{let l=this._client.code2ProtocolConverter.asChangeTextDocumentParams(u,t,r);this.aboutToSendNotification(u.document,fe.DidChangeTextDocumentNotification.type,l),await this._client.sendNotification(fe.DidChangeTextDocumentNotification.type,l),this.notificationSent(u.document,fe.DidChangeTextDocumentNotification.type,l)};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}else if(s.syncKind===fe.TextDocumentSyncKind.Full){let a=async u=>{let l=u.document.uri.toString();this._pendingTextDocumentChanges.set(l,u.document),this._onPendingChangeAdded.fire()};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}}return Promise.all(i).then(void 0,s=>{throw this._client.error(`Sending document notification ${fe.DidChangeTextDocumentNotification.type.method} failed`,s),s})}aboutToSendNotification(e,t,r){this._onAboutToSendNotification.fire({textDocument:e,type:t,params:r})}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){if(this._changeData.delete(e),this._changeData.size===0)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=fe.TextDocumentSyncKind.None;else{this._syncKind=fe.TextDocumentSyncKind.None;for(let t of this._changeData.values())if(this.updateSyncKind(t.syncKind),this._syncKind===fe.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=fe.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(this._pendingTextDocumentChanges.size===0)return[];let t;if(e.size===0)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(let r of this._pendingTextDocumentChanges)e.has(r[0])||(t.push(r[1]),this._pendingTextDocumentChanges.delete(r[0]))}return t}getProvider(e){for(let t of this._changeData.values())if(Ae.languages.match(t.documentSelector,e)>0)return{send:r=>this.callback(r)}}updateSyncKind(e){if(this._syncKind!==fe.TextDocumentSyncKind.Full)switch(e){case fe.TextDocumentSyncKind.Full:this._syncKind=e;break;case fe.TextDocumentSyncKind.Incremental:this._syncKind===fe.TextDocumentSyncKind.None&&(this._syncKind=fe.TextDocumentSyncKind.Incremental);break}}};We.DidChangeTextDocumentFeature=hd;var pd=class extends Ie.TextDocumentEventFeature{constructor(e){super(e,Ae.workspace.onWillSaveTextDocument,fe.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),t=>t.document,(t,r)=>Ie.TextDocumentEventFeature.textDocumentFilter(t,r.document))}get registrationType(){return fe.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSave&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}};We.WillSaveFeature=pd;var gd=class extends Ie.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return fe.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSaveWaitUntil&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ae.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(Ie.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,r=i=>this._client.sendRequest(fe.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(i)).then(async s=>{let o=await this._client.protocol2CodeConverter.asTextEdits(s);return o===void 0?[]:o});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,r):r(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}};We.WillSaveWaitUntilFeature=gd;var md=class extends Ie.TextDocumentEventFeature{_includeText;constructor(e){super(e,Ae.workspace.onDidSaveTextDocument,fe.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),t=>t,Ie.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return fe.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;if(t&&r&&r.save){let i=typeof r.save=="boolean"?{includeText:!1}:{includeText:!!r.save.includeText};this.register({id:Mi.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},i)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}};We.DidSaveTextDocumentFeature=md;var zS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function KS(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of zS)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}var BS=KS(),_d=class n{_extTextDocument;_capturedTextDocument;_content;_uri;_fileName;_languageId;_version;_eol;_isUntitled;_encoding;_isDirty;_isClosed;constructor(e){this._extTextDocument=e,this._content=e.getText(),this._uri=e.uri,this._fileName=e.fileName,this._languageId=e.languageId,this._version=e.version,this._eol=e.eol,this._isUntitled=e.isUntitled,this._encoding=e.encoding,this._isDirty=e.isDirty,this._isClosed=e.isClosed,this._capturedTextDocument=WS.TextDocument.create(this._uri.toString(),this._languageId,this._version,this._content)}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}get eol(){return this._eol}get isUntitled(){return this._isUntitled}get encoding(){return this._encoding}get fileName(){return this._fileName}get isDirty(){return this._isDirty}get isClosed(){return this._isClosed}save(){return this.version===this._extTextDocument.version?this._extTextDocument.save():Promise.resolve(!1)}get lineCount(){return this._capturedTextDocument.lineCount}offsetAt(e){return this._capturedTextDocument.offsetAt(e)}positionAt(e){let t=this._capturedTextDocument.positionAt(e);return new Ae.Position(t.line,t.character)}getText(e){return this._capturedTextDocument.getText(e)}lineAt(e){let t=typeof e=="number"?e:this.validatePosition(e).line;if(t<0||t>=this.lineCount)throw new RangeError(`Illegal value for line: ${t}`);let r=this._capturedTextDocument.getLineRange(t),i=this._capturedTextDocument.getText(r),s=i.search(/\S/),o=new Ae.Range(r.start.line,r.start.character,r.end.line,r.end.character),a=t+1=e.character)return new Ae.Range(r,o.index,r,s.lastIndex)}validateRange(e){let t=this.validatePosition(e.start),r=this.validatePosition(e.end);return t===e.start&&r===e.end?e:new Ae.Range(t.line,t.character,r.line,r.character)}validatePosition(e){let t=Math.min(Math.max(e.line,0),this.lineCount-1),r=this._capturedTextDocument.getLineRange(t),i=Math.min(Math.max(e.character,0),r.end.character);return t===e.line&&i===e.character?e:new Ae.Position(t,i)}static getWordRegExp(e){let t=e??BS;if(t.flags.includes("g"))return t;let r=`${t.flags}g`;return new RegExp(t.source,r)}}});var ey=P(cn=>{"use strict";var GS=cn&&cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),VS=cn&&cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),XS=cn&&cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let p=this._client,h=this._client.middleware,g=(_,v,R,q)=>p.sendRequest(ee.CompletionRequest.type,p.code2ProtocolConverter.asCompletionParams(_,v,R),q).then(w=>q.isCancellationRequested?null:p.protocol2CodeConverter.asCompletionResult(w,i,q),w=>p.handleFailedRequest(ee.CompletionRequest.type,q,w,null));return h.provideCompletionItem?h.provideCompletionItem(a,u,f,l,g):g(a,u,f,l)},resolveCompletionItem:e.resolveProvider?(a,u)=>{let l=this._client,f=this._client.middleware,p=(h,g)=>l.sendRequest(ee.CompletionResolveRequest.type,l.code2ProtocolConverter.asCompletionItem(h,!!this.labelDetailsSupport.get(t)),g).then(_=>g.isCancellationRequested?null:l.protocol2CodeConverter.asCompletionItem(_),_=>l.handleFailedRequest(ee.CompletionResolveRequest.type,g,_,h));return f.resolveCompletionItem?f.resolveCompletionItem(a,u,p):p(a,u)}:void 0};return[JS.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),o,...r),o]}};cn.CompletionItemFeature=vd});var ty=P(un=>{"use strict";var ZS=un&&un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),eP=un&&un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),tP=un&&un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(vs.HoverRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asHover(g),g=>a.handleFailedRequest(vs.HoverRequest.type,h,g,null)),l=a.middleware;return l.provideHover?l.provideHover(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return nP.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};un.HoverFeature=Cd});var ny=P(ln=>{"use strict";var iP=ln&&ln.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sP=ln&&ln.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oP=ln&&ln.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(wd.DefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(wd.DefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideDefinition?l.provideDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return aP.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ln.DefinitionFeature=Sd});var iy=P(dn=>{"use strict";var uP=dn&&dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),lP=dn&&dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),dP=dn&&dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h,g)=>a.sendRequest(bs.SignatureHelpRequest.type,a.code2ProtocolConverter.asSignatureHelpParams(f,p,h),g).then(_=>g.isCancellationRequested?null:a.protocol2CodeConverter.asSignatureHelp(_,g),_=>a.handleFailedRequest(bs.SignatureHelpRequest.type,g,_,null)),l=a.middleware;return l.provideSignatureHelp?l.provideSignatureHelp(r,i,o,s,u):u(r,i,o,s)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){let r=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(e.retriggerCharacters===void 0){let i=e.triggerCharacters||[];return ry.languages.registerSignatureHelpProvider(r,t,...i)}else{let i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return ry.languages.registerSignatureHelpProvider(r,t,i)}}};dn.SignatureHelpFeature=Rd});var sy=P(fn=>{"use strict";var hP=fn&&fn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pP=fn&&fn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gP=fn&&fn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(Td.DocumentHighlightRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDocumentHighlights(g,h),g=>a.handleFailedRequest(Td.DocumentHighlightRequest.type,h,g,null)),l=a.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,s,o,u):u(i,s,o)}};return[mP.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};fn.DocumentHighlightFeature=Ed});var xd=P(ut=>{"use strict";var yP=ut&&ut.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vP=ut&&ut.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bP=ut&&ut.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(le.DocumentSymbolRequest.type,a.code2ProtocolConverter.asDocumentSymbolParams(f),p);if(p.isCancellationRequested||h===void 0||h===null)return null;if(h.length===0)return[];{let g=h[0];return le.DocumentSymbol.is(g)?await a.protocol2CodeConverter.asDocumentSymbols(h,p):await a.protocol2CodeConverter.asSymbolInformations(h,p)}}catch(h){return a.handleFailedRequest(le.DocumentSymbolRequest.type,p,h,null)}},l=a.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(s,o,u):u(s,o)}},i=e.label!==void 0?{label:e.label}:void 0;return[CP.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,i),r]}};ut.DocumentSymbolFeature=Md});var ay=P(hn=>{"use strict";var DP=hn&&hn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SP=hn&&hn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PP=hn&&hn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let s=this._client,o=(u,l)=>s.sendRequest(Cs.WorkspaceSymbolRequest.type,{query:u},l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformations(f,l),f=>s.handleFailedRequest(Cs.WorkspaceSymbolRequest.type,l,f,null)),a=s.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(r,i,o):o(r,i)},resolveWorkspaceSymbol:e.resolveProvider===!0?(r,i)=>{let s=this._client,o=(u,l)=>s.sendRequest(Cs.WorkspaceSymbolResolveRequest.type,s.code2ProtocolConverter.asWorkspaceSymbol(u),l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformation(f),f=>s.handleFailedRequest(Cs.WorkspaceSymbolResolveRequest.type,l,f,null)),a=s.middleware;return a.resolveWorkspaceSymbol?a.resolveWorkspaceSymbol(r,i,o):o(r,i)}:void 0};return[RP.languages.registerWorkspaceSymbolProvider(t),t]}};hn.WorkspaceSymbolFeature=Nd});var cy=P(pn=>{"use strict";var OP=pn&&pn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),EP=pn&&pn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qP=pn&&pn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=(p,h,g,_)=>u.sendRequest(jd.ReferencesRequest.type,u.code2ProtocolConverter.asReferenceParams(p,h,g),_).then(v=>_.isCancellationRequested?null:u.protocol2CodeConverter.asReferences(v,_),v=>u.handleFailedRequest(jd.ReferencesRequest.type,_,v,null)),f=u.middleware;return f.provideReferences?f.provideReferences(i,s,o,a,l):l(i,s,o,a)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return MP.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};pn.ReferencesFeature=Ld});var uy=P(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.TypeDefinitionFeature=void 0;var IP=require("vscode"),Ad=V(),ws=ne(),kd=class extends ws.TextDocumentLanguageFeature{constructor(e){super(e,Ad.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,ws.ensure)((0,ws.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,ws.ensure)((0,ws.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeDefinitionProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideTypeDefinition:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(Ad.TypeDefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(Ad.TypeDefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return IP.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Go.TypeDefinitionFeature=kd});var ly=P(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.ImplementationFeature=void 0;var NP=require("vscode"),$d=V(),Hd=ne(),Ud=class extends Hd.TextDocumentLanguageFeature{constructor(e){super(e,$d.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,Hd.ensure)((0,Hd.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.implementationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideImplementation:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest($d.ImplementationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest($d.ImplementationRequest.type,h,g,null)),l=a.middleware;return l.provideImplementation?l.provideImplementation(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return NP.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Vo.ImplementationFeature=Ud});var dy=P(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.ColorProviderFeature=void 0;var jP=require("vscode"),Ds=V(),Wd=ne(),zd=class extends Wd.TextDocumentLanguageFeature{constructor(e){super(e,Ds.DocumentColorRequest.type)}fillClientCapabilities(e){(0,Wd.ensure)((0,Wd.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.colorProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideColorPresentations:(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={color:f,textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(p.document),range:a.code2ProtocolConverter.asRange(p.range)};return a.sendRequest(Ds.ColorPresentationRequest.type,g,h).then(_=>h.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(_,h),_=>a.handleFailedRequest(Ds.ColorPresentationRequest.type,h,_,null))},l=a.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,s,o,u):u(i,s,o)},provideDocumentColors:(i,s)=>{let o=this._client,a=(l,f)=>{let p={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(l)};return o.sendRequest(Ds.DocumentColorRequest.type,p,f).then(h=>f.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(h,f),h=>o.handleFailedRequest(Ds.DocumentColorRequest.type,f,h,null))},u=o.middleware;return u.provideDocumentColors?u.provideDocumentColors(i,s,a):a(i,s)}};return[jP.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Xo.ColorProviderFeature=zd});var fy=P(gn=>{"use strict";var FP=gn&&gn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),LP=gn&&gn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),AP=gn&&gn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),context:u.code2ProtocolConverter.asCodeActionContextSync(g)};return u.sendRequest(lt.CodeActionRequest.type,v,_).then(R=>_.isCancellationRequested||R===null||R===void 0?null:u.protocol2CodeConverter.asCodeActionResult(R,_),R=>u.handleFailedRequest(lt.CodeActionRequest.type,_,R,null))},f=u.middleware;return f.provideCodeActions?f.provideCodeActions(i,s,o,a,l):l(i,s,o,a)},resolveCodeAction:e.resolveProvider?(i,s)=>{let o=this._client,a=this._client.middleware,u=async(l,f)=>o.sendRequest(lt.CodeActionResolveRequest.type,o.code2ProtocolConverter.asCodeActionSync(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asCodeAction(p,f),p=>o.handleFailedRequest(lt.CodeActionResolveRequest.type,f,p,l));return a.resolveCodeAction?a.resolveCodeAction(i,s,u):u(i,s)}:void 0};return[kP.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,this.getMetadata(e)),r]}getMetadata(e){if(!(e.codeActionKinds===void 0&&e.documentation===void 0))return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}};gn.CodeActionFeature=Bd});var py=P(mn=>{"use strict";var HP=mn&&mn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),UP=mn&&mn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),WP=mn&&mn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let s of this.getAllProviders())s.onDidChangeCodeLensEmitter.fire()});let i=this.getRegistrationOptions(t,e.codeLensProvider);i&&this.register({id:zP.generateUuid(),registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new hy.EventEmitter,i={onDidChangeCodeLenses:r.event,provideCodeLenses:(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(xi.CodeLensRequest.type,a.code2ProtocolConverter.asCodeLensParams(f),p).then(h=>p.isCancellationRequested?null:a.protocol2CodeConverter.asCodeLenses(h,p),h=>a.handleFailedRequest(xi.CodeLensRequest.type,p,h,null)),l=a.middleware;return l.provideCodeLenses?l.provideCodeLenses(s,o,u):u(s,o)},resolveCodeLens:e.resolveProvider?(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(xi.CodeLensResolveRequest.type,a.code2ProtocolConverter.asCodeLens(f),p).then(h=>p.isCancellationRequested?f:a.protocol2CodeConverter.asCodeLens(h),h=>a.handleFailedRequest(xi.CodeLensResolveRequest.type,p,h,f)),l=a.middleware;return l.resolveCodeLens?l.resolveCodeLens(s,o,u):u(s,o)}:void 0};return[hy.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:r}]}};mn.CodeLensFeature=Gd});var gy=P(Ct=>{"use strict";var KP=Ct&&Ct.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),BP=Ct&&Ct.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),GP=Ct&&Ct.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),options:a.code2ProtocolConverter.asFormattingOptions(p,Ii.fromConfiguration(f))};return a.sendRequest(Jt.DocumentFormattingRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asTextEdits(_,h),_=>a.handleFailedRequest(Jt.DocumentFormattingRequest.type,h,_,null))},l=a.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,s,o,u):u(i,s,o)}};return[Jo.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ct.DocumentFormattingFeature=Vd;var Xd=class extends Qn.TextDocumentLanguageFeature{constructor(e){super(e,Jt.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){let t=(0,Qn.ensure)((0,Qn.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);r&&this.register({id:Qd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentRangeFormattingEdits:(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),options:u.code2ProtocolConverter.asFormattingOptions(g,Ii.fromConfiguration(p))};return u.sendRequest(Jt.DocumentRangeFormattingRequest.type,v,_).then(R=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(R,_),R=>u.handleFailedRequest(Jt.DocumentRangeFormattingRequest.type,_,R,null))},f=u.middleware;return f.provideDocumentRangeFormattingEdits?f.provideDocumentRangeFormattingEdits(i,s,o,a,l):l(i,s,o,a)}};return e.rangesSupport&&(r.provideDocumentRangesFormattingEdits=(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),ranges:u.code2ProtocolConverter.asRanges(h),options:u.code2ProtocolConverter.asFormattingOptions(g,Ii.fromConfiguration(p))};return u.sendRequest(Jt.DocumentRangesFormattingRequest.type,v,_).then(R=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(R,_),R=>u.handleFailedRequest(Jt.DocumentRangesFormattingRequest.type,_,R,null))},f=u.middleware;return f.provideDocumentRangesFormattingEdits?f.provideDocumentRangesFormattingEdits(i,s,o,a,l):l(i,s,o,a)}),[Jo.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ct.DocumentRangeFormattingFeature=Xd;var Jd=class extends Qn.TextDocumentLanguageFeature{constructor(e){super(e,Jt.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,Qn.ensure)((0,Qn.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);r&&this.register({id:Qd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideOnTypeFormattingEdits:(s,o,a,u,l)=>{let f=this._client,p=(g,_,v,R,q)=>{let w={textDocument:f.code2ProtocolConverter.asTextDocumentIdentifier(g),position:f.code2ProtocolConverter.asPosition(_),ch:v,options:f.code2ProtocolConverter.asFormattingOptions(R,Ii.fromConfiguration(g))};return f.sendRequest(Jt.DocumentOnTypeFormattingRequest.type,w,q).then(M=>q.isCancellationRequested?null:f.protocol2CodeConverter.asTextEdits(M,q),M=>f.handleFailedRequest(Jt.DocumentOnTypeFormattingRequest.type,q,M,null))},h=f.middleware;return h.provideOnTypeFormattingEdits?h.provideOnTypeFormattingEdits(s,o,a,u,l,p):p(s,o,a,u,l)}},i=e.moreTriggerCharacter||[];return[Jo.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,e.firstTriggerCharacter,...i),r]}};Ct.DocumentOnTypeFormattingFeature=Jd});var yy=P(_n=>{"use strict";var VP=_n&&_n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XP=_n&&_n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),_y=_n&&_n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),position:u.code2ProtocolConverter.asPosition(h),newName:g},R=null;try{R=await u.sendRequest(Ur.RenameRequest.type,v,_)}catch(w){return u.handleFailedRequest(Ur.RenameRequest.type,_,w,null,!1)}if(_.isCancellationRequested||R===null)return null;let q=await u.protocol2CodeConverter.asWorkspaceEdit(R,_);if(_.isCancellationRequested)return null;if(!u.validateWorkspaceEdit(R))throw new Error("The rename edit returned from the server is not valid anymore and cannot be applied.");return q},f=u.middleware;return f.provideRenameEdits?f.provideRenameEdits(i,s,o,a,l):l(i,s,o,a)},prepareRename:e.prepareProvider?(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),position:a.code2ProtocolConverter.asPosition(p)};return a.sendRequest(Ur.PrepareRenameRequest.type,g,h).then(_=>h.isCancellationRequested?null:Ur.Range.is(_)?a.protocol2CodeConverter.asRange(_):this.isDefaultBehavior(_)?_.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):_&&Ur.Range.is(_.range)?{range:a.protocol2CodeConverter.asRange(_.range),placeholder:_.placeholder}:Promise.reject(new Error("The element can't be renamed.")),_=>{throw typeof _.message=="string"?new Error(_.message):new Error("The element can't be renamed.")})},l=a.middleware;return l.prepareRename?l.prepareRename(i,s,o,u):u(i,s,o)}:void 0};return[this.registerProvider(t,r),r]}registerProvider(e,t){return JP.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){let t=e;return t&&my.boolean(t.defaultBehavior)}};_n.RenameFeature=Zd});var vy=P(yn=>{"use strict";var YP=yn&&yn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ZP=yn&&yn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),eR=yn&&yn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let o=this._client,a=(l,f)=>o.sendRequest(Ps.DocumentLinkRequest.type,o.code2ProtocolConverter.asDocumentLinkParams(l),f).then(p=>f.isCancellationRequested?null:o.protocol2CodeConverter.asDocumentLinks(p,f),p=>o.handleFailedRequest(Ps.DocumentLinkRequest.type,f,p,null)),u=o.middleware;return u.provideDocumentLinks?u.provideDocumentLinks(i,s,a):a(i,s)},resolveDocumentLink:e.resolveProvider?(i,s)=>{let o=this._client,a=(l,f)=>o.sendRequest(Ps.DocumentLinkResolveRequest.type,o.code2ProtocolConverter.asDocumentLink(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asDocumentLink(p),p=>o.handleFailedRequest(Ps.DocumentLinkResolveRequest.type,f,p,l)),u=o.middleware;return u.resolveDocumentLink?u.resolveDocumentLink(i,s,a):a(i,s)}:void 0};return[tR.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};yn.DocumentLinkFeature=tf});var Cy=P(vn=>{"use strict";var rR=vn&&vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),iR=vn&&vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sR=vn&&vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}get registrationType(){return nf.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,by.ensure)((0,by.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:aR.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,r=t.middleware,i=(s,o)=>{let a={command:s,arguments:o};return t.sendRequest(nf.ExecuteCommandRequest.type,a).then(void 0,u=>t.handleFailedRequest(nf.ExecuteCommandRequest.type,void 0,u,void 0))};if(e.registerOptions.commands){let s=[];for(let o of e.registerOptions.commands)s.push(oR.commands.registerCommand(o,(...a)=>r.executeCommand?r.executeCommand(o,a,i):i(o,a)));this._commands.set(e.id,s)}}unregister(e){let t=this._commands.get(e);t&&(this._commands.delete(e),t.forEach(r=>r.dispose()))}clear(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};vn.ExecuteCommandFeature=rf});var Dy=P(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.FoldingRangeFeature=void 0;var wy=require("vscode"),Wr=V(),Rs=ne(),sf=class extends Rs.TextDocumentLanguageFeature{constructor(e){super(e,Wr.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,Rs.ensure)((0,Rs.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[Wr.FoldingRangeKind.Comment,Wr.FoldingRangeKind.Imports,Wr.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,Rs.ensure)((0,Rs.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(Wr.FoldingRangeRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeFoldingRange.fire()});let[r,i]=this.getRegistration(t,e.foldingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new wy.EventEmitter,i={onDidChangeFoldingRanges:r.event,provideFoldingRanges:(s,o,a)=>{let u=this._client,l=(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p)};return u.sendRequest(Wr.FoldingRangeRequest.type,_,g).then(v=>g.isCancellationRequested?null:u.protocol2CodeConverter.asFoldingRanges(v,g),v=>u.handleFailedRequest(Wr.FoldingRangeRequest.type,g,v,null))},f=u.middleware;return f.provideFoldingRanges?f.provideFoldingRanges(s,o,a,l):l(s,o,a)}};return[wy.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeFoldingRange:r}]}};Qo.FoldingRangeFeature=sf});var Sy=P(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DeclarationFeature=void 0;var cR=require("vscode"),of=V(),af=ne(),cf=class extends af.TextDocumentLanguageFeature{constructor(e){super(e,of.DeclarationRequest.type)}fillClientCapabilities(e){let t=(0,af.ensure)((0,af.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.declarationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDeclaration:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(of.DeclarationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDeclarationResult(g,h),g=>a.handleFailedRequest(of.DeclarationRequest.type,h,g,null)),l=a.middleware;return l.provideDeclaration?l.provideDeclaration(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return cR.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Yo.DeclarationFeature=cf});var Py=P(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.SelectionRangeFeature=void 0;var uR=require("vscode"),uf=V(),lf=ne(),df=class extends lf.TextDocumentLanguageFeature{constructor(e){super(e,uf.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=(0,lf.ensure)((0,lf.ensure)(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.selectionRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideSelectionRanges:(i,s,o)=>{let a=this._client,u=async(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),positions:a.code2ProtocolConverter.asPositionsSync(p,h)};return a.sendRequest(uf.SelectionRangeRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asSelectionRanges(_,h),_=>a.handleFailedRequest(uf.SelectionRangeRequest.type,h,_,null))},l=a.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return uR.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Zo.SelectionRangeFeature=df});var Ry=P(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.CallHierarchyFeature=void 0;var lR=require("vscode"),zr=V(),ff=ne(),hf=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(zr.CallHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(p,l),p=>i.handleFailedRequest(zr.CallHierarchyPrepareRequest.type,l,p,null))};return s.prepareCallHierarchy?s.prepareCallHierarchy(e,t,r,o):o(e,t,r)}provideCallHierarchyIncomingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(zr.CallHierarchyIncomingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyIncomingCalls(l,a),l=>r.handleFailedRequest(zr.CallHierarchyIncomingCallsRequest.type,a,l,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,s):s(e,t)}provideCallHierarchyOutgoingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(zr.CallHierarchyOutgoingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyOutgoingCalls(l,a),l=>r.handleFailedRequest(zr.CallHierarchyOutgoingCallsRequest.type,a,l,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,s):s(e,t)}},pf=class extends ff.TextDocumentLanguageFeature{constructor(e){super(e,zr.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=e,r=(0,ff.ensure)((0,ff.ensure)(t,"textDocument"),"callHierarchy");r.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.callHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new hf(t);return[lR.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};ea.CallHierarchyFeature=pf});var Oy=P(bn=>{"use strict";var dR=bn&&bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),fR=bn&&bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ty=bn&&bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let o of this.getAllProviders())o.onDidChangeSemanticTokensEmitter.fire()});let[i,s]=this.getRegistration(t,e.semanticTokensProvider);!i||!s||this.register({id:i,registerOptions:s})}registerLanguageProvider(e){let t=e.documentSelector,r=hR.boolean(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,s=new ta.EventEmitter,o=r?{onDidChangeSemanticTokens:s.event,provideDocumentSemanticTokens:(g,_)=>{let v=this._client,R=v.middleware,q=(w,M)=>{let j={textDocument:v.code2ProtocolConverter.asTextDocumentIdentifier(w)};return v.sendRequest(J.SemanticTokensRequest.type,j,M).then(F=>M.isCancellationRequested?null:v.protocol2CodeConverter.asSemanticTokens(F,M),F=>v.handleFailedRequest(J.SemanticTokensRequest.type,M,F,null))};return R.provideDocumentSemanticTokens?R.provideDocumentSemanticTokens(g,_,q):q(g,_)},provideDocumentSemanticTokensEdits:i?(g,_,v)=>{let R=this._client,q=R.middleware,w=(M,j,F)=>{let oe={textDocument:R.code2ProtocolConverter.asTextDocumentIdentifier(M),previousResultId:j};return R.sendRequest(J.SemanticTokensDeltaRequest.type,oe,F).then(async te=>F.isCancellationRequested?null:J.SemanticTokens.is(te)?await R.protocol2CodeConverter.asSemanticTokens(te,F):await R.protocol2CodeConverter.asSemanticTokensEdits(te,F),te=>R.handleFailedRequest(J.SemanticTokensDeltaRequest.type,F,te,null))};return q.provideDocumentSemanticTokensEdits?q.provideDocumentSemanticTokensEdits(g,_,v,w):w(g,_,v)}:void 0}:void 0,u=e.range===!0?{onDidChangeSemanticTokens:s.event,provideDocumentRangeSemanticTokens:(g,_,v)=>{let R=this._client,q=R.middleware,w=(M,j,F)=>{let oe={textDocument:R.code2ProtocolConverter.asTextDocumentIdentifier(M),range:R.code2ProtocolConverter.asRange(j)};return R.sendRequest(J.SemanticTokensRangeRequest.type,oe,F).then(te=>F.isCancellationRequested?null:R.protocol2CodeConverter.asSemanticTokens(te,F),te=>R.handleFailedRequest(J.SemanticTokensRangeRequest.type,F,te,null))};return q.provideDocumentRangeSemanticTokens?q.provideDocumentRangeSemanticTokens(g,_,v,w):w(g,_,v)}}:void 0,l=[],f=this._client,p=f.protocol2CodeConverter.asSemanticTokensLegend(e.legend),h=f.protocol2CodeConverter.asDocumentSelector(t);return o!==void 0&&l.push(ta.languages.registerDocumentSemanticTokensProvider(h,o,p)),u!==void 0&&l.push(ta.languages.registerDocumentRangeSemanticTokensProvider(h,u,p)),[new ta.Disposable(()=>l.forEach(g=>g.dispose())),{range:u,full:o,onDidChangeSemanticTokensEmitter:s}]}};bn.SemanticTokensFeature=gf});var qy=P(Cn=>{"use strict";var pR=Cn&&Cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),gR=Cn&&Cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ey=Cn&&Cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(mf.LinkedEditingRangeRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asLinkedEditingRanges(g,h),g=>a.handleFailedRequest(mf.LinkedEditingRangeRequest.type,h,g,null)),l=a.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return mR.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Cn.LinkedEditingFeature=yf});var My=P(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.TypeHierarchyFeature=void 0;var _R=require("vscode"),Kr=V(),vf=ne(),bf=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(Kr.TypeHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(p,l),p=>i.handleFailedRequest(Kr.TypeHierarchyPrepareRequest.type,l,p,null))};return s.prepareTypeHierarchy?s.prepareTypeHierarchy(e,t,r,o):o(e,t,r)}provideTypeHierarchySupertypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(Kr.TypeHierarchySupertypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Kr.TypeHierarchySupertypesRequest.type,a,l,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,s):s(e,t)}provideTypeHierarchySubtypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(Kr.TypeHierarchySubtypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Kr.TypeHierarchySubtypesRequest.type,a,l,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,s):s(e,t)}},Cf=class extends vf.TextDocumentLanguageFeature{constructor(e){super(e,Kr.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=(0,vf.ensure)((0,vf.ensure)(e,"textDocument"),"typeHierarchy");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new bf(t);return[_R.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};na.TypeHierarchyFeature=Cf});var Iy=P(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.InlineValueFeature=void 0;var xy=require("vscode"),ra=V(),Os=ne(),wf=class extends Os.TextDocumentLanguageFeature{constructor(e){super(e,ra.InlineValueRequest.type)}fillClientCapabilities(e){(0,Os.ensure)((0,Os.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,Os.ensure)((0,Os.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(ra.InlineValueRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlineValues.fire()});let[r,i]=this.getRegistration(t,e.inlineValueProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new xy.EventEmitter,i={onDidChangeInlineValues:r.event,provideInlineValues:(s,o,a,u)=>{let l=this._client,f=(h,g,_,v)=>{let R={textDocument:l.code2ProtocolConverter.asTextDocumentIdentifier(h),range:l.code2ProtocolConverter.asRange(g),context:l.code2ProtocolConverter.asInlineValueContext(_)};return l.sendRequest(ra.InlineValueRequest.type,R,v).then(q=>v.isCancellationRequested?null:l.protocol2CodeConverter.asInlineValues(q,v),q=>l.handleFailedRequest(ra.InlineValueRequest.type,v,q,null))},p=l.middleware;return p.provideInlineValues?p.provideInlineValues(s,o,a,u,f):f(s,o,a,u)}};return[this.registerProvider(t,i),{provider:i,onDidChangeInlineValues:r}]}registerProvider(e,t){return xy.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ia.InlineValueFeature=wf});var jy=P(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.InlayHintsFeature=void 0;var Ny=require("vscode"),Ni=V(),Es=ne(),Df=class extends Es.TextDocumentLanguageFeature{constructor(e){super(e,Ni.InlayHintRequest.type)}fillClientCapabilities(e){let t=(0,Es.ensure)((0,Es.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,Es.ensure)((0,Es.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(Ni.InlayHintRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlayHints.fire()});let[r,i]=this.getRegistration(t,e.inlayHintProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Ny.EventEmitter,i={onDidChangeInlayHints:r.event,provideInlayHints:(s,o,a)=>{let u=this._client,l=async(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h)};try{let v=await u.sendRequest(Ni.InlayHintRequest.type,_,g);return g.isCancellationRequested?null:u.protocol2CodeConverter.asInlayHints(v,g)}catch(v){return u.handleFailedRequest(Ni.InlayHintRequest.type,g,v,null)}},f=u.middleware;return f.provideInlayHints?f.provideInlayHints(s,o,a,l):l(s,o,a)}};return i.resolveInlayHint=e.resolveProvider===!0?(s,o)=>{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(Ni.InlayHintResolveRequest.type,a.code2ProtocolConverter.asInlayHint(f),p);if(p.isCancellationRequested)return null;let g=a.protocol2CodeConverter.asInlayHint(h,p);return p.isCancellationRequested?null:g}catch(h){return a.handleFailedRequest(Ni.InlayHintResolveRequest.type,p,h,null)}},l=a.middleware;return l.resolveInlayHint?l.resolveInlayHint(s,o,u):u(s,o)}:void 0,[this.registerProvider(t,i),{provider:i,onDidChangeInlayHints:r}]}registerProvider(e,t){return Ny.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};sa.InlayHintsFeature=Df});var Fy=P(Qt=>{"use strict";var yR=Qt&&Qt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vR=Qt&&Qt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bR=Qt&&Qt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.indexOf(t)<0)}var Rf=class{_client;_listeners;_initialFolders;constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return qs.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=oa.workspace.workspaceFolders;this.initializeWithFolders(t),t===void 0?e.workspaceFolders=null:e.workspaceFolders=t.map(r=>this.asProtocol(r))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(qs.WorkspaceFoldersRequest.type,s=>{let o=()=>{let u=oa.workspace.workspaceFolders;return u===void 0?null:u.map(f=>this.asProtocol(f))},a=t.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(s,o):o(s)});let r=Sf(Sf(Sf(e,"workspace"),"workspaceFolders"),"changeNotifications"),i;typeof r=="string"?i=r:r===!0&&(i=CR.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){let r=Pf(this._initialFolders,e),i=Pf(e,this._initialFolders);(i.length>0||r.length>0)&&(t=this.doSendEvent(i,r))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));t!==void 0&&t.catch(r=>{this._client.error(`Sending notification ${qs.DidChangeWorkspaceFoldersNotification.type.method} failed`,r)})}doSendEvent(e,t){let r={event:{added:e.map(i=>this.asProtocol(i)),removed:t.map(i=>this.asProtocol(i))}};return this._client.sendNotification(qs.DidChangeWorkspaceFoldersNotification.type,r)}register(e){let t=e.id,r=this._client,i=oa.workspace.onDidChangeWorkspaceFolders(s=>{let o=l=>this.doSendEvent(l.added,l.removed),a=r.middleware.workspace;(a&&a.didChangeWorkspaceFolders?a.didChangeWorkspaceFolders(s,o):o(s)).catch(l=>{this._client.error(`Sending notification ${qs.DidChangeWorkspaceFoldersNotification.type.method} failed`,l)})});this._listeners.set(t,i),this.sendInitialEvent(oa.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return e===void 0?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}};Qt.WorkspaceFoldersFeature=Rf});var ky=P(ze=>{"use strict";var wR=ze&&ze.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),DR=ze&&ze.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ua=ze&&ze.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){let t=Ly(Ly(e,"workspace"),"fileOperations");Ay(t,"dynamicRegistration",!0),Ay(t,this._clientCapability,!0)}initialize(e){let t=e.workspace?.fileOperations,r=t!==void 0?RR(t,this._serverCapability):void 0;if(r?.filters!==void 0)try{this.register({id:PR.generateUuid(),registerOptions:{filters:r.filters}})}catch(i){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${i}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(r=>{let i=new SR.Minimatch(r.pattern.glob,n.asMinimatchOptions(r.pattern.options));if(!i.makeRe())throw new Error(`Invalid pattern ${r.pattern.glob}!`);return{scheme:r.scheme,matcher:i,kind:r.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return n.getFileType(e)}async filter(e,t){let r=await Promise.all(e.files.map(async s=>{let o=t(s),a=o.fsPath.replace(/\\/g,"/");for(let u of this._filters.values())for(let l of u)if(!(l.scheme!==void 0&&l.scheme!==o.scheme)){if(l.matcher.match(a)){if(l.kind===void 0)return!0;let f=await this.getFileType(o);if(f===void 0)return this._client.info(`Unable to determine file type for ${o.toString()}. Treating as a match.`),!0;if(f===$t.FileType.File&&l.kind===Yn.FileOperationPatternKind.file||f===$t.FileType.Directory&&l.kind===Yn.FileOperationPatternKind.folder)return!0}else if(l.kind===Yn.FileOperationPatternKind.folder&&await n.getFileType(o)===$t.FileType.Directory&&l.matcher.match(`${a}/`))return!0}return!1})),i=e.files.filter((s,o)=>r[o]);return{...e,files:i}}static async getFileType(e){try{return(await $t.workspace.fs.stat(e)).type}catch{return}}static asMinimatchOptions(e){let t={dot:!0};return e?.ignoreCase===!0&&(t.nocase=!0),t}},aa=class extends Ms{_notificationType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._notificationType=r,this._accessUri=o,this._createParams=a}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=async i=>this._client.sendNotification(this._notificationType,this._createParams(i));return this.doSend(t,r)}}},ca=class extends aa{_willListener;_fsPathFileTypes=new Map;async getFileType(e){let t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);let r=await Ms.getFileType(e);return r&&this._fsPathFileTypes.set(t,r),r}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),this.filterSize()===0&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}},Tf=class extends aa{constructor(e){super(e,$t.workspace.onDidCreateFiles,Yn.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.didCreateFiles?r.didCreateFiles(e,t):t(e)}};ze.DidCreateFilesFeature=Tf;var Of=class extends ca{constructor(e){super(e,$t.workspace.onDidRenameFiles,Yn.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=$t.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,t=>t.oldUri))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didRenameFiles?r.didRenameFiles(e,t):t(e)}};ze.DidRenameFilesFeature=Of;var Ef=class extends ca{constructor(e){super(e,$t.workspace.onDidDeleteFiles,Yn.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=$t.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,t=>t))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didDeleteFiles?r.didDeleteFiles(e,t):t(e)}};ze.DidDeleteFilesFeature=Ef;var xs=class extends Ms{_requestType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._requestType=r,this._accessUri=o,this._createParams=a}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=i=>this._client.sendRequest(this._requestType,this._createParams(i),i.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,r)}else return}},qf=class extends xs{constructor(e){super(e,$t.workspace.onWillCreateFiles,Yn.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willCreateFiles?r.willCreateFiles(e,t):t(e)}};ze.WillCreateFilesFeature=qf;var Mf=class extends xs{constructor(e){super(e,$t.workspace.onWillRenameFiles,Yn.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willRenameFiles?r.willRenameFiles(e,t):t(e)}};ze.WillRenameFilesFeature=Mf;var xf=class extends xs{constructor(e){super(e,$t.workspace.onWillDeleteFiles,Yn.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willDeleteFiles?r.willDeleteFiles(e,t):t(e)}};ze.WillDeleteFilesFeature=xf});var $y=P(wn=>{"use strict";var TR=wn&&wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OR=wn&&wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ER=wn&&wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=this._client.middleware,f=(p,h,g,_)=>u.sendRequest(If.InlineCompletionRequest.type,u.code2ProtocolConverter.asInlineCompletionParams(p,h,g),_).then(v=>_.isCancellationRequested?null:u.protocol2CodeConverter.asInlineCompletionResult(v,_),v=>u.handleFailedRequest(If.InlineCompletionRequest.type,_,v,null));return l.provideInlineCompletionItems?l.provideInlineCompletionItems(i,s,o,a,f):f(i,s,o,a)}};return[qR.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};wn.InlineCompletionItemFeature=jf});var Wy=P(Dn=>{"use strict";var xR=Dn&&Dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),IR=Dn&&Dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Uy=Dn&&Dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0;return{kind:"workspace",id:ji.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return ji.TextDocumentContentRequest.type}getProviders(){let e=[];for(let t of this._registrations.values())e.push(...t.providers);return e}fillClientCapabilities(e){let t=(0,Hy.ensure)((0,Hy.ensure)(e,"workspace"),"textDocumentContent");t.dynamicRegistration=!0}initialize(e){let t=this._client;if(t.onRequest(ji.TextDocumentContentRefreshRequest.type,async s=>{let o=t.protocol2CodeConverter.asUri(s.uri);for(let a of this._registrations.values())for(let u of a.providers)u.scheme===o.scheme&&u.onDidChangeEmitter.fire(o)}),!e?.workspace?.textDocumentContent)return;let r=e.workspace.textDocumentContent,i=ji.StaticRegistrationOptions.hasId(r)?r.id:NR.generateUuid();this.register({id:i,registerOptions:r})}register(e){let t=[],r=[];for(let i of e.registerOptions.schemes){let[s,o]=this.registerTextDocumentContentProvider(i);t.push(o),r.push(s)}this._registrations.set(e.id,{disposable:Ff.Disposable.from(...r),providers:t})}registerTextDocumentContentProvider(e){let t=new Ff.EventEmitter,r={onDidChange:t.event,provideTextDocumentContent:(i,s)=>{let o=this._client,a=(l,f)=>{let p={uri:o.code2ProtocolConverter.asUri(l)};return o.sendRequest(ji.TextDocumentContentRequest.type,p,f).then(h=>f.isCancellationRequested?null:h.text,h=>o.handleFailedRequest(ji.TextDocumentContentRequest.type,f,h,null))},u=o.middleware;return u.provideTextDocumentContent?u.provideTextDocumentContent(i,s,a):a(i,s)}};return[Ff.workspace.registerTextDocumentContentProvider(e,r),{scheme:e,onDidChangeEmitter:t,provider:r}]}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}};Dn.TextDocumentContentFeature=Lf});var zy=P(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.FileSystemWatcherFeature=void 0;var jR=require("vscode"),Br=V(),la=ne(),Af=class{_client;_notifyFileEvent;_watchers;constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return Br.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,la.ensure)((0,la.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,la.ensure)((0,la.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let r of e.registerOptions.watchers){let i=this._client.protocol2CodeConverter.asGlobPattern(r.globPattern);if(i===void 0)continue;let s=!0,o=!0,a=!0;r.kind!==void 0&&r.kind!==null&&(s=(r.kind&Br.WatchKind.Create)!==0,o=(r.kind&Br.WatchKind.Change)!==0,a=(r.kind&Br.WatchKind.Delete)!==0);let u=jR.workspace.createFileSystemWatcher(i,!s,!o,!a);this.hookListeners(u,s,o,a,t),t.push(u)}this._watchers.set(e.id,t)}registerRaw(e,t){let r=[];for(let i of t)this.hookListeners(i,!0,!0,!0,r);this._watchers.set(e,r)}hookListeners(e,t,r,i,s){t&&e.onDidCreate(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Created}),null,s),r&&e.onDidChange(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Changed}),null,s),i&&e.onDidDelete(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Deleted}),null,s)}unregister(e){let t=this._watchers.get(e);if(t){this._watchers.delete(e);for(let r of t)r.dispose()}}clear(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}};da.FileSystemWatcherFeature=Af});var By=P(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.ProgressFeature=void 0;var Ky=V(),FR=Ll();function LR(n,e){return n[e]===void 0&&(n[e]=Object.create(null)),n[e]}var kf=class{_client;activeParts;constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:Ky.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){LR(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=i=>{this.activeParts.delete(i)},r=i=>{this.activeParts.add(new FR.ProgressPart(this._client,i.token,t))};e.onRequest(Ky.WorkDoneProgressCreateRequest.type,r)}clear(){for(let e of this.activeParts)e.done();this.activeParts.clear()}};fa.ProgressFeature=kf});var Vf=P(he=>{"use strict";var AR=he&&he.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kR=he&&he.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ga=he&&he.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let t=this.open,r=new Set;n.fillVisibleResources(r);let i=new Set,s=new Set(r);for(let o of t.values())r.has(o)?s.delete(o):i.add(o);if(this.open=r,i.size>0){let o=new Set;for(let a of i)o.add(G.Uri.parse(a));this._onClose.fire(o)}if(s.size>0){let o=new Set;for(let a of s)o.add(G.Uri.parse(a));this._onOpen.fire(o)}};this.disposables.push(G.window.tabGroups.onDidChangeTabs(t=>{t.closed.length===0&&t.opened.length===0||e()})),this.disposables.push(G.window.onDidChangeVisibleTextEditors(t=>{e()}))}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposables.forEach(e=>e.dispose())}isActive(e){return e instanceof G.Uri?G.window.activeTextEditor?.document.uri===e:G.window.activeTextEditor?.document===e}isVisible(e){let t=e instanceof G.Uri?e:e.uri;return t.scheme===Hf.NotebookDocumentSyncFeature.CellScheme?G.workspace.notebookDocuments.some(r=>this.open.has(r.uri.toString())?r.getCells().find(s=>s.document.uri.toString()===t.toString())!==void 0:!1):this.open.has(t.toString())}getResources(){let e=new Set;return n.fillVisibleResources(new Set,e),e}static fillVisibleResources(e,t){let r=e??new Set;for(let i of G.window.tabGroups.all)for(let s of i.tabs){let o=s.input,a;o instanceof G.TabInputText?a=o.uri:o instanceof G.TabInputTextDiff?a=o.modified:(o instanceof G.TabInputCustom||o instanceof G.TabInputNotebook)&&(a=o.uri),a!==void 0&&!r.has(a.toString())&&(r.add(a.toString()),t!==void 0&&t.add(a))}for(let i of G.window.visibleTextEditors){let s=i.document.uri;r.has(s.toString())||(r.add(s.toString()),t!==void 0&&t.add(s))}}},pa=class n{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_traceLogLevel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=x.TraceFormat.Text;_tracer;_c2p;_p2c;_visibleDocuments;constructor(e,t,r){this._id=e,this._name=t,r=r||{};let i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};r.markdown!==void 0&&(i.isTrusted=Uf.sanitizeIsTrusted(r.markdown.isTrusted),i.supportHtml=r.markdown.supportHtml===!0,i.supportThemeIcons=r.markdown.supportThemeIcons===!0),this._clientOptions={documentSelector:r.documentSelector??[],synchronize:r.synchronize??{},diagnosticCollectionName:r.diagnosticCollectionName,outputChannelName:r.outputChannelName??this._name,revealOutputChannelOn:r.revealOutputChannelOn??Gr.Error,stdioEncoding:r.stdioEncoding??"utf8",initializationOptions:r.initializationOptions,initializationFailedHandler:r.initializationFailedHandler,progressOnInitialization:!!r.progressOnInitialization,errorHandler:r.errorHandler??this.createDefaultErrorHandler(r.connectionOptions?.maxRestartCount),middleware:r.middleware??{},uriConverters:r.uriConverters,workspaceFolder:r.workspaceFolder,connectionOptions:r.connectionOptions,markdown:i,diagnosticPullOptions:r.diagnosticPullOptions??{onChange:!0,onSave:!1},diagnosticCollectionProvider:r.diagnosticCollectionProvider??new dt.DefaultDiagnosticCollectionProvider,notebookDocumentOptions:r.notebookDocumentOptions??{},textSynchronization:this.createTextSynchronizationOptions(r.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Y.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,r.outputChannel?(this._outputChannel=r.outputChannel,this._disposeOutputChannel=!1,this._traceLogLevel=this._outputChannel.logLevel):(this._outputChannel=void 0,this._disposeOutputChannel=!0,this._traceLogLevel=G.LogLevel.Info),this._traceOutputChannel=r.traceOutputChannel,this._traceOutputChannel!==void 0&&(this._traceLogLevel=this._traceOutputChannel.logLevel),this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new ha.Semaphore(1),this._pendingChangeDelayer=new ha.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new ha.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new x.Emitter,this._stateChangeEmitter=new x.Emitter,this._trace=x.Trace.Off,this._tracer={log:(s,o)=>{Yt.string(s)?this.trace(s,o):this.traceObject(s)}},this._c2p=$R.createConverter(r.uriConverters?r.uriConverters.code2Protocol:void 0),this._p2c=HR.createConverter(r.uriConverters?r.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e?typeof e.delayOpenNotifications=="boolean"?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}:{delayOpenNotifications:!1}}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get visibleDocuments(){return this._visibleDocuments===void 0&&(this._visibleDocuments=new zf),this._visibleDocuments}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=G.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name,{log:!0}),this._traceOutputChannel===void 0&&(this._traceLogLevel=this._outputChannel.logLevel)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){if(this._diagnostics!==null)return this._diagnostics===void 0&&(this._diagnostics=this._clientOptions.diagnosticCollectionProvider.create(this._clientOptions.diagnosticCollectionName??this._id,dt.DiagnosticCollectionSource.push)),this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let r=this.getPublicState();r!==t&&this._stateChangeEmitter.fire({oldState:t,newState:r})}getPublicState(){switch(this.$state){case Y.Starting:return Ai.Starting;case Y.Running:return Ai.Running;case Y.StartFailed:return Ai.StartFailed;default:return Ai.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));let r=await this.$start();await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===x.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(r);let i,s;if(t.length===1?x.CancellationToken.is(t[0])?s=t[0]:i=t[0]:t.length===2&&(i=t[0],s=t[1]),s!==void 0&&s.isCancellationRequested)return Promise.reject(new x.ResponseError(x.LSPErrorCodes.RequestCancelled,"Request got cancelled"));let o=this._clientOptions.middleware?.sendRequest;return o!==void 0?o(e,i,s,(a,u,l)=>{let f=[];return u!==void 0&&f.push(u),l!==void 0&&f.push(l),r.sendRequest(a,...f)}):r.sendRequest(e,...t)}onRequest(e,t){let r=typeof e=="string"?e:e.method;this._requestHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._requestDisposables.set(r,i.onRequest(e,t)),s={dispose:()=>{let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}):(this._pendingRequestHandlers.set(r,t),s={dispose:()=>{this._pendingRequestHandlers.delete(r);let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}),{dispose:()=>{this._requestHandlers.delete(r),s.dispose()}}}async sendNotification(e,t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));let r=this._didChangeTextDocumentFeature.syncKind===x.TextDocumentSyncKind.Full,i;r&&typeof e!="string"&&e.method===x.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._inFlightOpenNotifications.add(i));let s;typeof e!="string"&&e.method===x.DidCloseTextDocumentNotification.method&&(s=t.textDocument.uri);let o=await this.$start();if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(s))return;r&&await this.sendPendingFullTextDocumentChanges(o),i!==void 0&&this._inFlightOpenNotifications.delete(i);let u=this._clientOptions.middleware?.sendNotification;return u?u(e,o.sendNotification.bind(o),t):o.sendNotification(e,t)}onNotification(e,t){let r=typeof e=="string"?e:e.method;this._notificationHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._notificationDisposables.set(r,i.onNotification(e,t)),s={dispose:()=>{let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}):(this._pendingNotificationHandlers.set(r,t),s={dispose:()=>{this._pendingNotificationHandlers.delete(r);let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}),{dispose:()=>{this._notificationHandlers.delete(r),s.dispose()}}}async sendProgress(e,t,r){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,r)}catch(i){throw this.error(`Sending progress for token ${t} failed.`,i),i}}onProgress(e,t,r){this._progressHandlers.set(t,{type:e,handler:r});let i=this.activeConnection(),s,o=this._clientOptions.middleware?.handleWorkDoneProgress,a=x.WorkDoneProgress.is(e)&&o!==void 0?u=>{o(t,u,()=>r(u))}:r;return i!==void 0?(this._progressDisposables.set(t,i.onProgress(e,t,a)),s={dispose:()=>{let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:r}),s={dispose:()=>{this._pendingProgressHandlers.delete(t);let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),s.dispose()}}}createDefaultErrorHandler(e){if(e!==void 0&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new Wf(this,e??4)}async setTrace(e){this._trace=e;let t=this.activeConnection();t!==void 0&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof x.ResponseError){let t=e;return` Message: ${t.message} +`&&i++}r&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return Lt.create(0,e);for(;re?i=o:r=o+1}let s=r-1;return Lt.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(g){return g===!0||g===!1}n.boolean=i;function s(g){return e.call(g)==="[object String]"}n.string=s;function o(g){return e.call(g)==="[object Number]"}n.number=o;function a(g,_,v){return e.call(g)==="[object Number]"&&_<=g&&g<=v}n.numberRange=a;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}n.integer=u;function l(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}n.uinteger=l;function f(g){return e.call(g)==="[object Function]"}n.func=f;function p(g){return g!==null&&typeof g=="object"}n.objectLiteral=p;function h(g,_){return Array.isArray(g)&&g.every(_)}n.typedArray=h})(C||(C={}))});var Ce=P(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.CM=at.ProtocolNotificationType=at.ProtocolNotificationType0=at.ProtocolRequestType=at.ProtocolRequestType0=at.RegistrationType=at.MessageDirection=void 0;var mi=Nn(),up;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(up||(at.MessageDirection=up={}));var Au=class{____;method;constructor(e){this.method=e}};at.RegistrationType=Au;var ku=class extends mi.RequestType0{__;___;____;_pr;constructor(e){super(e)}};at.ProtocolRequestType0=ku;var $u=class extends mi.RequestType{__;___;____;_pr;constructor(e){super(e,mi.ParameterStructures.byName)}};at.ProtocolRequestType=$u;var Hu=class extends mi.NotificationType0{___;____;constructor(e){super(e)}};at.ProtocolNotificationType0=Hu;var Uu=class extends mi.NotificationType{___;____;constructor(e){super(e,mi.ParameterStructures.byName)}};at.ProtocolNotificationType=Uu;var lp;(function(n){function e(t,r){return{client:t,server:r}}n.create=e})(lp||(at.CM=lp={}))});var go=P(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.boolean=pC;zt.string=dp;zt.number=gC;zt.error=mC;zt.func=_C;zt.array=fp;zt.stringArray=yC;zt.typedArray=vC;zt.objectLiteral=bC;function pC(n){return n===!0||n===!1}function dp(n){return typeof n=="string"||n instanceof String}function gC(n){return typeof n=="number"||n instanceof Number}function mC(n){return n instanceof Error}function _C(n){return typeof n=="function"}function fp(n){return Array.isArray(n)}function yC(n){return fp(n)&&n.every(e=>dp(e))}function vC(n,e){return Array.isArray(n)&&n.every(e)}function bC(n){return n!==null&&typeof n=="object"}});var pp=P(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.ImplementationRequest=void 0;var Wu=Ce(),hp;(function(n){n.method="textDocument/implementation",n.messageDirection=Wu.MessageDirection.clientToServer,n.type=new Wu.ProtocolRequestType(n.method),n.capabilities=Wu.CM.create("textDocument.implementation","implementationProvider")})(hp||(mo.ImplementationRequest=hp={}))});var mp=P(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.TypeDefinitionRequest=void 0;var zu=Ce(),gp;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=zu.MessageDirection.clientToServer,n.type=new zu.ProtocolRequestType(n.method),n.capabilities=zu.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(gp||(_o.TypeDefinitionRequest=gp={}))});var vp=P(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.DidChangeWorkspaceFoldersNotification=yi.WorkspaceFoldersRequest=void 0;var _i=Ce(),_p;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=_i.MessageDirection.serverToClient,n.type=new _i.ProtocolRequestType0(n.method),n.capabilities=_i.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(_p||(yi.WorkspaceFoldersRequest=_p={}));var yp;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=_i.MessageDirection.clientToServer,n.type=new _i.ProtocolNotificationType(n.method),n.capabilities=_i.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(yp||(yi.DidChangeWorkspaceFoldersNotification=yp={}))});var Cp=P(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.ConfigurationRequest=void 0;var Ku=Ce(),bp;(function(n){n.method="workspace/configuration",n.messageDirection=Ku.MessageDirection.serverToClient,n.type=new Ku.ProtocolRequestType(n.method),n.capabilities=Ku.CM.create("workspace.configuration",void 0)})(bp||(yo.ConfigurationRequest=bp={}))});var Sp=P(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.ColorPresentationRequest=bi.DocumentColorRequest=void 0;var vi=Ce(),wp;(function(n){n.method="textDocument/documentColor",n.messageDirection=vi.MessageDirection.clientToServer,n.type=new vi.ProtocolRequestType(n.method),n.capabilities=vi.CM.create("textDocument.colorProvider","colorProvider")})(wp||(bi.DocumentColorRequest=wp={}));var Dp;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=vi.MessageDirection.clientToServer,n.type=new vi.ProtocolRequestType(n.method),n.capabilities=vi.CM.create("textDocument.colorProvider","colorProvider")})(Dp||(bi.ColorPresentationRequest=Dp={}))});var Tp=P(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.FoldingRangeRefreshRequest=wi.FoldingRangeRequest=void 0;var Ci=Ce(),Pp;(function(n){n.method="textDocument/foldingRange",n.messageDirection=Ci.MessageDirection.clientToServer,n.type=new Ci.ProtocolRequestType(n.method),n.capabilities=Ci.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Pp||(wi.FoldingRangeRequest=Pp={}));var Rp;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=Ci.MessageDirection.serverToClient,n.type=new Ci.ProtocolRequestType0(n.method),n.capabilities=Ci.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Rp||(wi.FoldingRangeRefreshRequest=Rp={}))});var Ep=P(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.DeclarationRequest=void 0;var Bu=Ce(),Op;(function(n){n.method="textDocument/declaration",n.messageDirection=Bu.MessageDirection.clientToServer,n.type=new Bu.ProtocolRequestType(n.method),n.capabilities=Bu.CM.create("textDocument.declaration","declarationProvider")})(Op||(vo.DeclarationRequest=Op={}))});var Mp=P(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.SelectionRangeRequest=void 0;var Gu=Ce(),qp;(function(n){n.method="textDocument/selectionRange",n.messageDirection=Gu.MessageDirection.clientToServer,n.type=new Gu.ProtocolRequestType(n.method),n.capabilities=Gu.CM.create("textDocument.selectionRange","selectionRangeProvider")})(qp||(bo.SelectionRangeRequest=qp={}))});var jp=P(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.WorkDoneProgressCancelNotification=yr.WorkDoneProgressCreateRequest=yr.WorkDoneProgress=void 0;var CC=Nn(),ss=Ce(),xp;(function(n){n.type=new CC.ProgressType;function e(t){return t===n.type}n.is=e})(xp||(yr.WorkDoneProgress=xp={}));var Ip;(function(n){n.method="window/workDoneProgress/create",n.messageDirection=ss.MessageDirection.serverToClient,n.type=new ss.ProtocolRequestType(n.method),n.capabilities=ss.CM.create("window.workDoneProgress",void 0)})(Ip||(yr.WorkDoneProgressCreateRequest=Ip={}));var Np;(function(n){n.method="window/workDoneProgress/cancel",n.messageDirection=ss.MessageDirection.clientToServer,n.type=new ss.ProtocolNotificationType(n.method)})(Np||(yr.WorkDoneProgressCancelNotification=Np={}))});var kp=P(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.CallHierarchyOutgoingCallsRequest=vr.CallHierarchyIncomingCallsRequest=vr.CallHierarchyPrepareRequest=void 0;var Fn=Ce(),Fp;(function(n){n.method="textDocument/prepareCallHierarchy",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Fp||(vr.CallHierarchyPrepareRequest=Fp={}));var Lp;(function(n){n.method="callHierarchy/incomingCalls",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Lp||(vr.CallHierarchyIncomingCallsRequest=Lp={}));var Ap;(function(n){n.method="callHierarchy/outgoingCalls",n.messageDirection=Fn.MessageDirection.clientToServer,n.type=new Fn.ProtocolRequestType(n.method),n.capabilities=Fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ap||(vr.CallHierarchyOutgoingCallsRequest=Ap={}))});var Kp=P(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.SemanticTokensRefreshRequest=yt.SemanticTokensRangeRequest=yt.SemanticTokensDeltaRequest=yt.SemanticTokensRequest=yt.SemanticTokensRegistrationType=yt.TokenFormat=void 0;var Pt=Ce(),$p;(function(n){n.Relative="relative"})($p||(yt.TokenFormat=$p={}));var os;(function(n){n.method="textDocument/semanticTokens",n.type=new Pt.RegistrationType(n.method)})(os||(yt.SemanticTokensRegistrationType=os={}));var Hp;(function(n){n.method="textDocument/semanticTokens/full",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Hp||(yt.SemanticTokensRequest=Hp={}));var Up;(function(n){n.method="textDocument/semanticTokens/full/delta",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Up||(yt.SemanticTokensDeltaRequest=Up={}));var Wp;(function(n){n.method="textDocument/semanticTokens/range",n.messageDirection=Pt.MessageDirection.clientToServer,n.type=new Pt.ProtocolRequestType(n.method),n.registrationMethod=os.method,n.capabilities=Pt.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Wp||(yt.SemanticTokensRangeRequest=Wp={}));var zp;(function(n){n.method="workspace/semanticTokens/refresh",n.messageDirection=Pt.MessageDirection.serverToClient,n.type=new Pt.ProtocolRequestType0(n.method),n.capabilities=Pt.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(zp||(yt.SemanticTokensRefreshRequest=zp={}))});var Gp=P(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.ShowDocumentRequest=void 0;var Vu=Ce(),Bp;(function(n){n.method="window/showDocument",n.messageDirection=Vu.MessageDirection.serverToClient,n.type=new Vu.ProtocolRequestType(n.method),n.capabilities=Vu.CM.create("window.showDocument.support",void 0)})(Bp||(Co.ShowDocumentRequest=Bp={}))});var Xp=P(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.LinkedEditingRangeRequest=void 0;var Xu=Ce(),Vp;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=Xu.MessageDirection.clientToServer,n.type=new Xu.ProtocolRequestType(n.method),n.capabilities=Xu.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Vp||(wo.LinkedEditingRangeRequest=Vp={}))});var rg=P(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.WillDeleteFilesRequest=ct.DidDeleteFilesNotification=ct.DidRenameFilesNotification=ct.WillRenameFilesRequest=ct.DidCreateFilesNotification=ct.WillCreateFilesRequest=ct.FileOperationPatternKind=void 0;var Ge=Ce(),Jp;(function(n){n.file="file",n.folder="folder"})(Jp||(ct.FileOperationPatternKind=Jp={}));var Qp;(function(n){n.method="workspace/willCreateFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Qp||(ct.WillCreateFilesRequest=Qp={}));var Yp;(function(n){n.method="workspace/didCreateFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Yp||(ct.DidCreateFilesNotification=Yp={}));var Zp;(function(n){n.method="workspace/willRenameFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Zp||(ct.WillRenameFilesRequest=Zp={}));var eg;(function(n){n.method="workspace/didRenameFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(eg||(ct.DidRenameFilesNotification=eg={}));var tg;(function(n){n.method="workspace/didDeleteFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolNotificationType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(tg||(ct.DidDeleteFilesNotification=tg={}));var ng;(function(n){n.method="workspace/willDeleteFiles",n.messageDirection=Ge.MessageDirection.clientToServer,n.type=new Ge.ProtocolRequestType(n.method),n.capabilities=Ge.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(ng||(ct.WillDeleteFilesRequest=ng={}))});var ag=P(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.MonikerRequest=br.MonikerKind=br.UniquenessLevel=void 0;var Ju=Ce(),ig;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(ig||(br.UniquenessLevel=ig={}));var sg;(function(n){n.$import="import",n.$export="export",n.local="local"})(sg||(br.MonikerKind=sg={}));var og;(function(n){n.method="textDocument/moniker",n.messageDirection=Ju.MessageDirection.clientToServer,n.type=new Ju.ProtocolRequestType(n.method),n.capabilities=Ju.CM.create("textDocument.moniker","monikerProvider")})(og||(br.MonikerRequest=og={}))});var dg=P(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.TypeHierarchySubtypesRequest=Cr.TypeHierarchySupertypesRequest=Cr.TypeHierarchyPrepareRequest=void 0;var Fr=Ce(),cg;(function(n){n.method="textDocument/prepareTypeHierarchy",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method),n.capabilities=Fr.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(cg||(Cr.TypeHierarchyPrepareRequest=cg={}));var ug;(function(n){n.method="typeHierarchy/supertypes",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method)})(ug||(Cr.TypeHierarchySupertypesRequest=ug={}));var lg;(function(n){n.method="typeHierarchy/subtypes",n.messageDirection=Fr.MessageDirection.clientToServer,n.type=new Fr.ProtocolRequestType(n.method)})(lg||(Cr.TypeHierarchySubtypesRequest=lg={}))});var pg=P(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.InlineValueRefreshRequest=Si.InlineValueRequest=void 0;var Di=Ce(),fg;(function(n){n.method="textDocument/inlineValue",n.messageDirection=Di.MessageDirection.clientToServer,n.type=new Di.ProtocolRequestType(n.method),n.capabilities=Di.CM.create("textDocument.inlineValue","inlineValueProvider")})(fg||(Si.InlineValueRequest=fg={}));var hg;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=Di.MessageDirection.serverToClient,n.type=new Di.ProtocolRequestType0(n.method),n.capabilities=Di.CM.create("workspace.inlineValue.refreshSupport",void 0)})(hg||(Si.InlineValueRefreshRequest=hg={}))});var yg=P(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.InlayHintRefreshRequest=wr.InlayHintResolveRequest=wr.InlayHintRequest=void 0;var Ln=Ce(),gg;(function(n){n.method="textDocument/inlayHint",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint","inlayHintProvider")})(gg||(wr.InlayHintRequest=gg={}));var mg;(function(n){n.method="inlayHint/resolve",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(mg||(wr.InlayHintResolveRequest=mg={}));var _g;(function(n){n.method="workspace/inlayHint/refresh",n.messageDirection=Ln.MessageDirection.serverToClient,n.type=new Ln.ProtocolRequestType0(n.method),n.capabilities=Ln.CM.create("workspace.inlayHint.refreshSupport",void 0)})(_g||(wr.InlayHintRefreshRequest=_g={}))});var Pg=P(Ve=>{"use strict";var wC=Ve&&Ve.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),DC=Ve&&Ve.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),SC=Ve&&Ve.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var RC=de&&de.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),TC=de&&de.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),OC=de&&de.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.InlineCompletionRequest=void 0;var Zu=Ce(),Ig;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=Zu.MessageDirection.clientToServer,n.type=new Zu.ProtocolRequestType(n.method),n.capabilities=Zu.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Ig||(So.InlineCompletionRequest=Ig={}))});var Lg=P(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.TextDocumentContentRefreshRequest=Ri.TextDocumentContentRequest=void 0;var cs=Ce(),jg;(function(n){n.method="workspace/textDocumentContent",n.messageDirection=cs.MessageDirection.clientToServer,n.type=new cs.ProtocolRequestType(n.method),n.capabilities=cs.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(jg||(Ri.TextDocumentContentRequest=jg={}));var Fg;(function(n){n.method="workspace/textDocumentContent/refresh",n.messageDirection=cs.MessageDirection.serverToClient,n.type=new cs.ProtocolRequestType(n.method)})(Fg||(Ri.TextDocumentContentRefreshRequest=Fg={}))});var Qm=P(m=>{"use strict";var EC=m&&m.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qC=m&&m.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),MC=m&&m.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}n.hasId=e})(Kg||(m.StaticRegistrationOptions=Kg={}));var Bg;(function(n){function e(t){let r=t;return r&&(r.documentSelector===null||rl.is(r.documentSelector))}n.is=e})(Bg||(m.TextDocumentRegistrationOptions=Bg={}));var Gg;(function(n){function e(r){let i=r;return Xe.objectLiteral(i)&&(i.workDoneProgress===void 0||Xe.boolean(i.workDoneProgress))}n.is=e;function t(r){let i=r;return i&&Xe.boolean(i.workDoneProgress)}n.hasWorkDoneProgress=t})(Gg||(m.WorkDoneProgressOptions=Gg={}));var Vg;(function(n){n.method="initialize",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method)})(Vg||(m.InitializeRequest=Vg={}));var Xg;(function(n){n.unknownProtocolVersion=1})(Xg||(m.InitializeErrorCodes=Xg={}));var Jg;(function(n){n.method="initialized",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method)})(Jg||(m.InitializedNotification=Jg={}));var Qg;(function(n){n.method="shutdown",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType0(n.method)})(Qg||(m.ShutdownRequest=Qg={}));var Yg;(function(n){n.method="exit",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType0(n.method)})(Yg||(m.ExitNotification=Yg={}));var Zg;(function(n){n.method="workspace/didChangeConfiguration",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("workspace.didChangeConfiguration",void 0)})(Zg||(m.DidChangeConfigurationNotification=Zg={}));var em;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4,n.Debug=5})(em||(m.MessageType=em={}));var tm;(function(n){n.method="window/showMessage",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("window.showMessage",void 0)})(tm||(m.ShowMessageNotification=tm={}));var nm;(function(n){n.method="window/showMessageRequest",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("window.showMessage",void 0)})(nm||(m.ShowMessageRequest=nm={}));var rm;(function(n){n.method="window/logMessage",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method)})(rm||(m.LogMessageNotification=rm={}));var im;(function(n){n.method="telemetry/event",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method)})(im||(m.TelemetryEventNotification=im={}));var sm;(function(n){n.None=0,n.Full=1,n.Incremental=2})(sm||(m.TextDocumentSyncKind=sm={}));var om;(function(n){n.method="textDocument/didOpen",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(om||(m.DidOpenTextDocumentNotification=om={}));var am;(function(n){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}n.isIncremental=e;function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}n.isFull=t})(am||(m.TextDocumentContentChangeEvent=am={}));var cm;(function(n){n.method="textDocument/didChange",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync")})(cm||(m.DidChangeTextDocumentNotification=cm={}));var um;(function(n){n.method="textDocument/didClose",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(um||(m.DidCloseTextDocumentNotification=um={}));var lm;(function(n){n.method="textDocument/didSave",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(lm||(m.DidSaveTextDocumentNotification=lm={}));var dm;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(dm||(m.TextDocumentSaveReason=dm={}));var fm;(function(n){n.method="textDocument/willSave",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(fm||(m.WillSaveTextDocumentNotification=fm={}));var hm;(function(n){n.method="textDocument/willSaveWaitUntil",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(hm||(m.WillSaveTextDocumentWaitUntilRequest=hm={}));var pm;(function(n){n.method="workspace/didChangeWatchedFiles",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("workspace.didChangeWatchedFiles",void 0)})(pm||(m.DidChangeWatchedFilesNotification=pm={}));var gm;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(gm||(m.FileChangeType=gm={}));var il;(function(n){function e(t){let r=t;return Xe.objectLiteral(r)&&(Ag.URI.is(r.baseUri)||Ag.WorkspaceFolder.is(r.baseUri))&&Xe.string(r.pattern)}n.is=e})(il||(m.RelativePattern=il={}));var sl;(function(n){function e(t){let r=t;return Xe.string(r)||il.is(r)}n.is=e})(sl||(m.GlobPattern=sl={}));var mm;(function(n){n.Create=1,n.Change=2,n.Delete=4})(mm||(m.WatchKind=mm={}));var _m;(function(n){n.method="textDocument/publishDiagnostics",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolNotificationType(n.method),n.capabilities=O.CM.create("textDocument.publishDiagnostics",void 0)})(_m||(m.PublishDiagnosticsNotification=_m={}));var ym;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(ym||(m.CompletionTriggerKind=ym={}));var vm;(function(n){n.method="textDocument/completion",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.completion","completionProvider")})(vm||(m.CompletionRequest=vm={}));var bm;(function(n){n.method="completionItem/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(bm||(m.CompletionResolveRequest=bm={}));var Cm;(function(n){n.method="textDocument/hover",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.hover","hoverProvider")})(Cm||(m.HoverRequest=Cm={}));var wm;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(wm||(m.SignatureHelpTriggerKind=wm={}));var Dm;(function(n){n.method="textDocument/signatureHelp",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Dm||(m.SignatureHelpRequest=Dm={}));var Sm;(function(n){n.method="textDocument/definition",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.definition","definitionProvider")})(Sm||(m.DefinitionRequest=Sm={}));var Pm;(function(n){n.method="textDocument/references",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.references","referencesProvider")})(Pm||(m.ReferencesRequest=Pm={}));var Rm;(function(n){n.method="textDocument/documentHighlight",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Rm||(m.DocumentHighlightRequest=Rm={}));var Tm;(function(n){n.method="textDocument/documentSymbol",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Tm||(m.DocumentSymbolRequest=Tm={}));var Om;(function(n){n.method="textDocument/codeAction",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeAction","codeActionProvider")})(Om||(m.CodeActionRequest=Om={}));var Em;(function(n){n.method="codeAction/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Em||(m.CodeActionResolveRequest=Em={}));var qm;(function(n){n.method="workspace/symbol",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.symbol","workspaceSymbolProvider")})(qm||(m.WorkspaceSymbolRequest=qm={}));var Mm;(function(n){n.method="workspaceSymbol/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Mm||(m.WorkspaceSymbolResolveRequest=Mm={}));var xm;(function(n){n.method="textDocument/codeLens",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeLens","codeLensProvider")})(xm||(m.CodeLensRequest=xm={}));var Im;(function(n){n.method="codeLens/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Im||(m.CodeLensResolveRequest=Im={}));var Nm;(function(n){n.method="workspace/codeLens/refresh",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType0(n.method),n.capabilities=O.CM.create("workspace.codeLens",void 0)})(Nm||(m.CodeLensRefreshRequest=Nm={}));var jm;(function(n){n.method="textDocument/documentLink",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentLink","documentLinkProvider")})(jm||(m.DocumentLinkRequest=jm={}));var Fm;(function(n){n.method="documentLink/resolve",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Fm||(m.DocumentLinkResolveRequest=Fm={}));var Lm;(function(n){n.method="textDocument/formatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.formatting","documentFormattingProvider")})(Lm||(m.DocumentFormattingRequest=Lm={}));var Am;(function(n){n.method="textDocument/rangeFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Am||(m.DocumentRangeFormattingRequest=Am={}));var km;(function(n){n.method="textDocument/rangesFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(km||(m.DocumentRangesFormattingRequest=km={}));var $m;(function(n){n.method="textDocument/onTypeFormatting",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})($m||(m.DocumentOnTypeFormattingRequest=$m={}));var Hm;(function(n){n.Identifier=1})(Hm||(m.PrepareSupportDefaultBehavior=Hm={}));var Um;(function(n){n.method="textDocument/rename",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rename","renameProvider")})(Um||(m.RenameRequest=Um={}));var Wm;(function(n){n.method="textDocument/prepareRename",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Wm||(m.PrepareRenameRequest=Wm={}));var zm;(function(n){n.method="workspace/executeCommand",n.messageDirection=O.MessageDirection.clientToServer,n.type=new O.ProtocolRequestType(n.method),n.capabilities=O.CM.create("workspace.executeCommand","executeCommandProvider")})(zm||(m.ExecuteCommandRequest=zm={}));var Km;(function(n){n.method="workspace/applyEdit",n.messageDirection=O.MessageDirection.serverToClient,n.type=new O.ProtocolRequestType("workspace/applyEdit"),n.capabilities=O.CM.create("workspace.applyEdit",void 0)})(Km||(m.ApplyWorkspaceEditRequest=Km={}))});var Zm=P(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.createProtocolConnection=$C;var Ym=Nn();function $C(n,e,t,r){return Ym.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Ym.createMessageConnection)(n,e,t,r)}});var V=P(vt=>{"use strict";var HC=vt&&vt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Po=vt&&vt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&HC(e,n,t)};Object.defineProperty(vt,"__esModule",{value:!0});vt.LSPErrorCodes=vt.createProtocolConnection=void 0;Po(Nn(),vt);Po((po(),Hs(ho)),vt);Po(Ce(),vt);Po(Qm(),vt);var UC=Zm();Object.defineProperty(vt,"createProtocolConnection",{enumerable:!0,get:function(){return UC.createProtocolConnection}});var e_;(function(n){n.lspReservedErrorRangeStart=-32899,n.RequestFailed=-32803,n.ServerCancelled=-32802,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(e_||(vt.LSPErrorCodes=e_={}))});var Ro=P(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.Semaphore=Bt.Delayer=void 0;Bt.setTestMode=WC;Bt.clearTestMode=zC;Bt.map=KC;Bt.mapAsync=BC;Bt.forEach=GC;var ds=V(),fl=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(r=>{this.onSuccess=r}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let r=this.task();return this.task=void 0,r})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,ds.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};Bt.Delayer=fl;var hl=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ds.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Bt.Semaphore=hl;var pl=!1;function WC(){pl=!0}function zC(){pl=!1}var t_=15,ls=class{yieldAfter;startTime;counter;total;counterInterval;constructor(e=t_){this.yieldAfter=pl===!0?Math.max(e,2):Math.max(e,t_),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}};async function KC(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new ls(r?.yieldAfter);function o(u){s.start();for(let l=u;l{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function BC(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),s=new ls(r?.yieldAfter);async function o(u){s.start();for(let l=u;l{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(o(a))})});return i}async function GC(n,e,t,r){if(n.length===0)return;let i=new ls(r?.yieldAfter);function s(a){i.start();for(let u=a;u{(0,ds.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?a(-1):a(s(o))})})}});var ml=P(kn=>{"use strict";var VC=kn&&kn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XC=kn&&kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),JC=kn&&kn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var YC=$n&&$n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ZC=$n&&$n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ew=$n&&$n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var nw=Hn&&Hn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),rw=Hn&&Hn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),iw=Hn&&Hn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var ow=Un&&Un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),aw=Un&&Un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),cw=Un&&Un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var lw=At&&At.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),dw=At&&At.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),r_=At&&At.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var hw=Wn&&Wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pw=Wn&&Wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gw=Wn&&Wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var _w=zn&&zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),yw=zn&&zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),vw=zn&&zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Cw=Kn&&Kn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ww=Kn&&Kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Dw=Kn&&Kn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Sw=Bn&&Bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Pw=Bn&&Bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Rw=Bn&&Bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";var Ow=Gt&&Gt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Ew=Gt&&Gt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Oo=Gt&&Gt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;id.toString());function r(d){return t(d)}function i(d){return{uri:t(d.uri)}}function s(d){return{uri:t(d.uri),languageId:d.languageId,version:d.version,text:d.getText()}}function o(d){return{uri:t(d.uri),version:d.version}}function a(d){return{textDocument:s(d)}}function u(d){let D=d;return!!D.document&&!!D.contentChanges}function l(d){let D=d;return!!D.uri&&!!D.version}function f(d,D,$){if(l(d))return{textDocument:{uri:t(d.uri),version:d.version},contentChanges:[{text:d.getText()}]};if(u(d)){let ge=D,ce=$;return{textDocument:{uri:t(ge),version:ce},contentChanges:d.contentChanges.map(mt=>{let Mn=mt.range;return{range:{start:{line:Mn.start.line,character:Mn.start.character},end:{line:Mn.end.line,character:Mn.end.character}},rangeLength:mt.rangeLength,text:mt.text}})}}else throw Error("Unsupported text document change parameter")}function p(d){return{textDocument:i(d)}}function h(d,D=!1){let $={textDocument:i(d)};return D&&($.text=d.getText()),$}function g(d){switch(d){case Fe.TextDocumentSaveReason.Manual:return B.TextDocumentSaveReason.Manual;case Fe.TextDocumentSaveReason.AfterDelay:return B.TextDocumentSaveReason.AfterDelay;case Fe.TextDocumentSaveReason.FocusOut:return B.TextDocumentSaveReason.FocusOut}return B.TextDocumentSaveReason.Manual}function _(d){return{textDocument:i(d.document),reason:g(d.reason)}}function v(d){return{files:d.files.map(D=>({uri:t(D)}))}}function R(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function q(d){return{files:d.files.map(D=>({uri:t(D)}))}}function w(d){return{files:d.files.map(D=>({uri:t(D)}))}}function M(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function j(d){return{files:d.files.map(D=>({uri:t(D)}))}}function F(d,D){return{textDocument:i(d),position:Rn(D)}}function oe(d){switch(d){case Fe.CompletionTriggerKind.TriggerCharacter:return B.CompletionTriggerKind.TriggerCharacter;case Fe.CompletionTriggerKind.TriggerForIncompleteCompletions:return B.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return B.CompletionTriggerKind.Invoked}}function te(d,D,$){return{textDocument:i(d),position:Rn(D),context:{triggerKind:oe($.triggerKind),triggerCharacter:$.triggerCharacter}}}function Te(d){switch(d){case Fe.SignatureHelpTriggerKind.Invoke:return B.SignatureHelpTriggerKind.Invoked;case Fe.SignatureHelpTriggerKind.TriggerCharacter:return B.SignatureHelpTriggerKind.TriggerCharacter;case Fe.SignatureHelpTriggerKind.ContentChange:return B.SignatureHelpTriggerKind.ContentChange}}function Pn(d){return{label:d.label}}function Qr(d){return d.map(Pn)}function rr(d){return{label:d.label,parameters:Qr(d.parameters)}}function Yr(d){return d.map(rr)}function Zr(d){return d===void 0?d:{signatures:Yr(d.signatures),activeSignature:d.activeSignature,activeParameter:d.activeParameter}}function Mt(d,D,$){return{textDocument:i(d),position:Rn(D),context:{isRetrigger:$.isRetrigger,triggerCharacter:$.triggerCharacter,triggerKind:Te($.triggerKind),activeSignatureHelp:Zr($.activeSignatureHelp)}}}function Rn(d){return{line:d.line,character:d.character}}function xt(d){return d==null?d:{line:d.line>B.uinteger.MAX_VALUE?B.uinteger.MAX_VALUE:d.line,character:d.character>B.uinteger.MAX_VALUE?B.uinteger.MAX_VALUE:d.character}}function Tn(d,D){return i_.map(d,xt,D)}function Ht(d){return d.map(xt)}function Oe(d){return d==null?d:{start:xt(d.start),end:xt(d.end)}}function Ui(d){return d.map(Oe)}function Zt(d){return d==null?d:B.Location.create(r(d.uri),Oe(d.range))}function ir(d){switch(d){case Fe.DiagnosticSeverity.Error:return B.DiagnosticSeverity.Error;case Fe.DiagnosticSeverity.Warning:return B.DiagnosticSeverity.Warning;case Fe.DiagnosticSeverity.Information:return B.DiagnosticSeverity.Information;case Fe.DiagnosticSeverity.Hint:return B.DiagnosticSeverity.Hint}}function ei(d){if(!d)return;let D=[];for(let $ of d){let ge=Mr($);ge!==void 0&&D.push(ge)}return D.length>0?D:void 0}function Mr(d){switch(d){case Fe.DiagnosticTag.Unnecessary:return B.DiagnosticTag.Unnecessary;case Fe.DiagnosticTag.Deprecated:return B.DiagnosticTag.Deprecated;default:return}}function en(d){return{message:d.message,location:Zt(d.location)}}function xr(d){return d.map(en)}function ti(d){if(d!=null)return Ar.number(d)||Ar.string(d)?d:{value:d.value,target:r(d.target)}}function sr(d){let D=B.Diagnostic.create(Oe(d.range),d.message),$=d instanceof o_.ProtocolDiagnostic?d:void 0;$!==void 0&&$.data!==void 0&&(D.data=$.data);let ge=ti(d.code);return o_.DiagnosticCode.is(ge)?$!==void 0&&$.hasDiagnosticCode?D.code=ge:(D.code=ge.value,D.codeDescription={href:ge.target}):D.code=ge,Ar.number(d.severity)&&(D.severity=ir(d.severity)),Array.isArray(d.tags)&&(D.tags=ei(d.tags)),d.relatedInformation&&(D.relatedInformation=xr(d.relatedInformation)),d.source&&(D.source=d.source),D}function or(d,D){return d==null?d:i_.map(d,sr,D)}function ar(d){return d==null?d:d.map(sr)}function Wi(d,D){switch(d){case"$string":return D;case B.MarkupKind.PlainText:return{kind:d,value:D};case B.MarkupKind.Markdown:return{kind:d,value:D.value};default:return`Unsupported Markup content received. Kind is: ${d}`}}function ni(d){if(d===Fe.CompletionItemTag.Deprecated)return B.CompletionItemTag.Deprecated}function wt(d){if(d===void 0)return d;let D=[];for(let $ of d){let ge=ni($);ge!==void 0&&D.push(ge)}return D}function zi(d,D){return D!==void 0?D:d+1}function tn(d,D=!1){let $,ge;Ar.string(d.label)?$=d.label:($=d.label.label,D&&(d.label.detail!==void 0||d.label.description!==void 0)&&(ge={detail:d.label.detail,description:d.label.description}));let ce={label:$};ge!==void 0&&(ce.labelDetails=ge);let Ze=d instanceof qw.default?d:void 0;d.detail&&(ce.detail=d.detail),d.documentation&&(!Ze||Ze.documentationFormat==="$string"?ce.documentation=d.documentation:ce.documentation=Wi(Ze.documentationFormat,d.documentation)),d.filterText&&(ce.filterText=d.filterText),cr(ce,d),Ar.number(d.kind)&&(ce.kind=zi(d.kind,Ze&&Ze.originalItemKind)),d.sortText&&(ce.sortText=d.sortText),d.additionalTextEdits&&(ce.additionalTextEdits=ri(d.additionalTextEdits)),d.commitCharacters&&(ce.commitCharacters=d.commitCharacters.slice()),d.command&&(ce.command=ae(d.command)),(d.preselect===!0||d.preselect===!1)&&(ce.preselect=d.preselect);let mt=wt(d.tags);if(Ze){if(Ze.data!==void 0&&(ce.data=Ze.data),Ze.deprecated===!0||Ze.deprecated===!1){if(Ze.deprecated===!0&&mt!==void 0&&mt.length>0){let Mn=mt.indexOf(Fe.CompletionItemTag.Deprecated);Mn!==-1&&mt.splice(Mn,1)}ce.deprecated=Ze.deprecated}Ze.insertTextMode!==void 0&&(ce.insertTextMode=Ze.insertTextMode)}return mt!==void 0&&mt.length>0&&(ce.tags=mt),ce.insertTextMode===void 0&&d.keepWhitespace===!0&&(ce.insertTextMode=B.InsertTextMode.adjustIndentation),ce}function cr(d,D){let $=B.InsertTextFormat.PlainText,ge,ce;D.textEdit?(ge=D.textEdit.newText,ce=D.textEdit.range):D.insertText instanceof Fe.SnippetString?($=B.InsertTextFormat.Snippet,ge=D.insertText.value):ge=D.insertText,D.range&&(ce=D.range),d.insertTextFormat=$,D.fromEdit&&ge!==void 0&&ce!==void 0?d.textEdit=ur(ge,ce):d.insertText=ge}function ur(d,D){return Nl.is(D)?B.InsertReplaceEdit.create(d,Oe(D.inserting),Oe(D.replacing)):{newText:d,range:Oe(D)}}function On(d){return{range:Oe(d.range),newText:d.newText}}function ri(d){return d==null?d:d.map(On)}function tt(d){return d<=Fe.SymbolKind.TypeParameter?d+1:B.SymbolKind.Property}function Ut(d){return d}function nt(d){return d.map(Ut)}function Ki(d,D,$){return{textDocument:i(d),position:Rn(D),context:{includeDeclaration:$.includeDeclaration}}}async function Ye(d,D){let $=B.CodeAction.create(d.title);if(d instanceof s_.default&&d.data!==void 0&&($.data=d.data),d.kind!==void 0&&($.kind=It(d.kind)),d.diagnostics!==void 0&&($.diagnostics=await or(d.diagnostics,D)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&($.command=ae(d.command)),d.isPreferred!==void 0&&($.isPreferred=d.isPreferred),d.disabled!==void 0&&($.disabled={reason:d.disabled.reason}),d.isAI&&($.tags??=[],$.tags.push(B.CodeActionTag.LLMGenerated)),$}function En(d){let D=B.CodeAction.create(d.title);if(d instanceof s_.default&&d.data!==void 0&&(D.data=d.data),d.kind!==void 0&&(D.kind=It(d.kind)),d.diagnostics!==void 0&&(D.diagnostics=ar(d.diagnostics)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(D.command=ae(d.command)),d.isPreferred!==void 0&&(D.isPreferred=d.isPreferred),d.disabled!==void 0&&(D.disabled={reason:d.disabled.reason}),d.isAI&&(D.tags??=[],D.tags.push(B.CodeActionTag.LLMGenerated)),D}async function ii(d,D){if(d==null)return d;let $;return d.only&&Ar.string(d.only.value)&&($=[d.only.value]),B.CodeActionContext.create(await or(d.diagnostics,D),$,lr(d.triggerKind))}function Ir(d){if(d==null)return d;let D;return d.only&&Ar.string(d.only.value)&&(D=[d.only.value]),B.CodeActionContext.create(ar(d.diagnostics),D,lr(d.triggerKind))}function lr(d){switch(d){case Fe.CodeActionTriggerKind.Invoke:return B.CodeActionTriggerKind.Invoked;case Fe.CodeActionTriggerKind.Automatic:return B.CodeActionTriggerKind.Automatic;default:return}}function It(d){if(d!=null)return d.value}function y(d){return B.InlineValueContext.create(d.frameId,Oe(d.stoppedLocation))}function E(d,D,$){return{textDocument:i(d),position:xt(D),context:I($)}}function I(d){return{triggerKind:H(d.triggerKind),selectedCompletionInfo:Z(d.selectedCompletionInfo)}}function H(d){switch(d){case Fe.InlineCompletionTriggerKind.Invoke:return B.InlineCompletionTriggerKind.Invoked;case Fe.InlineCompletionTriggerKind.Automatic:return B.InlineCompletionTriggerKind.Automatic}}function Z(d){if(d!=null)return{range:Oe(d.range),text:d.text}}function ae(d){let D=B.Command.create(d.title,d.command);return d.tooltip&&(D.tooltip=d.tooltip),d.arguments&&(D.arguments=d.arguments),D}function ie(d){let D=B.CodeLens.create(Oe(d.range));return d.command&&(D.command=ae(d.command)),d instanceof Mw.default&&d.data&&(D.data=d.data),D}function Ee(d,D){let $={tabSize:d.tabSize,insertSpaces:d.insertSpaces};return D.trimTrailingWhitespace&&($.trimTrailingWhitespace=!0),D.trimFinalNewlines&&($.trimFinalNewlines=!0),D.insertFinalNewline&&($.insertFinalNewline=!0),$}function ke(d){return{textDocument:i(d)}}function pe(d){return{textDocument:i(d)}}function ye(d){let D=B.DocumentLink.create(Oe(d.range));d.target&&(D.target=r(d.target)),d.tooltip!==void 0&&(D.tooltip=d.tooltip);let $=d instanceof xw.default?d:void 0;return $&&$.data&&(D.data=$.data),D}function rt(d){return{textDocument:i(d)}}function pt(d){let D={name:d.name,kind:tt(d.kind),uri:r(d.uri),range:Oe(d.range),selectionRange:Oe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=nt(d.tags)),d instanceof Iw.default&&d.data!==void 0&&(D.data=d.data),D}function qn(d){let D={name:d.name,kind:tt(d.kind),uri:r(d.uri),range:Oe(d.range),selectionRange:Oe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=nt(d.tags)),d instanceof Nw.default&&d.data!==void 0&&(D.data=d.data),D}function Dt(d){let D=d instanceof jw.default?{name:d.name,kind:tt(d.kind),location:d.hasRange?Zt(d.location):{uri:t(d.location.uri)},data:d.data}:{name:d.name,kind:tt(d.kind),location:Zt(d.location)};return d.tags!==void 0&&(D.tags=nt(d.tags)),d.containerName!==""&&(D.containerName=d.containerName),D}function gt(d){let D=typeof d.label=="string"?d.label:d.label.map(si),$=B.InlayHint.create(xt(d.position),D);return d.kind!==void 0&&($.kind=d.kind),d.textEdits!==void 0&&($.textEdits=ri(d.textEdits)),d.tooltip!==void 0&&($.tooltip=ks(d.tooltip)),d.paddingLeft!==void 0&&($.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&($.paddingRight=d.paddingRight),d instanceof Fw.default&&d.data!==void 0&&($.data=d.data),$}function si(d){let D=B.InlayHintLabelPart.create(d.value);return d.location!==void 0&&(D.location=Zt(d.location)),d.command!==void 0&&(D.command=ae(d.command)),d.tooltip!==void 0&&(D.tooltip=ks(d.tooltip)),D}function ks(d){return typeof d=="string"?d:{kind:B.MarkupKind.Markdown,value:d.value}}return{asUri:r,asTextDocumentIdentifier:i,asTextDocumentItem:s,asVersionedTextDocumentIdentifier:o,asOpenTextDocumentParams:a,asChangeTextDocumentParams:f,asCloseTextDocumentParams:p,asSaveTextDocumentParams:h,asWillSaveTextDocumentParams:_,asDidCreateFilesParams:v,asDidRenameFilesParams:R,asDidDeleteFilesParams:q,asWillCreateFilesParams:w,asWillRenameFilesParams:M,asWillDeleteFilesParams:j,asTextDocumentPositionParams:F,asCompletionParams:te,asSignatureHelpParams:Mt,asWorkerPosition:Rn,asRange:Oe,asRanges:Ui,asPosition:xt,asPositions:Tn,asPositionsSync:Ht,asLocation:Zt,asDiagnosticSeverity:ir,asDiagnosticTag:Mr,asDiagnostic:sr,asDiagnostics:or,asDiagnosticsSync:ar,asCompletionItem:tn,asTextEdit:On,asSymbolKind:tt,asSymbolTag:Ut,asSymbolTags:nt,asReferenceParams:Ki,asCodeAction:Ye,asCodeActionSync:En,asCodeActionContext:ii,asCodeActionContextSync:Ir,asInlineValueContext:y,asCommand:ae,asCodeLens:ie,asFormattingOptions:Ee,asDocumentSymbolParams:ke,asCodeLensParams:pe,asDocumentLink:ye,asDocumentLinkParams:rt,asCallHierarchyItem:pt,asTypeHierarchyItem:qn,asInlayHint:gt,asWorkspaceSymbol:Dt,asInlineCompletionParams:E,asInlineCompletionContext:I}}});var l_=P(Vt=>{"use strict";var Aw=Vt&&Vt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kw=Vt&&Vt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qo=Vt&&Vt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;iN.Uri.parse(c));function o(c){return s(c)}function a(c){let b=[];for(let T of c)if(typeof T=="string")b.push(T);else if(u_.NotebookCellTextDocumentFilter.is(T))if(typeof T.notebook=="string")b.push({notebookType:T.notebook,language:T.language});else{let L=T.notebook.notebookType??"*";b.push({notebookType:L,scheme:T.notebook.scheme,pattern:Ra(T.notebook.pattern),language:T.language})}else u_.TextDocumentFilter.is(T)&&b.push({language:T.language,scheme:T.scheme,pattern:Ra(T.pattern)});return b}async function u(c,b){return se.map(c,f,b)}function l(c){let b=new Array(c.length);for(let T=0;T0?b:void 0}function g(c){switch(c){case z.DiagnosticTag.Unnecessary:return N.DiagnosticTag.Unnecessary;case z.DiagnosticTag.Deprecated:return N.DiagnosticTag.Deprecated;default:return}}function _(c){return c?new N.Position(c.line,c.character):void 0}function v(c){return c?new N.Range(c.start.line,c.start.character,c.end.line,c.end.character):void 0}async function R(c,b){return se.map(c,T=>new N.Range(T.start.line,T.start.character,T.end.line,T.end.character),b)}function q(c){if(c==null)return N.DiagnosticSeverity.Error;switch(c){case z.DiagnosticSeverity.Error:return N.DiagnosticSeverity.Error;case z.DiagnosticSeverity.Warning:return N.DiagnosticSeverity.Warning;case z.DiagnosticSeverity.Information:return N.DiagnosticSeverity.Information;case z.DiagnosticSeverity.Hint:return N.DiagnosticSeverity.Hint}return N.DiagnosticSeverity.Error}function w(c){if(Rt.string(c))return j(c);if(Eo.is(c))return j().appendCodeblock(c.value,c.language);if(Array.isArray(c)){let b=[];for(let T of c){let L=j();Eo.is(T)?L.appendCodeblock(T.value,T.language):L.appendMarkdown(T),b.push(L)}return b}else return j(c)}function M(c){if(Rt.string(c))return c;switch(c.kind){case z.MarkupKind.Markdown:return j(c.value);case z.MarkupKind.PlainText:return c.value;default:return`Unsupported Markup content received. Kind is: ${c.kind}`}}function j(c){let b;if(c===void 0||typeof c=="string")b=new N.MarkdownString(c);else switch(c.kind){case z.MarkupKind.Markdown:b=new N.MarkdownString(c.value);break;case z.MarkupKind.PlainText:b=new N.MarkdownString,b.appendText(c.value);break;default:b=new N.MarkdownString,b.appendText(`Unsupported Markup content received. Kind is: ${c.kind}`);break}return b.isTrusted=e,b.supportHtml=t,b.supportThemeIcons=r,b}function F(c){if(c)return new N.Hover(w(c.contents),v(c.range))}async function oe(c,b,T){if(!c)return;if(Array.isArray(c))return se.map(c,xn=>rr(xn,b),T);let L=c,{defaultRange:qe,commitCharacters:Le}=te(L,b),me=await se.map(L.items,xn=>rr(xn,Le,L.applyKind?.commitCharacters,qe,L.itemDefaults?.insertTextMode,L.itemDefaults?.insertTextFormat,L.itemDefaults?.data,L.applyKind?.data),T);return new N.CompletionList(me,L.isIncomplete)}function te(c,b){let T=c.itemDefaults?.editRange,L=c.itemDefaults?.commitCharacters??b;return z.Range.is(T)?{defaultRange:v(T),commitCharacters:L}:T!==void 0?{defaultRange:{inserting:v(T.insert),replacing:v(T.replace)},commitCharacters:L}:{defaultRange:void 0,commitCharacters:L}}function Te(c){return z.CompletionItemKind.Text<=c&&c<=z.CompletionItemKind.TypeParameter?[c-1,void 0]:[N.CompletionItemKind.Text,c]}function Pn(c){if(c===z.CompletionItemTag.Deprecated)return N.CompletionItemTag.Deprecated}function Qr(c){if(c==null)return[];let b=[];for(let T of c){let L=Pn(T);L!==void 0&&b.push(L)}return b}function rr(c,b,T,L,qe,Le,me,xn){let dr=Qr(c.tags),Nt=Mt(c),$e=new $w.default(Nt);c.detail&&($e.detail=c.detail),c.documentation&&($e.documentation=M(c.documentation),$e.documentationFormat=Rt.string(c.documentation)?"$string":c.documentation.kind),c.filterText&&($e.filterText=c.filterText);let $s=Rn(c,L,Le);if($s&&($e.insertText=$s.text,$e.range=$s.range,$e.fromEdit=$s.fromEdit),Rt.number(c.kind)){let[hb,Nh]=Te(c.kind);$e.kind=hb,Nh&&($e.originalItemKind=Nh)}c.sortText&&($e.sortText=c.sortText),c.additionalTextEdits&&($e.additionalTextEdits=Oe(c.additionalTextEdits));let xh=Yr(c,b,T);xh&&($e.commitCharacters=xh.slice()),c.command&&($e.command=nt(c.command)),(c.deprecated===!0||c.deprecated===!1)&&($e.deprecated=c.deprecated,c.deprecated===!0&&dr.push(N.CompletionItemTag.Deprecated)),(c.preselect===!0||c.preselect===!1)&&($e.preselect=c.preselect);let Ih=Zr(c,me,xn);Ih!==void 0&&($e.data=Ih),dr.length>0&&($e.tags=dr);let Oa=c.insertTextMode??qe;return Oa!==void 0&&($e.insertTextMode=Oa,Oa===z.InsertTextMode.asIs&&($e.keepWhitespace=!0)),$e}function Yr(c,b,T){if(T===z.ApplyKind.Merge){if(!b&&!c.commitCharacters)return;let L=new Set;if(b)for(let qe of b)L.add(qe);if(Rt.stringArray(c.commitCharacters))for(let qe of c.commitCharacters)L.add(qe);return Array.from(L)}return c.commitCharacters!==void 0?Rt.stringArray(c.commitCharacters)?c.commitCharacters:void 0:b}function Zr(c,b,T){if(T===z.ApplyKind.Merge){let L={...b};return c.data&&Object.entries(c.data).forEach(([qe,Le])=>{Le!=null&&(L[qe]=Le)}),L}return c.data??b}function Mt(c){return z.CompletionItemLabelDetails.is(c.labelDetails)?{label:c.label,detail:c.labelDetails.detail,description:c.labelDetails.description}:c.label}function Rn(c,b,T){let L=c.insertTextFormat??T;if(c.textEdit!==void 0||b!==void 0){let[qe,Le]=c.textEdit!==void 0?xt(c.textEdit):[b,c.textEditText??c.label];return L===z.InsertTextFormat.Snippet?{text:new N.SnippetString(Le),range:qe,fromEdit:!0}:{text:Le,range:qe,fromEdit:!0}}else return c.insertText?L===z.InsertTextFormat.Snippet?{text:new N.SnippetString(c.insertText),fromEdit:!1}:{text:c.insertText,fromEdit:!1}:void 0}function xt(c){return z.InsertReplaceEdit.is(c)?[{inserting:v(c.insert),replacing:v(c.replace)},c.newText]:[v(c.range),c.newText]}function Tn(c){if(c)return new N.TextEdit(v(c.range),c.newText)}async function Ht(c,b){if(c)return se.map(c,Tn,b)}function Oe(c){if(!c)return;let b=new Array(c.length);for(let T=0;T0){let T=[];for(let L of c.children)T.push(tt(L));b.children=T}return b}function Ut(c,b){c.tags=ur(b.tags),b.deprecated&&(c.tags?c.tags.includes(N.SymbolTag.Deprecated)||(c.tags=c.tags.concat(N.SymbolTag.Deprecated)):c.tags=[N.SymbolTag.Deprecated])}function nt(c){let b={title:c.title,command:c.command};return c.tooltip&&(b.tooltip=c.tooltip),c.arguments&&(b.arguments=c.arguments),b}async function Ki(c,b){if(c)return se.map(c,nt,b)}let Ye=new Map;Ye.set(z.CodeActionKind.Empty,N.CodeActionKind.Empty),Ye.set(z.CodeActionKind.QuickFix,N.CodeActionKind.QuickFix),Ye.set(z.CodeActionKind.Refactor,N.CodeActionKind.Refactor),Ye.set(z.CodeActionKind.RefactorExtract,N.CodeActionKind.RefactorExtract),Ye.set(z.CodeActionKind.RefactorInline,N.CodeActionKind.RefactorInline),Ye.set(z.CodeActionKind.RefactorRewrite,N.CodeActionKind.RefactorRewrite),Ye.set(z.CodeActionKind.Source,N.CodeActionKind.Source),Ye.set(z.CodeActionKind.SourceOrganizeImports,N.CodeActionKind.SourceOrganizeImports);function En(c){if(c==null)return;let b=Ye.get(c);if(b)return b;let T=c.split(".");b=N.CodeActionKind.Empty;for(let L of T)b=b.append(L);return b}function ii(c){if(c!=null)return c.map(b=>En(b))}function Ir(c){if(c!=null)return c.map(b=>({kind:En(b.kind),command:nt(b.command)}))}async function lr(c,b){if(c==null)return;let T=new Ww.default(c.title,c.data);return c.kind!==void 0&&(T.kind=En(c.kind)),c.diagnostics!==void 0&&(T.diagnostics=l(c.diagnostics)),c.edit!==void 0&&(T.edit=await I(c.edit,b)),c.command!==void 0&&(T.command=nt(c.command)),c.isPreferred!==void 0&&(T.isPreferred=c.isPreferred),c.disabled!==void 0&&(T.disabled={reason:c.disabled.reason}),c.tags?.includes(z.CodeActionTag.LLMGenerated)&&(T.isAI=!0),T}function It(c,b){return se.mapAsync(c,async T=>z.Command.is(T)?nt(T):lr(T,b),b)}function y(c){if(!c)return;let b=new Hw.default(v(c.range));return c.command&&(b.command=nt(c.command)),c.data!==void 0&&c.data!==null&&(b.data=c.data),b}async function E(c,b){if(c)return se.map(c,y,b)}async function I(c,b){if(!c)return;let T=new Map;if(c.changeAnnotations!==void 0){let Le=c.changeAnnotations;await se.forEach(Object.keys(Le),me=>{let xn=H(Le[me]);T.set(me,xn)},b)}let L=Le=>{if(Le!==void 0)return T.get(Le)},qe=new N.WorkspaceEdit;if(c.documentChanges){let Le=c.documentChanges;await se.forEach(Le,me=>{if(z.CreateFile.is(me))qe.createFile(s(me.uri),me.options,L(me.annotationId));else if(z.RenameFile.is(me))qe.renameFile(s(me.oldUri),s(me.newUri),me.options,L(me.annotationId));else if(z.DeleteFile.is(me))qe.deleteFile(s(me.uri),me.options,L(me.annotationId));else if(z.TextDocumentEdit.is(me)){let xn=s(me.textDocument.uri),dr=[];for(let Nt of me.edits)z.AnnotatedTextEdit.is(Nt)?dr.push([new N.TextEdit(v(Nt.range),Nt.newText),L(Nt.annotationId)]):z.SnippetTextEdit.is(Nt)?dr.push([new N.SnippetTextEdit(v(Nt.range),new N.SnippetString(Nt.snippet.value)),L(Nt.annotationId)]):dr.push([new N.TextEdit(v(Nt.range),Nt.newText),void 0]);qe.set(xn,dr)}else throw new Error(`Unknown workspace edit change received: +${JSON.stringify(me,void 0,4)}`)},b)}else if(c.changes){let Le=c.changes;await se.forEach(Object.keys(Le),me=>{qe.set(s(me),Oe(Le[me]))},b)}return qe}function H(c){if(c!==void 0)return{label:c.label,needsConfirmation:!!c.needsConfirmation,description:c.description}}function Z(c){let b=v(c.range),T=c.target?o(c.target):void 0,L=new Uw.default(b,T);return c.tooltip!==void 0&&(L.tooltip=c.tooltip),c.data!==void 0&&c.data!==null&&(L.data=c.data),L}async function ae(c,b){if(c)return se.map(c,Z,b)}function ie(c){return new N.Color(c.red,c.green,c.blue,c.alpha)}function Ee(c){return new N.ColorInformation(v(c.range),ie(c.color))}async function ke(c,b){if(c)return se.map(c,Ee,b)}function pe(c){let b=new N.ColorPresentation(c.label);return b.additionalTextEdits=Oe(c.additionalTextEdits),c.textEdit&&(b.textEdit=Tn(c.textEdit)),b}async function ye(c,b){if(c)return se.map(c,pe,b)}function rt(c){if(c)switch(c){case z.FoldingRangeKind.Comment:return N.FoldingRangeKind.Comment;case z.FoldingRangeKind.Imports:return N.FoldingRangeKind.Imports;case z.FoldingRangeKind.Region:return N.FoldingRangeKind.Region}}function pt(c){return new N.FoldingRange(c.startLine,c.endLine,rt(c.kind))}async function qn(c,b){if(c)return se.map(c,pt,b)}function Dt(c){return new N.SelectionRange(v(c.range),c.parent?Dt(c.parent):void 0)}async function gt(c,b){return Array.isArray(c)?se.map(c,Dt,b):[]}function si(c){return z.InlineValueText.is(c)?new N.InlineValueText(v(c.range),c.text):z.InlineValueVariableLookup.is(c)?new N.InlineValueVariableLookup(v(c.range),c.variableName,c.caseSensitiveLookup):new N.InlineValueEvaluatableExpression(v(c.range),c.expression)}async function ks(c,b){return Array.isArray(c)?se.map(c,si,b):[]}async function d(c,b){let T=typeof c.label=="string"?c.label:await se.map(c.label,D,b),L=new Gw.default(_(c.position),T);return c.kind!==void 0&&(L.kind=c.kind),c.textEdits!==void 0&&(L.textEdits=await Ht(c.textEdits,b)),c.tooltip!==void 0&&(L.tooltip=$(c.tooltip)),c.paddingLeft!==void 0&&(L.paddingLeft=c.paddingLeft),c.paddingRight!==void 0&&(L.paddingRight=c.paddingRight),c.data!==void 0&&(L.data=c.data),L}function D(c){let b=new N.InlayHintLabelPart(c.value);return c.location!==void 0&&(b.location=en(c.location)),c.tooltip!==void 0&&(b.tooltip=$(c.tooltip)),c.command!==void 0&&(b.command=nt(c.command)),b}function $(c){return typeof c=="string"?c:j(c)}async function ge(c,b){if(Array.isArray(c))return se.mapAsync(c,d,b)}function ce(c){if(c===null)return;let b=new zw.default(tn(c.kind),c.name,c.detail||"",o(c.uri),v(c.range),v(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=ur(c.tags)),b}async function Ze(c,b){if(c!==null)return se.map(c,ce,b)}async function mt(c,b){return new N.CallHierarchyIncomingCall(ce(c.from),await R(c.fromRanges,b))}async function Mn(c,b){if(c!==null)return se.mapAsync(c,mt,b)}async function Eh(c,b){return new N.CallHierarchyOutgoingCall(ce(c.to),await R(c.fromRanges,b))}async function sb(c,b){if(c!==null)return se.mapAsync(c,Eh,b)}async function ob(c,b){if(c!=null)return new N.SemanticTokens(new Uint32Array(c.data),c.resultId)}function qh(c){return new N.SemanticTokensEdit(c.start,c.deleteCount,c.data!==void 0?new Uint32Array(c.data):void 0)}async function ab(c,b){if(c!=null)return new N.SemanticTokensEdits(c.edits.map(qh),c.resultId)}function cb(c){return c}async function ub(c,b){if(c!=null)return new N.LinkedEditingRanges(await R(c.ranges,b),lb(c.wordPattern))}function lb(c){if(c!=null)return new RegExp(c)}function Mh(c){if(c===null)return;let b=new Kw.default(tn(c.kind),c.name,c.detail||"",o(c.uri),v(c.range),v(c.selectionRange),c.data);return c.tags!==void 0&&(b.tags=ur(c.tags)),b}async function db(c,b){if(c!==null)return se.map(c,Mh,b)}function Ra(c){if(Rt.string(c))return c;if(z.RelativePattern.is(c)){if(z.URI.is(c.baseUri))return new N.RelativePattern(o(c.baseUri),c.pattern);if(z.WorkspaceFolder.is(c.baseUri)){let b=N.workspace.getWorkspaceFolder(o(c.baseUri.uri));return b!==void 0?new N.RelativePattern(b,c.pattern):void 0}}}async function fb(c,b){if(!c)return;if(Array.isArray(c))return se.map(c,qe=>Ta(qe),b);let T=c,L=await se.map(T.items,qe=>Ta(qe),b);return new N.InlineCompletionList(L)}function Ta(c){let b;typeof c.insertText=="string"?b=c.insertText:b=new N.SnippetString(c.insertText.value);let T;c.command&&(T=nt(c.command));let L=new N.InlineCompletionItem(b,v(c.range),T);return c.filterText&&(L.filterText=c.filterText),L}return{asUri:o,asDocumentSelector:a,asDiagnostics:u,asDiagnostic:f,asRange:v,asRanges:R,asPosition:_,asDiagnosticSeverity:q,asDiagnosticTag:g,asHover:F,asCompletionResult:oe,asCompletionItem:rr,asTextEdit:Tn,asTextEdits:Ht,asSignatureHelp:Ui,asSignatureInformations:Zt,asSignatureInformation:ir,asParameterInformations:ei,asParameterInformation:Mr,asDeclarationResult:xr,asDefinitionResult:ti,asLocation:en,asReferences:ar,asDocumentHighlights:Wi,asDocumentHighlight:ni,asDocumentHighlightKind:wt,asSymbolKind:tn,asSymbolTag:cr,asSymbolTags:ur,asSymbolInformations:zi,asSymbolInformation:On,asDocumentSymbols:ri,asDocumentSymbol:tt,asCommand:nt,asCommands:Ki,asCodeAction:lr,asCodeActionKind:En,asCodeActionKinds:ii,asCodeActionDocumentations:Ir,asCodeActionResult:It,asCodeLens:y,asCodeLenses:E,asWorkspaceEdit:I,asDocumentLink:Z,asDocumentLinks:ae,asFoldingRangeKind:rt,asFoldingRange:pt,asFoldingRanges:qn,asColor:ie,asColorInformation:Ee,asColorInformations:ke,asColorPresentation:pe,asColorPresentations:ye,asSelectionRange:Dt,asSelectionRanges:gt,asInlineValue:si,asInlineValues:ks,asInlayHint:d,asInlayHints:ge,asSemanticTokensLegend:cb,asSemanticTokens:ob,asSemanticTokensEdit:qh,asSemanticTokensEdits:ab,asCallHierarchyItem:ce,asCallHierarchyItems:Ze,asCallHierarchyIncomingCall:mt,asCallHierarchyIncomingCalls:Mn,asCallHierarchyOutgoingCall:Eh,asCallHierarchyOutgoingCalls:sb,asLinkedEditingRanges:ub,asTypeHierarchyItem:Mh,asTypeHierarchyItems:db,asGlobPattern:Ra,asInlineCompletionResult:fb,asInlineCompletionItem:Ta}}});var we=P(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.empty=void 0;Pr.v4=d_;Pr.isUUID=f_;Pr.parse=Jw;Pr.generateUuid=Qw;var fs=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},jl=class n extends fs{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}};Pr.empty=new fs("00000000-0000-0000-0000-000000000000");function d_(){return new jl}var Xw=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function f_(n){return Xw.test(n)}function Jw(n){if(!f_(n))throw new Error("invalid uuid");return new fs(n)}function Qw(){return d_().asHex()}});var Ll=P(on=>{"use strict";var Yw=on&&on.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Zw=on&&on.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),eD=on&&on.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{switch(i.kind){case"begin":this.begin(i);break;case"report":this.report(i);break;case"end":this.done(),r&&r(this);break}})}begin(e){this._infinite=e.percentage===void 0,this._lspProgressDisposable!==void 0&&h_.window.withProgress({location:h_.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(t,r)=>{if(this._lspProgressDisposable!==void 0)return this._progress=t,this._cancellationToken=r,this._tokenDisposable=this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(p_.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((i,s)=>{this._resolve=i,this._reject=s})})}report(e){if(this._infinite&&g_.string(e.message))this._progress!==void 0&&this._progress.report({message:e.message});else if(g_.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),r=Math.max(0,t-this._reported);this._reported+=r,this._progress!==void 0&&this._progress.report({message:e.message,increment:r})}}cancel(){this.cleanup(),this._reject!==void 0&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),this._resolve!==void 0&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){this._lspProgressDisposable!==void 0&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),this._tokenDisposable!==void 0&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}};on.ProgressPart=Fl});var ne=P(_e=>{"use strict";var tD=_e&&_e.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),nD=_e&&_e.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),b_=_e&&_e.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}let r=t>0;return{kind:"document",id:this.registrationType.method,registrations:r,matches:!1}}};_e.DynamicDocumentFeature=hs;var $l=class extends hs{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onAboutToSendNotification;_onNotificationSent;static textDocumentFilter(e,t){for(let r of e)if(Xt.languages.match(r,t)>0)return!0;return!1}constructor(e,t,r,i,s,o,a){super(e),this._event=t,this._type=r,this._middleware=i,this._createParams=s,this._textDocument=o,this._selectorFilter=a,this._selectors=new Map,this._onAboutToSendNotification=new Xt.EventEmitter,this._onNotificationSent=new Xt.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(t=>{this.callback(t).catch(r=>{this._client.error(`Sending document notification ${this._type.method} failed.`,r)})})),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){let t=async r=>{let i=this.getTextDocument(r),s=this._createParams(r);this.aboutToSendNotification(i,this._type,s),await this._client.sendNotification(this._type,s),this.notificationSent(i,this._type,s)};if(this.matches(e)){let r=this._middleware();return r?r(e,i=>t(i)):t(e)}}matches(e){return this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))?!1:!this._selectorFilter||this._selectorFilter(this._selectors.values(),e)}get onAboutToSendNotification(){return this._onAboutToSendNotification.event}aboutToSendNotification(e,t,r){this._onAboutToSendNotification.fire({textDocument:e,type:t,params:r})}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._onNotificationSent=new Xt.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(Xt.languages.match(t,e)>0)return{send:r=>this.callback(r)}}};_e.TextDocumentEventFeature=$l;var Hl=class extends hs{_registrationType;_registrations;constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(let e of this._registrations.values()){let t=e.data.registerOptions.documentSelector;t!==null&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(Al.TextDocumentRegistrationOptions.is(t)){let r=Al.StaticRegistrationOptions.hasId(t)?t.id:m_.generateUuid(),i=t.documentSelector??e;if(i)return[r,Object.assign({},t,{documentSelector:i})]}else if(ft.boolean(t)&&t===!0||Al.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let r=ft.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[m_.generateUuid(),r]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return ft.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let r=t.data.registerOptions.documentSelector;if(r!==null&&Xt.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(r),e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};_e.TextDocumentLanguageFeature=Hl;var Ul=class{_client;_registrationType;_registrations;constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};_e.WorkspaceFeature=Ul;var v_;(function(n){n.push="push",n.pull="pull"})(v_||(_e.DiagnosticCollectionSource=v_={}));var Wl=class{create(e,t){return e!==void 0?Xt.languages.createDiagnosticCollection(e):Xt.languages.createDiagnosticCollection()}dispose(e,t){e.dispose()}};_e.DefaultDiagnosticCollectionProvider=Wl});var w_=P(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.range=kr.balanced=void 0;var iD=(n,e,t)=>{let r=n instanceof RegExp?C_(n,t):n,i=e instanceof RegExp?C_(e,t):e,s=r!==null&&i!=null&&(0,kr.range)(r,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+r.length,s[1]),post:t.slice(s[1]+i.length)}};kr.balanced=iD;var C_=(n,e)=>{let t=e.match(n);return t?t[0]:null},sD=(n,e,t)=>{let r,i,s,o,a,u=t.indexOf(n),l=t.indexOf(e,u+1),f=u;if(u>=0&&l>0){if(n===e)return[u,l];for(r=[],s=t.length;f>=0&&!a;){if(f===u)r.push(f),u=t.indexOf(n,f+1);else if(r.length===1){let p=r.pop();p!==void 0&&(a=[p,l])}else i=r.pop(),i!==void 0&&i=0?u:l}r.length&&o!==void 0&&(a=[s,o])}return a};kr.range=sD});var E_=P(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.EXPANSION_MAX_LENGTH=Gn.EXPANSION_MAX=void 0;Gn.expand=yD;var D_=w_(),S_="\0SLASH"+Math.random()+"\0",P_="\0OPEN"+Math.random()+"\0",Bl="\0CLOSE"+Math.random()+"\0",R_="\0COMMA"+Math.random()+"\0",T_="\0PERIOD"+Math.random()+"\0",oD=new RegExp(S_,"g"),aD=new RegExp(P_,"g"),cD=new RegExp(Bl,"g"),uD=new RegExp(R_,"g"),lD=new RegExp(T_,"g"),dD=/\\\\/g,fD=/\\{/g,hD=/\\}/g,pD=/\\,/g,gD=/\\\./g;Gn.EXPANSION_MAX=1e5;Gn.EXPANSION_MAX_LENGTH=4e6;function zl(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function mD(n){return n.replace(dD,S_).replace(fD,P_).replace(hD,Bl).replace(pD,R_).replace(gD,T_)}function _D(n){return n.replace(oD,"\\").replace(aD,"{").replace(cD,"}").replace(uD,",").replace(lD,".")}function O_(n){if(!n)return[""];let e=[],t=(0,D_.balanced)("{","}",n);if(!t)return n.split(",");let{pre:r,body:i,post:s}=t,o=r.split(",");o[o.length-1]+="{"+i+"}";let a=O_(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function yD(n,e={}){if(!n)return[];let{max:t=Gn.EXPANSION_MAX,maxLength:r=Gn.EXPANSION_MAX_LENGTH}=e;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),Kl(mD(n),t,r,!0).map(_D)}function vD(n){return"{"+n+"}"}function bD(n){return/^-?0\d/.test(n)}function CD(n,e){return n<=e}function wD(n,e){return n>=e}function ps(n,e,t,r,i,s){let o=[],a=0;for(let u=0;u=r)return o;let f=n[u]+e+t[l];if(!(s&&!f)){if(a+f.length>i)return o;o.push(f),a+=f.length}}return o}function DD(n,e,t,r){let i=n.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=zl(i[0]),a=zl(i[1]),u=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(zl(i[2])),1):1,f=CD;a0){let q=new Array(R+1).join("0");_<0?v="-"+q+v.slice(1):v=q+v}}if(g+v.length>r)break;s.push(v),g+=v.length}return s}function Kl(n,e,t,r){let i=[""],s=!1,o=!0;for(;;){let a=(0,D_.balanced)("{","}",n);if(!a)return ps(i,n,[""],e,t,s);let u=a.pre;if(/\$$/.test(u)){if(i=ps(i,u+"{"+a.body+"}",[""],e,t,s&&!a.post.length),o=!1,!a.post.length)break;n=a.post;continue}let l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),p=l||f,h=a.body.indexOf(",")>=0;if(!p&&!h){if(a.post.match(/,(?!,).*\}/)){n=a.pre+"{"+a.body+Bl+a.post,r=!0;continue}return ps(i,u+"{"+a.body+"}"+a.post,[""],e,t,s)}o&&(s=r&&!p,o=!1);let g;if(p)g=DD(a.body,f,e,t);else{let _=O_(a.body);if(_.length===1&&_[0]!==void 0&&(_=Kl(_[0],e,t,!1).map(vD),_.length===1)){if(i=ps(i,u+_[0],[""],e,t,s&&!a.post.length),!a.post.length)break;n=a.post;continue}let v=s&&!a.post.length&&!u;for(let q=0;v&&q=e||R+j.length>t)break e;g.push(j),R+=j.length}}}}if(i=ps(i,u,g,e,t,s&&!a.post.length),!a.post.length)break;n=a.post}return i}});var q_=P(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.assertValidPattern=void 0;var SD=1024*64,PD=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>SD)throw new TypeError("pattern is too long")};Mo.assertValidPattern=PD});var x_=P(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.parseClass=void 0;var RD={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},gs=n=>n.replace(/[[\]\\-]/g,"\\$&"),TD=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),M_=n=>n.join(""),OD=(n,e)=>{let t=e;if(n.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=t+1,o=!1,a=!1,u=!1,l=!1,f=t,p="";e:for(;sp?r.push(gs(p)+"-"+gs(v)):v===p&&r.push(gs(v)),p="",s++;continue}if(n.startsWith("-]",s+1)){r.push(gs(v+"-")),s+=2;continue}if(n.startsWith("-",s+1)){p=v,s+=2;continue}r.push(gs(v)),s++}if(f{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.unescape=void 0;var ED=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?n.replace(/\[([^/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?n.replace(/\[([^/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");Io.unescape=ED});var Xl=P(Ao=>{"use strict";var bt;Object.defineProperty(Ao,"__esModule",{value:!0});Ao.AST=void 0;var qD=x_(),jo=No(),MD=new Set(["!","?","+","*","@"]),Gl=n=>MD.has(n),I_=n=>Gl(n.type),xD=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),ID=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),ND=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),N_=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),jD="(?!(?:^|/)\\.\\.?(?:$|/))",Fo="(?!\\.)",FD=new Set(["[","."]),LD=new Set(["..","."]),AD=new Set("().*{}+?[]^$\\!"),kD=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Vl="[^/]",j_=Vl+"*?",F_=Vl+"+?",$D=0,Lo=class{type;#n;#r;#i=!1;#e=[];#t;#a;#u;#c=!1;#s;#o;#l=!1;id=++$D;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,r={}){this.type=e,e&&(this.#r=!0),this.#t=t,this.#n=this.#t?this.#t.#n:this,this.#s=this.#n===this?r:this.#n.#s,this.#u=this.#n===this?[]:this.#n.#u,e==="!"&&!this.#n.#c&&this.#u.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#o=this.#e.map(e=>String(e)).join("")}#_(){if(this!==this.#n)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,r=t.#t;for(;r;){for(let i=t.#a+1;!r.type&&itypeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#c&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let e=this.#t;for(let t=0;ttypeof g!="string"),l=this.#e.map(g=>{let[_,v,R,q]=typeof g=="string"?bt.#D(g,this.#r,u):g.toRegExpSource(e);return this.#r=this.#r||R,this.#i=this.#i||q,_}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&LD.has(this.#e[0]))){let _=FD,v=t&&_.has(l.charAt(0))||l.startsWith("\\.")&&_.has(l.charAt(2))||l.startsWith("\\.\\.")&&_.has(l.charAt(4)),R=!t&&!e&&_.has(l.charAt(0));f=v?jD:R?Fo:""}let p="";return this.isEnd()&&this.#n.#c&&this.#t?.type==="!"&&(p="(?:$|\\/)"),[f+l+p,(0,jo.unescape)(l),this.#r=!!this.#r,this.#i]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#m(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),l=this;return l.#e=[u],l.type=null,l.#r=void 0,[u,(0,jo.unescape)(this.toString()),!1,!1]}let o=!r||e||t||!Fo?"":this.#m(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!t?Fo:"")+F_;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Fo:"")+j_+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+u}return[a,(0,jo.unescape)(s),this.#r=!!this.#r,this.#i]}#h(){if(I_(this)){let e=0,t=!1;do{t=!0;for(let r=0;r{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,s,o]=t.toRegExpSource(e);return this.#i=this.#i||o,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#D(e,t,r=!1){let i=!1,s="",o=!1,a=!1;for(let u=0;u{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.escape=void 0;var HD=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):e?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");ko.escape=HD});var Ql=P(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.unescape=U.escape=U.AST=U.Minimatch=U.match=U.makeRe=U.braceExpand=U.defaults=U.filter=U.GLOBSTAR=U.sep=U.minimatch=void 0;var UD=E_(),$o=q_(),k_=Xl(),WD=Jl(),zD=No(),KD=(n,e,t={})=>((0,$o.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new $r(e,t).match(n));U.minimatch=KD;var BD=/^\*+([^+@!?*[(]*)$/,GD=n=>e=>!e.startsWith(".")&&e.endsWith(n),VD=n=>e=>e.endsWith(n),XD=n=>(n=n.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(n)),JD=n=>(n=n.toLowerCase(),e=>e.toLowerCase().endsWith(n)),QD=/^\*+\.\*+$/,YD=n=>!n.startsWith(".")&&n.includes("."),ZD=n=>n!=="."&&n!==".."&&n.includes("."),eS=/^\.\*+$/,tS=n=>n!=="."&&n!==".."&&n.startsWith("."),nS=/^\*+$/,rS=n=>n.length!==0&&!n.startsWith("."),iS=n=>n.length!==0&&n!=="."&&n!=="..",sS=/^\?+([^+@!?*[(]*)?$/,oS=([n,e=""])=>{let t=$_([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},aS=([n,e=""])=>{let t=H_([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},cS=([n,e=""])=>{let t=H_([n]);return e?r=>t(r)&&r.endsWith(e):t},uS=([n,e=""])=>{let t=$_([n]);return e?r=>t(r)&&r.endsWith(e):t},$_=([n])=>{let e=n.length;return t=>t.length===e&&!t.startsWith(".")},H_=([n])=>{let e=n.length;return t=>t.length===e&&t!=="."&&t!==".."},U_=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",L_={win32:{sep:"\\"},posix:{sep:"/"}};U.sep=U_==="win32"?L_.win32.sep:L_.posix.sep;U.minimatch.sep=U.sep;U.GLOBSTAR=Symbol("globstar **");U.minimatch.GLOBSTAR=U.GLOBSTAR;var lS="[^/]",dS=lS+"*?",fS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",hS="(?:(?!(?:\\/|^)\\.).)*?",pS=(n,e={})=>t=>(0,U.minimatch)(t,n,e);U.filter=pS;U.minimatch.filter=U.filter;var kt=(n,e={})=>Object.assign({},n,e),gS=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return U.minimatch;let e=U.minimatch;return Object.assign((r,i,s={})=>e(r,i,kt(n,s)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,kt(n,s))}static defaults(i){return e.defaults(kt(n,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,o={}){super(i,s,kt(n,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,kt(n,s))}},unescape:(r,i={})=>e.unescape(r,kt(n,i)),escape:(r,i={})=>e.escape(r,kt(n,i)),filter:(r,i={})=>e.filter(r,kt(n,i)),defaults:r=>e.defaults(kt(n,r)),makeRe:(r,i={})=>e.makeRe(r,kt(n,i)),braceExpand:(r,i={})=>e.braceExpand(r,kt(n,i)),match:(r,i,s={})=>e.match(r,i,kt(n,s)),sep:e.sep,GLOBSTAR:U.GLOBSTAR})};U.defaults=gS;U.minimatch.defaults=U.defaults;var mS=(n,e={})=>((0,$o.assertValidPattern)(n),e.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,UD.expand)(n,{max:e.braceExpandMax}));U.braceExpand=mS;U.minimatch.braceExpand=U.braceExpand;var _S=(n,e={})=>new $r(n,e).makeRe();U.makeRe=_S;U.minimatch.makeRe=U.makeRe;var yS=(n,e,t={})=>{let r=new $r(e,t);return n=n.filter(i=>r.match(i)),r.options.nonull&&!n.length&&n.push(e),n};U.match=yS;U.minimatch.match=U.match;var A_=/[?*]|[+@!]\(.*?\)|\[|\]/,vS=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$r=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,$o.assertValidPattern)(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||U_,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!A_.test(s[2]))&&!A_.test(s[3]),l=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(l)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&r.splice(i+1,o-i);let a=r[i+1],u=r[i+2],l=r[i+3];if(a!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(i,1);let f=r.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;ot.length)}partsMatch(e,t,r=!1){let i=0,s=0,o=[],a="";for(;i=2&&(e=this.levelTwoFileOptimize(e)),t.includes(U.GLOBSTAR)?this.#n(e,t,r,i,s):this.#i(e,t,r,i,s)}#n(e,t,r,i,s){let o=t.indexOf(U.GLOBSTAR,s),a=t.lastIndexOf(U.GLOBSTAR),[u,l,f]=r?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(u.length){let w=e.slice(i,i+u.length);if(!this.#i(w,u,r,0,0))return!1;i+=u.length,s+=u.length}let p=0;if(f.length){if(f.length+i>e.length)return!1;let w=e.length-f.length;if(this.#i(e,f,r,w,0))p=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(w--,!this.#i(e,f,r,w,0)))return!1;p=f.length+1}}if(!l.length){let w=!!p;for(let M=i;M{let l=u.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?vS(p):p===U.GLOBSTAR?U.GLOBSTAR:p._src});l.forEach((p,h)=>{let g=l[h+1],_=l[h-1];p!==U.GLOBSTAR||_===U.GLOBSTAR||(_===void 0?g!==void 0&&g!==U.GLOBSTAR?l[h+1]="(?:\\/|"+r+"\\/)?"+g:l[h]=r:g===void 0?l[h-1]=_+"(?:\\/|\\/"+r+")?":g!==U.GLOBSTAR&&(l[h-1]=_+"(?:\\/|\\/"+r+"\\/)"+g,l[h+1]=U.GLOBSTAR))});let f=l.filter(p=>p!==U.GLOBSTAR);if(this.partial&&f.length>=1){let p=[];for(let h=1;h<=f.length;h++)p.push(f.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a of s){let u=i;if(r.matchBase&&a.length===1&&(u=[o]),this.matchOne(u,a,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return U.minimatch.defaults(e).Minimatch}};U.Minimatch=$r;var bS=Xl();Object.defineProperty(U,"AST",{enumerable:!0,get:function(){return bS.AST}});var CS=Jl();Object.defineProperty(U,"escape",{enumerable:!0,get:function(){return CS.escape}});var wS=No();Object.defineProperty(U,"unescape",{enumerable:!0,get:function(){return wS.unescape}});U.minimatch.AST=k_.AST;U.minimatch.Minimatch=$r;U.minimatch.escape=WD.escape;U.minimatch.unescape=zD.unescape});var Yl=P(Vn=>{"use strict";var DS=Vn&&Vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SS=Vn&&Vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PS=Vn&&Vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.DiagnosticFeature=Rr.DiagnosticPullMode=Rr.vsdiag=void 0;var De=require("vscode"),Se=V(),ES=we(),qS=Yl(),ms=ne();function Ho(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var Tt;(function(n){let e;(function(t){t.full="full",t.unChanged="unChanged"})(e=n.DocumentDiagnosticReportKind||(n.DocumentDiagnosticReportKind={}))})(Tt||(Rr.vsdiag=Tt={}));var _s;(function(n){n.onType="onType",n.onSave="onSave",n.onFocus="onFocus"})(_s||(Rr.DiagnosticPullMode=_s={}));var Je;(function(n){n.active="open",n.reschedule="reschedule",n.outDated="drop"})(Je||(Je={}));var Ue;(function(n){n[n.document=1]="document",n[n.workspace=2]="workspace"})(Ue||(Ue={}));var Xn;(function(n){function e(t){return t instanceof De.Uri?t.toString():t.uri.toString()}n.asKey=e})(Xn||(Xn={}));var Zl=class{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,r){let i=e===Ue.document?this.documentPullStates:this.workspacePullStates,[s,o,a]=t instanceof De.Uri?[t.toString(),t,r]:[t.uri.toString(),t.uri,t.version],u=i.get(s);return u===void 0&&(u={document:o,pulledVersion:a,resultId:void 0},i.set(s,u)),u}update(e,t,r,i){let s=e===Ue.document?this.documentPullStates:this.workspacePullStates,[o,a,u,l]=t instanceof De.Uri?[t.toString(),t,r,i]:[t.uri.toString(),t.uri,t.version,r],f=s.get(o);f===void 0?(f={document:a,pulledVersion:u,resultId:l},s.set(o,f)):(f.pulledVersion=u,f.resultId=l)}unTrack(e,t){let r=Xn.asKey(t);(e===Ue.document?this.documentPullStates:this.workspacePullStates).delete(r)}tracks(e,t){let r=Xn.asKey(t);return(e===Ue.document?this.documentPullStates:this.workspacePullStates).has(r)}tracksSameVersion(e,t){let r=t.uri.toString(),s=(e===Ue.document?this.documentPullStates:this.workspacePullStates).get(r);return s!==void 0&&s.pulledVersion===t.version}getResultId(e,t){let r=Xn.asKey(t);return(e===Ue.document?this.documentPullStates:this.workspacePullStates).get(r)?.resultId}getAllResultIds(){let e=[];for(let[t,r]of this.workspacePullStates)this.documentPullStates.has(t)&&(r=this.documentPullStates.get(t)),r.resultId!==void 0&&e.push({uri:t,value:r.resultId});return e}},ed=class{isDisposed;client;visibleDocuments;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,t,r){this.client=e,this.visibleDocuments=t,this.options=r,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new De.EventEmitter,this.provider=this.createProvider(),this.diagnostics=this.createDiagnosticCollection(),this.openRequests=new Map,this.documentStates=new Zl,this.workspaceErrorCounter=0}createDiagnosticCollection(){return this.client.clientOptions.diagnosticCollectionProvider===void 0?De.languages.createDiagnosticCollection(this.options.identifier):this.client.clientOptions.diagnosticCollectionProvider.create(this.options.identifier,ms.DiagnosticCollectionSource.pull)}knows(e,t){let r=t instanceof De.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(r.toString())}knowsSameVersion(e,t){let r=this.openRequests.get(t.uri.toString());return r===void 0?this.documentStates.tracksSameVersion(e,t):r.state===Je.reschedule?!0:r.state===Je.outDated?!1:r.version===t.version}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;let r=e instanceof De.Uri?e:e.uri;this.pullAsync(e).then(()=>{t&&t()},i=>{this.client.error(`Document pull failed for text document ${r.toString()}`,i,!1)})}async pullAsync(e,t){if(this.isDisposed)return;let r=e instanceof De.Uri,i=r?e:e.uri,s=i.toString();t=r?t:e.version;let o=this.openRequests.get(s),a=r?this.documentStates.track(Ue.document,e,t):this.documentStates.track(Ue.document,e);if(o===void 0){let u=new De.CancellationTokenSource;this.openRequests.set(s,{state:Je.active,document:e,version:t,tokenSource:u});let l,f;try{l=await this.provider.provideDiagnostics(e,a.resultId,u.token)??{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}}catch(p){if(p instanceof ms.LSPCancellationError&&Se.DiagnosticServerCancellationData.is(p.data)&&p.data.retriggerRequest===!1&&(f={state:Je.outDated,document:e}),f===void 0&&p instanceof De.CancellationError)f={state:Je.reschedule,document:e};else throw p}if(f=f??this.openRequests.get(s),f===void 0){this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),this.diagnostics.delete(i);return}if(this.openRequests.delete(s),!this.visibleDocuments.isVisible(e)){this.documentStates.unTrack(Ue.document,e);return}if(f.state===Je.outDated)return;l!==void 0&&(l.kind===Tt.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,l.items),a.pulledVersion=t,a.resultId=l.resultId),f.state===Je.reschedule&&this.pull(e)}else o.state===Je.active?(o.tokenSource.cancel(),this.openRequests.set(s,{state:Je.reschedule,document:o.document})):o.state===Je.outDated&&this.openRequests.set(s,{state:Je.reschedule,document:o.document})}forgetDocument(e){if(this.isDisposed)return;let t=e instanceof De.Uri?e:e.uri,r=t.toString(),i=this.openRequests.get(r);this.options.workspaceDiagnostics&&t.scheme!=="untitled"?(i!==void 0?this.openRequests.set(r,{state:Je.reschedule,document:e}):this.pull(e,()=>{this.forget(Ue.document,e)}),this.forget(Ue.workspace,e)):(i!==void 0&&(i.state===Je.active&&i.tokenSource.cancel(),this.openRequests.set(r,{state:Je.outDated,document:e})),this.diagnostics.delete(t),this.forget(Ue.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then(()=>{this.workspaceTimeout=(0,Se.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3)},e=>{!(e instanceof ms.LSPCancellationError)&&!Se.DiagnosticServerCancellationData.is(e.data)&&(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,Se.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3))})}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;this.workspaceCancellation!==void 0&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new De.CancellationTokenSource;let e=this.documentStates.getAllResultIds().map(t=>({uri:this.client.protocol2CodeConverter.asUri(t.uri),value:t.value}));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,t=>{if(!(!t||this.isDisposed))for(let r of t.items)r.kind===Tt.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(Ue.document,r.uri)||this.diagnostics.set(r.uri,r.items)),this.documentStates.update(Ue.workspace,r.uri,r.version??void 0,r.resultId)})}createProvider(){let e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(t,r,i)=>{let s=(a,u,l)=>{let f={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(a instanceof De.Uri?a:a.uri)},previousResultId:u};return this.isDisposed===!0||!this.client.isRunning()?{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}:this.client.sendRequest(Se.DocumentDiagnosticRequest.type,f,l).then(async p=>{if(this.isDisposed)return{kind:Tt.DocumentDiagnosticReportKind.full,items:[]};if(l.isCancellationRequested)throw new De.CancellationError;return p==null?{kind:Tt.DocumentDiagnosticReportKind.full,items:[]}:p.kind===Se.DocumentDiagnosticReportKind.Full?{kind:Tt.DocumentDiagnosticReportKind.full,resultId:p.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(p.items,l)}:{kind:Tt.DocumentDiagnosticReportKind.unChanged,resultId:p.resultId}},p=>this.client.handleFailedRequest(Se.DocumentDiagnosticRequest.type,l,p,{kind:Tt.DocumentDiagnosticReportKind.full,items:[]},!0,!0))},o=this.client.middleware;return o.provideDiagnostics?o.provideDiagnostics(t,r,i,s):s(t,r,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(t,r,i)=>{let s=async l=>l.kind===Se.DocumentDiagnosticReportKind.Full?{kind:Tt.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version,items:await this.client.protocol2CodeConverter.asDiagnostics(l.items,r)}:{kind:Tt.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version},o=l=>{let f=[];for(let p of l)f.push({uri:this.client.code2ProtocolConverter.asUri(p.uri),value:p.value});return f},a=(l,f,p)=>{let h=(0,ES.generateUuid)(),g=this.client.onProgress(Se.WorkspaceDiagnosticRequest.partialResult,h,async v=>{if(v==null){p(null);return}let R={items:[]};for(let q of v.items)try{R.items.push(await s(q))}catch(w){this.client.error("Converting workspace diagnostics failed.",w)}p(R)}),_={identifier:this.options.identifier,previousResultIds:o(l),partialResultToken:h};return this.isDisposed===!0||!this.client.isRunning()?{items:[]}:this.client.sendRequest(Se.WorkspaceDiagnosticRequest.type,_,f).then(async v=>{if(f.isCancellationRequested)return{items:[]};let R={items:[]};for(let q of v.items)R.items.push(await s(q));return g.dispose(),p(R),{items:[]}},v=>(g.dispose(),this.client.handleFailedRequest(Se.DocumentDiagnosticRequest.type,f,v,{items:[]})))},u=this.client.middleware;return u.provideWorkspaceDiagnostics?u.provideWorkspaceDiagnostics(t,r,i,a):a(t,r,i)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(let[e,t]of this.openRequests)t.state===Je.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:Je.outDated,document:t.document});this.client.clientOptions.diagnosticCollectionProvider!==void 0?this.client.clientOptions.diagnosticCollectionProvider.dispose(this.diagnostics,ms.DiagnosticCollectionSource.pull):this.diagnostics.dispose()}},td=class{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,t){this.client=e,this.diagnosticRequestor=t,this.documents=new Se.LinkedMap,this.isDisposed=!1}add(e){if(this.isDisposed===!0)return;let t=Xn.asKey(e);this.documents.has(t)||(this.documents.set(t,e,Se.Touch.Last),this.lastDocumentToPull=e)}remove(e){let t=Xn.asKey(e);if(this.documents.delete(t),this.documents.size===0){this.stop();return}else if(t===this.lastDocumentToPullKey()){let r=this.documents.before(t);r===void 0?this.stop():this.lastDocumentToPull=r}}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){if(this.isDisposed!==!0){if(this.documents.size===0){this.stop();return}this.lastDocumentToPull!==void 0&&this.timeoutHandle===void 0&&(this.timeoutHandle=(0,Se.RAL)().timer.setTimeout(()=>{let e=this.documents.first;if(e===void 0)return;let t=Xn.asKey(e);this.diagnosticRequestor.pullAsync(e).catch(r=>{this.client.error(`Document pull failed for text document ${t}`,r,!1)}).finally(()=>{this.timeoutHandle=void 0,this.documents.set(t,e,Se.Touch.Last),t!==this.lastDocumentToPullKey()&&this.runLoop()})},500))}}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return this.lastDocumentToPull!==void 0?Xn.asKey(this.lastDocumentToPull):void 0}},nd=class{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,t,r){let i=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),s=e.protocol2CodeConverter.asDocumentSelector(r.documentSelector),o=[],a=(w,M)=>!(typeof w=="string"||w.language!==void 0&&w.language!=="*"||w.scheme!==void 0&&w.scheme!=="*"&&w.scheme!==M.scheme||w.pattern!==void 0&&!(0,qS.matchGlobPattern)(w.pattern,M)),u=w=>{let M=r.documentSelector;if(i.match!==void 0)return i.match(M,w);for(let j of M)if(Se.TextDocumentFilter.is(j)&&a(j,w))return!0;return!1},l=w=>w instanceof De.Uri?u(w):De.languages.match(s,w)>0&&t.isVisible(w),f=w=>De.languages.match(s,w.document)>0&&t.isVisible(w.notebook.uri),p=w=>w instanceof De.Uri?this.activeTextDocument?.uri.toString()===w.toString():this.activeTextDocument===w;this.diagnosticRequestor=new ed(e,t,r),this.backgroundScheduler=new td(e,this.diagnosticRequestor);let h=w=>{!l(w)||!r.interFileDependencies||p(w)||i.onChange===!1||this.backgroundScheduler.add(w)},g=(w,M)=>(i.filter===void 0||!i.filter(w,M))&&this.diagnosticRequestor.knows(Ue.document,w);this.activeTextDocument=De.window.activeTextEditor?.document,o.push(De.window.onDidChangeActiveTextEditor(w=>{let M=this.activeTextDocument;this.activeTextDocument=w?.document,M!==void 0&&h(M),this.activeTextDocument!==void 0&&(this.backgroundScheduler.remove(this.activeTextDocument),i.onFocus===!0&&l(this.activeTextDocument)&&g(this.activeTextDocument,_s.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))}));let _=e.getFeature(Se.DidOpenTextDocumentNotification.method);o.push(_.onNotificationSent(w=>{let M=w.textDocument;this.diagnosticRequestor.knowsSameVersion(Ue.document,M)||l(M)&&this.diagnosticRequestor.pull(M,()=>{h(M)})}));let v=e.getFeature(Se.NotebookDocumentSyncRegistrationType.method);o.push(v.onOpenNotificationSent(w=>{for(let M of w.getCells())f(M)&&this.diagnosticRequestor.pull(M.document,()=>{h(M.document)})})),o.push(t.onOpen(w=>{for(let M of w){if(this.diagnosticRequestor.knows(Ue.document,M))continue;let j=M.toString(),F;for(let oe of De.workspace.textDocuments)if(j===oe.uri.toString()){F=oe;break}F!==void 0&&l(F)&&this.diagnosticRequestor.pull(F,()=>{h(F)})}}));let R=new Set;for(let w of De.workspace.textDocuments)l(w)&&(this.diagnosticRequestor.pull(w,()=>{h(w)}),R.add(w.uri.toString()));for(let w of De.workspace.notebookDocuments)for(let M of w.getCells())f(M)&&(this.diagnosticRequestor.pull(M.document,()=>{h(M.document)}),R.add(M.document.uri.toString()));if(i.onTabs===!0)for(let w of t.getResources())!R.has(w.toString())&&l(w)&&this.diagnosticRequestor.pull(w,()=>{h(w)});if(i.onChange===!0){let w=e.getFeature(Se.DidChangeTextDocumentNotification.method);o.push(w.onNotificationSent(async M=>{let j=M.textDocument;g(j,_s.onType)&&this.diagnosticRequestor.pull(j,()=>{this.backgroundScheduler.trigger()})})),o.push(v.onChangeNotificationSent(async M=>{let F=(M.cells?.textContent||[]).map(Te=>M.notebook.getCells().find(Pn=>Pn.document.uri.toString()===Te.document.uri.toString()));for(let Te of F)Te&&f(Te)&&this.diagnosticRequestor.pull(Te.document,()=>{this.backgroundScheduler.trigger()});let oe=M.cells?.structure?.didClose||[];for(let Te of oe)this.diagnosticRequestor.forgetDocument(Te.document);let te=M.cells?.structure?.didOpen||[];for(let Te of te)f(Te)&&this.diagnosticRequestor.pull(Te.document,()=>{this.backgroundScheduler.trigger()})}))}if(i.onSave===!0){let w=e.getFeature(Se.DidSaveTextDocumentNotification.method);o.push(w.onNotificationSent(M=>{let j=M.textDocument;g(j,_s.onSave)&&this.diagnosticRequestor.pull(M.textDocument)})),o.push(v.onSaveNotificationSent(M=>{for(let j of M.getCells())f(j)&&this.diagnosticRequestor.pull(j.document)}))}let q=e.getFeature(Se.DidCloseTextDocumentNotification.method);o.push(q.onAboutToSendNotification(w=>{this.cleanUpDocument(w.textDocument)})),o.push(v.onCloseNotificationSent(w=>{for(let M of w.getCells())this.cleanUpDocument(M.document)})),o.push(t.onClose(w=>{for(let M of w)this.cleanUpDocument(M)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(let w of De.workspace.textDocuments)l(w)&&this.diagnosticRequestor.pull(w)}),r.workspaceDiagnostics===!0&&r.identifier!=="da348dc5-c30a-4515-9d98-31ff3be38d14"&&this.diagnosticRequestor.pullWorkspace(),this.disposable=De.Disposable.from(...o,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(Ue.document,e)&&this.diagnosticRequestor.forgetDocument(e)}},rd=class extends ms.TextDocumentLanguageFeature{constructor(e){super(e,Se.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=Ho(Ho(e,"textDocument"),"diagnostic");t.relatedInformation=!0,t.tagSupport={valueSet:[Se.DiagnosticTag.Unnecessary,Se.DiagnosticTag.Deprecated]},t.codeDescriptionSupport=!0,t.dataSupport=!0,t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,t.markupMessageSupport=!1,Ho(Ho(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(Se.DiagnosticRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeDiagnosticsEmitter.fire()});let[i,s]=this.getRegistration(t,e.diagnosticProvider);!i||!s||this.register({id:i,registerOptions:s})}clear(){super.clear()}refresh(){for(let e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){let t=new nd(this._client,this._client.visibleDocuments,e);return[t.disposable,t]}};Rr.DiagnosticFeature=rd});var K_=P(an=>{"use strict";var MS=an&&an.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),xS=an&&an.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ko=an&&an.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(v.metadata=o(h.metadata)),v}t.asNotebookDocument=i;function s(h,g){return h.map(_=>a(_,g))}t.asNotebookCells=s;function o(h){return l(new Set,h)}t.asMetadata=o;function a(h,g){let _=Jn.NotebookCell.create(u(h.kind),g.asUri(h.document.uri));return Object.keys(h.metadata).length>0&&(_.metadata=o(h.metadata)),h.executionSummary!==void 0&&W_.number(h.executionSummary.executionOrder)&&W_.boolean(h.executionSummary.success)&&(_.executionSummary={executionOrder:h.executionSummary.executionOrder,success:h.executionSummary.success}),_}t.asNotebookCell=a;function u(h){switch(h){case Re.NotebookCellKind.Markup:return Jn.NotebookCellKind.Markup;case Re.NotebookCellKind.Code:return Jn.NotebookCellKind.Code}}function l(h,g){if(h.has(g))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(g)){let _=[];for(let v of g)if(v!==null&&typeof v=="object"||Array.isArray(v))_.push(l(h,v));else{if(v instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");_.push(v)}return _}else{let _=Object.keys(g),v=Object.create(null);for(let R of _){let q=g[R];if(q!==null&&typeof q=="object"||Array.isArray(q))v[R]=l(h,q);else{if(q instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");v[R]=q}}return v}}function f(h,g){let _=g.asChangeTextDocumentParams(h,h.document.uri,h.document.version);return{document:_.textDocument,changes:_.contentChanges}}t.asTextContentChange=f;function p(h,g){let _=Object.create(null);if(h.metadata&&(_.metadata=n.c2p.asMetadata(h.metadata)),h.cells!==void 0){let v=Object.create(null),R=h.cells;R.structure&&(v.structure={array:{start:R.structure.array.start,deleteCount:R.structure.array.deleteCount,cells:R.structure.array.cells!==void 0?R.structure.array.cells.map(q=>n.c2p.asNotebookCell(q,g)):void 0},didOpen:R.structure.didOpen!==void 0?R.structure.didOpen.map(q=>g.asOpenTextDocumentParams(q.document).textDocument):void 0,didClose:R.structure.didClose!==void 0?R.structure.didClose.map(q=>g.asCloseTextDocumentParams(q.document).textDocument):void 0}),R.data!==void 0&&(v.data=R.data.map(q=>n.c2p.asNotebookCell(q,g))),R.textContent!==void 0&&(v.textContent=R.textContent.map(q=>n.c2p.asTextContentChange(q,g))),Object.keys(v).length>0&&(_.cells=v)}return _}t.asNotebookDocumentChangeEvent=p})(e=n.c2p||(n.c2p={}))})(Oi||(Oi={}));var sd;(function(n){function e(a,u,l){let f=a.length,p=u.length,h=0;for(;h=0&&_>=0&&t(a[g],u[_],l);)g--,_--;let v=g+1-h,R=h===_+1?void 0:u.slice(h,_+1);return R!==void 0?{start:h,deleteCount:v,cells:R}:{start:h,deleteCount:v}}else return hr.document.uri.toString()))}}n.create=e})(zo||(zo={}));var Ei=class{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,t,r,i,s,o){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(Wo.asDocumentSelector(t)),this.onChangeNotificationSent=r,this.onOpenNotificationSent=i,this.onCloseNotificationSent=s,this.onSaveNotificationSent=o,Re.workspace.onDidOpenNotebookDocument(a=>{this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a)},void 0,this.disposables);for(let a of Re.workspace.notebookDocuments)this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a);Re.workspace.onDidChangeNotebookDocument(a=>this.didChangeNotebookDocument(a),void 0,this.disposables),this.options.save===!0&&Re.workspace.onDidSaveNotebookDocument(a=>this.didSave(a),void 0,this.disposables),Re.workspace.onDidCloseNotebookDocument(a=>{this.didClose(a),this.notebookDidOpen.delete(a.uri.toString())},void 0,this.disposables)}getState(){for(let e of Re.workspace.notebookDocuments)if(this.getMatchingCellsConsideringSyncInfo(e)!==void 0)return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){if(Re.languages.match(this.selector,e)>0)return!0;let t=e.uri.toString();for(let r of this.notebookSyncInfo.values())if(r.uris.has(t))return!0;return!1}didOpenNotebookCellTextDocument(e,t){if(Re.languages.match(this.selector,t.document)===0||!this.notebookDidOpen.has(e.uri.toString()))return;let r=this.getSyncInfo(e),i=this.cellMatches(e,t);if(r!==void 0){let s=r.uris.has(t.document.uri.toString());if(i&&s||!i&&!s)return;if(i){let o=this.mergeCells(e,r,[t]);if(o!==void 0){let a=this.asNotebookDocumentChangeEvent(e,void 0,r,o);a!==void 0&&this.doSendChange(a,o).catch(()=>{})}}}else i&&this.doSendOpen(e,[t]).catch(()=>{})}didChangeNotebookCellTextDocument(e,t,r){if(Re.languages.match(this.selector,r.document)===0)return;let i=this.getSyncInfo(e);i===void 0||!i.uris.has(t.document.uri.toString())||this.doSendChange({notebook:e,cells:{textContent:[r]}},i.cells).catch(()=>{})}didCloseNotebookCellTextDocument(e,t){let r=this.getSyncInfo(e);if(r===void 0)return;let i=t.document.uri,s=r.cells.findIndex(o=>o.document.uri.toString()===i.toString());if(s!==-1)if(s===0&&r.cells.length===1)this.doSendClose(e,r.cells).catch(()=>{});else{let o=r.cells.slice(),a=o.splice(s,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:s,deleteCount:1},didClose:a}}},o).catch(()=>{})}}dispose(){for(let e of this.disposables)e.dispose()}didOpen(e,t,r=this.getSyncInfo(e)){if(r!==void 0)if(t===void 0&&(t=r.cells.slice()),t!==void 0){let i=this.asNotebookDocumentChangeEvent(e,void 0,r,t);i!==void 0&&this.doSendChange(i,t).catch(()=>{})}else this.doSendClose(e,[]).catch(()=>{});else{if(t=this.getMatchingCells(e),t===void 0)return;this.doSendOpen(e,t).catch(()=>{})}}didChangeNotebookDocument(e){let t=e.notebook,r=this.getSyncInfo(t);if(r===void 0){if(e.contentChanges.length===0)return;let i=this.getMatchingCells(t);if(i===void 0)return;this.didOpen(t,i,r)}else{let i=this.getMatchingCellsFromEvent(t,r,e);if(i===void 0){this.didClose(t,r);return}let s=this.asNotebookDocumentChangeEvent(e.notebook,e,r,i);s!==void 0&&this.doSendChange(s,i).catch(()=>{})}}didSave(e){this.getSyncInfo(e)!==void 0&&this.doSendSave(e).catch(()=>{})}didClose(e,t=this.getSyncInfo(e)){if(t===void 0)return;let r=e.getCells().filter(i=>t.uris.has(i.document.uri.toString()));this.doSendClose(e,r).catch(()=>{})}async sendDidOpenNotebookDocument(e){if(this.getSyncInfo(e)!==void 0)throw new Error(`Notebook document ${e.uri.toString()} is already open`);let r=this.getMatchingCells(e);if(r!==void 0)return this.doSendOpen(e,r)}async doSendOpen(e,t){let r=async(s,o)=>{let a=o.map(u=>this.client.code2ProtocolConverter.asTextDocumentItem(u.document));try{await this.client.sendNotification(Jn.DidOpenNotebookDocumentNotification.type,{notebookDocument:Oi.c2p.asNotebookDocument(s,o,this.client.code2ProtocolConverter),cellTextDocuments:a}),this.onOpenNotificationSent.fire(s)}catch(u){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",u),u}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),zo.create(t)),i?.didOpen!==void 0?i.didOpen(e,t,r):r(e,t)}async sendDidChangeNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e.notebook);if(t===void 0)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,t)}async doSendChange(e,t){let r=async s=>{try{await this.client.sendNotification(Jn.DidChangeNotebookDocumentNotification.type,{notebookDocument:Oi.c2p.asVersionedNotebookDocumentIdentifier(s.notebook,this.client.code2ProtocolConverter),change:Oi.c2p.asNotebookDocumentChangeEvent(s,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(s)}catch(o){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",o),o}},i=this.client.middleware?.notebooks;return e.cells?.structure!==void 0&&this.notebookSyncInfo.set(e.notebook.uri.toString(),zo.create(t)),i?.didChange!==void 0?i?.didChange(e,r):r(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){let t=async i=>{try{await this.client.sendNotification(Jn.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(i.uri)}}),this.onSaveNotificationSent.fire(i)}catch(s){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",s),s}},r=this.client.middleware?.notebooks;return r?.didSave!==void 0?r.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e);if(t===void 0)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,t)}async doSendClose(e,t){let r=async(s,o)=>{try{await this.client.sendNotification(Jn.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(s.uri)},cellTextDocuments:o.map(a=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(a.document))}),this.onCloseNotificationSent.fire(s)}catch(a){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",a),a}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),i?.didClose!==void 0?i.didClose(e,t,r):r(e,t)}getSynchronizedCells(e){return this.getSyncInfo(e)?.cells}asNotebookDocumentChangeEvent(e,t,r,i){if(t!==void 0&&t.notebook!==e)throw new Error("Notebook must be identical");let s={notebook:e};t?.metadata!==void 0&&(s.metadata=Oi.c2p.asMetadata(t.metadata));let o;if(t?.cellChanges!==void 0&&t.cellChanges.length>0){let a=[];o=new Set(i.map(u=>u.document.uri.toString()));for(let u of t.cellChanges)o.has(u.cell.document.uri.toString())&&(u.executionSummary!==void 0||u.metadata!==void 0)&&a.push(u.cell);a.length>0&&(s.cells=s.cells??{},s.cells.data=a)}if((t?.contentChanges!==void 0&&t.contentChanges.length>0||t===void 0)&&r!==void 0&&i!==void 0){let a=r.cells,u=i,l=sd.computeDiff(a,u,!1),f,p;if(l!==void 0){f=l.cells===void 0?new Map:new Map(l.cells.map(_=>[_.document.uri.toString(),_])),p=l.deleteCount===0?new Map:new Map(a.slice(l.start,l.start+l.deleteCount).map(_=>[_.document.uri.toString(),_]));for(let _ of Array.from(p.keys()))f.has(_)&&(p.delete(_),f.delete(_));s.cells=s.cells??{};let h=[],g=[];if(f.size>0||p.size>0){for(let _ of f.values())h.push(_);for(let _ of p.values())g.push(_)}s.cells.structure={array:l,didOpen:h,didClose:g}}}return Object.keys(s).length>1?s:void 0}getMatchingCells(e,t=e.getCells()){if(this.options.notebookSelector!==void 0){for(let r of this.options.notebookSelector)if(r.notebook===void 0||Uo.matchNotebook(r.notebook,e)){let i=this.filterCells(e,t,r.cells);return i.length===0?void 0:i}}}getMatchingCellsFromEvent(e,t,r){if(this.options.notebookSelector===void 0)return;let i;for(let u of this.options.notebookSelector)if(u.notebook===void 0||Uo.matchNotebook(u.notebook,e)){i=u;break}if(i===void 0)return;if((r.cellChanges===void 0||r.cellChanges.length===0)&&(r.contentChanges===void 0||r.contentChanges.length===0))return t.cells;let s;if(r.cellChanges!==void 0&&r.cellChanges.length>0){let u=r.cellChanges.map(f=>f.cell),l=this.filterCells(e,u,i.cells);if(l.length!==u.length){s=new Set(t.uris);for(let f of u)s.delete(f.document.uri.toString());for(let f of l)s.add(f.document.uri.toString())}}if(r.contentChanges!==void 0&&r.contentChanges.length>0){s===void 0&&(s=new Set(t.uris));for(let u of r.contentChanges){for(let f of u.removedCells)s.delete(f.document.uri.toString());let l=this.filterCells(e,new Array(...u.addedCells),i.cells);for(let f of l)s.add(f.document.uri.toString())}}if(s===void 0)return t.cells;let o=[],a=e.getCells();for(let u of a)s.has(u.document.uri.toString())&&o.push(u);return o}getMatchingCellsFromSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:void 0}getMatchingCellsConsideringSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:this.getMatchingCells(e)}mergeCells(e,t,r){let i=[],s=new Set(t.uris);for(let o of r)s.add(o.document.uri.toString());for(let o of e.getCells())s.has(o.document.uri.toString())&&i.push(o);return i}cellMatches(e,t){let r=this.getMatchingCells(e,[t]);return r!==void 0&&r[0]===t}filterCells(e,t,r){let i=r!==void 0?t.filter(s=>{let o=s.document.languageId;return r.some((a=>a.language==="*"||o===a.language))}):t;return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells=="function"?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}},od=class n{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=Jn.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new Re.EventEmitter,this._onOpenNotificationSent=new Re.EventEmitter,this._onCloseNotificationSent=new Re.EventEmitter,this._onSaveNotificationSent=new Re.EventEmitter,Re.workspace.onDidOpenTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Ei&&s.didOpenNotebookCellTextDocument(r,i)}),Re.workspace.onDidChangeTextDocument(t=>{if(t.contentChanges.length===0)return;let r=t.document;if(r.uri.scheme!==n.CellScheme)return;let[i,s]=this.findNotebookDocumentAndCell(r);if(!(i===void 0||s===void 0))for(let o of this.registrations.values())o instanceof Ei&&o.didChangeNotebookCellTextDocument(i,s,t)}),Re.workspace.onDidCloseTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let s of this.registrations.values())s instanceof Ei&&s.didCloseNotebookCellTextDocument(r,i)})}getState(){if(this.registrations.size===0)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(let e of this.registrations.values()){let t=e.getState();if(t.kind==="document"&&t.registrations===!0&&t.matches===!0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){let t=z_(z_(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){let t=e.notebookDocumentSync;t!==void 0&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(Wo.asDocumentSelector(t)))}initialize(e){let t=e.notebookDocumentSync;if(t===void 0)return;let r=t.id??IS.generateUuid();this.register({id:r,registerOptions:t})}register(e){let t=new Ei(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,t)}unregister(e){let t=this.registrations.get(e);t!==void 0&&(this.registrations.delete(e),t.dispose())}clear(){for(let e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new Re.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new Re.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new Re.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new Re.EventEmitter}handles(e){if(e.uri.scheme!==n.CellScheme)return!1;if(this.dedicatedChannel!==void 0&&Re.languages.match(this.dedicatedChannel,e)>0)return!0;for(let t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(let t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){let t=e.uri.toString();for(let r of Re.workspace.notebookDocuments)for(let i of r.getCells())if(i.document.uri.toString()===t)return[r,i];return[void 0,void 0]}};an.NotebookDocumentSyncFeature=od});var V_=P(Ot=>{"use strict";var jS=Ot&&Ot.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),FS=Ot&&Ot.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),G_=Ot&&Ot.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let i=o=>{let a=[];for(let u of o.items){let l=u.scopeUri!==void 0&&u.scopeUri!==null?this._client.protocol2CodeConverter.asUri(u.scopeUri):void 0;a.push(this.getConfiguration(l,u.section!==null?u.section:void 0))}return a},s=e.middleware.workspace;return s&&s.configuration?s.configuration(t,r,i):i(t,r)})}getConfiguration(e,t){let r=null;if(t){let i=t.lastIndexOf(".");if(i===-1)r=Hr(qi.workspace.getConfiguration(void 0,e).get(t));else{let s=qi.workspace.getConfiguration(t.substr(0,i),e);s&&(r=Hr(s.get(t.substr(i+1))))}}else{let i=qi.workspace.getConfiguration(void 0,e);r={};for(let s of Object.keys(i))i.has(s)&&(r[s]=Hr(i.get(s)))}return r===void 0&&(r=null),r}clear(){}};Ot.ConfigurationFeature=ad;function Hr(n){if(n){if(Array.isArray(n))return n.map(Hr);if(typeof n=="object"){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=Hr(n[t]));return e}}return n}var cd=class{_client;isCleared;_listeners;constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return ys.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,B_.ensure)((0,B_.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;e!==void 0&&this.register({id:AS.generateUuid(),registerOptions:{section:e}})}register(e){let t=qi.workspace.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,t),e.registerOptions.section!==void 0&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let r;if(LS.string(e)?r=[e]:r=e,r!==void 0&&t!==void 0&&!r.some(a=>t.affectsConfiguration(a)))return;let i=async o=>o===void 0?this._client.sendNotification(ys.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(ys.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(o)}),s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(r,i):i(r)).catch(o=>{this._client.error(`Sending notification ${ys.DidChangeConfigurationNotification.type.method} failed`,o)})}extractSettingsInformation(e){function t(s,o){let a=s;for(let u=0;u=0?u=qi.workspace.getConfiguration(o.substr(0,a),r).get(o.substr(a+1)):u=qi.workspace.getConfiguration(void 0,r).get(o),u){let l=e[s].split(".");t(i,l)[l[l.length-1]]=Hr(u)}}return i}};Ot.SyncConfigurationFeature=cd});var Y_={};Fh(Y_,{TextDocument:()=>ud});function ld(n,e){if(n.length<=1)return n;let t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);ld(r,e),ld(i,e);let s=0,o=0,a=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function kS(n){let e=Q_(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var Bo,ud,Z_=jh(()=>{"use strict";Bo=class n{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let r of e)if(n.isIncremental(r)){let i=Q_(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),u=Math.max(i.end.line,0),l=this._lineOffsets,f=X_(r.text,!1,s);if(u-a===f.length)for(let h=0,g=f.length;he?i=o:r=o+1}let s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line];if(e.character<=0)return r;let i=e.line+1=t.length){let o=t.length-1;return{start:{line:o,character:0},end:{line:o,character:this._content.length-t[o]}}}else if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=t[e],i=e+1=t.length)return"";if(e<0)return"";let r=e+1t&&J_(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}};(function(n){function e(i,s,o,a){return new Bo(i,s,o,a)}n.create=e;function t(i,s,o){if(i instanceof Bo)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){let o=i.getText(),a=ld(s.map(kS),(f,p)=>{let h=f.range.start.line-p.range.start.line;return h===0?f.range.start.character-p.range.start.character:h}),u=0,l=[];for(let f of a){let p=i.offsetAt(f.range.start);if(pu&&l.push(o.substring(u,p)),f.newText.length&&l.push(f.newText),u=i.offsetAt(f.range.end)}return l.push(o.substr(u)),l.join("")}n.applyEdits=r})(ud||(ud={}))});var ey=P(We=>{"use strict";var $S=We&&We.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),HS=We&&We.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),US=We&&We.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.middleware.didOpen,r=>e.code2ProtocolConverter.asOpenTextDocumentParams(r),r=>r,Ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){if(this._delayOpen){if(!this.matches(e))return;if(this._client.visibleDocuments.isVisible(e))return super.callback(e);{let r=new _d(e);this._pendingOpenNotifications.set(r.uri.toString(),r)}}else return super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return fe.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(Ae.workspace.textDocuments.forEach(r=>{let i=r.uri.toString();if(!this._syncedDocuments.has(i)&&Ae.languages.match(t,r)>0&&!this._client.hasDedicatedTextSynchronizationFeature(r))if(this._client.visibleDocuments.isVisible(r)){let o=this._client.middleware,a=u=>this._client.sendNotification(this._type,this._createParams(u));(o.didOpen?o.didOpen(r,a):a(r)).catch(u=>{this._client.error(`Sending document notification ${this._type.method} failed`,u)}),this._syncedDocuments.set(i,r)}else this._pendingOpenNotifications.set(i,r)}),this._delayOpen&&this._pendingOpenListeners===void 0){this._pendingOpenListeners=[];let r=this._client.visibleDocuments;this._pendingOpenListeners.push(r.onClose(i=>{for(let s of i)this._pendingOpenNotifications.delete(s.toString())})),this._pendingOpenListeners.push(r.onOpen(i=>{for(let s of i){let o=this._pendingOpenNotifications.get(s.toString());o!==void 0&&(super.callback(o).catch((a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})),this._pendingOpenNotifications.delete(s.toString()))}})),this._pendingOpenListeners.push(Ae.workspace.onDidCloseTextDocument(i=>{this._pendingOpenNotifications.delete(i.uri.toString())}))}}async sendPendingOpenNotifications(e){let t=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();let r=!1;for(let i of t){if(e!==void 0&&i.uri.toString()===e){r=!0;continue}await super.callback(i)}return r}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,r)}clear(){if(this._pendingOpenNotifications.clear(),this._pendingOpenListeners!==void 0){for(let e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}};We.DidOpenTextDocumentFeature=dd;var fd=class extends Ie.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,t,r){super(e,Ae.workspace.onDidCloseTextDocument,fe.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,i=>e.code2ProtocolConverter.asCloseTextDocumentParams(i),i=>i,Ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=r}get registrationType(){return fe.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,r)}unregister(e){let t=this._selectors.get(e);if(t===void 0)return;super.unregister(e);let r=this._selectors.values();this._syncedDocuments.forEach(i=>{if(Ae.languages.match(t,i)>0&&!this._selectorFilter(r,i)&&!this._client.hasDedicatedTextSynchronizationFeature(i)){let s=this._client.middleware,o=a=>this._client.sendNotification(this._type,this._createParams(a));this._syncedDocuments.delete(i.uri.toString()),(s.didClose?s.didClose(i,o):o(i)).catch(a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})}})}};We.DidCloseTextDocumentFeature=fd;var hd=class extends Ie.DynamicDocumentFeature{_listener;_changeData;_onAboutToSendNotification;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,t){super(e),this._changeData=new Map,this._onAboutToSendNotification=new Ae.EventEmitter,this._onNotificationSent=new Ae.EventEmitter,this._onPendingChangeAdded=new Ae.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=fe.TextDocumentSyncKind.None}get onAboutToSendNotification(){return this._onAboutToSendNotification.event}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return fe.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.change!==void 0&&r.change!==fe.TextDocumentSyncKind.None&&this.register({id:Mi.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:r.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ae.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(let e of this._changeData.values())yield e.documentSelector}async callback(e){if(e.contentChanges.length===0)return;let t=e.document.uri,r=e.document.version,i=[];for(let s of this._changeData.values())if(Ae.languages.match(s.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let o=this._client.middleware;if(s.syncKind===fe.TextDocumentSyncKind.Incremental){let a=async u=>{let l=this._client.code2ProtocolConverter.asChangeTextDocumentParams(u,t,r);this.aboutToSendNotification(u.document,fe.DidChangeTextDocumentNotification.type,l),await this._client.sendNotification(fe.DidChangeTextDocumentNotification.type,l),this.notificationSent(u.document,fe.DidChangeTextDocumentNotification.type,l)};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}else if(s.syncKind===fe.TextDocumentSyncKind.Full){let a=async u=>{let l=u.document.uri.toString();this._pendingTextDocumentChanges.set(l,u.document),this._onPendingChangeAdded.fire()};i.push(o.didChange?o.didChange(e,u=>a(u)):a(e))}}return Promise.all(i).then(void 0,s=>{throw this._client.error(`Sending document notification ${fe.DidChangeTextDocumentNotification.type.method} failed`,s),s})}aboutToSendNotification(e,t,r){this._onAboutToSendNotification.fire({textDocument:e,type:t,params:r})}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){if(this._changeData.delete(e),this._changeData.size===0)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=fe.TextDocumentSyncKind.None;else{this._syncKind=fe.TextDocumentSyncKind.None;for(let t of this._changeData.values())if(this.updateSyncKind(t.syncKind),this._syncKind===fe.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=fe.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(this._pendingTextDocumentChanges.size===0)return[];let t;if(e.size===0)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(let r of this._pendingTextDocumentChanges)e.has(r[0])||(t.push(r[1]),this._pendingTextDocumentChanges.delete(r[0]))}return t}getProvider(e){for(let t of this._changeData.values())if(Ae.languages.match(t.documentSelector,e)>0)return{send:r=>this.callback(r)}}updateSyncKind(e){if(this._syncKind!==fe.TextDocumentSyncKind.Full)switch(e){case fe.TextDocumentSyncKind.Full:this._syncKind=e;break;case fe.TextDocumentSyncKind.Incremental:this._syncKind===fe.TextDocumentSyncKind.None&&(this._syncKind=fe.TextDocumentSyncKind.Incremental);break}}};We.DidChangeTextDocumentFeature=hd;var pd=class extends Ie.TextDocumentEventFeature{constructor(e){super(e,Ae.workspace.onWillSaveTextDocument,fe.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),t=>t.document,(t,r)=>Ie.TextDocumentEventFeature.textDocumentFilter(t,r.document))}get registrationType(){return fe.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSave&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}};We.WillSaveFeature=pd;var gd=class extends Ie.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return fe.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSaveWaitUntil&&this.register({id:Mi.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ae.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(Ie.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,r=i=>this._client.sendRequest(fe.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(i)).then(async s=>{let o=await this._client.protocol2CodeConverter.asTextEdits(s);return o===void 0?[]:o});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,r):r(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}};We.WillSaveWaitUntilFeature=gd;var md=class extends Ie.TextDocumentEventFeature{_includeText;constructor(e){super(e,Ae.workspace.onDidSaveTextDocument,fe.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),t=>t,Ie.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return fe.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,Ie.ensure)((0,Ie.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;if(t&&r&&r.save){let i=typeof r.save=="boolean"?{includeText:!1}:{includeText:!!r.save.includeText};this.register({id:Mi.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},i)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}};We.DidSaveTextDocumentFeature=md;var zS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function KS(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of zS)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}var BS=KS(),_d=class n{_extTextDocument;_capturedTextDocument;_content;_uri;_fileName;_languageId;_version;_eol;_isUntitled;_encoding;_isDirty;_isClosed;constructor(e){this._extTextDocument=e,this._content=e.getText(),this._uri=e.uri,this._fileName=e.fileName,this._languageId=e.languageId,this._version=e.version,this._eol=e.eol,this._isUntitled=e.isUntitled,this._encoding=e.encoding,this._isDirty=e.isDirty,this._isClosed=e.isClosed,this._capturedTextDocument=WS.TextDocument.create(this._uri.toString(),this._languageId,this._version,this._content)}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}get eol(){return this._eol}get isUntitled(){return this._isUntitled}get encoding(){return this._encoding}get fileName(){return this._fileName}get isDirty(){return this._isDirty}get isClosed(){return this._isClosed}save(){return this.version===this._extTextDocument.version?this._extTextDocument.save():Promise.resolve(!1)}get lineCount(){return this._capturedTextDocument.lineCount}offsetAt(e){return this._capturedTextDocument.offsetAt(e)}positionAt(e){let t=this._capturedTextDocument.positionAt(e);return new Ae.Position(t.line,t.character)}getText(e){return this._capturedTextDocument.getText(e)}lineAt(e){let t=typeof e=="number"?e:this.validatePosition(e).line;if(t<0||t>=this.lineCount)throw new RangeError(`Illegal value for line: ${t}`);let r=this._capturedTextDocument.getLineRange(t),i=this._capturedTextDocument.getText(r),s=i.search(/\S/),o=new Ae.Range(r.start.line,r.start.character,r.end.line,r.end.character),a=t+1=e.character)return new Ae.Range(r,o.index,r,s.lastIndex)}validateRange(e){let t=this.validatePosition(e.start),r=this.validatePosition(e.end);return t===e.start&&r===e.end?e:new Ae.Range(t.line,t.character,r.line,r.character)}validatePosition(e){let t=Math.min(Math.max(e.line,0),this.lineCount-1),r=this._capturedTextDocument.getLineRange(t),i=Math.min(Math.max(e.character,0),r.end.character);return t===e.line&&i===e.character?e:new Ae.Position(t,i)}static getWordRegExp(e){let t=e??BS;if(t.flags.includes("g"))return t;let r=`${t.flags}g`;return new RegExp(t.source,r)}}});var ty=P(cn=>{"use strict";var GS=cn&&cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),VS=cn&&cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),XS=cn&&cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let p=this._client,h=this._client.middleware,g=(_,v,R,q)=>p.sendRequest(ee.CompletionRequest.type,p.code2ProtocolConverter.asCompletionParams(_,v,R),q).then(w=>q.isCancellationRequested?null:p.protocol2CodeConverter.asCompletionResult(w,i,q),w=>p.handleFailedRequest(ee.CompletionRequest.type,q,w,null));return h.provideCompletionItem?h.provideCompletionItem(a,u,f,l,g):g(a,u,f,l)},resolveCompletionItem:e.resolveProvider?(a,u)=>{let l=this._client,f=this._client.middleware,p=(h,g)=>l.sendRequest(ee.CompletionResolveRequest.type,l.code2ProtocolConverter.asCompletionItem(h,!!this.labelDetailsSupport.get(t)),g).then(_=>g.isCancellationRequested?null:l.protocol2CodeConverter.asCompletionItem(_),_=>l.handleFailedRequest(ee.CompletionResolveRequest.type,g,_,h));return f.resolveCompletionItem?f.resolveCompletionItem(a,u,p):p(a,u)}:void 0};return[JS.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),o,...r),o]}};cn.CompletionItemFeature=vd});var ny=P(un=>{"use strict";var ZS=un&&un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),eP=un&&un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),tP=un&&un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(vs.HoverRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asHover(g),g=>a.handleFailedRequest(vs.HoverRequest.type,h,g,null)),l=a.middleware;return l.provideHover?l.provideHover(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return nP.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};un.HoverFeature=Cd});var ry=P(ln=>{"use strict";var iP=ln&&ln.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sP=ln&&ln.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oP=ln&&ln.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(wd.DefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(wd.DefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideDefinition?l.provideDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return aP.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ln.DefinitionFeature=Sd});var sy=P(dn=>{"use strict";var uP=dn&&dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),lP=dn&&dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),dP=dn&&dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h,g)=>a.sendRequest(bs.SignatureHelpRequest.type,a.code2ProtocolConverter.asSignatureHelpParams(f,p,h),g).then(_=>g.isCancellationRequested?null:a.protocol2CodeConverter.asSignatureHelp(_,g),_=>a.handleFailedRequest(bs.SignatureHelpRequest.type,g,_,null)),l=a.middleware;return l.provideSignatureHelp?l.provideSignatureHelp(r,i,o,s,u):u(r,i,o,s)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){let r=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(e.retriggerCharacters===void 0){let i=e.triggerCharacters||[];return iy.languages.registerSignatureHelpProvider(r,t,...i)}else{let i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return iy.languages.registerSignatureHelpProvider(r,t,i)}}};dn.SignatureHelpFeature=Rd});var oy=P(fn=>{"use strict";var hP=fn&&fn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pP=fn&&fn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gP=fn&&fn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(Td.DocumentHighlightRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDocumentHighlights(g,h),g=>a.handleFailedRequest(Td.DocumentHighlightRequest.type,h,g,null)),l=a.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,s,o,u):u(i,s,o)}};return[mP.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};fn.DocumentHighlightFeature=Ed});var xd=P(ut=>{"use strict";var yP=ut&&ut.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vP=ut&&ut.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bP=ut&&ut.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(le.DocumentSymbolRequest.type,a.code2ProtocolConverter.asDocumentSymbolParams(f),p);if(p.isCancellationRequested||h===void 0||h===null)return null;if(h.length===0)return[];{let g=h[0];return le.DocumentSymbol.is(g)?await a.protocol2CodeConverter.asDocumentSymbols(h,p):await a.protocol2CodeConverter.asSymbolInformations(h,p)}}catch(h){return a.handleFailedRequest(le.DocumentSymbolRequest.type,p,h,null)}},l=a.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(s,o,u):u(s,o)}},i=e.label!==void 0?{label:e.label}:void 0;return[CP.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,i),r]}};ut.DocumentSymbolFeature=Md});var cy=P(hn=>{"use strict";var DP=hn&&hn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SP=hn&&hn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PP=hn&&hn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let s=this._client,o=(u,l)=>s.sendRequest(Cs.WorkspaceSymbolRequest.type,{query:u},l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformations(f,l),f=>s.handleFailedRequest(Cs.WorkspaceSymbolRequest.type,l,f,null)),a=s.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(r,i,o):o(r,i)},resolveWorkspaceSymbol:e.resolveProvider===!0?(r,i)=>{let s=this._client,o=(u,l)=>s.sendRequest(Cs.WorkspaceSymbolResolveRequest.type,s.code2ProtocolConverter.asWorkspaceSymbol(u),l).then(f=>l.isCancellationRequested?null:s.protocol2CodeConverter.asSymbolInformation(f),f=>s.handleFailedRequest(Cs.WorkspaceSymbolResolveRequest.type,l,f,null)),a=s.middleware;return a.resolveWorkspaceSymbol?a.resolveWorkspaceSymbol(r,i,o):o(r,i)}:void 0};return[RP.languages.registerWorkspaceSymbolProvider(t),t]}};hn.WorkspaceSymbolFeature=Nd});var uy=P(pn=>{"use strict";var OP=pn&&pn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),EP=pn&&pn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qP=pn&&pn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=(p,h,g,_)=>u.sendRequest(jd.ReferencesRequest.type,u.code2ProtocolConverter.asReferenceParams(p,h,g),_).then(v=>_.isCancellationRequested?null:u.protocol2CodeConverter.asReferences(v,_),v=>u.handleFailedRequest(jd.ReferencesRequest.type,_,v,null)),f=u.middleware;return f.provideReferences?f.provideReferences(i,s,o,a,l):l(i,s,o,a)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return MP.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};pn.ReferencesFeature=Ld});var ly=P(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.TypeDefinitionFeature=void 0;var IP=require("vscode"),Ad=V(),ws=ne(),kd=class extends ws.TextDocumentLanguageFeature{constructor(e){super(e,Ad.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,ws.ensure)((0,ws.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,ws.ensure)((0,ws.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeDefinitionProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideTypeDefinition:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(Ad.TypeDefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest(Ad.TypeDefinitionRequest.type,h,g,null)),l=a.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return IP.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Go.TypeDefinitionFeature=kd});var dy=P(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.ImplementationFeature=void 0;var NP=require("vscode"),$d=V(),Hd=ne(),Ud=class extends Hd.TextDocumentLanguageFeature{constructor(e){super(e,$d.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,Hd.ensure)((0,Hd.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.implementationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideImplementation:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest($d.ImplementationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,h),g=>a.handleFailedRequest($d.ImplementationRequest.type,h,g,null)),l=a.middleware;return l.provideImplementation?l.provideImplementation(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return NP.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Vo.ImplementationFeature=Ud});var fy=P(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.ColorProviderFeature=void 0;var jP=require("vscode"),Ds=V(),Wd=ne(),zd=class extends Wd.TextDocumentLanguageFeature{constructor(e){super(e,Ds.DocumentColorRequest.type)}fillClientCapabilities(e){(0,Wd.ensure)((0,Wd.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.colorProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideColorPresentations:(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={color:f,textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(p.document),range:a.code2ProtocolConverter.asRange(p.range)};return a.sendRequest(Ds.ColorPresentationRequest.type,g,h).then(_=>h.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(_,h),_=>a.handleFailedRequest(Ds.ColorPresentationRequest.type,h,_,null))},l=a.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,s,o,u):u(i,s,o)},provideDocumentColors:(i,s)=>{let o=this._client,a=(l,f)=>{let p={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(l)};return o.sendRequest(Ds.DocumentColorRequest.type,p,f).then(h=>f.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(h,f),h=>o.handleFailedRequest(Ds.DocumentColorRequest.type,f,h,null))},u=o.middleware;return u.provideDocumentColors?u.provideDocumentColors(i,s,a):a(i,s)}};return[jP.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Xo.ColorProviderFeature=zd});var hy=P(gn=>{"use strict";var FP=gn&&gn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),LP=gn&&gn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),AP=gn&&gn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),context:u.code2ProtocolConverter.asCodeActionContextSync(g)};return u.sendRequest(lt.CodeActionRequest.type,v,_).then(R=>_.isCancellationRequested||R===null||R===void 0?null:u.protocol2CodeConverter.asCodeActionResult(R,_),R=>u.handleFailedRequest(lt.CodeActionRequest.type,_,R,null))},f=u.middleware;return f.provideCodeActions?f.provideCodeActions(i,s,o,a,l):l(i,s,o,a)},resolveCodeAction:e.resolveProvider?(i,s)=>{let o=this._client,a=this._client.middleware,u=async(l,f)=>o.sendRequest(lt.CodeActionResolveRequest.type,o.code2ProtocolConverter.asCodeActionSync(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asCodeAction(p,f),p=>o.handleFailedRequest(lt.CodeActionResolveRequest.type,f,p,l));return a.resolveCodeAction?a.resolveCodeAction(i,s,u):u(i,s)}:void 0};return[kP.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,this.getMetadata(e)),r]}getMetadata(e){if(!(e.codeActionKinds===void 0&&e.documentation===void 0))return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}};gn.CodeActionFeature=Bd});var gy=P(mn=>{"use strict";var HP=mn&&mn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),UP=mn&&mn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),WP=mn&&mn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let s of this.getAllProviders())s.onDidChangeCodeLensEmitter.fire()});let i=this.getRegistrationOptions(t,e.codeLensProvider);i&&this.register({id:zP.generateUuid(),registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new py.EventEmitter,i={onDidChangeCodeLenses:r.event,provideCodeLenses:(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(xi.CodeLensRequest.type,a.code2ProtocolConverter.asCodeLensParams(f),p).then(h=>p.isCancellationRequested?null:a.protocol2CodeConverter.asCodeLenses(h,p),h=>a.handleFailedRequest(xi.CodeLensRequest.type,p,h,null)),l=a.middleware;return l.provideCodeLenses?l.provideCodeLenses(s,o,u):u(s,o)},resolveCodeLens:e.resolveProvider?(s,o)=>{let a=this._client,u=(f,p)=>a.sendRequest(xi.CodeLensResolveRequest.type,a.code2ProtocolConverter.asCodeLens(f),p).then(h=>p.isCancellationRequested?f:a.protocol2CodeConverter.asCodeLens(h),h=>a.handleFailedRequest(xi.CodeLensResolveRequest.type,p,h,f)),l=a.middleware;return l.resolveCodeLens?l.resolveCodeLens(s,o,u):u(s,o)}:void 0};return[py.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:r}]}};mn.CodeLensFeature=Gd});var my=P(Ct=>{"use strict";var KP=Ct&&Ct.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),BP=Ct&&Ct.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),GP=Ct&&Ct.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),options:a.code2ProtocolConverter.asFormattingOptions(p,Ii.fromConfiguration(f))};return a.sendRequest(Jt.DocumentFormattingRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asTextEdits(_,h),_=>a.handleFailedRequest(Jt.DocumentFormattingRequest.type,h,_,null))},l=a.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,s,o,u):u(i,s,o)}};return[Jo.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ct.DocumentFormattingFeature=Vd;var Xd=class extends Qn.TextDocumentLanguageFeature{constructor(e){super(e,Jt.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){let t=(0,Qn.ensure)((0,Qn.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);r&&this.register({id:Qd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentRangeFormattingEdits:(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h),options:u.code2ProtocolConverter.asFormattingOptions(g,Ii.fromConfiguration(p))};return u.sendRequest(Jt.DocumentRangeFormattingRequest.type,v,_).then(R=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(R,_),R=>u.handleFailedRequest(Jt.DocumentRangeFormattingRequest.type,_,R,null))},f=u.middleware;return f.provideDocumentRangeFormattingEdits?f.provideDocumentRangeFormattingEdits(i,s,o,a,l):l(i,s,o,a)}};return e.rangesSupport&&(r.provideDocumentRangesFormattingEdits=(i,s,o,a)=>{let u=this._client,l=(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),ranges:u.code2ProtocolConverter.asRanges(h),options:u.code2ProtocolConverter.asFormattingOptions(g,Ii.fromConfiguration(p))};return u.sendRequest(Jt.DocumentRangesFormattingRequest.type,v,_).then(R=>_.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(R,_),R=>u.handleFailedRequest(Jt.DocumentRangesFormattingRequest.type,_,R,null))},f=u.middleware;return f.provideDocumentRangesFormattingEdits?f.provideDocumentRangesFormattingEdits(i,s,o,a,l):l(i,s,o,a)}),[Jo.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ct.DocumentRangeFormattingFeature=Xd;var Jd=class extends Qn.TextDocumentLanguageFeature{constructor(e){super(e,Jt.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,Qn.ensure)((0,Qn.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);r&&this.register({id:Qd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideOnTypeFormattingEdits:(s,o,a,u,l)=>{let f=this._client,p=(g,_,v,R,q)=>{let w={textDocument:f.code2ProtocolConverter.asTextDocumentIdentifier(g),position:f.code2ProtocolConverter.asPosition(_),ch:v,options:f.code2ProtocolConverter.asFormattingOptions(R,Ii.fromConfiguration(g))};return f.sendRequest(Jt.DocumentOnTypeFormattingRequest.type,w,q).then(M=>q.isCancellationRequested?null:f.protocol2CodeConverter.asTextEdits(M,q),M=>f.handleFailedRequest(Jt.DocumentOnTypeFormattingRequest.type,q,M,null))},h=f.middleware;return h.provideOnTypeFormattingEdits?h.provideOnTypeFormattingEdits(s,o,a,u,l,p):p(s,o,a,u,l)}},i=e.moreTriggerCharacter||[];return[Jo.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,e.firstTriggerCharacter,...i),r]}};Ct.DocumentOnTypeFormattingFeature=Jd});var vy=P(_n=>{"use strict";var VP=_n&&_n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XP=_n&&_n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),yy=_n&&_n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=async(p,h,g,_)=>{let v={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),position:u.code2ProtocolConverter.asPosition(h),newName:g},R=null;try{R=await u.sendRequest(Ur.RenameRequest.type,v,_)}catch(w){return u.handleFailedRequest(Ur.RenameRequest.type,_,w,null,!1)}if(_.isCancellationRequested||R===null)return null;let q=await u.protocol2CodeConverter.asWorkspaceEdit(R,_);if(_.isCancellationRequested)return null;if(!u.validateWorkspaceEdit(R))throw new Error("The rename edit returned from the server is not valid anymore and cannot be applied.");return q},f=u.middleware;return f.provideRenameEdits?f.provideRenameEdits(i,s,o,a,l):l(i,s,o,a)},prepareRename:e.prepareProvider?(i,s,o)=>{let a=this._client,u=(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),position:a.code2ProtocolConverter.asPosition(p)};return a.sendRequest(Ur.PrepareRenameRequest.type,g,h).then(_=>h.isCancellationRequested?null:Ur.Range.is(_)?a.protocol2CodeConverter.asRange(_):this.isDefaultBehavior(_)?_.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):_&&Ur.Range.is(_.range)?{range:a.protocol2CodeConverter.asRange(_.range),placeholder:_.placeholder}:Promise.reject(new Error("The element can't be renamed.")),_=>{throw typeof _.message=="string"?new Error(_.message):new Error("The element can't be renamed.")})},l=a.middleware;return l.prepareRename?l.prepareRename(i,s,o,u):u(i,s,o)}:void 0};return[this.registerProvider(t,r),r]}registerProvider(e,t){return JP.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){let t=e;return t&&_y.boolean(t.defaultBehavior)}};_n.RenameFeature=Zd});var by=P(yn=>{"use strict";var YP=yn&&yn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ZP=yn&&yn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),eR=yn&&yn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let o=this._client,a=(l,f)=>o.sendRequest(Ps.DocumentLinkRequest.type,o.code2ProtocolConverter.asDocumentLinkParams(l),f).then(p=>f.isCancellationRequested?null:o.protocol2CodeConverter.asDocumentLinks(p,f),p=>o.handleFailedRequest(Ps.DocumentLinkRequest.type,f,p,null)),u=o.middleware;return u.provideDocumentLinks?u.provideDocumentLinks(i,s,a):a(i,s)},resolveDocumentLink:e.resolveProvider?(i,s)=>{let o=this._client,a=(l,f)=>o.sendRequest(Ps.DocumentLinkResolveRequest.type,o.code2ProtocolConverter.asDocumentLink(l),f).then(p=>f.isCancellationRequested?l:o.protocol2CodeConverter.asDocumentLink(p),p=>o.handleFailedRequest(Ps.DocumentLinkResolveRequest.type,f,p,l)),u=o.middleware;return u.resolveDocumentLink?u.resolveDocumentLink(i,s,a):a(i,s)}:void 0};return[tR.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};yn.DocumentLinkFeature=tf});var wy=P(vn=>{"use strict";var rR=vn&&vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),iR=vn&&vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sR=vn&&vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}get registrationType(){return nf.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,Cy.ensure)((0,Cy.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:aR.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,r=t.middleware,i=(s,o)=>{let a={command:s,arguments:o};return t.sendRequest(nf.ExecuteCommandRequest.type,a).then(void 0,u=>t.handleFailedRequest(nf.ExecuteCommandRequest.type,void 0,u,void 0))};if(e.registerOptions.commands){let s=[];for(let o of e.registerOptions.commands)s.push(oR.commands.registerCommand(o,(...a)=>r.executeCommand?r.executeCommand(o,a,i):i(o,a)));this._commands.set(e.id,s)}}unregister(e){let t=this._commands.get(e);t&&(this._commands.delete(e),t.forEach(r=>r.dispose()))}clear(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};vn.ExecuteCommandFeature=rf});var Sy=P(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.FoldingRangeFeature=void 0;var Dy=require("vscode"),Wr=V(),Rs=ne(),sf=class extends Rs.TextDocumentLanguageFeature{constructor(e){super(e,Wr.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,Rs.ensure)((0,Rs.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[Wr.FoldingRangeKind.Comment,Wr.FoldingRangeKind.Imports,Wr.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,Rs.ensure)((0,Rs.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(Wr.FoldingRangeRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeFoldingRange.fire()});let[r,i]=this.getRegistration(t,e.foldingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Dy.EventEmitter,i={onDidChangeFoldingRanges:r.event,provideFoldingRanges:(s,o,a)=>{let u=this._client,l=(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p)};return u.sendRequest(Wr.FoldingRangeRequest.type,_,g).then(v=>g.isCancellationRequested?null:u.protocol2CodeConverter.asFoldingRanges(v,g),v=>u.handleFailedRequest(Wr.FoldingRangeRequest.type,g,v,null))},f=u.middleware;return f.provideFoldingRanges?f.provideFoldingRanges(s,o,a,l):l(s,o,a)}};return[Dy.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeFoldingRange:r}]}};Qo.FoldingRangeFeature=sf});var Py=P(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DeclarationFeature=void 0;var cR=require("vscode"),of=V(),af=ne(),cf=class extends af.TextDocumentLanguageFeature{constructor(e){super(e,of.DeclarationRequest.type)}fillClientCapabilities(e){let t=(0,af.ensure)((0,af.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.declarationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDeclaration:(i,s,o)=>{let a=this._client,u=(f,p,h)=>a.sendRequest(of.DeclarationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asDeclarationResult(g,h),g=>a.handleFailedRequest(of.DeclarationRequest.type,h,g,null)),l=a.middleware;return l.provideDeclaration?l.provideDeclaration(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return cR.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Yo.DeclarationFeature=cf});var Ry=P(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.SelectionRangeFeature=void 0;var uR=require("vscode"),uf=V(),lf=ne(),df=class extends lf.TextDocumentLanguageFeature{constructor(e){super(e,uf.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=(0,lf.ensure)((0,lf.ensure)(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.selectionRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideSelectionRanges:(i,s,o)=>{let a=this._client,u=async(f,p,h)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),positions:a.code2ProtocolConverter.asPositionsSync(p,h)};return a.sendRequest(uf.SelectionRangeRequest.type,g,h).then(_=>h.isCancellationRequested?null:a.protocol2CodeConverter.asSelectionRanges(_,h),_=>a.handleFailedRequest(uf.SelectionRangeRequest.type,h,_,null))},l=a.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return uR.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Zo.SelectionRangeFeature=df});var Ty=P(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.CallHierarchyFeature=void 0;var lR=require("vscode"),zr=V(),ff=ne(),hf=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(zr.CallHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(p,l),p=>i.handleFailedRequest(zr.CallHierarchyPrepareRequest.type,l,p,null))};return s.prepareCallHierarchy?s.prepareCallHierarchy(e,t,r,o):o(e,t,r)}provideCallHierarchyIncomingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(zr.CallHierarchyIncomingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyIncomingCalls(l,a),l=>r.handleFailedRequest(zr.CallHierarchyIncomingCallsRequest.type,a,l,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,s):s(e,t)}provideCallHierarchyOutgoingCalls(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(o)};return r.sendRequest(zr.CallHierarchyOutgoingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyOutgoingCalls(l,a),l=>r.handleFailedRequest(zr.CallHierarchyOutgoingCallsRequest.type,a,l,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,s):s(e,t)}},pf=class extends ff.TextDocumentLanguageFeature{constructor(e){super(e,zr.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=e,r=(0,ff.ensure)((0,ff.ensure)(t,"textDocument"),"callHierarchy");r.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.callHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new hf(t);return[lR.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};ea.CallHierarchyFeature=pf});var Ey=P(bn=>{"use strict";var dR=bn&&bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),fR=bn&&bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Oy=bn&&bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{for(let o of this.getAllProviders())o.onDidChangeSemanticTokensEmitter.fire()});let[i,s]=this.getRegistration(t,e.semanticTokensProvider);!i||!s||this.register({id:i,registerOptions:s})}registerLanguageProvider(e){let t=e.documentSelector,r=hR.boolean(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,s=new ta.EventEmitter,o=r?{onDidChangeSemanticTokens:s.event,provideDocumentSemanticTokens:(g,_)=>{let v=this._client,R=v.middleware,q=(w,M)=>{let j={textDocument:v.code2ProtocolConverter.asTextDocumentIdentifier(w)};return v.sendRequest(J.SemanticTokensRequest.type,j,M).then(F=>M.isCancellationRequested?null:v.protocol2CodeConverter.asSemanticTokens(F,M),F=>v.handleFailedRequest(J.SemanticTokensRequest.type,M,F,null))};return R.provideDocumentSemanticTokens?R.provideDocumentSemanticTokens(g,_,q):q(g,_)},provideDocumentSemanticTokensEdits:i?(g,_,v)=>{let R=this._client,q=R.middleware,w=(M,j,F)=>{let oe={textDocument:R.code2ProtocolConverter.asTextDocumentIdentifier(M),previousResultId:j};return R.sendRequest(J.SemanticTokensDeltaRequest.type,oe,F).then(async te=>F.isCancellationRequested?null:J.SemanticTokens.is(te)?await R.protocol2CodeConverter.asSemanticTokens(te,F):await R.protocol2CodeConverter.asSemanticTokensEdits(te,F),te=>R.handleFailedRequest(J.SemanticTokensDeltaRequest.type,F,te,null))};return q.provideDocumentSemanticTokensEdits?q.provideDocumentSemanticTokensEdits(g,_,v,w):w(g,_,v)}:void 0}:void 0,u=e.range===!0?{onDidChangeSemanticTokens:s.event,provideDocumentRangeSemanticTokens:(g,_,v)=>{let R=this._client,q=R.middleware,w=(M,j,F)=>{let oe={textDocument:R.code2ProtocolConverter.asTextDocumentIdentifier(M),range:R.code2ProtocolConverter.asRange(j)};return R.sendRequest(J.SemanticTokensRangeRequest.type,oe,F).then(te=>F.isCancellationRequested?null:R.protocol2CodeConverter.asSemanticTokens(te,F),te=>R.handleFailedRequest(J.SemanticTokensRangeRequest.type,F,te,null))};return q.provideDocumentRangeSemanticTokens?q.provideDocumentRangeSemanticTokens(g,_,v,w):w(g,_,v)}}:void 0,l=[],f=this._client,p=f.protocol2CodeConverter.asSemanticTokensLegend(e.legend),h=f.protocol2CodeConverter.asDocumentSelector(t);return o!==void 0&&l.push(ta.languages.registerDocumentSemanticTokensProvider(h,o,p)),u!==void 0&&l.push(ta.languages.registerDocumentRangeSemanticTokensProvider(h,u,p)),[new ta.Disposable(()=>l.forEach(g=>g.dispose())),{range:u,full:o,onDidChangeSemanticTokensEmitter:s}]}};bn.SemanticTokensFeature=gf});var My=P(Cn=>{"use strict";var pR=Cn&&Cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),gR=Cn&&Cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qy=Cn&&Cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let a=this._client,u=(f,p,h)=>a.sendRequest(mf.LinkedEditingRangeRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,p),h).then(g=>h.isCancellationRequested?null:a.protocol2CodeConverter.asLinkedEditingRanges(g,h),g=>a.handleFailedRequest(mf.LinkedEditingRangeRequest.type,h,g,null)),l=a.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,s,o,u):u(i,s,o)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return mR.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Cn.LinkedEditingFeature=yf});var xy=P(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.TypeHierarchyFeature=void 0;var _R=require("vscode"),Kr=V(),vf=ne(),bf=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,r){let i=this.client,s=this.middleware,o=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(Kr.TypeHierarchyPrepareRequest.type,f,l).then(p=>l.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(p,l),p=>i.handleFailedRequest(Kr.TypeHierarchyPrepareRequest.type,l,p,null))};return s.prepareTypeHierarchy?s.prepareTypeHierarchy(e,t,r,o):o(e,t,r)}provideTypeHierarchySupertypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(Kr.TypeHierarchySupertypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Kr.TypeHierarchySupertypesRequest.type,a,l,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,s):s(e,t)}provideTypeHierarchySubtypes(e,t){let r=this.client,i=this.middleware,s=(o,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(o)};return r.sendRequest(Kr.TypeHierarchySubtypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Kr.TypeHierarchySubtypesRequest.type,a,l,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,s):s(e,t)}},Cf=class extends vf.TextDocumentLanguageFeature{constructor(e){super(e,Kr.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=(0,vf.ensure)((0,vf.ensure)(e,"textDocument"),"typeHierarchy");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new bf(t);return[_R.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};na.TypeHierarchyFeature=Cf});var Ny=P(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.InlineValueFeature=void 0;var Iy=require("vscode"),ra=V(),Os=ne(),wf=class extends Os.TextDocumentLanguageFeature{constructor(e){super(e,ra.InlineValueRequest.type)}fillClientCapabilities(e){(0,Os.ensure)((0,Os.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,Os.ensure)((0,Os.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(ra.InlineValueRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlineValues.fire()});let[r,i]=this.getRegistration(t,e.inlineValueProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Iy.EventEmitter,i={onDidChangeInlineValues:r.event,provideInlineValues:(s,o,a,u)=>{let l=this._client,f=(h,g,_,v)=>{let R={textDocument:l.code2ProtocolConverter.asTextDocumentIdentifier(h),range:l.code2ProtocolConverter.asRange(g),context:l.code2ProtocolConverter.asInlineValueContext(_)};return l.sendRequest(ra.InlineValueRequest.type,R,v).then(q=>v.isCancellationRequested?null:l.protocol2CodeConverter.asInlineValues(q,v),q=>l.handleFailedRequest(ra.InlineValueRequest.type,v,q,null))},p=l.middleware;return p.provideInlineValues?p.provideInlineValues(s,o,a,u,f):f(s,o,a,u)}};return[this.registerProvider(t,i),{provider:i,onDidChangeInlineValues:r}]}registerProvider(e,t){return Iy.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};ia.InlineValueFeature=wf});var Fy=P(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.InlayHintsFeature=void 0;var jy=require("vscode"),Ni=V(),Es=ne(),Df=class extends Es.TextDocumentLanguageFeature{constructor(e){super(e,Ni.InlayHintRequest.type)}fillClientCapabilities(e){let t=(0,Es.ensure)((0,Es.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,Es.ensure)((0,Es.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(Ni.InlayHintRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeInlayHints.fire()});let[r,i]=this.getRegistration(t,e.inlayHintProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new jy.EventEmitter,i={onDidChangeInlayHints:r.event,provideInlayHints:(s,o,a)=>{let u=this._client,l=async(p,h,g)=>{let _={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(p),range:u.code2ProtocolConverter.asRange(h)};try{let v=await u.sendRequest(Ni.InlayHintRequest.type,_,g);return g.isCancellationRequested?null:u.protocol2CodeConverter.asInlayHints(v,g)}catch(v){return u.handleFailedRequest(Ni.InlayHintRequest.type,g,v,null)}},f=u.middleware;return f.provideInlayHints?f.provideInlayHints(s,o,a,l):l(s,o,a)}};return i.resolveInlayHint=e.resolveProvider===!0?(s,o)=>{let a=this._client,u=async(f,p)=>{try{let h=await a.sendRequest(Ni.InlayHintResolveRequest.type,a.code2ProtocolConverter.asInlayHint(f),p);if(p.isCancellationRequested)return null;let g=a.protocol2CodeConverter.asInlayHint(h,p);return p.isCancellationRequested?null:g}catch(h){return a.handleFailedRequest(Ni.InlayHintResolveRequest.type,p,h,null)}},l=a.middleware;return l.resolveInlayHint?l.resolveInlayHint(s,o,u):u(s,o)}:void 0,[this.registerProvider(t,i),{provider:i,onDidChangeInlayHints:r}]}registerProvider(e,t){return jy.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};sa.InlayHintsFeature=Df});var Ly=P(Qt=>{"use strict";var yR=Qt&&Qt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vR=Qt&&Qt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bR=Qt&&Qt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ie.indexOf(t)<0)}var Rf=class{_client;_listeners;_initialFolders;constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return qs.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=oa.workspace.workspaceFolders;this.initializeWithFolders(t),t===void 0?e.workspaceFolders=null:e.workspaceFolders=t.map(r=>this.asProtocol(r))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(qs.WorkspaceFoldersRequest.type,s=>{let o=()=>{let u=oa.workspace.workspaceFolders;return u===void 0?null:u.map(f=>this.asProtocol(f))},a=t.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(s,o):o(s)});let r=Sf(Sf(Sf(e,"workspace"),"workspaceFolders"),"changeNotifications"),i;typeof r=="string"?i=r:r===!0&&(i=CR.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){let r=Pf(this._initialFolders,e),i=Pf(e,this._initialFolders);(i.length>0||r.length>0)&&(t=this.doSendEvent(i,r))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));t!==void 0&&t.catch(r=>{this._client.error(`Sending notification ${qs.DidChangeWorkspaceFoldersNotification.type.method} failed`,r)})}doSendEvent(e,t){let r={event:{added:e.map(i=>this.asProtocol(i)),removed:t.map(i=>this.asProtocol(i))}};return this._client.sendNotification(qs.DidChangeWorkspaceFoldersNotification.type,r)}register(e){let t=e.id,r=this._client,i=oa.workspace.onDidChangeWorkspaceFolders(s=>{let o=l=>this.doSendEvent(l.added,l.removed),a=r.middleware.workspace;(a&&a.didChangeWorkspaceFolders?a.didChangeWorkspaceFolders(s,o):o(s)).catch(l=>{this._client.error(`Sending notification ${qs.DidChangeWorkspaceFoldersNotification.type.method} failed`,l)})});this._listeners.set(t,i),this.sendInitialEvent(oa.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return e===void 0?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}};Qt.WorkspaceFoldersFeature=Rf});var $y=P(ze=>{"use strict";var wR=ze&&ze.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),DR=ze&&ze.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ua=ze&&ze.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){let t=Ay(Ay(e,"workspace"),"fileOperations");ky(t,"dynamicRegistration",!0),ky(t,this._clientCapability,!0)}initialize(e){let t=e.workspace?.fileOperations,r=t!==void 0?RR(t,this._serverCapability):void 0;if(r?.filters!==void 0)try{this.register({id:PR.generateUuid(),registerOptions:{filters:r.filters}})}catch(i){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${i}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(r=>{let i=new SR.Minimatch(r.pattern.glob,n.asMinimatchOptions(r.pattern.options));if(!i.makeRe())throw new Error(`Invalid pattern ${r.pattern.glob}!`);return{scheme:r.scheme,matcher:i,kind:r.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return n.getFileType(e)}async filter(e,t){let r=await Promise.all(e.files.map(async s=>{let o=t(s),a=o.fsPath.replace(/\\/g,"/");for(let u of this._filters.values())for(let l of u)if(!(l.scheme!==void 0&&l.scheme!==o.scheme)){if(l.matcher.match(a)){if(l.kind===void 0)return!0;let f=await this.getFileType(o);if(f===void 0)return this._client.info(`Unable to determine file type for ${o.toString()}. Treating as a match.`),!0;if(f===$t.FileType.File&&l.kind===Yn.FileOperationPatternKind.file||f===$t.FileType.Directory&&l.kind===Yn.FileOperationPatternKind.folder)return!0}else if(l.kind===Yn.FileOperationPatternKind.folder&&await n.getFileType(o)===$t.FileType.Directory&&l.matcher.match(`${a}/`))return!0}return!1})),i=e.files.filter((s,o)=>r[o]);return{...e,files:i}}static async getFileType(e){try{return(await $t.workspace.fs.stat(e)).type}catch{return}}static asMinimatchOptions(e){let t={dot:!0};return e?.ignoreCase===!0&&(t.nocase=!0),t}},aa=class extends Ms{_notificationType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._notificationType=r,this._accessUri=o,this._createParams=a}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=async i=>this._client.sendNotification(this._notificationType,this._createParams(i));return this.doSend(t,r)}}},ca=class extends aa{_willListener;_fsPathFileTypes=new Map;async getFileType(e){let t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);let r=await Ms.getFileType(e);return r&&this._fsPathFileTypes.set(t,r),r}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),this.filterSize()===0&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}},Tf=class extends aa{constructor(e){super(e,$t.workspace.onDidCreateFiles,Yn.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.didCreateFiles?r.didCreateFiles(e,t):t(e)}};ze.DidCreateFilesFeature=Tf;var Of=class extends ca{constructor(e){super(e,$t.workspace.onDidRenameFiles,Yn.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=$t.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,t=>t.oldUri))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didRenameFiles?r.didRenameFiles(e,t):t(e)}};ze.DidRenameFilesFeature=Of;var Ef=class extends ca{constructor(e){super(e,$t.workspace.onDidDeleteFiles,Yn.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=$t.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,t=>t))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didDeleteFiles?r.didDeleteFiles(e,t):t(e)}};ze.DidDeleteFilesFeature=Ef;var xs=class extends Ms{_requestType;_accessUri;_createParams;constructor(e,t,r,i,s,o,a){super(e,t,r,i,s),this._requestType=r,this._accessUri=o,this._createParams=a}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=i=>this._client.sendRequest(this._requestType,this._createParams(i),i.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,r)}else return}},qf=class extends xs{constructor(e){super(e,$t.workspace.onWillCreateFiles,Yn.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willCreateFiles?r.willCreateFiles(e,t):t(e)}};ze.WillCreateFilesFeature=qf;var Mf=class extends xs{constructor(e){super(e,$t.workspace.onWillRenameFiles,Yn.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willRenameFiles?r.willRenameFiles(e,t):t(e)}};ze.WillRenameFilesFeature=Mf;var xf=class extends xs{constructor(e){super(e,$t.workspace.onWillDeleteFiles,Yn.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willDeleteFiles?r.willDeleteFiles(e,t):t(e)}};ze.WillDeleteFilesFeature=xf});var Hy=P(wn=>{"use strict";var TR=wn&&wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OR=wn&&wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ER=wn&&wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let u=this._client,l=this._client.middleware,f=(p,h,g,_)=>u.sendRequest(If.InlineCompletionRequest.type,u.code2ProtocolConverter.asInlineCompletionParams(p,h,g),_).then(v=>_.isCancellationRequested?null:u.protocol2CodeConverter.asInlineCompletionResult(v,_),v=>u.handleFailedRequest(If.InlineCompletionRequest.type,_,v,null));return l.provideInlineCompletionItems?l.provideInlineCompletionItems(i,s,o,a,f):f(i,s,o,a)}};return[qR.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};wn.InlineCompletionItemFeature=jf});var zy=P(Dn=>{"use strict";var xR=Dn&&Dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),IR=Dn&&Dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Wy=Dn&&Dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0;return{kind:"workspace",id:ji.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return ji.TextDocumentContentRequest.type}getProviders(){let e=[];for(let t of this._registrations.values())e.push(...t.providers);return e}fillClientCapabilities(e){let t=(0,Uy.ensure)((0,Uy.ensure)(e,"workspace"),"textDocumentContent");t.dynamicRegistration=!0}initialize(e){let t=this._client;if(t.onRequest(ji.TextDocumentContentRefreshRequest.type,async s=>{let o=t.protocol2CodeConverter.asUri(s.uri);for(let a of this._registrations.values())for(let u of a.providers)u.scheme===o.scheme&&u.onDidChangeEmitter.fire(o)}),!e?.workspace?.textDocumentContent)return;let r=e.workspace.textDocumentContent,i=ji.StaticRegistrationOptions.hasId(r)?r.id:NR.generateUuid();this.register({id:i,registerOptions:r})}register(e){let t=[],r=[];for(let i of e.registerOptions.schemes){let[s,o]=this.registerTextDocumentContentProvider(i);t.push(o),r.push(s)}this._registrations.set(e.id,{disposable:Ff.Disposable.from(...r),providers:t})}registerTextDocumentContentProvider(e){let t=new Ff.EventEmitter,r={onDidChange:t.event,provideTextDocumentContent:(i,s)=>{let o=this._client,a=(l,f)=>{let p={uri:o.code2ProtocolConverter.asUri(l)};return o.sendRequest(ji.TextDocumentContentRequest.type,p,f).then(h=>f.isCancellationRequested?null:h.text,h=>o.handleFailedRequest(ji.TextDocumentContentRequest.type,f,h,null))},u=o.middleware;return u.provideTextDocumentContent?u.provideTextDocumentContent(i,s,a):a(i,s)}};return[Ff.workspace.registerTextDocumentContentProvider(e,r),{scheme:e,onDidChangeEmitter:t,provider:r}]}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}};Dn.TextDocumentContentFeature=Lf});var Ky=P(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.FileSystemWatcherFeature=void 0;var jR=require("vscode"),Br=V(),la=ne(),Af=class{_client;_notifyFileEvent;_watchers;constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return Br.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,la.ensure)((0,la.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,la.ensure)((0,la.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let r of e.registerOptions.watchers){let i=this._client.protocol2CodeConverter.asGlobPattern(r.globPattern);if(i===void 0)continue;let s=!0,o=!0,a=!0;r.kind!==void 0&&r.kind!==null&&(s=(r.kind&Br.WatchKind.Create)!==0,o=(r.kind&Br.WatchKind.Change)!==0,a=(r.kind&Br.WatchKind.Delete)!==0);let u=jR.workspace.createFileSystemWatcher(i,!s,!o,!a);this.hookListeners(u,s,o,a,t),t.push(u)}this._watchers.set(e.id,t)}registerRaw(e,t){let r=[];for(let i of t)this.hookListeners(i,!0,!0,!0,r);this._watchers.set(e,r)}hookListeners(e,t,r,i,s){t&&e.onDidCreate(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Created}),null,s),r&&e.onDidChange(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Changed}),null,s),i&&e.onDidDelete(o=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(o),type:Br.FileChangeType.Deleted}),null,s)}unregister(e){let t=this._watchers.get(e);if(t){this._watchers.delete(e);for(let r of t)r.dispose()}}clear(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}};da.FileSystemWatcherFeature=Af});var Gy=P(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.ProgressFeature=void 0;var By=V(),FR=Ll();function LR(n,e){return n[e]===void 0&&(n[e]=Object.create(null)),n[e]}var kf=class{_client;activeParts;constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:By.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){LR(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=i=>{this.activeParts.delete(i)},r=i=>{this.activeParts.add(new FR.ProgressPart(this._client,i.token,t))};e.onRequest(By.WorkDoneProgressCreateRequest.type,r)}clear(){for(let e of this.activeParts)e.done();this.activeParts.clear()}};fa.ProgressFeature=kf});var Vf=P(he=>{"use strict";var AR=he&&he.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kR=he&&he.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ga=he&&he.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{let t=this.open,r=new Set;n.fillVisibleResources(r);let i=new Set,s=new Set(r);for(let o of t.values())r.has(o)?s.delete(o):i.add(o);if(this.open=r,i.size>0){let o=new Set;for(let a of i)o.add(G.Uri.parse(a));this._onClose.fire(o)}if(s.size>0){let o=new Set;for(let a of s)o.add(G.Uri.parse(a));this._onOpen.fire(o)}};this.disposables.push(G.window.tabGroups.onDidChangeTabs(t=>{t.closed.length===0&&t.opened.length===0||e()})),this.disposables.push(G.window.onDidChangeVisibleTextEditors(t=>{e()}))}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposables.forEach(e=>e.dispose())}isActive(e){return e instanceof G.Uri?G.window.activeTextEditor?.document.uri===e:G.window.activeTextEditor?.document===e}isVisible(e){let t=e instanceof G.Uri?e:e.uri;return t.scheme===Hf.NotebookDocumentSyncFeature.CellScheme?G.workspace.notebookDocuments.some(r=>this.open.has(r.uri.toString())?r.getCells().find(s=>s.document.uri.toString()===t.toString())!==void 0:!1):this.open.has(t.toString())}getResources(){let e=new Set;return n.fillVisibleResources(new Set,e),e}static fillVisibleResources(e,t){let r=e??new Set;for(let i of G.window.tabGroups.all)for(let s of i.tabs){let o=s.input,a;o instanceof G.TabInputText?a=o.uri:o instanceof G.TabInputTextDiff?a=o.modified:(o instanceof G.TabInputCustom||o instanceof G.TabInputNotebook)&&(a=o.uri),a!==void 0&&!r.has(a.toString())&&(r.add(a.toString()),t!==void 0&&t.add(a))}for(let i of G.window.visibleTextEditors){let s=i.document.uri;r.has(s.toString())||(r.add(s.toString()),t!==void 0&&t.add(s))}}},pa=class n{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_traceLogLevel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=x.TraceFormat.Text;_tracer;_c2p;_p2c;_visibleDocuments;constructor(e,t,r){this._id=e,this._name=t,r=r||{};let i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};r.markdown!==void 0&&(i.isTrusted=Uf.sanitizeIsTrusted(r.markdown.isTrusted),i.supportHtml=r.markdown.supportHtml===!0,i.supportThemeIcons=r.markdown.supportThemeIcons===!0),this._clientOptions={documentSelector:r.documentSelector??[],synchronize:r.synchronize??{},diagnosticCollectionName:r.diagnosticCollectionName,outputChannelName:r.outputChannelName??this._name,revealOutputChannelOn:r.revealOutputChannelOn??Gr.Error,stdioEncoding:r.stdioEncoding??"utf8",initializationOptions:r.initializationOptions,initializationFailedHandler:r.initializationFailedHandler,progressOnInitialization:!!r.progressOnInitialization,errorHandler:r.errorHandler??this.createDefaultErrorHandler(r.connectionOptions?.maxRestartCount),middleware:r.middleware??{},uriConverters:r.uriConverters,workspaceFolder:r.workspaceFolder,connectionOptions:r.connectionOptions,markdown:i,diagnosticPullOptions:r.diagnosticPullOptions??{onChange:!0,onSave:!1},diagnosticCollectionProvider:r.diagnosticCollectionProvider??new dt.DefaultDiagnosticCollectionProvider,notebookDocumentOptions:r.notebookDocumentOptions??{},textSynchronization:this.createTextSynchronizationOptions(r.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Y.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,r.outputChannel?(this._outputChannel=r.outputChannel,this._disposeOutputChannel=!1,this._traceLogLevel=this._outputChannel.logLevel):(this._outputChannel=void 0,this._disposeOutputChannel=!0,this._traceLogLevel=G.LogLevel.Info),this._traceOutputChannel=r.traceOutputChannel,this._traceOutputChannel!==void 0&&(this._traceLogLevel=this._traceOutputChannel.logLevel),this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new ha.Semaphore(1),this._pendingChangeDelayer=new ha.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new ha.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new x.Emitter,this._stateChangeEmitter=new x.Emitter,this._trace=x.Trace.Off,this._tracer={log:(s,o)=>{Yt.string(s)?this.trace(s,o):this.traceObject(s)}},this._c2p=$R.createConverter(r.uriConverters?r.uriConverters.code2Protocol:void 0),this._p2c=HR.createConverter(r.uriConverters?r.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e?typeof e.delayOpenNotifications=="boolean"?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}:{delayOpenNotifications:!1}}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get visibleDocuments(){return this._visibleDocuments===void 0&&(this._visibleDocuments=new zf),this._visibleDocuments}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=G.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name,{log:!0}),this._traceOutputChannel===void 0&&(this._traceLogLevel=this._outputChannel.logLevel)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){if(this._diagnostics!==null)return this._diagnostics===void 0&&(this._diagnostics=this._clientOptions.diagnosticCollectionProvider.create(this._clientOptions.diagnosticCollectionName??this._id,dt.DiagnosticCollectionSource.push)),this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let r=this.getPublicState();r!==t&&this._stateChangeEmitter.fire({oldState:t,newState:r})}getPublicState(){switch(this.$state){case Y.Starting:return Ai.Starting;case Y.Running:return Ai.Running;case Y.StartFailed:return Ai.StartFailed;default:return Ai.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));let r=await this.$start();await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===x.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(r);let i,s;if(t.length===1?x.CancellationToken.is(t[0])?s=t[0]:i=t[0]:t.length===2&&(i=t[0],s=t[1]),s!==void 0&&s.isCancellationRequested)return Promise.reject(new x.ResponseError(x.LSPErrorCodes.RequestCancelled,"Request got cancelled"));let o=this._clientOptions.middleware?.sendRequest;return o!==void 0?o(e,i,s,(a,u,l)=>{let f=[];return u!==void 0&&f.push(u),l!==void 0&&f.push(l),r.sendRequest(a,...f)}):r.sendRequest(e,...t)}onRequest(e,t){let r=typeof e=="string"?e:e.method;this._requestHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._requestDisposables.set(r,i.onRequest(e,t)),s={dispose:()=>{let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}):(this._pendingRequestHandlers.set(r,t),s={dispose:()=>{this._pendingRequestHandlers.delete(r);let o=this._requestDisposables.get(r);o!==void 0&&(o.dispose(),this._requestDisposables.delete(r))}}),{dispose:()=>{this._requestHandlers.delete(r),s.dispose()}}}async sendNotification(e,t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));let r=this._didChangeTextDocumentFeature.syncKind===x.TextDocumentSyncKind.Full,i;r&&typeof e!="string"&&e.method===x.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._inFlightOpenNotifications.add(i));let s;typeof e!="string"&&e.method===x.DidCloseTextDocumentNotification.method&&(s=t.textDocument.uri);let o=await this.$start();if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(s))return;r&&await this.sendPendingFullTextDocumentChanges(o),i!==void 0&&this._inFlightOpenNotifications.delete(i);let u=this._clientOptions.middleware?.sendNotification;return u?u(e,o.sendNotification.bind(o),t):o.sendNotification(e,t)}onNotification(e,t){let r=typeof e=="string"?e:e.method;this._notificationHandlers.set(r,t);let i=this.activeConnection(),s;return i!==void 0?(this._notificationDisposables.set(r,i.onNotification(e,t)),s={dispose:()=>{let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}):(this._pendingNotificationHandlers.set(r,t),s={dispose:()=>{this._pendingNotificationHandlers.delete(r);let o=this._notificationDisposables.get(r);o!==void 0&&(o.dispose(),this._notificationDisposables.delete(r))}}),{dispose:()=>{this._notificationHandlers.delete(r),s.dispose()}}}async sendProgress(e,t,r){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new x.ResponseError(x.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,r)}catch(i){throw this.error(`Sending progress for token ${t} failed.`,i),i}}onProgress(e,t,r){this._progressHandlers.set(t,{type:e,handler:r});let i=this.activeConnection(),s,o=this._clientOptions.middleware?.handleWorkDoneProgress,a=x.WorkDoneProgress.is(e)&&o!==void 0?u=>{o(t,u,()=>r(u))}:r;return i!==void 0?(this._progressDisposables.set(t,i.onProgress(e,t,a)),s={dispose:()=>{let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:r}),s={dispose:()=>{this._pendingProgressHandlers.delete(t);let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),s.dispose()}}}createDefaultErrorHandler(e){if(e!==void 0&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new Wf(this,e??4)}async setTrace(e){this._trace=e;let t=this.activeConnection();t!==void 0&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof x.ResponseError){let t=e;return` Message: ${t.message} Code: ${t.code} ${t.data?` `+t.data.toString():""}`}return e instanceof Error?Yt.string(e.stack)?e.stack:e.message:Yt.string(e)?e:e.toString()}shouldLogToOutputChannel(){return this.$state!==Y.Stopped?!0:this._outputChannel!==void 0}error(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.error(this.getLogMessage(e,t)),(r==="force"||r&&this._clientOptions.revealOutputChannelOn<=Gr.Error)&&this.showNotificationMessage(x.MessageType.Error,e,t)}warn(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.warn(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=Gr.Warn&&this.showNotificationMessage(x.MessageType.Warning,e,t)}info(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.info(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=Gr.Info&&this.showNotificationMessage(x.MessageType.Info,e,t)}debug(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.debug(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=Gr.Debug&&this.showNotificationMessage(x.MessageType.Debug,e,t)}trace(e,t){this.traceOutputChannel.trace(this.getLogMessage(e,t))}traceObject(e){this.traceOutputChannel.trace(JSON.stringify(e))}showNotificationMessage(e,t,r){t=t??"A request has failed. See the output for more information.",r&&(t+=` `+this.data2String(r)),(e===x.MessageType.Error?G.window.showErrorMessage:e===x.MessageType.Warning?G.window.showWarningMessage:G.window.showInformationMessage)(t,"Go to output").then(s=>{s!==void 0&&this.outputChannel.show(!0)})}getLogMessage(e,t){return t!=null?`${e} -${this.data2String(t)}`:e}needsStart(){return this.$state===Y.Initial||this.$state===Y.Stopping||this.$state===Y.Stopped}needsStop(){return this.$state===Y.Starting||this.$state===Y.Running}activeConnection(){return this.$state===Y.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===Y.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===Y.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,t,r]=this.createOnStartPromise();this._onStart=e,this._diagnostics=void 0;for(let[i,s]of this._notificationHandlers)this._pendingNotificationHandlers.has(i)||this._pendingNotificationHandlers.set(i,s);for(let[i,s]of this._requestHandlers)this._pendingRequestHandlers.has(i)||this._pendingRequestHandlers.set(i,s);for(let[i,s]of this._progressHandlers)this._pendingProgressHandlers.has(i)||this._pendingProgressHandlers.set(i,s);this.$state=Y.Starting;try{let i=await this.createConnection();i.onNotification(x.LogMessageNotification.type,s=>{switch(s.type){case x.MessageType.Error:this.error(s.message,void 0,!1);break;case x.MessageType.Warning:this.warn(s.message,void 0,!1);break;case x.MessageType.Info:this.info(s.message,void 0,!1);break;case x.MessageType.Debug:this.debug(s.message,void 0,!1);break;default:this.outputChannel.appendLine(s.message)}}),i.onNotification(x.ShowMessageNotification.type,s=>{switch(s.type){case x.MessageType.Error:G.window.showErrorMessage(s.message);break;case x.MessageType.Warning:G.window.showWarningMessage(s.message);break;case x.MessageType.Info:G.window.showInformationMessage(s.message);break;default:G.window.showInformationMessage(s.message)}}),i.onRequest(x.ShowMessageRequest.type,s=>{let o;switch(s.type){case x.MessageType.Error:o=G.window.showErrorMessage;break;case x.MessageType.Warning:o=G.window.showWarningMessage;break;case x.MessageType.Info:o=G.window.showInformationMessage;break;default:o=G.window.showInformationMessage}let a=s.actions||[];return o(s.message,...a)}),i.onNotification(x.TelemetryEventNotification.type,s=>{this._telemetryEmitter.fire(s)}),i.onRequest(x.ShowDocumentRequest.type,async(s,o)=>{let a=async l=>{let f=this.protocol2CodeConverter.asUri(l.uri);try{if(l.external===!0)return{success:await G.env.openExternal(f)};{let p={};return l.selection!==void 0&&(p.selection=this.protocol2CodeConverter.asRange(l.selection)),l.takeFocus===void 0||l.takeFocus===!1?p.preserveFocus=!0:l.takeFocus===!0&&(p.preserveFocus=!1),await G.window.showTextDocument(f,p),{success:!0}}}catch{return{success:!1}}},u=this._clientOptions.middleware.window?.showDocument;return u!==void 0?u(s,o,a):a(s)}),i.listen(),await this.initialize(i),t()}catch(i){this.$state=Y.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,i,"force"),r(i)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise((i,s)=>{e=i,t=s}),e,t]}async initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,[r,i]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:G.env.appName,version:G.version},locale:this.getLocale(),rootPath:r||null,rootUri:r?this._c2p.asUri(G.Uri.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:Yt.func(t)?t():t,trace:x.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(s),this._clientOptions.progressOnInitialization){let o=Gy.generateUuid(),a=new UR.ProgressPart(e,o);s.workDoneToken=o;try{let u=await this.doInitialize(e,s);return a.done(),u}catch(u){throw a.cancel(),u}}else return this.doInitialize(e,s)}async doInitialize(e,t){try{let r=await e.initialize(t);if(r.capabilities.positionEncoding!==void 0&&r.capabilities.positionEncoding!==x.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${r.capabilities.positionEncoding}) received from server ${this.name}`);this._initializeResult=r,this.$state=Y.Running;let i;Yt.number(r.capabilities.textDocumentSync)?r.capabilities.textDocumentSync===x.TextDocumentSyncKind.None?i={openClose:!1,change:x.TextDocumentSyncKind.None,save:void 0}:i={openClose:!0,change:r.capabilities.textDocumentSync,save:{includeText:!1}}:r.capabilities.textDocumentSync!==void 0&&r.capabilities.textDocumentSync!==null&&(i=r.capabilities.textDocumentSync),this._capabilities=Object.assign({},r.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(x.PublishDiagnosticsNotification.type,s=>this.handleDiagnostics(s)),e.onRequest(x.RegistrationRequest.type,s=>this.handleRegistrationRequest(s)),e.onRequest("client/registerFeature",s=>this.handleRegistrationRequest(s)),e.onRequest(x.UnregistrationRequest.type,s=>this.handleUnregistrationRequest(s)),e.onRequest("client/unregisterFeature",s=>this.handleUnregistrationRequest(s)),e.onRequest(x.ApplyWorkspaceEditRequest.type,s=>this.handleApplyWorkspaceEdit(s));for(let[s,o]of this._pendingNotificationHandlers)this._notificationDisposables.set(s,e.onNotification(s,o));this._pendingNotificationHandlers.clear();for(let[s,o]of this._pendingRequestHandlers)this._requestDisposables.set(s,e.onRequest(s,o));this._pendingRequestHandlers.clear();for(let[s,o]of this._pendingProgressHandlers)this._progressDisposables.set(s,e.onProgress(o.type,s,o.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(x.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookLogLevelChanged(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),r}catch(r){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(r)?this.initialize(e):this.stop():r instanceof x.ResponseError&&r.data&&r.data.retry?G.window.showErrorMessage(r.message,{title:"Retry",id:"retry"}).then(i=>{i&&i.id==="retry"?this.initialize(e):this.stop()}):(r&&r.message&&G.window.showErrorMessage(r.message),this.error("Server initialization failed.",r),this.stop()),r}}_clientGetRootPath(){let e=G.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}stop(e=2e3){return this.shutdown(Tr.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t=2e3){if(this.$state===Y.Stopped||this.$state===Y.Initial)return;if(this.$state===Y.Stopping){if(this._onStop!==void 0)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}let r=this.activeConnection();if(r===void 0||this.$state!==Y.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Y.Stopping,this.cleanUp(e);let i=new Promise(o=>{(0,x.RAL)().timer.setTimeout(o,t)}),s=(async o=>(await o.shutdown(),await o.exit(),o))(r);return this._onStop=Promise.race([i,s]).then(o=>{if(o!==void 0)o.end(),o.dispose();else throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out")},o=>{throw this.error("Stopping server failed",o,!1),o}).finally(()=>{this.$state=Y.Stopped,e===Tr.Stop&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()})}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();let t=this._listeners.splice(0,this._listeners.length);for(let r of t)r.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(let r of Array.from(this._features.entries()).map(i=>i[1]).reverse())r.clear();(e===Tr.Stop||e===Tr.Restart)&&(this._diagnostics===void 0&&(this._diagnostics=null),this._diagnostics!==null&&(this._clientOptions.diagnosticCollectionProvider.dispose(this._diagnostics,dt.DiagnosticCollectionSource.push),this._diagnostics=null)),this._idleInterval!==void 0&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){this._outputChannel!==void 0&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){let t=this;async function r(s){return t._fileEvents.push(s),t._fileEventDelayer.trigger(async()=>{let o=t._fileEvents;t._fileEvents=[];try{await t.sendNotification(x.DidChangeWatchedFilesNotification.type,{changes:o})}catch(a){throw t._fileEvents.push(...o),a}})}let i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,r):r(e)).catch(s=>{t.error("Notifying file events failed.",s)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{let t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(t.length===0)return;for(let r of t){let i=this.code2ProtocolConverter.asChangeTextDocumentParams(r);this._didChangeTextDocumentFeature.aboutToSendNotification(r,x.DidChangeTextDocumentNotification.type,i),await e.sendNotification(x.DidChangeTextDocumentNotification.type,i),this._didChangeTextDocumentFeature.notificationSent(r,x.DidChangeTextDocumentNotification.type,i)}}catch(t){throw this.error("Sending pending changes failed",t,!1),t}})}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger(async()=>{let e=this.activeConnection();if(e===void 0){this.triggerPendingChangeDelivery();return}await this.sendPendingFullTextDocumentChanges(e)}).catch(e=>this.error("Delivering pending changes failed",e,!1))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};handleDiagnostics(e){if(this._diagnostics===null)return;let t=e.uri;this._diagnosticQueueState.state==="busy"&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,x.RAL)().timer.setImmediate(()=>{this.workDiagnosticQueue()})}workDiagnosticQueue(){if(this._diagnosticQueueState.state==="busy")return;let e=this._diagnosticQueue.entries().next();if(e.done===!0)return;let[t,r]=e.value;this._diagnosticQueue.delete(t);let i=new G.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(r,i.token).then(s=>{if(!i.token.isCancellationRequested){let o=this._p2c.asUri(t),a=this.clientOptions.middleware;a.handleDiagnostics?a.handleDiagnostics(o,s,(u,l)=>this.setDiagnostics(u,l)):this.setDiagnostics(o,s)}}).catch(s=>{this.error("Processing diagnostic queue failed.",s)}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,t){if(this._diagnostics===null)return;let r=this.diagnostics;r!==void 0&&r.set(e,t)}getLocale(){return G.env.language}async $start(){if(this.$state===Y.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();let e=this.activeConnection();if(e===void 0)throw new Error("Starting server failed");return e}async createConnection(){let e=(i,s,o)=>{this.handleConnectionError(i,s,o).catch(a=>this.error("Handling connection error failed",a))},t=()=>{this.handleConnectionClosed().catch(i=>this.error("Handling connection close failed",i))},r=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=bT(r.reader,r.writer,e,t,this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===Y.Stopped)return;try{this._connection!==void 0&&this._connection.dispose()}catch{}let e={action:Or.DoNotRestart};if(this.$state!==Y.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch{}this._connection=void 0,e.action===Or.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,e.handled===!0?!1:"force"),this.cleanUp(Tr.Stop),this.$state===Y.Starting?this.$state=Y.StartFailed:this.$state=Y.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Or.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(Tr.Restart),this.$state=Y.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch(t=>this.error("Restarting server failed",t,"force")))}async handleConnectionError(e,t,r){let i=await this._clientOptions.errorHandler.error(e,t,r);i.action===Is.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring. +${this.data2String(t)}`:e}needsStart(){return this.$state===Y.Initial||this.$state===Y.Stopping||this.$state===Y.Stopped}needsStop(){return this.$state===Y.Starting||this.$state===Y.Running}activeConnection(){return this.$state===Y.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===Y.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===Y.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,t,r]=this.createOnStartPromise();this._onStart=e,this._diagnostics=void 0;for(let[i,s]of this._notificationHandlers)this._pendingNotificationHandlers.has(i)||this._pendingNotificationHandlers.set(i,s);for(let[i,s]of this._requestHandlers)this._pendingRequestHandlers.has(i)||this._pendingRequestHandlers.set(i,s);for(let[i,s]of this._progressHandlers)this._pendingProgressHandlers.has(i)||this._pendingProgressHandlers.set(i,s);this.$state=Y.Starting;try{let i=await this.createConnection();i.onNotification(x.LogMessageNotification.type,s=>{switch(s.type){case x.MessageType.Error:this.error(s.message,void 0,!1);break;case x.MessageType.Warning:this.warn(s.message,void 0,!1);break;case x.MessageType.Info:this.info(s.message,void 0,!1);break;case x.MessageType.Debug:this.debug(s.message,void 0,!1);break;default:this.outputChannel.appendLine(s.message)}}),i.onNotification(x.ShowMessageNotification.type,s=>{switch(s.type){case x.MessageType.Error:G.window.showErrorMessage(s.message);break;case x.MessageType.Warning:G.window.showWarningMessage(s.message);break;case x.MessageType.Info:G.window.showInformationMessage(s.message);break;default:G.window.showInformationMessage(s.message)}}),i.onRequest(x.ShowMessageRequest.type,s=>{let o;switch(s.type){case x.MessageType.Error:o=G.window.showErrorMessage;break;case x.MessageType.Warning:o=G.window.showWarningMessage;break;case x.MessageType.Info:o=G.window.showInformationMessage;break;default:o=G.window.showInformationMessage}let a=s.actions||[];return o(s.message,...a)}),i.onNotification(x.TelemetryEventNotification.type,s=>{this._telemetryEmitter.fire(s)}),i.onRequest(x.ShowDocumentRequest.type,async(s,o)=>{let a=async l=>{let f=this.protocol2CodeConverter.asUri(l.uri);try{if(l.external===!0)return{success:await G.env.openExternal(f)};{let p={};return l.selection!==void 0&&(p.selection=this.protocol2CodeConverter.asRange(l.selection)),l.takeFocus===void 0||l.takeFocus===!1?p.preserveFocus=!0:l.takeFocus===!0&&(p.preserveFocus=!1),await G.window.showTextDocument(f,p),{success:!0}}}catch{return{success:!1}}},u=this._clientOptions.middleware.window?.showDocument;return u!==void 0?u(s,o,a):a(s)}),i.listen(),await this.initialize(i),t()}catch(i){this.$state=Y.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,i,"force"),r(i)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise((i,s)=>{e=i,t=s}),e,t]}async initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,[r,i]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:G.env.appName,version:G.version},locale:this.getLocale(),rootPath:r||null,rootUri:r?this._c2p.asUri(G.Uri.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:Yt.func(t)?t():t,trace:x.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(s),this._clientOptions.progressOnInitialization){let o=Vy.generateUuid(),a=new UR.ProgressPart(e,o);s.workDoneToken=o;try{let u=await this.doInitialize(e,s);return a.done(),u}catch(u){throw a.cancel(),u}}else return this.doInitialize(e,s)}async doInitialize(e,t){try{let r=await e.initialize(t);if(r.capabilities.positionEncoding!==void 0&&r.capabilities.positionEncoding!==x.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${r.capabilities.positionEncoding}) received from server ${this.name}`);this._initializeResult=r,this.$state=Y.Running;let i;Yt.number(r.capabilities.textDocumentSync)?r.capabilities.textDocumentSync===x.TextDocumentSyncKind.None?i={openClose:!1,change:x.TextDocumentSyncKind.None,save:void 0}:i={openClose:!0,change:r.capabilities.textDocumentSync,save:{includeText:!1}}:r.capabilities.textDocumentSync!==void 0&&r.capabilities.textDocumentSync!==null&&(i=r.capabilities.textDocumentSync),this._capabilities=Object.assign({},r.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(x.PublishDiagnosticsNotification.type,s=>this.handleDiagnostics(s)),e.onRequest(x.RegistrationRequest.type,s=>this.handleRegistrationRequest(s)),e.onRequest("client/registerFeature",s=>this.handleRegistrationRequest(s)),e.onRequest(x.UnregistrationRequest.type,s=>this.handleUnregistrationRequest(s)),e.onRequest("client/unregisterFeature",s=>this.handleUnregistrationRequest(s)),e.onRequest(x.ApplyWorkspaceEditRequest.type,s=>this.handleApplyWorkspaceEdit(s));for(let[s,o]of this._pendingNotificationHandlers)this._notificationDisposables.set(s,e.onNotification(s,o));this._pendingNotificationHandlers.clear();for(let[s,o]of this._pendingRequestHandlers)this._requestDisposables.set(s,e.onRequest(s,o));this._pendingRequestHandlers.clear();for(let[s,o]of this._pendingProgressHandlers)this._progressDisposables.set(s,e.onProgress(o.type,s,o.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(x.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookLogLevelChanged(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),r}catch(r){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(r)?this.initialize(e):this.stop():r instanceof x.ResponseError&&r.data&&r.data.retry?G.window.showErrorMessage(r.message,{title:"Retry",id:"retry"}).then(i=>{i&&i.id==="retry"?this.initialize(e):this.stop()}):(r&&r.message&&G.window.showErrorMessage(r.message),this.error("Server initialization failed.",r),this.stop()),r}}_clientGetRootPath(){let e=G.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}stop(e=2e3){return this.shutdown(Tr.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t=2e3){if(this.$state===Y.Stopped||this.$state===Y.Initial)return;if(this.$state===Y.Stopping){if(this._onStop!==void 0)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}let r=this.activeConnection();if(r===void 0||this.$state!==Y.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Y.Stopping,this.cleanUp(e);let i=new Promise(o=>{(0,x.RAL)().timer.setTimeout(o,t)}),s=(async o=>(await o.shutdown(),await o.exit(),o))(r);return this._onStop=Promise.race([i,s]).then(o=>{if(o!==void 0)o.end(),o.dispose();else throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out")},o=>{throw this.error("Stopping server failed",o,!1),o}).finally(()=>{this.$state=Y.Stopped,e===Tr.Stop&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()})}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();let t=this._listeners.splice(0,this._listeners.length);for(let r of t)r.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(let r of Array.from(this._features.entries()).map(i=>i[1]).reverse())r.clear();(e===Tr.Stop||e===Tr.Restart)&&(this._diagnostics===void 0&&(this._diagnostics=null),this._diagnostics!==null&&(this._clientOptions.diagnosticCollectionProvider.dispose(this._diagnostics,dt.DiagnosticCollectionSource.push),this._diagnostics=null)),this._idleInterval!==void 0&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){this._outputChannel!==void 0&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){let t=this;async function r(s){return t._fileEvents.push(s),t._fileEventDelayer.trigger(async()=>{let o=t._fileEvents;t._fileEvents=[];try{await t.sendNotification(x.DidChangeWatchedFilesNotification.type,{changes:o})}catch(a){throw t._fileEvents.push(...o),a}})}let i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,r):r(e)).catch(s=>{t.error("Notifying file events failed.",s)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{let t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(t.length===0)return;for(let r of t){let i=this.code2ProtocolConverter.asChangeTextDocumentParams(r);this._didChangeTextDocumentFeature.aboutToSendNotification(r,x.DidChangeTextDocumentNotification.type,i),await e.sendNotification(x.DidChangeTextDocumentNotification.type,i),this._didChangeTextDocumentFeature.notificationSent(r,x.DidChangeTextDocumentNotification.type,i)}}catch(t){throw this.error("Sending pending changes failed",t,!1),t}})}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger(async()=>{let e=this.activeConnection();if(e===void 0){this.triggerPendingChangeDelivery();return}await this.sendPendingFullTextDocumentChanges(e)}).catch(e=>this.error("Delivering pending changes failed",e,!1))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};handleDiagnostics(e){if(this._diagnostics===null)return;let t=e.uri;this._diagnosticQueueState.state==="busy"&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,x.RAL)().timer.setImmediate(()=>{this.workDiagnosticQueue()})}workDiagnosticQueue(){if(this._diagnosticQueueState.state==="busy")return;let e=this._diagnosticQueue.entries().next();if(e.done===!0)return;let[t,r]=e.value;this._diagnosticQueue.delete(t);let i=new G.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(r,i.token).then(s=>{if(!i.token.isCancellationRequested){let o=this._p2c.asUri(t),a=this.clientOptions.middleware;a.handleDiagnostics?a.handleDiagnostics(o,s,(u,l)=>this.setDiagnostics(u,l)):this.setDiagnostics(o,s)}}).catch(s=>{this.error("Processing diagnostic queue failed.",s)}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,t){if(this._diagnostics===null)return;let r=this.diagnostics;r!==void 0&&r.set(e,t)}getLocale(){return G.env.language}async $start(){if(this.$state===Y.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();let e=this.activeConnection();if(e===void 0)throw new Error("Starting server failed");return e}async createConnection(){let e=(i,s,o)=>{this.handleConnectionError(i,s,o).catch(a=>this.error("Handling connection error failed",a))},t=()=>{this.handleConnectionClosed().catch(i=>this.error("Handling connection close failed",i))},r=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=bT(r.reader,r.writer,e,t,this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===Y.Stopped)return;try{this._connection!==void 0&&this._connection.dispose()}catch{}let e={action:Or.DoNotRestart};if(this.$state!==Y.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch{}this._connection=void 0,e.action===Or.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,e.handled===!0?!1:"force"),this.cleanUp(Tr.Stop),this.$state===Y.Starting?this.$state=Y.StartFailed:this.$state=Y.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Or.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(Tr.Restart),this.$state=Y.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch(t=>this.error("Restarting server failed",t,"force")))}async handleConnectionError(e,t,r){let i=await this._clientOptions.errorHandler.error(e,t,r);i.action===Is.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring. ${e.message} Shutting down server.`,void 0,i.handled===!0?!1:"force"),this.stop().catch(s=>{this.error("Stopping server failed",s,!1)})):this.error(i.message??`Client ${this._name}: connection to server is erroring. -${e.message}`,void 0,i.handled===!0?!1:"force")}hookConfigurationChanged(e){this._listeners.push(G.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)}))}hookLogLevelChanged(e){this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel(t=>{this._traceLogLevel=t,this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let r=G.workspace.getConfiguration(this._id),i=this._traceLogLevel!==G.LogLevel.Trace?x.Trace.Off:x.Trace.Messages,s=x.TraceFormat.Text;if(r&&i!==x.Trace.Off){let o=r.get("trace.server","messages");typeof o=="string"?(i=x.Trace.fromString(o),i===x.Trace.Off&&(i=x.Trace.Messages)):(i=x.Trace.fromString(r.get("trace.server.verbosity","messages")),i===x.Trace.Off&&(i=x.Trace.Messages),s=x.TraceFormat.fromString(r.get("trace.server.format","text")))}this._trace=i,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch(o=>{this.error("Updating trace failed with error",o,!1)})}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let r;Yt.array(t)?r=t:r=[t],r&&this._dynamicFeatures.get(x.DidChangeWatchedFilesNotification.type.method).registerRaw(Gy.generateUuid(),r)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),dt.DynamicFeature.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){let t=this.getFeature(x.NotebookDocumentSyncRegistrationType.method);return t===void 0||!(t instanceof Hf.NotebookDocumentSyncFeature)?!1:t.handles(e)}registerBuiltinFeatures(){let e=new Map;this.registerFeature(new Vy.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new Fi.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new Fi.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new Fi.WillSaveFeature(this)),this.registerFeature(new Fi.WillSaveWaitUntilFeature(this)),this.registerFeature(new Fi.DidSaveTextDocumentFeature(this)),this.registerFeature(new Fi.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new yT.FileSystemWatcherFeature(this,t=>this.notifyFileEvent(t))),this.registerFeature(new zR.CompletionItemFeature(this)),this.registerFeature(new KR.HoverFeature(this)),this.registerFeature(new GR.SignatureHelpFeature(this)),this.registerFeature(new BR.DefinitionFeature(this)),this.registerFeature(new QR.ReferencesFeature(this)),this.registerFeature(new VR.DocumentHighlightFeature(this)),this.registerFeature(new XR.DocumentSymbolFeature(this)),this.registerFeature(new JR.WorkspaceSymbolFeature(this)),this.registerFeature(new tT.CodeActionFeature(this)),this.registerFeature(new nT.CodeLensFeature(this)),this.registerFeature(new $f.DocumentFormattingFeature(this)),this.registerFeature(new $f.DocumentRangeFormattingFeature(this)),this.registerFeature(new $f.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new rT.RenameFeature(this)),this.registerFeature(new iT.DocumentLinkFeature(this)),this.registerFeature(new sT.ExecuteCommandFeature(this)),this.registerFeature(new Vy.SyncConfigurationFeature(this)),this.registerFeature(new YR.TypeDefinitionFeature(this)),this.registerFeature(new ZR.ImplementationFeature(this)),this.registerFeature(new eT.ColorProviderFeature(this)),this.clientOptions.workspaceFolder===void 0&&this.registerFeature(new gT.WorkspaceFoldersFeature(this)),this.registerFeature(new oT.FoldingRangeFeature(this)),this.registerFeature(new aT.DeclarationFeature(this)),this.registerFeature(new cT.SelectionRangeFeature(this)),this.registerFeature(new vT.ProgressFeature(this)),this.registerFeature(new uT.CallHierarchyFeature(this)),this.registerFeature(new lT.SemanticTokensFeature(this)),this.registerFeature(new dT.LinkedEditingFeature(this)),this.registerFeature(new Li.DidCreateFilesFeature(this)),this.registerFeature(new Li.DidRenameFilesFeature(this)),this.registerFeature(new Li.DidDeleteFilesFeature(this)),this.registerFeature(new Li.WillCreateFilesFeature(this)),this.registerFeature(new Li.WillRenameFilesFeature(this)),this.registerFeature(new Li.WillDeleteFilesFeature(this)),this.registerFeature(new fT.TypeHierarchyFeature(this)),this.registerFeature(new hT.InlineValueFeature(this)),this.registerFeature(new pT.InlayHintsFeature(this)),this.registerFeature(new WR.DiagnosticFeature(this)),this.registerFeature(new Hf.NotebookDocumentSyncFeature(this)),this.registerFeature(new mT.InlineCompletionItemFeature(this)),this.registerFeature(new _T.TextDocumentContentFeature(this))}registerProposedFeatures(){this.registerFeatures(Gf.createAll(this))}fillInitializeParams(e){for(let t of this._features)Yt.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};(0,dt.ensure)(e,"workspace").applyEdit=!0;let t=(0,dt.ensure)((0,dt.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[x.ResourceOperationKind.Create,x.ResourceOperationKind.Rename,x.ResourceOperationKind.Delete],t.failureHandling=x.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0},t.metadataSupport=!0,t.snippetEditSupport=!0;let r=(0,dt.ensure)((0,dt.ensure)(e,"textDocument"),"publishDiagnostics");r.relatedInformation=!0,r.versionSupport=!1,r.tagSupport={valueSet:[x.DiagnosticTag.Unnecessary,x.DiagnosticTag.Deprecated]},r.codeDescriptionSupport=!0,r.dataSupport=!0;let i=(0,dt.ensure)((0,dt.ensure)(e,"textDocument"),"filters");i.relativePatternSupport=!0;let s=(0,dt.ensure)(e,"window"),o=(0,dt.ensure)(s,"showMessage");o.messageActionItem={additionalPropertiesSupport:!0};let a=(0,dt.ensure)(s,"showDocument");a.support=!0;let u=(0,dt.ensure)(e,"general");u.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(n.RequestsToCancelOnContentModified)},u.regularExpressions={engine:"ECMAScript",version:"ES2020"},u.markdown={parser:"marked",version:"1.1.0"},u.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(u.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let l of this._features)l.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let r of this._features)Yt.func(r.preInitialize)&&r.preInitialize(this._capabilities,t);for(let r of this._features)r.initialize(this._capabilities,t)}async handleRegistrationRequest(e){let t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,r=>this.doRegisterCapability(r)):this.doRegisterCapability(e)}async doRegisterCapability(e){if(!this.isRunning()){for(let t of e.registrations)this._ignoredRegistrations.add(t.id);return}for(let t of e.registrations){let r=this._dynamicFeatures.get(t.method);if(r===void 0)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));let i=t.registerOptions??{};i.documentSelector=i.documentSelector??this._clientOptions.documentSelector;let s={id:t.id,registerOptions:i};try{r.register(s)}catch(o){return Promise.reject(o)}}}async handleUnregistrationRequest(e){let t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,r=>this.doUnregisterCapability(r)):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;let r=this._dynamicFeatures.get(t.method);if(!r)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));r.unregister(t.id)}}async handleApplyWorkspaceEdit(e){let t=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(t){let r=await t(e,i=>this.doHandleApplyWorkspaceEdit(i));return r instanceof x.ResponseError?Promise.reject(r):r}else return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new ha.Semaphore(1);async doHandleApplyWorkspaceEdit(e){let t=e.edit,r=await this.workspaceEditLock.lock(()=>this._p2c.asWorkspaceEdit(t));return this.validateWorkspaceEdit(t)?Yt.asPromise(G.workspace.applyEdit(r,{isRefactoring:e.metadata?.isRefactoring}).then(s=>({applied:s}))):Promise.resolve({applied:!1})}validateWorkspaceEdit(e){let t=new Map;if(G.workspace.textDocuments.forEach(r=>t.set(r.uri.toString(),r)),e.documentChanges){for(let r of e.documentChanges)if(x.TextDocumentEdit.is(r)&&r.textDocument.version!==null&&r.textDocument.version>=0){let i=this._p2c.asUri(r.textDocument.uri).toString(),s=t.get(i);if(s&&s.version!==r.textDocument.version)return!1}}return!0}static RequestsToCancelOnContentModified=new Set([x.SemanticTokensRequest.method,x.SemanticTokensRangeRequest.method,x.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([x.CompletionResolveRequest.method,x.CodeLensResolveRequest.method,x.CodeActionResolveRequest.method,x.InlayHintResolveRequest.method,x.DocumentLinkResolveRequest.method,x.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,t,r,i,s=!0,o=!1){if(r instanceof x.ResponseError){if(r.code===x.ErrorCodes.PendingResponseRejected||r.code===x.ErrorCodes.ConnectionInactive)return i;if(r.code===x.LSPErrorCodes.RequestCancelled||r.code===x.LSPErrorCodes.ServerCancelled){if(t!==void 0&&t.isCancellationRequested&&!o)return i;throw r.data!==void 0?new dt.LSPCancellationError(r.data):new G.CancellationError}else if(r.code===x.LSPErrorCodes.ContentModified){if(n.RequestsToCancelOnContentModified.has(e.method)||n.CancellableResolveCalls.has(e.method))throw new G.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,r,s),r}};he.BaseLanguageClient=pa;var Kf=class extends pa{serverOptions;constructor(e,t,r,i){super(e,t,i),this.serverOptions=r}async createMessageTransports(e){return this.serverOptions()}};he.LanguageClient=Kf;var Bf=class{error(e){(0,x.RAL)().console.error(e)}warn(e){(0,x.RAL)().console.warn(e)}info(e){(0,x.RAL)().console.info(e)}log(e){(0,x.RAL)().console.log(e)}};function bT(n,e,t,r,i){let s=new Bf,o=(0,x.createProtocolConnection)(n,e,s,i);return o.onError(u=>{t(u[0],u[1],u[2])}),o.onClose(r),{listen:()=>o.listen(),sendRequest:o.sendRequest,onRequest:o.onRequest,hasPendingResponse:o.hasPendingResponse,sendNotification:o.sendNotification,onNotification:o.onNotification,onProgress:o.onProgress,sendProgress:o.sendProgress,trace:(u,l,f)=>{let p={sendNotification:!1,traceFormat:x.TraceFormat.Text};return f===void 0?o.trace(u,l,p):(Yt.boolean(f),o.trace(u,l,f))},initialize:u=>o.sendRequest(x.InitializeRequest.type,u),shutdown:()=>o.sendRequest(x.ShutdownRequest.type,void 0),exit:()=>o.sendNotification(x.ExitNotification.type),end:()=>o.end(),dispose:()=>o.dispose()}}var Gf;(function(n){function e(t){return[]}n.createAll=e})(Gf||(he.ProposedFeatures=Gf={}))});var Yy=P(Zn=>{"use strict";var CT=Zn&&Zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),wT=Zn&&Zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),DT=Zn&&Zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{this.refreshTrace(e,!0)}))}hookLogLevelChanged(e){this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel(t=>{this._traceLogLevel=t,this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let r=G.workspace.getConfiguration(this._id),i=this._traceLogLevel!==G.LogLevel.Trace?x.Trace.Off:x.Trace.Messages,s=x.TraceFormat.Text;if(r&&i!==x.Trace.Off){let o=r.get("trace.server","messages");typeof o=="string"?(i=x.Trace.fromString(o),i===x.Trace.Off&&(i=x.Trace.Messages)):(i=x.Trace.fromString(r.get("trace.server.verbosity","messages")),i===x.Trace.Off&&(i=x.Trace.Messages),s=x.TraceFormat.fromString(r.get("trace.server.format","text")))}this._trace=i,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch(o=>{this.error("Updating trace failed with error",o,!1)})}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let r;Yt.array(t)?r=t:r=[t],r&&this._dynamicFeatures.get(x.DidChangeWatchedFilesNotification.type.method).registerRaw(Vy.generateUuid(),r)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),dt.DynamicFeature.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){let t=this.getFeature(x.NotebookDocumentSyncRegistrationType.method);return t===void 0||!(t instanceof Hf.NotebookDocumentSyncFeature)?!1:t.handles(e)}registerBuiltinFeatures(){let e=new Map;this.registerFeature(new Xy.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new Fi.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new Fi.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new Fi.WillSaveFeature(this)),this.registerFeature(new Fi.WillSaveWaitUntilFeature(this)),this.registerFeature(new Fi.DidSaveTextDocumentFeature(this)),this.registerFeature(new Fi.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new yT.FileSystemWatcherFeature(this,t=>this.notifyFileEvent(t))),this.registerFeature(new zR.CompletionItemFeature(this)),this.registerFeature(new KR.HoverFeature(this)),this.registerFeature(new GR.SignatureHelpFeature(this)),this.registerFeature(new BR.DefinitionFeature(this)),this.registerFeature(new QR.ReferencesFeature(this)),this.registerFeature(new VR.DocumentHighlightFeature(this)),this.registerFeature(new XR.DocumentSymbolFeature(this)),this.registerFeature(new JR.WorkspaceSymbolFeature(this)),this.registerFeature(new tT.CodeActionFeature(this)),this.registerFeature(new nT.CodeLensFeature(this)),this.registerFeature(new $f.DocumentFormattingFeature(this)),this.registerFeature(new $f.DocumentRangeFormattingFeature(this)),this.registerFeature(new $f.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new rT.RenameFeature(this)),this.registerFeature(new iT.DocumentLinkFeature(this)),this.registerFeature(new sT.ExecuteCommandFeature(this)),this.registerFeature(new Xy.SyncConfigurationFeature(this)),this.registerFeature(new YR.TypeDefinitionFeature(this)),this.registerFeature(new ZR.ImplementationFeature(this)),this.registerFeature(new eT.ColorProviderFeature(this)),this.clientOptions.workspaceFolder===void 0&&this.registerFeature(new gT.WorkspaceFoldersFeature(this)),this.registerFeature(new oT.FoldingRangeFeature(this)),this.registerFeature(new aT.DeclarationFeature(this)),this.registerFeature(new cT.SelectionRangeFeature(this)),this.registerFeature(new vT.ProgressFeature(this)),this.registerFeature(new uT.CallHierarchyFeature(this)),this.registerFeature(new lT.SemanticTokensFeature(this)),this.registerFeature(new dT.LinkedEditingFeature(this)),this.registerFeature(new Li.DidCreateFilesFeature(this)),this.registerFeature(new Li.DidRenameFilesFeature(this)),this.registerFeature(new Li.DidDeleteFilesFeature(this)),this.registerFeature(new Li.WillCreateFilesFeature(this)),this.registerFeature(new Li.WillRenameFilesFeature(this)),this.registerFeature(new Li.WillDeleteFilesFeature(this)),this.registerFeature(new fT.TypeHierarchyFeature(this)),this.registerFeature(new hT.InlineValueFeature(this)),this.registerFeature(new pT.InlayHintsFeature(this)),this.registerFeature(new WR.DiagnosticFeature(this)),this.registerFeature(new Hf.NotebookDocumentSyncFeature(this)),this.registerFeature(new mT.InlineCompletionItemFeature(this)),this.registerFeature(new _T.TextDocumentContentFeature(this))}registerProposedFeatures(){this.registerFeatures(Gf.createAll(this))}fillInitializeParams(e){for(let t of this._features)Yt.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};(0,dt.ensure)(e,"workspace").applyEdit=!0;let t=(0,dt.ensure)((0,dt.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[x.ResourceOperationKind.Create,x.ResourceOperationKind.Rename,x.ResourceOperationKind.Delete],t.failureHandling=x.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0},t.metadataSupport=!0,t.snippetEditSupport=!0;let r=(0,dt.ensure)((0,dt.ensure)(e,"textDocument"),"publishDiagnostics");r.relatedInformation=!0,r.versionSupport=!1,r.tagSupport={valueSet:[x.DiagnosticTag.Unnecessary,x.DiagnosticTag.Deprecated]},r.codeDescriptionSupport=!0,r.dataSupport=!0;let i=(0,dt.ensure)((0,dt.ensure)(e,"textDocument"),"filters");i.relativePatternSupport=!0;let s=(0,dt.ensure)(e,"window"),o=(0,dt.ensure)(s,"showMessage");o.messageActionItem={additionalPropertiesSupport:!0};let a=(0,dt.ensure)(s,"showDocument");a.support=!0;let u=(0,dt.ensure)(e,"general");u.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(n.RequestsToCancelOnContentModified)},u.regularExpressions={engine:"ECMAScript",version:"ES2020"},u.markdown={parser:"marked",version:"1.1.0"},u.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(u.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let l of this._features)l.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let r of this._features)Yt.func(r.preInitialize)&&r.preInitialize(this._capabilities,t);for(let r of this._features)r.initialize(this._capabilities,t)}async handleRegistrationRequest(e){let t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,r=>this.doRegisterCapability(r)):this.doRegisterCapability(e)}async doRegisterCapability(e){if(!this.isRunning()){for(let t of e.registrations)this._ignoredRegistrations.add(t.id);return}for(let t of e.registrations){let r=this._dynamicFeatures.get(t.method);if(r===void 0)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));let i=t.registerOptions??{};i.documentSelector=i.documentSelector??this._clientOptions.documentSelector;let s={id:t.id,registerOptions:i};try{r.register(s)}catch(o){return Promise.reject(o)}}}async handleUnregistrationRequest(e){let t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,r=>this.doUnregisterCapability(r)):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;let r=this._dynamicFeatures.get(t.method);if(!r)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));r.unregister(t.id)}}async handleApplyWorkspaceEdit(e){let t=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(t){let r=await t(e,i=>this.doHandleApplyWorkspaceEdit(i));return r instanceof x.ResponseError?Promise.reject(r):r}else return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new ha.Semaphore(1);async doHandleApplyWorkspaceEdit(e){let t=e.edit,r=await this.workspaceEditLock.lock(()=>this._p2c.asWorkspaceEdit(t));return this.validateWorkspaceEdit(t)?Yt.asPromise(G.workspace.applyEdit(r,{isRefactoring:e.metadata?.isRefactoring}).then(s=>({applied:s}))):Promise.resolve({applied:!1})}validateWorkspaceEdit(e){let t=new Map;if(G.workspace.textDocuments.forEach(r=>t.set(r.uri.toString(),r)),e.documentChanges){for(let r of e.documentChanges)if(x.TextDocumentEdit.is(r)&&r.textDocument.version!==null&&r.textDocument.version>=0){let i=this._p2c.asUri(r.textDocument.uri).toString(),s=t.get(i);if(s&&s.version!==r.textDocument.version)return!1}}return!0}static RequestsToCancelOnContentModified=new Set([x.SemanticTokensRequest.method,x.SemanticTokensRangeRequest.method,x.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([x.CompletionResolveRequest.method,x.CodeLensResolveRequest.method,x.CodeActionResolveRequest.method,x.InlayHintResolveRequest.method,x.DocumentLinkResolveRequest.method,x.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,t,r,i,s=!0,o=!1){if(r instanceof x.ResponseError){if(r.code===x.ErrorCodes.PendingResponseRejected||r.code===x.ErrorCodes.ConnectionInactive)return i;if(r.code===x.LSPErrorCodes.RequestCancelled||r.code===x.LSPErrorCodes.ServerCancelled){if(t!==void 0&&t.isCancellationRequested&&!o)return i;throw r.data!==void 0?new dt.LSPCancellationError(r.data):new G.CancellationError}else if(r.code===x.LSPErrorCodes.ContentModified){if(n.RequestsToCancelOnContentModified.has(e.method)||n.CancellableResolveCalls.has(e.method))throw new G.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,r,s),r}};he.BaseLanguageClient=pa;var Kf=class extends pa{serverOptions;constructor(e,t,r,i){super(e,t,i),this.serverOptions=r}async createMessageTransports(e){return this.serverOptions()}};he.LanguageClient=Kf;var Bf=class{error(e){(0,x.RAL)().console.error(e)}warn(e){(0,x.RAL)().console.warn(e)}info(e){(0,x.RAL)().console.info(e)}log(e){(0,x.RAL)().console.log(e)}};function bT(n,e,t,r,i){let s=new Bf,o=(0,x.createProtocolConnection)(n,e,s,i);return o.onError(u=>{t(u[0],u[1],u[2])}),o.onClose(r),{listen:()=>o.listen(),sendRequest:o.sendRequest,onRequest:o.onRequest,hasPendingResponse:o.hasPendingResponse,sendNotification:o.sendNotification,onNotification:o.onNotification,onProgress:o.onProgress,sendProgress:o.sendProgress,trace:(u,l,f)=>{let p={sendNotification:!1,traceFormat:x.TraceFormat.Text};return f===void 0?o.trace(u,l,p):(Yt.boolean(f),o.trace(u,l,f))},initialize:u=>o.sendRequest(x.InitializeRequest.type,u),shutdown:()=>o.sendRequest(x.ShutdownRequest.type,void 0),exit:()=>o.sendNotification(x.ExitNotification.type),end:()=>o.end(),dispose:()=>o.dispose()}}var Gf;(function(n){function e(t){return[]}n.createAll=e})(Gf||(he.ProposedFeatures=Gf={}))});var Zy=P(Zn=>{"use strict";var CT=Zn&&Zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),wT=Zn&&Zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),DT=Zn&&Zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var Zy=require("util"),er=Nn(),Xf=class n extends er.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return n.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new Zy.TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}},Jf=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),er.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),er.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),er.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),er.Disposable.create(()=>this.stream.off("data",e))}},Qf=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),er.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),er.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),er.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,i)=>{let s=o=>{o==null?r():i(o)};typeof e=="string"?this.stream.write(e,t,s):this.stream.write(e,s)})}end(){this.stream.end()}},ev=Object.freeze({messageBuffer:Object.freeze({create:n=>new Xf(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(n,void 0,0),e.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{try{return n instanceof Buffer?Promise.resolve(JSON.parse(n.toString(e.charset))):Promise.resolve(JSON.parse(new Zy.TextDecoder(e.charset).decode(n)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:n=>new Jf(n),asWritableStream:n=>new Qf(n)}),console,timer:Object.freeze({setTimeout(n,e,...t){let r=setTimeout(n,e,...t);return{dispose:()=>clearTimeout(r)}},setImmediate(n,...e){let t=setImmediate(n,...e);return{dispose:()=>clearImmediate(t)}},setInterval(n,e,...t){let r=setInterval(n,e,...t);return{dispose:()=>clearInterval(r)}}})});function Yf(){return ev}(function(n){function e(){er.RAL.install(ev)}n.install=e})(Yf||(Yf={}));Zf.default=Yf});var sh=P(re=>{"use strict";var rv=re&&re.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OT=re&&re.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ih=re&&re.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),Et.Disposable.create(()=>this.process.off("message",e))}};re.IPCMessageReader=eh;var th=class extends Et.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",r=>this.fireError(r)),t.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};re.IPCMessageWriter=th;var nh=class extends Et.AbstractMessageReader{onData;constructor(e){super(),this.onData=new Et.Emitter,e.on("close",()=>this.fireClose),e.on("error",t=>this.fireError(t)),e.on("message",t=>{this.onData.fire(t)})}listen(e){return this.onData.event(e)}};re.PortMessageReader=nh;var rh=class extends Et.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",t=>this.fireError(t))}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(){}};re.PortMessageWriter=rh;var Vr=class extends Et.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,Ns.default)().stream.asReadableStream(e),t)}};re.SocketMessageReader=Vr;var Xr=class extends Et.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,Ns.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};re.SocketMessageWriter=Xr;var ma=class extends Et.ReadableStreamMessageReader{constructor(e,t){super((0,Ns.default)().stream.asReadableStream(e),t)}};re.StreamMessageReader=ma;var _a=class extends Et.WriteableStreamMessageWriter{constructor(e,t){super((0,Ns.default)().stream.asWritableStream(e),t)}};re.StreamMessageWriter=_a;var NT=process.env.XDG_RUNTIME_DIR,jT=new Map([["linux",107],["darwin",102]]);function FT(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,nv.randomBytes)(16).toString("hex")}-sock`;let n=32,e=10,t=IT.realpathSync(NT??xT.tmpdir()),r=jT.get(process.platform);if(r!==void 0&&(n=Math.min(r-t.length-e,n)),n<16)throw new Error(`Unable to generate a random pipe name with ${n} characters.`);let i=(0,nv.randomBytes)(Math.floor(n/2)).toString("hex");return MT.join(t,`lsp-${i}.sock`)}function LT(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,ya.createServer)(a=>{o.close(),t([new Vr(a,e),new Xr(a,e)])});o.on("error",s),o.listen(n,()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function AT(n,e="utf-8"){let t=(0,ya.createConnection)(n);return[new Vr(t,e),new Xr(t,e)]}function kT(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,ya.createServer)(a=>{o.close(),t([new Vr(a,e),new Xr(a,e)])});o.on("error",s),o.listen(n,"127.0.0.1",()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function $T(n,e="utf-8"){let t=(0,ya.createConnection)(n,"127.0.0.1");return[new Vr(t,e),new Xr(t,e)]}function HT(n){let e=n;return e.read!==void 0&&e.addListener!==void 0}function UT(n){let e=n;return e.write!==void 0&&e.addListener!==void 0}function WT(n,e,t,r){t||(t=Et.NullLogger);let i=HT(n)?new ma(n):n,s=UT(e)?new _a(e):e;return Et.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Et.createMessageConnection)(i,s,t,r)}});var oh=P(tr=>{"use strict";var zT=tr&&tr.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),iv=tr&&tr.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&zT(e,n,t)};Object.defineProperty(tr,"__esModule",{value:!0});tr.createProtocolConnection=BT;var KT=sh();iv(sh(),tr);iv(V(),tr);function BT(n,e,t,r){return(0,KT.createMessageConnection)(n,e,t,r)}});var js=P((vq,sv)=>{"use strict";var GT=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};sv.exports=GT});var va=P((bq,ov)=>{"use strict";var VT="2.0.0",XT=Number.MAX_SAFE_INTEGER||9007199254740991,JT=16,QT=250,YT=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ov.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:JT,MAX_SAFE_BUILD_LENGTH:QT,MAX_SAFE_INTEGER:XT,RELEASE_TYPES:YT,SEMVER_SPEC_VERSION:VT,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var ba=P((Sn,av)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ah,MAX_SAFE_BUILD_LENGTH:ZT,MAX_LENGTH:eO}=va(),tO=js();Sn=av.exports={};var nO=Sn.re=[],rO=Sn.safeRe=[],A=Sn.src=[],iO=Sn.safeSrc=[],k=Sn.t={},sO=0,ch="[a-zA-Z0-9-]",oO=[["\\s",1],["\\d",eO],[ch,ZT]],aO=n=>{for(let[e,t]of oO)n=n.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return n},Q=(n,e,t)=>{let r=aO(e),i=sO++;tO(n,i,e),k[n]=i,A[i]=e,iO[i]=r,nO[i]=new RegExp(e,t?"g":void 0),rO[i]=new RegExp(r,t?"g":void 0)};Q("NUMERICIDENTIFIER","0|[1-9]\\d*");Q("NUMERICIDENTIFIERLOOSE","\\d+");Q("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ch}*`);Q("MAINVERSION",`(${A[k.NUMERICIDENTIFIER]})\\.(${A[k.NUMERICIDENTIFIER]})\\.(${A[k.NUMERICIDENTIFIER]})`);Q("MAINVERSIONLOOSE",`(${A[k.NUMERICIDENTIFIERLOOSE]})\\.(${A[k.NUMERICIDENTIFIERLOOSE]})\\.(${A[k.NUMERICIDENTIFIERLOOSE]})`);Q("PRERELEASEIDENTIFIER",`(?:${A[k.NONNUMERICIDENTIFIER]}|${A[k.NUMERICIDENTIFIER]})`);Q("PRERELEASEIDENTIFIERLOOSE",`(?:${A[k.NONNUMERICIDENTIFIER]}|${A[k.NUMERICIDENTIFIERLOOSE]})`);Q("PRERELEASE",`(?:-(${A[k.PRERELEASEIDENTIFIER]}(?:\\.${A[k.PRERELEASEIDENTIFIER]})*))`);Q("PRERELEASELOOSE",`(?:-?(${A[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${A[k.PRERELEASEIDENTIFIERLOOSE]})*))`);Q("BUILDIDENTIFIER",`${ch}+`);Q("BUILD",`(?:\\+(${A[k.BUILDIDENTIFIER]}(?:\\.${A[k.BUILDIDENTIFIER]})*))`);Q("FULLPLAIN",`v?${A[k.MAINVERSION]}${A[k.PRERELEASE]}?${A[k.BUILD]}?`);Q("FULL",`^${A[k.FULLPLAIN]}$`);Q("LOOSEPLAIN",`[v=\\s]*${A[k.MAINVERSIONLOOSE]}${A[k.PRERELEASELOOSE]}?${A[k.BUILD]}?`);Q("LOOSE",`^${A[k.LOOSEPLAIN]}$`);Q("GTLT","((?:<|>)?=?)");Q("XRANGEIDENTIFIERLOOSE",`${A[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Q("XRANGEIDENTIFIER",`${A[k.NUMERICIDENTIFIER]}|x|X|\\*`);Q("XRANGEPLAIN",`[v=\\s]*(${A[k.XRANGEIDENTIFIER]})(?:\\.(${A[k.XRANGEIDENTIFIER]})(?:\\.(${A[k.XRANGEIDENTIFIER]})(?:${A[k.PRERELEASE]})?${A[k.BUILD]}?)?)?`);Q("XRANGEPLAINLOOSE",`[v=\\s]*(${A[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[k.XRANGEIDENTIFIERLOOSE]})(?:${A[k.PRERELEASELOOSE]})?${A[k.BUILD]}?)?)?`);Q("XRANGE",`^${A[k.GTLT]}\\s*${A[k.XRANGEPLAIN]}$`);Q("XRANGELOOSE",`^${A[k.GTLT]}\\s*${A[k.XRANGEPLAINLOOSE]}$`);Q("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ah}})(?:\\.(\\d{1,${ah}}))?(?:\\.(\\d{1,${ah}}))?`);Q("COERCE",`${A[k.COERCEPLAIN]}(?:$|[^\\d])`);Q("COERCEFULL",A[k.COERCEPLAIN]+`(?:${A[k.PRERELEASE]})?(?:${A[k.BUILD]})?(?:$|[^\\d])`);Q("COERCERTL",A[k.COERCE],!0);Q("COERCERTLFULL",A[k.COERCEFULL],!0);Q("LONETILDE","(?:~>?)");Q("TILDETRIM",`(\\s*)${A[k.LONETILDE]}\\s+`,!0);Sn.tildeTrimReplace="$1~";Q("TILDE",`^${A[k.LONETILDE]}${A[k.XRANGEPLAIN]}$`);Q("TILDELOOSE",`^${A[k.LONETILDE]}${A[k.XRANGEPLAINLOOSE]}$`);Q("LONECARET","(?:\\^)");Q("CARETTRIM",`(\\s*)${A[k.LONECARET]}\\s+`,!0);Sn.caretTrimReplace="$1^";Q("CARET",`^${A[k.LONECARET]}${A[k.XRANGEPLAIN]}$`);Q("CARETLOOSE",`^${A[k.LONECARET]}${A[k.XRANGEPLAINLOOSE]}$`);Q("COMPARATORLOOSE",`^${A[k.GTLT]}\\s*(${A[k.LOOSEPLAIN]})$|^$`);Q("COMPARATOR",`^${A[k.GTLT]}\\s*(${A[k.FULLPLAIN]})$|^$`);Q("COMPARATORTRIM",`(\\s*)${A[k.GTLT]}\\s*(${A[k.LOOSEPLAIN]}|${A[k.XRANGEPLAIN]})`,!0);Sn.comparatorTrimReplace="$1$2$3";Q("HYPHENRANGE",`^\\s*(${A[k.XRANGEPLAIN]})\\s+-\\s+(${A[k.XRANGEPLAIN]})\\s*$`);Q("HYPHENRANGELOOSE",`^\\s*(${A[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${A[k.XRANGEPLAINLOOSE]})\\s*$`);Q("STAR","(<|>)?=?\\s*\\*");Q("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Q("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ca=P((Cq,cv)=>{"use strict";var cO=Object.freeze({loose:!0}),uO=Object.freeze({}),lO=n=>n?typeof n!="object"?cO:n:uO;cv.exports=lO});var fv=P((wq,dv)=>{"use strict";var uv=/^[0-9]+$/,lv=(n,e)=>{if(typeof n=="number"&&typeof e=="number")return n===e?0:nlv(e,n);dv.exports={compareIdentifiers:lv,rcompareIdentifiers:dO}});var Fs=P((Dq,pv)=>{"use strict";var wa=js(),{MAX_LENGTH:hv,MAX_SAFE_INTEGER:Da}=va(),{safeRe:Sa,t:Pa}=ba(),fO=Ca(),{compareIdentifiers:uh}=fv(),hO=(n,e)=>{let t=e.split(".");if(t.length>n.length)return!1;for(let r=0;rhv)throw new TypeError(`version is longer than ${hv} characters`);wa("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Sa[Pa.LOOSE]:Sa[Pa.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Da||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Da||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Da||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&se.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof n||(e=new n(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(wa("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return uh(r,i)}while(++t)}compareBuild(e){e instanceof n||(e=new n(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(wa("build compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return uh(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?Sa[Pa.PRERELEASELOOSE]:Sa[Pa.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];if(r===!1&&(s=[t]),hO(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};pv.exports=lh});var _v=P((Sq,mv)=>{"use strict";var gv=Fs(),pO=(n,e,t=!1)=>{if(n instanceof gv)return n;try{return new gv(n,e)}catch(r){if(!t)return null;throw r}};mv.exports=pO});var vv=P((Pq,yv)=>{"use strict";var dh=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};yv.exports=dh});var Jr=P((Rq,Cv)=>{"use strict";var bv=Fs(),gO=(n,e,t)=>new bv(n,t).compare(new bv(e,t));Cv.exports=gO});var Dv=P((Tq,wv)=>{"use strict";var mO=Jr(),_O=(n,e,t)=>mO(n,e,t)===0;wv.exports=_O});var Pv=P((Oq,Sv)=>{"use strict";var yO=Jr(),vO=(n,e,t)=>yO(n,e,t)!==0;Sv.exports=vO});var Tv=P((Eq,Rv)=>{"use strict";var bO=Jr(),CO=(n,e,t)=>bO(n,e,t)>0;Rv.exports=CO});var Ev=P((qq,Ov)=>{"use strict";var wO=Jr(),DO=(n,e,t)=>wO(n,e,t)>=0;Ov.exports=DO});var Mv=P((Mq,qv)=>{"use strict";var SO=Jr(),PO=(n,e,t)=>SO(n,e,t)<0;qv.exports=PO});var Iv=P((xq,xv)=>{"use strict";var RO=Jr(),TO=(n,e,t)=>RO(n,e,t)<=0;xv.exports=TO});var jv=P((Iq,Nv)=>{"use strict";var OO=Dv(),EO=Pv(),qO=Tv(),MO=Ev(),xO=Mv(),IO=Iv(),NO=(n,e,t,r)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return OO(n,t,r);case"!=":return EO(n,t,r);case">":return qO(n,t,r);case">=":return MO(n,t,r);case"<":return xO(n,t,r);case"<=":return IO(n,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Nv.exports=NO});var Uv=P((Nq,Hv)=>{"use strict";var Ls=Symbol("SemVer ANY"),ph=class n{static get ANY(){return Ls}constructor(e,t){if(t=Fv(t),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),hh("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ls?this.value="":this.value=this.operator+this.semver.version,hh("comp",this)}parse(e){let t=this.options.loose?Lv[Av.COMPARATORLOOSE]:Lv[Av.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new kv(r[2],this.options.loose):this.semver=Ls}toString(){return this.value}test(e){if(hh("Comparator.test",e,this.options.loose),this.semver===Ls||e===Ls)return!0;if(typeof e=="string")try{e=new kv(e,this.options)}catch{return!1}return fh(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new $v(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new $v(this.value,t).test(e.semver):(t=Fv(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fh(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fh(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Hv.exports=ph;var Fv=Ca(),{safeRe:Lv,t:Av}=ba(),fh=jv(),hh=js(),kv=Fs(),$v=gh()});var gh=P((jq,Bv)=>{"use strict";var jO=/\s+/g,mh=class n{constructor(e,t){if(t=LO(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof _h)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(jO," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!zv(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&BO(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(KO,"");let r=((this.options.includePrerelease&&WO)|(this.options.loose&&zO))+":"+e,i=Wv.get(r);if(i)return i;let s=this.options.loose,o=s?ht[et.HYPHENRANGELOOSE]:ht[et.HYPHENRANGE];e=e.replace(o,rE(this.options.includePrerelease)),Pe("hyphen replace",e),e=e.replace(ht[et.COMPARATORTRIM],$O),Pe("comparator trim",e),e=e.replace(ht[et.TILDETRIM],HO),Pe("tilde trim",e),e=e.replace(ht[et.CARETTRIM],UO),Pe("caret trim",e);let a=e.split(" ").map(p=>GO(p,this.options)).join(" ").split(/\s+/).map(p=>nE(p,this.options));s&&(a=a.filter(p=>(Pe("loose invalid filter",p,this.options),!!p.match(ht[et.COMPARATORLOOSE])))),Pe("range list",a);let u=new Map,l=a.map(p=>new _h(p,this.options));for(let p of l){if(zv(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let f=[...u.values()];return Wv.set(r,f),f}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>Kv(r,t)&&e.set.some(i=>Kv(i,t)&&r.every(s=>i.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AO(e,this.options)}catch{return!1}for(let t=0;tn.value==="<0.0.0-0",BO=n=>n.value==="",Kv=(n,e)=>{let t=!0,r=n.slice(),i=r.pop();for(;t&&r.length;)t=r.every(s=>i.intersects(s,e)),i=r.pop();return t},GO=(n,e)=>(n=n.replace(ht[et.BUILD],""),Pe("comp",n,e),n=QO(n,e),Pe("caret",n),n=XO(n,e),Pe("tildes",n),n=ZO(n,e),Pe("xrange",n),n=tE(n,e),Pe("stars",n),n),Ke=n=>!n||n.toLowerCase()==="x"||n==="*",VO=(n,e,t)=>Ke(n)&&!Ke(e)||Ke(e)&&t&&!Ke(t),XO=(n,e)=>n.trim().split(/\s+/).map(t=>JO(t,e)).join(" "),JO=(n,e)=>{let t=e.loose?ht[et.TILDELOOSE]:ht[et.TILDE],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Pe("tilde",n,i,s,o,a,u);let l;return Ke(s)?l="":Ke(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Ke(a)?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:u?(Pe("replaceTilde pr",u),l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,Pe("tilde return",l),l})},QO=(n,e)=>n.trim().split(/\s+/).map(t=>YO(t,e)).join(" "),YO=(n,e)=>{Pe("caret",n,e);let t=e.loose?ht[et.CARETLOOSE]:ht[et.CARET],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Pe("caret",n,i,s,o,a,u);let l;return Ke(s)?l="":Ke(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Ke(a)?s==="0"?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${r} <${+s+1}.0.0-0`:u?(Pe("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${a}-${u} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a}-${u} <${+s+1}.0.0-0`):(Pe("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Pe("caret return",l),l})},ZO=(n,e)=>(Pe("replaceXRanges",n,e),n.split(/\s+/).map(t=>eE(t,e)).join(" ")),eE=(n,e)=>{n=n.trim();let t=e.loose?ht[et.XRANGELOOSE]:ht[et.XRANGE];return n.replace(t,(r,i,s,o,a,u)=>{if(Pe("xRange",n,r,i,s,o,a,u),VO(s,o,a))return n;let l=Ke(s),f=l||Ke(o),p=f||Ke(a),h=p;return i==="="&&h&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&h?(f&&(o=0),a=0,i===">"?(i=">=",f?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",f?s=+s+1:o=+o+1),i==="<"&&(u="-0"),r=`${i+s}.${o}.${a}${u}`):f?r=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),Pe("xRange return",r),r})},tE=(n,e)=>(Pe("replaceStars",n,e),n.trim().replace(ht[et.STAR],"")),nE=(n,e)=>(Pe("replaceGTE0",n,e),n.trim().replace(ht[e.includePrerelease?et.GTE0PRE:et.GTE0],"")),rE=n=>(e,t,r,i,s,o,a,u,l,f,p,h)=>(Ke(r)?t="":Ke(i)?t=`>=${r}.0.0${n?"-0":""}`:Ke(s)?t=`>=${r}.${i}.0${n?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,Ke(l)?u="":Ke(f)?u=`<${+l+1}.0.0-0`:Ke(p)?u=`<${l}.${+f+1}.0-0`:h?u=`<=${l}.${f}.${p}-${h}`:n?u=`<${l}.${f}.${+p+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),iE=(n,e,t)=>{for(let r=0;r0){let i=n[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Vv=P((Fq,Gv)=>{"use strict";var sE=gh(),oE=(n,e,t)=>{try{e=new sE(e,t)}catch{return!1}return e.test(n)};Gv.exports=oE});var Jv=P(qt=>{"use strict";var aE=qt&&qt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),yh=qt&&qt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&aE(e,n,t)};Object.defineProperty(qt,"__esModule",{value:!0});qt.DiagnosticPullMode=qt.vsdiag=void 0;yh(V(),qt);yh(ne(),qt);var Xv=id();Object.defineProperty(qt,"vsdiag",{enumerable:!0,get:function(){return Xv.vsdiag}});Object.defineProperty(qt,"DiagnosticPullMode",{enumerable:!0,get:function(){return Xv.DiagnosticPullMode}});yh(Vf(),qt)});var nb=P(Qe=>{"use strict";var eb=Qe&&Qe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),cE=Qe&&Qe.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),As=Qe&&Qe.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(e.prerelease=[]),!dE(e,Zv))throw new Error(`The language client requires VS Code version ${Zv} but received version ${qr.version}`)}get isInDebugMode(){return this._isInDebugMode}get serverProcess(){return this._serverProcess}async restart(){await this.stop(),this.isInDebugMode?(await new Promise(e=>setTimeout(e,1e3)),await this.start()):await this.start()}shutdown(e,t=2e3){return super.shutdown(e,t).finally(()=>{if(this._serverProcess){let r=this._serverProcess;this._serverProcess=void 0,(this._isDetached===void 0||!this._isDetached)&&this.checkProcessDied(r),this._isDetached=void 0}})}checkProcessDied(e){!e||e.pid===void 0||setTimeout(()=>{try{e.pid!==void 0&&(process.kill(e.pid,0),(0,uE.terminate)(e))}catch{}},2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),e.processId===null&&(e.processId=process.pid)}createMessageTransports(e){function t(h,g){if(!h&&!g)return;let _=Object.create(null);return Object.keys(process.env).forEach(v=>_[v]=process.env[v]),g&&(_.ELECTRON_RUN_AS_NODE="1",_.ELECTRON_NO_ASAR="1"),h&&Object.keys(h).forEach(v=>_[v]=h[v]),_}let r=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function s(){let h=process.execArgv;return h?h.some(g=>r.some(_=>g.startsWith(_))||i.some(_=>g===_)):!1}function o(h){if(h.stdin===null||h.stdout===null||h.stderr===null)throw new Error("Process created without stdio streams")}function a(h,g){Qv.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.info(_))}function u(h,g){Qv.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.error(_))}let l=this._serverOptions;if($i.func(l))return l().then(h=>{if(Yv.MessageTransports.is(h))return this._isDetached=!!h.detached,h;if(Dh.is(h))return this._isDetached=!!h.detached,{reader:new Ne.StreamMessageReader(h.reader),writer:new Ne.StreamMessageWriter(h.writer)};{let g;return Sh.is(h)?(g=h.process,this._isDetached=h.detached):(g=h,this._isDetached=!1),u(g.stderr,this.outputChannel),{reader:new Ne.StreamMessageReader(g.stdout),writer:new Ne.StreamMessageWriter(g.stdin)}}});let f,p=l;return p.run||p.debug?this._forceDebug||s()?(f=p.debug,this._isInDebugMode=!0):(f=p.run,this._isInDebugMode=!1):f=l,this._getServerWorkingDir(f.options).then(h=>{if(wh.is(f)&&f.module){let g=f,_=g.transport||je.stdio;if(g.runtime){let v=[],R=g.options??Object.create(null);R.execArgv&&R.execArgv.forEach(j=>v.push(j)),v.push(g.module),g.args&&g.args.forEach(j=>v.push(j));let q=Object.create(null);q.cwd=h,q.env=t(R.env,!1);let w=this._getRuntimePath(g.runtime,h),M;if(_===je.ipc?(q.stdio=[null,null,null,"ipc"],v.push("--node-ipc")):_===je.stdio?v.push("--stdio"):_===je.pipe?(M=(0,Ne.generateRandomPipeName)(),v.push(`--pipe=${M}`)):Er.isSocket(_)&&v.push(`--socket=${_.port}`),v.push(`--clientProcessId=${process.pid.toString()}`),_===je.ipc||_===je.stdio){let j=nr.spawn(w,v,q);return!j||!j.pid?ki(j,`Launching server using runtime ${w} failed.`):(this._serverProcess=j,u(j.stderr,this.outputChannel),_===je.ipc?(a(j.stdout,this.outputChannel),Promise.resolve({reader:new Ne.IPCMessageReader(j),writer:new Ne.IPCMessageWriter(j)})):Promise.resolve({reader:new Ne.StreamMessageReader(j.stdout),writer:new Ne.StreamMessageWriter(j.stdin)}))}else{if(_===je.pipe)return(0,Ne.createClientPipeTransport)(M).then(j=>{let F=nr.spawn(w,v,q);return!F||!F.pid?ki(F,`Launching server using runtime ${w} failed.`):(this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>({reader:oe[0],writer:oe[1]})))});if(Er.isSocket(_))return(0,Ne.createClientSocketTransport)(_.port).then(j=>{let F=nr.spawn(w,v,q);return!F||!F.pid?ki(F,`Launching server using runtime ${w} failed.`):(this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>({reader:oe[0],writer:oe[1]})))})}}else{let v;return new Promise((R,q)=>{let w=(g.args&&g.args.slice())??[];_===je.ipc?w.push("--node-ipc"):_===je.stdio?w.push("--stdio"):_===je.pipe?(v=(0,Ne.generateRandomPipeName)(),w.push(`--pipe=${v}`)):Er.isSocket(_)&&w.push(`--socket=${_.port}`),w.push(`--clientProcessId=${process.pid.toString()}`);let M=g.options?{...g.options}:Object.create(null);if(M.env=t(M.env,!0),M.execArgv=M.execArgv||[],M.cwd=h,M.silent=!0,_===je.ipc||_===je.stdio){let j=nr.fork(g.module,w||[],M);o(j),this._serverProcess=j,u(j.stderr,this.outputChannel),_===je.ipc?(a(j.stdout,this.outputChannel),R({reader:new Ne.IPCMessageReader(this._serverProcess),writer:new Ne.IPCMessageWriter(this._serverProcess)})):R({reader:new Ne.StreamMessageReader(j.stdout),writer:new Ne.StreamMessageWriter(j.stdin)})}else _===je.pipe?(0,Ne.createClientPipeTransport)(v).then(j=>{let F=nr.fork(g.module,w||[],M);o(F),this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>{R({reader:oe[0],writer:oe[1]})},q)},q):Er.isSocket(_)&&(0,Ne.createClientSocketTransport)(_.port).then(j=>{let F=nr.fork(g.module,w||[],M);o(F),this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>{R({reader:oe[0],writer:oe[1]})},q)},q)})}}else if(Ch.is(f)&&f.command){let g=f,_=f.args!==void 0?f.args.slice(0):[],v,R=f.transport;if(R===je.stdio)_.push("--stdio");else if(R===je.pipe)v=(0,Ne.generateRandomPipeName)(),_.push(`--pipe=${v}`);else if(Er.isSocket(R))_.push(`--socket=${R.port}`);else if(R===je.ipc)throw new Error("Transport kind ipc is not support for command executable");let q=Object.assign({},g.options);if(q.cwd=q.cwd||h,R===void 0||R===je.stdio){let w=nr.spawn(g.command,_,q);return!w||!w.pid?ki(w,`Launching server using command ${g.command} failed.`):(u(w.stderr,this.outputChannel),this._serverProcess=w,this._isDetached=!!q.detached,Promise.resolve({reader:new Ne.StreamMessageReader(w.stdout),writer:new Ne.StreamMessageWriter(w.stdin)}))}else{if(R===je.pipe)return(0,Ne.createClientPipeTransport)(v).then(w=>{let M=nr.spawn(g.command,_,q);return!M||!M.pid?ki(M,`Launching server using command ${g.command} failed.`):(this._serverProcess=M,this._isDetached=!!q.detached,u(M.stderr,this.outputChannel),a(M.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))});if(Er.isSocket(R))return(0,Ne.createClientSocketTransport)(R.port).then(w=>{let M=nr.spawn(g.command,_,q);return!M||!M.pid?ki(M,`Launching server using command ${g.command} failed.`):(this._serverProcess=M,this._isDetached=!!q.detached,u(M.stderr,this.outputChannel),a(M.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))})}}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(l,null,4)))}).finally(()=>{this._serverProcess!==void 0&&this._serverProcess.on("exit",(h,g)=>{h===0?this.info("Server process exited successfully",void 0,!1):h!==null&&this.error(`Server process exited with code ${h}.`,void 0,!1),g!==null&&this.error(`Server process exited with signal ${g}.`,void 0,!1)})})}_getRuntimePath(e,t){if(bh.isAbsolute(e))return e;let r=this._mainGetRootPath();if(r!==void 0){let i=bh.join(r,e);if(vh.existsSync(i))return i}if(t!==void 0){let i=bh.join(t,e);if(vh.existsSync(i))return i}return e}_mainGetRootPath(){let e=qr.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(r=>{vh.lstat(t,(i,s)=>{r(!i&&s.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}};Qe.LanguageClient=Ph;var Rh=class{_client;_setting;_listeners;constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return qr.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new qr.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,r=e>=0?this._setting.substr(e+1):void 0,i=r?qr.workspace.getConfiguration(t).get(r,!1):qr.workspace.getConfiguration(t);i&&this._client.needsStart()?this._client.start().catch(s=>this._client.error("Start failed after configuration change",s,"force")):!i&&this._client.needsStop()&&this._client.stop().catch(s=>this._client.error("Stop failed after configuration change",s,"force"))}};Qe.SettingMonitor=Rh;function ki(n,e){return n===null?Promise.reject(e):new Promise((t,r)=>{n.on("error",i=>{r(`${e} ${i}`)}),setImmediate(()=>r(e))})}});var fE=exports&&exports.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),hE=exports&&exports.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ib=exports&&exports.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{await rb.commands.executeCommand("editor.action.formatDocument")})),await Hi.start()}async function mE(){Hi!==void 0&&(await Hi.stop(),Hi=void 0)} +`;return!Yy.spawnSync("/bin/sh",[],{input:r,stdio:["pipe","inherit","inherit"]}).error}catch{return!1}else return n.kill("SIGKILL"),!0}});var nv=P(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var ev=require("util"),er=Nn(),Xf=class n extends er.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return n.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new ev.TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}},Jf=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),er.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),er.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),er.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),er.Disposable.create(()=>this.stream.off("data",e))}},Qf=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),er.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),er.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),er.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,i)=>{let s=o=>{o==null?r():i(o)};typeof e=="string"?this.stream.write(e,t,s):this.stream.write(e,s)})}end(){this.stream.end()}},tv=Object.freeze({messageBuffer:Object.freeze({create:n=>new Xf(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(n,void 0,0),e.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{try{return n instanceof Buffer?Promise.resolve(JSON.parse(n.toString(e.charset))):Promise.resolve(JSON.parse(new ev.TextDecoder(e.charset).decode(n)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:n=>new Jf(n),asWritableStream:n=>new Qf(n)}),console,timer:Object.freeze({setTimeout(n,e,...t){let r=setTimeout(n,e,...t);return{dispose:()=>clearTimeout(r)}},setImmediate(n,...e){let t=setImmediate(n,...e);return{dispose:()=>clearImmediate(t)}},setInterval(n,e,...t){let r=setInterval(n,e,...t);return{dispose:()=>clearInterval(r)}}})});function Yf(){return tv}(function(n){function e(){er.RAL.install(tv)}n.install=e})(Yf||(Yf={}));Zf.default=Yf});var sh=P(re=>{"use strict";var iv=re&&re.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OT=re&&re.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ih=re&&re.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;ithis.fireError(r)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),Et.Disposable.create(()=>this.process.off("message",e))}};re.IPCMessageReader=eh;var th=class extends Et.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",r=>this.fireError(r)),t.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};re.IPCMessageWriter=th;var nh=class extends Et.AbstractMessageReader{onData;constructor(e){super(),this.onData=new Et.Emitter,e.on("close",()=>this.fireClose),e.on("error",t=>this.fireError(t)),e.on("message",t=>{this.onData.fire(t)})}listen(e){return this.onData.event(e)}};re.PortMessageReader=nh;var rh=class extends Et.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",t=>this.fireError(t))}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(){}};re.PortMessageWriter=rh;var Vr=class extends Et.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,Ns.default)().stream.asReadableStream(e),t)}};re.SocketMessageReader=Vr;var Xr=class extends Et.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,Ns.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};re.SocketMessageWriter=Xr;var ma=class extends Et.ReadableStreamMessageReader{constructor(e,t){super((0,Ns.default)().stream.asReadableStream(e),t)}};re.StreamMessageReader=ma;var _a=class extends Et.WriteableStreamMessageWriter{constructor(e,t){super((0,Ns.default)().stream.asWritableStream(e),t)}};re.StreamMessageWriter=_a;var NT=process.env.XDG_RUNTIME_DIR,jT=new Map([["linux",107],["darwin",102]]);function FT(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,rv.randomBytes)(16).toString("hex")}-sock`;let n=32,e=10,t=IT.realpathSync(NT??xT.tmpdir()),r=jT.get(process.platform);if(r!==void 0&&(n=Math.min(r-t.length-e,n)),n<16)throw new Error(`Unable to generate a random pipe name with ${n} characters.`);let i=(0,rv.randomBytes)(Math.floor(n/2)).toString("hex");return MT.join(t,`lsp-${i}.sock`)}function LT(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,ya.createServer)(a=>{o.close(),t([new Vr(a,e),new Xr(a,e)])});o.on("error",s),o.listen(n,()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function AT(n,e="utf-8"){let t=(0,ya.createConnection)(n);return[new Vr(t,e),new Xr(t,e)]}function kT(n,e="utf-8"){let t,r=new Promise((i,s)=>{t=i});return new Promise((i,s)=>{let o=(0,ya.createServer)(a=>{o.close(),t([new Vr(a,e),new Xr(a,e)])});o.on("error",s),o.listen(n,"127.0.0.1",()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}function $T(n,e="utf-8"){let t=(0,ya.createConnection)(n,"127.0.0.1");return[new Vr(t,e),new Xr(t,e)]}function HT(n){let e=n;return e.read!==void 0&&e.addListener!==void 0}function UT(n){let e=n;return e.write!==void 0&&e.addListener!==void 0}function WT(n,e,t,r){t||(t=Et.NullLogger);let i=HT(n)?new ma(n):n,s=UT(e)?new _a(e):e;return Et.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Et.createMessageConnection)(i,s,t,r)}});var oh=P(tr=>{"use strict";var zT=tr&&tr.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sv=tr&&tr.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&zT(e,n,t)};Object.defineProperty(tr,"__esModule",{value:!0});tr.createProtocolConnection=BT;var KT=sh();sv(sh(),tr);sv(V(),tr);function BT(n,e,t,r){return(0,KT.createMessageConnection)(n,e,t,r)}});var js=P((vq,ov)=>{"use strict";var GT=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};ov.exports=GT});var va=P((bq,av)=>{"use strict";var VT="2.0.0",XT=Number.MAX_SAFE_INTEGER||9007199254740991,JT=16,QT=250,YT=["major","premajor","minor","preminor","patch","prepatch","prerelease"];av.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:JT,MAX_SAFE_BUILD_LENGTH:QT,MAX_SAFE_INTEGER:XT,RELEASE_TYPES:YT,SEMVER_SPEC_VERSION:VT,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var ba=P((Sn,cv)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ah,MAX_SAFE_BUILD_LENGTH:ZT,MAX_LENGTH:eO}=va(),tO=js();Sn=cv.exports={};var nO=Sn.re=[],rO=Sn.safeRe=[],A=Sn.src=[],iO=Sn.safeSrc=[],k=Sn.t={},sO=0,ch="[a-zA-Z0-9-]",oO=[["\\s",1],["\\d",eO],[ch,ZT]],aO=n=>{for(let[e,t]of oO)n=n.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return n},Q=(n,e,t)=>{let r=aO(e),i=sO++;tO(n,i,e),k[n]=i,A[i]=e,iO[i]=r,nO[i]=new RegExp(e,t?"g":void 0),rO[i]=new RegExp(r,t?"g":void 0)};Q("NUMERICIDENTIFIER","0|[1-9]\\d*");Q("NUMERICIDENTIFIERLOOSE","\\d+");Q("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ch}*`);Q("MAINVERSION",`(${A[k.NUMERICIDENTIFIER]})\\.(${A[k.NUMERICIDENTIFIER]})\\.(${A[k.NUMERICIDENTIFIER]})`);Q("MAINVERSIONLOOSE",`(${A[k.NUMERICIDENTIFIERLOOSE]})\\.(${A[k.NUMERICIDENTIFIERLOOSE]})\\.(${A[k.NUMERICIDENTIFIERLOOSE]})`);Q("PRERELEASEIDENTIFIER",`(?:${A[k.NONNUMERICIDENTIFIER]}|${A[k.NUMERICIDENTIFIER]})`);Q("PRERELEASEIDENTIFIERLOOSE",`(?:${A[k.NONNUMERICIDENTIFIER]}|${A[k.NUMERICIDENTIFIERLOOSE]})`);Q("PRERELEASE",`(?:-(${A[k.PRERELEASEIDENTIFIER]}(?:\\.${A[k.PRERELEASEIDENTIFIER]})*))`);Q("PRERELEASELOOSE",`(?:-?(${A[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${A[k.PRERELEASEIDENTIFIERLOOSE]})*))`);Q("BUILDIDENTIFIER",`${ch}+`);Q("BUILD",`(?:\\+(${A[k.BUILDIDENTIFIER]}(?:\\.${A[k.BUILDIDENTIFIER]})*))`);Q("FULLPLAIN",`v?${A[k.MAINVERSION]}${A[k.PRERELEASE]}?${A[k.BUILD]}?`);Q("FULL",`^${A[k.FULLPLAIN]}$`);Q("LOOSEPLAIN",`[v=\\s]*${A[k.MAINVERSIONLOOSE]}${A[k.PRERELEASELOOSE]}?${A[k.BUILD]}?`);Q("LOOSE",`^${A[k.LOOSEPLAIN]}$`);Q("GTLT","((?:<|>)?=?)");Q("XRANGEIDENTIFIERLOOSE",`${A[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Q("XRANGEIDENTIFIER",`${A[k.NUMERICIDENTIFIER]}|x|X|\\*`);Q("XRANGEPLAIN",`[v=\\s]*(${A[k.XRANGEIDENTIFIER]})(?:\\.(${A[k.XRANGEIDENTIFIER]})(?:\\.(${A[k.XRANGEIDENTIFIER]})(?:${A[k.PRERELEASE]})?${A[k.BUILD]}?)?)?`);Q("XRANGEPLAINLOOSE",`[v=\\s]*(${A[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[k.XRANGEIDENTIFIERLOOSE]})(?:${A[k.PRERELEASELOOSE]})?${A[k.BUILD]}?)?)?`);Q("XRANGE",`^${A[k.GTLT]}\\s*${A[k.XRANGEPLAIN]}$`);Q("XRANGELOOSE",`^${A[k.GTLT]}\\s*${A[k.XRANGEPLAINLOOSE]}$`);Q("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ah}})(?:\\.(\\d{1,${ah}}))?(?:\\.(\\d{1,${ah}}))?`);Q("COERCE",`${A[k.COERCEPLAIN]}(?:$|[^\\d])`);Q("COERCEFULL",A[k.COERCEPLAIN]+`(?:${A[k.PRERELEASE]})?(?:${A[k.BUILD]})?(?:$|[^\\d])`);Q("COERCERTL",A[k.COERCE],!0);Q("COERCERTLFULL",A[k.COERCEFULL],!0);Q("LONETILDE","(?:~>?)");Q("TILDETRIM",`(\\s*)${A[k.LONETILDE]}\\s+`,!0);Sn.tildeTrimReplace="$1~";Q("TILDE",`^${A[k.LONETILDE]}${A[k.XRANGEPLAIN]}$`);Q("TILDELOOSE",`^${A[k.LONETILDE]}${A[k.XRANGEPLAINLOOSE]}$`);Q("LONECARET","(?:\\^)");Q("CARETTRIM",`(\\s*)${A[k.LONECARET]}\\s+`,!0);Sn.caretTrimReplace="$1^";Q("CARET",`^${A[k.LONECARET]}${A[k.XRANGEPLAIN]}$`);Q("CARETLOOSE",`^${A[k.LONECARET]}${A[k.XRANGEPLAINLOOSE]}$`);Q("COMPARATORLOOSE",`^${A[k.GTLT]}\\s*(${A[k.LOOSEPLAIN]})$|^$`);Q("COMPARATOR",`^${A[k.GTLT]}\\s*(${A[k.FULLPLAIN]})$|^$`);Q("COMPARATORTRIM",`(\\s*)${A[k.GTLT]}\\s*(${A[k.LOOSEPLAIN]}|${A[k.XRANGEPLAIN]})`,!0);Sn.comparatorTrimReplace="$1$2$3";Q("HYPHENRANGE",`^\\s*(${A[k.XRANGEPLAIN]})\\s+-\\s+(${A[k.XRANGEPLAIN]})\\s*$`);Q("HYPHENRANGELOOSE",`^\\s*(${A[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${A[k.XRANGEPLAINLOOSE]})\\s*$`);Q("STAR","(<|>)?=?\\s*\\*");Q("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Q("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ca=P((Cq,uv)=>{"use strict";var cO=Object.freeze({loose:!0}),uO=Object.freeze({}),lO=n=>n?typeof n!="object"?cO:n:uO;uv.exports=lO});var hv=P((wq,fv)=>{"use strict";var lv=/^[0-9]+$/,dv=(n,e)=>{if(typeof n=="number"&&typeof e=="number")return n===e?0:ndv(e,n);fv.exports={compareIdentifiers:dv,rcompareIdentifiers:dO}});var Fs=P((Dq,gv)=>{"use strict";var wa=js(),{MAX_LENGTH:pv,MAX_SAFE_INTEGER:Da}=va(),{safeRe:Sa,t:Pa}=ba(),fO=Ca(),{compareIdentifiers:uh}=hv(),hO=(n,e)=>{let t=e.split(".");if(t.length>n.length)return!1;for(let r=0;rpv)throw new TypeError(`version is longer than ${pv} characters`);wa("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Sa[Pa.LOOSE]:Sa[Pa.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Da||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Da||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Da||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&se.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof n||(e=new n(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(wa("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return uh(r,i)}while(++t)}compareBuild(e){e instanceof n||(e=new n(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(wa("build compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return uh(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?Sa[Pa.PRERELEASELOOSE]:Sa[Pa.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];if(r===!1&&(s=[t]),hO(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};gv.exports=lh});var yv=P((Sq,_v)=>{"use strict";var mv=Fs(),pO=(n,e,t=!1)=>{if(n instanceof mv)return n;try{return new mv(n,e)}catch(r){if(!t)return null;throw r}};_v.exports=pO});var bv=P((Pq,vv)=>{"use strict";var dh=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};vv.exports=dh});var Jr=P((Rq,wv)=>{"use strict";var Cv=Fs(),gO=(n,e,t)=>new Cv(n,t).compare(new Cv(e,t));wv.exports=gO});var Sv=P((Tq,Dv)=>{"use strict";var mO=Jr(),_O=(n,e,t)=>mO(n,e,t)===0;Dv.exports=_O});var Rv=P((Oq,Pv)=>{"use strict";var yO=Jr(),vO=(n,e,t)=>yO(n,e,t)!==0;Pv.exports=vO});var Ov=P((Eq,Tv)=>{"use strict";var bO=Jr(),CO=(n,e,t)=>bO(n,e,t)>0;Tv.exports=CO});var qv=P((qq,Ev)=>{"use strict";var wO=Jr(),DO=(n,e,t)=>wO(n,e,t)>=0;Ev.exports=DO});var xv=P((Mq,Mv)=>{"use strict";var SO=Jr(),PO=(n,e,t)=>SO(n,e,t)<0;Mv.exports=PO});var Nv=P((xq,Iv)=>{"use strict";var RO=Jr(),TO=(n,e,t)=>RO(n,e,t)<=0;Iv.exports=TO});var Fv=P((Iq,jv)=>{"use strict";var OO=Sv(),EO=Rv(),qO=Ov(),MO=qv(),xO=xv(),IO=Nv(),NO=(n,e,t,r)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return OO(n,t,r);case"!=":return EO(n,t,r);case">":return qO(n,t,r);case">=":return MO(n,t,r);case"<":return xO(n,t,r);case"<=":return IO(n,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};jv.exports=NO});var Wv=P((Nq,Uv)=>{"use strict";var Ls=Symbol("SemVer ANY"),ph=class n{static get ANY(){return Ls}constructor(e,t){if(t=Lv(t),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),hh("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ls?this.value="":this.value=this.operator+this.semver.version,hh("comp",this)}parse(e){let t=this.options.loose?Av[kv.COMPARATORLOOSE]:Av[kv.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new $v(r[2],this.options.loose):this.semver=Ls}toString(){return this.value}test(e){if(hh("Comparator.test",e,this.options.loose),this.semver===Ls||e===Ls)return!0;if(typeof e=="string")try{e=new $v(e,this.options)}catch{return!1}return fh(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Hv(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new Hv(this.value,t).test(e.semver):(t=Lv(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fh(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fh(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Uv.exports=ph;var Lv=Ca(),{safeRe:Av,t:kv}=ba(),fh=Fv(),hh=js(),$v=Fs(),Hv=gh()});var gh=P((jq,Gv)=>{"use strict";var jO=/\s+/g,mh=class n{constructor(e,t){if(t=LO(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof _h)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(jO," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!Kv(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&BO(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(KO,"");let r=((this.options.includePrerelease&&WO)|(this.options.loose&&zO))+":"+e,i=zv.get(r);if(i)return i;let s=this.options.loose,o=s?ht[et.HYPHENRANGELOOSE]:ht[et.HYPHENRANGE];e=e.replace(o,rE(this.options.includePrerelease)),Pe("hyphen replace",e),e=e.replace(ht[et.COMPARATORTRIM],$O),Pe("comparator trim",e),e=e.replace(ht[et.TILDETRIM],HO),Pe("tilde trim",e),e=e.replace(ht[et.CARETTRIM],UO),Pe("caret trim",e);let a=e.split(" ").map(p=>GO(p,this.options)).join(" ").split(/\s+/).map(p=>nE(p,this.options));s&&(a=a.filter(p=>(Pe("loose invalid filter",p,this.options),!!p.match(ht[et.COMPARATORLOOSE])))),Pe("range list",a);let u=new Map,l=a.map(p=>new _h(p,this.options));for(let p of l){if(Kv(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let f=[...u.values()];return zv.set(r,f),f}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>Bv(r,t)&&e.set.some(i=>Bv(i,t)&&r.every(s=>i.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AO(e,this.options)}catch{return!1}for(let t=0;tn.value==="<0.0.0-0",BO=n=>n.value==="",Bv=(n,e)=>{let t=!0,r=n.slice(),i=r.pop();for(;t&&r.length;)t=r.every(s=>i.intersects(s,e)),i=r.pop();return t},GO=(n,e)=>(n=n.replace(ht[et.BUILD],""),Pe("comp",n,e),n=QO(n,e),Pe("caret",n),n=XO(n,e),Pe("tildes",n),n=ZO(n,e),Pe("xrange",n),n=tE(n,e),Pe("stars",n),n),Ke=n=>!n||n.toLowerCase()==="x"||n==="*",VO=(n,e,t)=>Ke(n)&&!Ke(e)||Ke(e)&&t&&!Ke(t),XO=(n,e)=>n.trim().split(/\s+/).map(t=>JO(t,e)).join(" "),JO=(n,e)=>{let t=e.loose?ht[et.TILDELOOSE]:ht[et.TILDE],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Pe("tilde",n,i,s,o,a,u);let l;return Ke(s)?l="":Ke(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Ke(a)?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:u?(Pe("replaceTilde pr",u),l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,Pe("tilde return",l),l})},QO=(n,e)=>n.trim().split(/\s+/).map(t=>YO(t,e)).join(" "),YO=(n,e)=>{Pe("caret",n,e);let t=e.loose?ht[et.CARETLOOSE]:ht[et.CARET],r=e.includePrerelease?"-0":"";return n.replace(t,(i,s,o,a,u)=>{Pe("caret",n,i,s,o,a,u);let l;return Ke(s)?l="":Ke(o)?l=`>=${s}.0.0${r} <${+s+1}.0.0-0`:Ke(a)?s==="0"?l=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${r} <${+s+1}.0.0-0`:u?(Pe("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${a}-${u} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a}-${u} <${+s+1}.0.0-0`):(Pe("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Pe("caret return",l),l})},ZO=(n,e)=>(Pe("replaceXRanges",n,e),n.split(/\s+/).map(t=>eE(t,e)).join(" ")),eE=(n,e)=>{n=n.trim();let t=e.loose?ht[et.XRANGELOOSE]:ht[et.XRANGE];return n.replace(t,(r,i,s,o,a,u)=>{if(Pe("xRange",n,r,i,s,o,a,u),VO(s,o,a))return n;let l=Ke(s),f=l||Ke(o),p=f||Ke(a),h=p;return i==="="&&h&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&h?(f&&(o=0),a=0,i===">"?(i=">=",f?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",f?s=+s+1:o=+o+1),i==="<"&&(u="-0"),r=`${i+s}.${o}.${a}${u}`):f?r=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),Pe("xRange return",r),r})},tE=(n,e)=>(Pe("replaceStars",n,e),n.trim().replace(ht[et.STAR],"")),nE=(n,e)=>(Pe("replaceGTE0",n,e),n.trim().replace(ht[e.includePrerelease?et.GTE0PRE:et.GTE0],"")),rE=n=>(e,t,r,i,s,o,a,u,l,f,p,h)=>(Ke(r)?t="":Ke(i)?t=`>=${r}.0.0${n?"-0":""}`:Ke(s)?t=`>=${r}.${i}.0${n?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,Ke(l)?u="":Ke(f)?u=`<${+l+1}.0.0-0`:Ke(p)?u=`<${l}.${+f+1}.0-0`:h?u=`<=${l}.${f}.${p}-${h}`:n?u=`<${l}.${f}.${+p+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),iE=(n,e,t)=>{for(let r=0;r0){let i=n[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Xv=P((Fq,Vv)=>{"use strict";var sE=gh(),oE=(n,e,t)=>{try{e=new sE(e,t)}catch{return!1}return e.test(n)};Vv.exports=oE});var Qv=P(qt=>{"use strict";var aE=qt&&qt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),yh=qt&&qt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&aE(e,n,t)};Object.defineProperty(qt,"__esModule",{value:!0});qt.DiagnosticPullMode=qt.vsdiag=void 0;yh(V(),qt);yh(ne(),qt);var Jv=id();Object.defineProperty(qt,"vsdiag",{enumerable:!0,get:function(){return Jv.vsdiag}});Object.defineProperty(qt,"DiagnosticPullMode",{enumerable:!0,get:function(){return Jv.DiagnosticPullMode}});yh(Vf(),qt)});var rb=P(Qe=>{"use strict";var tb=Qe&&Qe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),cE=Qe&&Qe.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),As=Qe&&Qe.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i0&&(e.prerelease=[]),!dE(e,eb))throw new Error(`The language client requires VS Code version ${eb} but received version ${qr.version}`)}get isInDebugMode(){return this._isInDebugMode}get serverProcess(){return this._serverProcess}async restart(){await this.stop(),this.isInDebugMode?(await new Promise(e=>setTimeout(e,1e3)),await this.start()):await this.start()}shutdown(e,t=2e3){return super.shutdown(e,t).finally(()=>{if(this._serverProcess){let r=this._serverProcess;this._serverProcess=void 0,(this._isDetached===void 0||!this._isDetached)&&this.checkProcessDied(r),this._isDetached=void 0}})}checkProcessDied(e){!e||e.pid===void 0||setTimeout(()=>{try{e.pid!==void 0&&(process.kill(e.pid,0),(0,uE.terminate)(e))}catch{}},2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),e.processId===null&&(e.processId=process.pid)}createMessageTransports(e){function t(h,g){if(!h&&!g)return;let _=Object.create(null);return Object.keys(process.env).forEach(v=>_[v]=process.env[v]),g&&(_.ELECTRON_RUN_AS_NODE="1",_.ELECTRON_NO_ASAR="1"),h&&Object.keys(h).forEach(v=>_[v]=h[v]),_}let r=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function s(){let h=process.execArgv;return h?h.some(g=>r.some(_=>g.startsWith(_))||i.some(_=>g===_)):!1}function o(h){if(h.stdin===null||h.stdout===null||h.stderr===null)throw new Error("Process created without stdio streams")}function a(h,g){Yv.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.info(_))}function u(h,g){Yv.createInterface({input:h,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",_=>g.error(_))}let l=this._serverOptions;if($i.func(l))return l().then(h=>{if(Zv.MessageTransports.is(h))return this._isDetached=!!h.detached,h;if(Dh.is(h))return this._isDetached=!!h.detached,{reader:new Ne.StreamMessageReader(h.reader),writer:new Ne.StreamMessageWriter(h.writer)};{let g;return Sh.is(h)?(g=h.process,this._isDetached=h.detached):(g=h,this._isDetached=!1),u(g.stderr,this.outputChannel),{reader:new Ne.StreamMessageReader(g.stdout),writer:new Ne.StreamMessageWriter(g.stdin)}}});let f,p=l;return p.run||p.debug?this._forceDebug||s()?(f=p.debug,this._isInDebugMode=!0):(f=p.run,this._isInDebugMode=!1):f=l,this._getServerWorkingDir(f.options).then(h=>{if(wh.is(f)&&f.module){let g=f,_=g.transport||je.stdio;if(g.runtime){let v=[],R=g.options??Object.create(null);R.execArgv&&R.execArgv.forEach(j=>v.push(j)),v.push(g.module),g.args&&g.args.forEach(j=>v.push(j));let q=Object.create(null);q.cwd=h,q.env=t(R.env,!1);let w=this._getRuntimePath(g.runtime,h),M;if(_===je.ipc?(q.stdio=[null,null,null,"ipc"],v.push("--node-ipc")):_===je.stdio?v.push("--stdio"):_===je.pipe?(M=(0,Ne.generateRandomPipeName)(),v.push(`--pipe=${M}`)):Er.isSocket(_)&&v.push(`--socket=${_.port}`),v.push(`--clientProcessId=${process.pid.toString()}`),_===je.ipc||_===je.stdio){let j=nr.spawn(w,v,q);return!j||!j.pid?ki(j,`Launching server using runtime ${w} failed.`):(this._serverProcess=j,u(j.stderr,this.outputChannel),_===je.ipc?(a(j.stdout,this.outputChannel),Promise.resolve({reader:new Ne.IPCMessageReader(j),writer:new Ne.IPCMessageWriter(j)})):Promise.resolve({reader:new Ne.StreamMessageReader(j.stdout),writer:new Ne.StreamMessageWriter(j.stdin)}))}else{if(_===je.pipe)return(0,Ne.createClientPipeTransport)(M).then(j=>{let F=nr.spawn(w,v,q);return!F||!F.pid?ki(F,`Launching server using runtime ${w} failed.`):(this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>({reader:oe[0],writer:oe[1]})))});if(Er.isSocket(_))return(0,Ne.createClientSocketTransport)(_.port).then(j=>{let F=nr.spawn(w,v,q);return!F||!F.pid?ki(F,`Launching server using runtime ${w} failed.`):(this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>({reader:oe[0],writer:oe[1]})))})}}else{let v;return new Promise((R,q)=>{let w=(g.args&&g.args.slice())??[];_===je.ipc?w.push("--node-ipc"):_===je.stdio?w.push("--stdio"):_===je.pipe?(v=(0,Ne.generateRandomPipeName)(),w.push(`--pipe=${v}`)):Er.isSocket(_)&&w.push(`--socket=${_.port}`),w.push(`--clientProcessId=${process.pid.toString()}`);let M=g.options?{...g.options}:Object.create(null);if(M.env=t(M.env,!0),M.execArgv=M.execArgv||[],M.cwd=h,M.silent=!0,_===je.ipc||_===je.stdio){let j=nr.fork(g.module,w||[],M);o(j),this._serverProcess=j,u(j.stderr,this.outputChannel),_===je.ipc?(a(j.stdout,this.outputChannel),R({reader:new Ne.IPCMessageReader(this._serverProcess),writer:new Ne.IPCMessageWriter(this._serverProcess)})):R({reader:new Ne.StreamMessageReader(j.stdout),writer:new Ne.StreamMessageWriter(j.stdin)})}else _===je.pipe?(0,Ne.createClientPipeTransport)(v).then(j=>{let F=nr.fork(g.module,w||[],M);o(F),this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>{R({reader:oe[0],writer:oe[1]})},q)},q):Er.isSocket(_)&&(0,Ne.createClientSocketTransport)(_.port).then(j=>{let F=nr.fork(g.module,w||[],M);o(F),this._serverProcess=F,u(F.stderr,this.outputChannel),a(F.stdout,this.outputChannel),j.onConnected().then(oe=>{R({reader:oe[0],writer:oe[1]})},q)},q)})}}else if(Ch.is(f)&&f.command){let g=f,_=f.args!==void 0?f.args.slice(0):[],v,R=f.transport;if(R===je.stdio)_.push("--stdio");else if(R===je.pipe)v=(0,Ne.generateRandomPipeName)(),_.push(`--pipe=${v}`);else if(Er.isSocket(R))_.push(`--socket=${R.port}`);else if(R===je.ipc)throw new Error("Transport kind ipc is not support for command executable");let q=Object.assign({},g.options);if(q.cwd=q.cwd||h,R===void 0||R===je.stdio){let w=nr.spawn(g.command,_,q);return!w||!w.pid?ki(w,`Launching server using command ${g.command} failed.`):(u(w.stderr,this.outputChannel),this._serverProcess=w,this._isDetached=!!q.detached,Promise.resolve({reader:new Ne.StreamMessageReader(w.stdout),writer:new Ne.StreamMessageWriter(w.stdin)}))}else{if(R===je.pipe)return(0,Ne.createClientPipeTransport)(v).then(w=>{let M=nr.spawn(g.command,_,q);return!M||!M.pid?ki(M,`Launching server using command ${g.command} failed.`):(this._serverProcess=M,this._isDetached=!!q.detached,u(M.stderr,this.outputChannel),a(M.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))});if(Er.isSocket(R))return(0,Ne.createClientSocketTransport)(R.port).then(w=>{let M=nr.spawn(g.command,_,q);return!M||!M.pid?ki(M,`Launching server using command ${g.command} failed.`):(this._serverProcess=M,this._isDetached=!!q.detached,u(M.stderr,this.outputChannel),a(M.stdout,this.outputChannel),w.onConnected().then(j=>({reader:j[0],writer:j[1]})))})}}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(l,null,4)))}).finally(()=>{this._serverProcess!==void 0&&this._serverProcess.on("exit",(h,g)=>{h===0?this.info("Server process exited successfully",void 0,!1):h!==null&&this.error(`Server process exited with code ${h}.`,void 0,!1),g!==null&&this.error(`Server process exited with signal ${g}.`,void 0,!1)})})}_getRuntimePath(e,t){if(bh.isAbsolute(e))return e;let r=this._mainGetRootPath();if(r!==void 0){let i=bh.join(r,e);if(vh.existsSync(i))return i}if(t!==void 0){let i=bh.join(t,e);if(vh.existsSync(i))return i}return e}_mainGetRootPath(){let e=qr.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(r=>{vh.lstat(t,(i,s)=>{r(!i&&s.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}};Qe.LanguageClient=Ph;var Rh=class{_client;_setting;_listeners;constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return qr.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new qr.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,r=e>=0?this._setting.substr(e+1):void 0,i=r?qr.workspace.getConfiguration(t).get(r,!1):qr.workspace.getConfiguration(t);i&&this._client.needsStart()?this._client.start().catch(s=>this._client.error("Start failed after configuration change",s,"force")):!i&&this._client.needsStop()&&this._client.stop().catch(s=>this._client.error("Stop failed after configuration change",s,"force"))}};Qe.SettingMonitor=Rh;function ki(n,e){return n===null?Promise.reject(e):new Promise((t,r)=>{n.on("error",i=>{r(`${e} ${i}`)}),setImmediate(()=>r(e))})}});var fE=exports&&exports.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),hE=exports&&exports.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ib=exports&&exports.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i{await Th.commands.executeCommand("editor.action.formatDocument")})),await Hi.start()}async function mE(){Hi!==void 0&&(await Hi.stop(),Hi=void 0)} //# sourceMappingURL=extension.js.map diff --git a/dist/server.js b/dist/server.js index de72e0f..09502f3 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,27 +1,27 @@ -"use strict";var So=Object.defineProperty;var Dm=Object.getOwnPropertyDescriptor;var wm=Object.getOwnPropertyNames;var Pm=Object.prototype.hasOwnProperty;var ga=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},pa=(e,t)=>{for(var n in t)So(e,n,{get:t[n],enumerable:!0})},Rm=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wm(t))!Pm.call(e,o)&&o!==n&&So(e,o,{get:()=>t[o],enumerable:!(r=Dm(t,o))||r.enumerable});return e};var Vn=e=>Rm(So({},"__esModule",{value:!0}),e);var Xn=I(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.boolean=Om;qe.string=ya;qe.number=km;qe.error=Mm;qe.func=Ta;qe.array=_a;qe.stringArray=xm;qe.typedArray=qm;qe.thenable=Em;function Om(e){return e===!0||e===!1}function ya(e){return typeof e=="string"||e instanceof String}function km(e){return typeof e=="number"||e instanceof Number}function Mm(e){return e instanceof Error}function Ta(e){return typeof e=="function"}function _a(e){return Array.isArray(e)}function xm(e){return _a(e)&&e.every(t=>ya(t))}function qm(e,t){return Array.isArray(e)&&e.every(t)}function Em(e){return e&&Ta(e.then)}});var At=I(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.boolean=Gm;Ve.string=ba;Ve.number=Nm;Ve.error=Am;Ve.func=jm;Ve.array=va;Ve.stringArray=Fm;function Gm(e){return e===!0||e===!1}function ba(e){return typeof e=="string"||e instanceof String}function Nm(e){return typeof e=="number"||e instanceof Number}function Am(e){return e instanceof Error}function jm(e){return typeof e=="function"}function va(e){return Array.isArray(e)}function Fm(e){return va(e)&&e.every(t=>ba(t))}});var Xo=I(w=>{"use strict";var Lm=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hm=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wm=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.LRUCache=ct.LinkedMap=ct.Touch=void 0;var ae;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ae||(ct.Touch=ae={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ae.None){let r=this._map.get(t);if(r)return n!==ae.None&&this.touch(r,n),r.value}set(t,n,r=ae.None){let o=this._map.get(t);if(o)o.value=n,r!==ae.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ae.None:this.addItemLast(o);break;case ae.First:this.addItemFirst(o);break;case ae.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ae.First&&n!==ae.Last)){if(n===ae.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ae.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};ct.LinkedMap=Yn;var Yo=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ae.AsNew){return super.get(t,n)}peek(t){return super.get(t,ae.None)}set(t,n){return super.set(t,n,ae.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ct.LRUCache=Yo});var Sa=I(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var Ia;(function(e){function t(n){return{dispose:n}}e.create=t})(Ia||(Jn.Disposable=Ia={}))});var at=I(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});var Ko;function Zo(){if(Ko===void 0)throw new Error("No runtime abstraction layer installed");return Ko}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Ko=n}e.install=t})(Zo||(Zo={}));ei.default=Zo});var jt=I(ut=>{"use strict";var Um=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ut,"__esModule",{value:!0});ut.Emitter=ut.Event=void 0;var Bm=Um(at()),Da;(function(e){let t={dispose(){}};e.None=function(){return t}})(Da||(ut.Event=Da={}));var ti=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new ti),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ut.Emitter=ni});var er=I(ve=>{"use strict";var zm=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$m=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qm=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.SharedArrayReceiverStrategy=Ft.SharedArraySenderStrategy=void 0;var Km=er(),Tn;(function(e){e.Continue=0,e.Cancelled=1})(Tn||(Tn={}));var ii=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Tn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Tn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Ft.SharedArraySenderStrategy=ii;var si=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Tn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},ci=class{token;constructor(t){this.token=new si(t)}cancel(){}dispose(){}},ai=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Km.CancellationTokenSource:new ci(n)}};Ft.SharedArrayReceiverStrategy=ai});var li=I(Lt=>{"use strict";var Zm=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Semaphore=void 0;var eh=Zm(at()),ui=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,eh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Lt.Semaphore=ui});var Ra=I(ue=>{"use strict";var th=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),nh=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rh=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,fi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};ue.ReadableStreamMessageReader=hi});var qa=I(le=>{"use strict";var sh=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ch=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ah=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(dh,r.byteLength.toString(),Ma),o.push(Ma),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};le.WriteableStreamMessageWriter=pi});var Ea=I(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.AbstractMessageBuffer=void 0;var fh=13,mh=10,hh=`\r -`,yi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};rr.AbstractMessageBuffer=yi});var ja=I(R=>{"use strict";var gh=R&&R.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ph=R&&R.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yh=R&&R.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(R.Trace=F={}));var Ci;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Ci||(R.TraceValue=Ci={}));R.TraceValues=Ci;(function(e){function t(r){if(!X.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(R.Trace=F={}));var Se;(function(e){e.Text="text",e.JSON="json"})(Se||(R.TraceFormat=Se={}));(function(e){function t(n){return X.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Se||(R.TraceFormat=Se={}));var Ii;(function(e){e.type=new O.NotificationType("$/setTrace")})(Ii||(R.SetTraceNotification=Ii={}));var or;(function(e){e.type=new O.NotificationType("$/logTrace")})(or||(R.LogTraceNotification=or={}));var Cn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Cn||(R.ConnectionErrors=Cn={}));var Wt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};R.ConnectionError=Wt;var Si;(function(e){function t(n){let r=n;return r&&X.func(r.cancelUndispatched)}e.is=t})(Si||(R.ConnectionStrategy=Si={}));var ir;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(ir||(R.IdCancellationReceiverStrategy=ir={}));var Di;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(Di||(R.RequestCancellationReceiverStrategy=Di={}));var sr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ti.CancellationTokenSource}});function t(n){return ir.is(n)||Di.is(n)}e.is=t})(sr||(R.CancellationReceiverStrategy=sr={}));var cr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&X.func(r.sendCancellation)&&X.func(r.cleanup)}e.is=t})(cr||(R.CancellationSenderStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({receiver:sr.Message,sender:cr.Message});function t(n){let r=n;return r&&sr.is(r.receiver)&&cr.is(r.sender)}e.is=t})(ar||(R.CancellationStrategy=ar={}));var ur;(function(e){function t(n){let r=n;return r&&X.func(r.handleMessage)}e.is=t})(ur||(R.MessageStrategy=ur={}));var Aa;(function(e){function t(n){let r=n;return r&&(ar.is(r.cancellationStrategy)||Si.is(r.connectionStrategy)||ur.is(r.messageStrategy)||X.number(r.maxParallelism))}e.is=t})(Aa||(R.ConnectionOptions=Aa={}));var Ee;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Ee||(Ee={}));function _h(e,t,n,r){let o=n!==void 0?n:R.NullLogger,i=0,s=0,a=0,h="2.0",l=r?.maxParallelism??-1,_=0,b,g=new Map,D,N=new Map,A=new Map,B,M=new Na.LinkedMap,m=new Map,f=new Set,v=new Map,x=F.Off,G=Se.Text,q,be=Ee.New,rt=new bn.Emitter,mn=new bn.Emitter,se=new bn.Emitter,hn=new bn.Emitter,ot=new bn.Emitter,Fe=r&&r.cancellationStrategy?r.cancellationStrategy:ar.Message;function am(u){}function sa(){return be===Ee.Listening}function ca(){return be===Ee.Closed}function Gt(){return be===Ee.Disposed}function aa(){(be===Ee.New||be===Ee.Listening)&&(be=Ee.Closed,mn.fire(void 0))}function um(u){rt.fire([u,void 0,void 0])}function lm(u){rt.fire(u)}e.onClose(aa),e.onError(um),t.onClose(aa),t.onError(lm);function ua(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function dm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function fm(){return"not-"+(++s).toString()}function mm(u,T){O.Message.isRequest(T)?u.set(ua(T.id),T):O.Message.isResponse(T)?l===-1?u.set(dm(T.id),T):da(T):u.set(fm(),T)}function bo(){B||M.size===0||l!==-1&&_>=l||(B=(0,Ga.default)().timer.setImmediate(async()=>{if(B=void 0,M.size===0||l!==-1&&_>=l)return;let u=M.shift(),T;try{_++;let C=r?.messageStrategy;ur.is(C)?T=C.handleMessage(u,la):T=la(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{T instanceof Promise?T.then(()=>{_--,bo()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):_--,bo()}}))}async function la(u){return O.Message.isRequest(u)?gm(u):O.Message.isNotification(u)?pm(u):O.Message.isResponse(u)?da(u):ym(u)}let hm=u=>{try{if(O.Message.isNotification(u)&&u.method===In.type.method){let T=u.params.id,C=ua(T),P=M.get(C);if(O.Message.isRequest(P)){let V=r?.connectionStrategy,H=V&&V.cancelUndispatched?V.cancelUndispatched(P,am):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){M.delete(C),v.delete(T),H.id=P.id,vo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=v.get(T);if(j!==void 0){j.cancel(),Co(u);return}else f.add(T)}mm(M,u)}finally{bo()}};async function gm(u){if(Gt())return Promise.resolve();function T(te,ce,J){let K={jsonrpc:h,id:u.id};return te instanceof O.ResponseError?K.error=te.toJson():K.result=te===void 0?null:te,vo(K,ce,J),t.write(K)}function C(te,ce,J){let K={jsonrpc:h,id:u.id,error:te.toJson()};return vo(K,ce,J),t.write(K)}bm(u);let P=g.get(u.method),j,V;P&&(j=P.type,V=P.handler);let H=Date.now();if(V||b){let te=u.id??String(Date.now()),ce=ir.is(Fe.receiver)?Fe.receiver.createCancellationTokenSource(te):Fe.receiver.createCancellationTokenSource(u);u.id!==null&&f.has(u.id)&&ce.cancel(),u.id!==null&&v.set(te,ce);try{let J;if(V)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new O.ResponseError(O.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);J=V(ce.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===O.ParameterStructures.byName)return C(new O.ResponseError(O.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=V(...u.params,ce.token)}else{if(j!==void 0&&j.parameterStructures===O.ParameterStructures.byPosition)return C(new O.ResponseError(O.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=V(u.params,ce.token)}else b&&(J=b(u.method,u.params,ce.token));let K=await J;await T(K,u.method,H)}catch(J){J instanceof O.ResponseError?await T(J,u.method,H):J&&X.string(J.message)?await C(new O.ResponseError(O.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new O.ResponseError(O.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{v.delete(te)}}else await C(new O.ResponseError(O.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function da(u){if(!Gt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let T=u.id,C=m.get(T);if(vm(u,C),C!==void 0){m.delete(T);try{if(u.error){let P=u.error;C.reject(new O.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function pm(u){if(Gt())return;let T,C;if(u.method===In.type.method){let P=u.params.id;f.delete(P),Co(u);return}else{let P=N.get(u.method);P&&(C=P.handler,T=P.type)}if(C||D)try{if(Co(u),C)if(u.params===void 0)T!==void 0&&T.numberOfParams!==0&&T.parameterStructures!==O.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===vn.type.method&&P.length===2&&_i.is(P[0])?await C({token:P[0],value:P[1]}):(T!==void 0&&(T.parameterStructures===O.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),T.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else T!==void 0&&T.parameterStructures===O.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else D&&await D(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else se.fire(u)}function ym(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let T=u;if(X.string(T.id)||X.number(T.id)){let C=T.id,P=m.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function it(u){if(u!=null)switch(x){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Tm(u){if(!(x===F.Off||!q))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${it(u.params)}`),q.log(`Sending request '${u.method} - (${u.id})'.`,T)}else Nt("send-request",u)}function _m(u){if(!(x===F.Off||!q))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${it(u.params)}`:T="No parameters provided."),q.log(`Sending notification '${u.method}'.`,T)}else Nt("send-notification",u)}function vo(u,T,C){if(!(x===F.Off||!q))if(G===Se.Text){let P;(x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${it(u.error.data)}`:u.result?P=`Result: ${it(u.result)}`:u.error===void 0&&(P="No result returned.")),q.log(`Sending response '${T} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Nt("send-response",u)}function bm(u){if(!(x===F.Off||!q))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${it(u.params)}`),q.log(`Received request '${u.method} - (${u.id})'.`,T)}else Nt("receive-request",u)}function Co(u){if(!(x===F.Off||!q||u.method===or.type.method))if(G===Se.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${it(u.params)}`:T="No parameters provided."),q.log(`Received notification '${u.method}'.`,T)}else Nt("receive-notification",u)}function vm(u,T){if(!(x===F.Off||!q))if(G===Se.Text){let C;if((x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${it(u.error.data)}`:u.result?C=`Result: ${it(u.result)}`:u.error===void 0&&(C="No result returned.")),T){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";q.log(`Received response '${T.method} - (${u.id})' in ${Date.now()-T.timerStart}ms.${P}`,C)}else q.log(`Received response ${u.id} without active response promise.`,C)}else Nt("receive-response",u)}function Nt(u,T){if(!q||x===F.Off)return;let C={isLSPMessage:!0,type:u,message:T,timestamp:Date.now()};q.log(C)}function gn(){if(ca())throw new Wt(Cn.Closed,"Connection is closed.");if(Gt())throw new Wt(Cn.Disposed,"Connection is disposed.")}function Cm(){if(sa())throw new Wt(Cn.AlreadyListening,"Connection is already listening")}function Im(){if(!sa())throw new Error("Call listen() first.")}function pn(u){return u===void 0?null:u}function fa(u){if(u!==null)return u}function ma(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Io(u,T){switch(u){case O.ParameterStructures.auto:return ma(T)?fa(T):[pn(T)];case O.ParameterStructures.byName:if(!ma(T))throw new Error("Received parameters by name but param is not an object literal.");return fa(T);case O.ParameterStructures.byPosition:return[pn(T)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function ha(u,T){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Io(u.parameterStructures,T[0]);break;default:C=[];for(let j=0;j{gn();let C,P;if(X.string(u)){C=u;let V=T[0],H=0,te=O.ParameterStructures.auto;O.ParameterStructures.is(V)&&(H=1,te=V);let ce=T.length,J=ce-H;switch(J){case 0:P=void 0;break;case 1:P=Io(te,T[H]);break;default:if(te===O.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=T.slice(H,ce).map(K=>pn(K));break}}else{let V=T;C=u.method,P=ha(u,V)}let j={jsonrpc:h,method:C,params:P};return _m(j),t.write(j).catch(V=>{throw o.error("Sending notification failed."),V})},onNotification:(u,T)=>{gn();let C;return X.func(u)?D=u:T&&(X.string(u)?(C=u,N.set(u,{type:void 0,handler:T})):(C=u.method,N.set(u.method,{type:u,handler:T}))),{dispose:()=>{C!==void 0?N.get(C)?.handler===T&&N.delete(C):D===u&&(D=void 0)}}},onProgress:(u,T,C)=>{if(A.has(T))throw new Error(`Progress handler for token ${T} already registered`);return A.set(T,C),{dispose:()=>{A.get(T)===C&&A.delete(T)}}},sendProgress:(u,T,C)=>vt.sendNotification(vn.type,{token:T,value:C}),onUnhandledProgress:hn.event,sendRequest:(u,...T)=>{gn(),Im();function C(K,xe){let Qe=Fe.sender.sendCancellation(K,xe);Qe===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${xe}`):Qe.catch(()=>{o.log(`Sending cancellation messages for id ${xe} failed.`)})}let P,j,V;if(X.string(u)){P=u;let K=T[0],xe=T[T.length-1],Qe=0,yn=O.ParameterStructures.auto;O.ParameterStructures.is(K)&&(Qe=1,yn=K);let Ct=T.length;Ti.CancellationToken.is(xe)&&(Ct=Ct-1,V=xe);let Le=Ct-Qe;switch(Le){case 0:j=void 0;break;case 1:j=Io(yn,T[Qe]);break;default:if(yn===O.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' request parameter structure.`);j=T.slice(Qe,Ct).map(Sm=>pn(Sm));break}}else{let K=T;P=u.method,j=ha(u,K);let xe=u.numberOfParams;V=Ti.CancellationToken.is(K[xe])?K[xe]:void 0}let H=i++,te,ce=!1;V!==void 0&&(V.isCancellationRequested?ce=!0:te=V.onCancellationRequested(()=>{C(vt,H)}));let J={jsonrpc:h,id:H,method:P,params:j};return Tm(J),typeof Fe.sender.enableCancellation=="function"&&Fe.sender.enableCancellation(J),new Promise(async(K,xe)=>{let Qe=Le=>{K(Le),Fe.sender.cleanup(H),te?.dispose()},yn=Le=>{xe(Le),Fe.sender.cleanup(H),te?.dispose()},Ct={method:P,timerStart:Date.now(),resolve:Qe,reject:yn};try{m.set(H,Ct),await t.write(J),ce&&C(vt,H)}catch(Le){throw m.delete(H),Ct.reject(new O.ResponseError(O.ErrorCodes.MessageWriteError,Le.message?Le.message:"Unknown reason")),o.error("Sending request failed."),Le}})},onRequest:(u,T)=>{gn();let C=null;return vi.is(u)?(C=void 0,b=u):X.string(u)?(C=null,T!==void 0&&(C=u,g.set(u,{handler:T,type:void 0}))):T!==void 0&&(C=u.method,g.set(u.method,{type:u,handler:T})),{dispose:()=>{C!==null&&(C!==void 0?g.get(C)?.handler===T&&g.delete(C):b===u&&(b=void 0))}}},hasPendingResponse:()=>m.size>0,trace:async(u,T,C)=>{let P=!1,j=Se.Text;C!==void 0&&(X.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||Se.Text)),x=u,G=j,x===F.Off?q=void 0:q=T,P&&!ca()&&!Gt()&&await vt.sendNotification(Ii.type,{value:F.toString(u)})},onError:rt.event,onClose:mn.event,onUnhandledNotification:se.event,onDispose:ot.event,end:()=>{t.end()},dispose:()=>{if(Gt())return;be=Ee.Disposed,ot.fire(void 0);let u=new O.ResponseError(O.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let T of m.values())T.reject(u);m=new Map,v=new Map,f=new Set,M=new Na.LinkedMap,X.func(t.dispose)&&t.dispose(),X.func(e.dispose)&&e.dispose()},listen:()=>{gn(),Cm(),be=Ee.Listening,e.listen(hm)},inspect:()=>{(0,Ga.default)().console.log("inspect")}};return vt.onNotification(or.type,u=>{if(x===F.Off||!q)return;let T=x===F.Verbose||x===F.Compact;q.log(u.message,T?u.verbose:void 0)}),vt.onNotification(vn.type,async u=>{let T=A.get(u.token);T?await T(u.value):hn.fire(u)}),vt}});var Xe=I(p=>{"use strict";var bh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var z=Xo();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return z.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return z.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return z.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return z.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return z.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return z.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return z.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return z.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return z.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return z.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return z.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return z.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return z.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return z.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return z.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return z.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return z.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return z.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return z.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return z.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return z.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return z.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return z.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return z.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return z.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return z.ParameterStructures}});var wi=Jo();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return wi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return wi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return wi.Touch}});var vh=Sa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return vh.Disposable}});var Fa=jt();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return Fa.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return Fa.Emitter}});var La=er();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return La.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return La.CancellationToken}});var Ha=wa();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Ha.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Ha.SharedArrayReceiverStrategy}});var Pi=Ra();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Pi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Pi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Pi.ReadableStreamMessageReader}});var Ri=qa();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ri.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ri.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ri.WriteableStreamMessageWriter}});var Ch=Ea();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Ch.AbstractMessageBuffer}});var ee=ja();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return ee.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return ee.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return ee.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return ee.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return ee.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return ee.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return ee.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return ee.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return ee.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return ee.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return ee.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return ee.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return ee.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ee.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return ee.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return ee.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return ee.TraceValues}});var Ih=bh(at());p.RAL=Ih.default});var br={};pa(br,{AnnotatedTextEdit:()=>Ye,ApplyKind:()=>Yi,ChangeAnnotation:()=>lt,ChangeAnnotationIdentifier:()=>ne,CodeAction:()=>fs,CodeActionContext:()=>ds,CodeActionKind:()=>ls,CodeActionTag:()=>pr,CodeActionTriggerKind:()=>kn,CodeDescription:()=>ji,CodeLens:()=>ms,Color:()=>dr,ColorInformation:()=>xi,ColorPresentation:()=>qi,Command:()=>St,CompletionItem:()=>Ki,CompletionItemKind:()=>zi,CompletionItemLabelDetails:()=>Ji,CompletionItemTag:()=>Qi,CompletionList:()=>Zi,CreateFile:()=>Bt,DeleteFile:()=>$t,Diagnostic:()=>wn,DiagnosticRelatedInformation:()=>fr,DiagnosticSeverity:()=>Ni,DiagnosticTag:()=>Ai,DocumentHighlight:()=>os,DocumentHighlightKind:()=>rs,DocumentLink:()=>gs,DocumentSymbol:()=>us,DocumentUri:()=>Oi,EOL:()=>Sh,FoldingRange:()=>Gi,FoldingRangeKind:()=>Ei,FormattingOptions:()=>hs,Hover:()=>es,InlayHint:()=>Ss,InlayHintKind:()=>yr,InlayHintLabelPart:()=>Tr,InlineCompletionContext:()=>Os,InlineCompletionItem:()=>Ds,InlineCompletionList:()=>ws,InlineCompletionTriggerKind:()=>Ps,InlineValueContext:()=>Is,InlineValueEvaluatableExpression:()=>Cs,InlineValueText:()=>bs,InlineValueVariableLookup:()=>vs,InsertReplaceEdit:()=>Vi,InsertTextFormat:()=>$i,InsertTextMode:()=>Xi,LanguageKind:()=>Ui,Location:()=>Dn,LocationLink:()=>Mi,MarkedString:()=>On,MarkupContent:()=>dt,MarkupKind:()=>gr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>ts,Position:()=>Re,Range:()=>Y,RenameFile:()=>zt,SelectedCompletionInfo:()=>Rs,SelectionRange:()=>ps,SemanticTokenModifiers:()=>Ts,SemanticTokenTypes:()=>ys,SemanticTokens:()=>_s,SignatureInformation:()=>ns,SnippetTextEdit:()=>Fi,StringValue:()=>_r,SymbolInformation:()=>cs,SymbolKind:()=>is,SymbolTag:()=>ss,TextDocument:()=>Ms,TextDocumentEdit:()=>Pn,TextDocumentIdentifier:()=>Hi,TextDocumentItem:()=>Bi,TextEdit:()=>He,URI:()=>lr,VersionedTextDocumentIdentifier:()=>Wi,WorkspaceChange:()=>Li,WorkspaceEdit:()=>mr,WorkspaceFolder:()=>ks,WorkspaceSymbol:()=>as,integer:()=>ki,uinteger:()=>Sn});var Oi,lr,ki,Sn,Re,Y,Dn,Mi,dr,xi,qi,Ei,Gi,fr,Ni,Ai,ji,wn,St,He,lt,ne,Ye,Pn,Bt,zt,$t,mr,Ut,Fi,hr,Li,Hi,Wi,Rn,Ui,Bi,gr,dt,zi,$i,Qi,Vi,Xi,Yi,Ji,Ki,Zi,On,es,ts,ns,rs,os,is,ss,cs,as,us,ls,kn,ds,pr,fs,ms,hs,gs,ps,ys,Ts,_s,bs,vs,Cs,Is,yr,Tr,Ss,_r,Ds,ws,Ps,Rs,Os,ks,Sh,Ms,xs,d,vr=ga(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Oi||(Oi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(lr||(lr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(ki||(ki={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Sn||(Sn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Sn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Sn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.line)&&d.uinteger(o.character)}e.is=n})(Re||(Re={}));(function(e){function t(r,o,i,s){if(d.uinteger(r)&&d.uinteger(o)&&d.uinteger(i)&&d.uinteger(s))return{start:Re.create(r,o),end:Re.create(i,s)};if(Re.is(r)&&Re.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Re.is(o.start)&&Re.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(d.string(o.uri)||d.undefined(o.uri))}e.is=n})(Dn||(Dn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.targetRange)&&d.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||d.undefined(o.originSelectionRange))}e.is=n})(Mi||(Mi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.numberRange(o.red,0,1)&&d.numberRange(o.green,0,1)&&d.numberRange(o.blue,0,1)&&d.numberRange(o.alpha,0,1)}e.is=n})(dr||(dr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&dr.is(o.color)}e.is=n})(xi||(xi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.undefined(o.textEdit)||He.is(o))&&(d.undefined(o.additionalTextEdits)||d.typedArray(o.additionalTextEdits,He.is))}e.is=n})(qi||(qi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ei||(Ei={}));(function(e){function t(r,o,i,s,a,h){let l={startLine:r,endLine:o};return d.defined(i)&&(l.startCharacter=i),d.defined(s)&&(l.endCharacter=s),d.defined(a)&&(l.kind=a),d.defined(h)&&(l.collapsedText=h),l}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.startLine)&&d.uinteger(o.startLine)&&(d.undefined(o.startCharacter)||d.uinteger(o.startCharacter))&&(d.undefined(o.endCharacter)||d.uinteger(o.endCharacter))&&(d.undefined(o.kind)||d.string(o.kind))}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Dn.is(o.location)&&d.string(o.message)}e.is=n})(fr||(fr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ni||(Ni={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Ai||(Ai={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&d.string(r.href)}e.is=t})(ji||(ji={}));(function(e){function t(i,s,a,h,l,_){let b={range:i,message:s};return d.defined(a)&&(b.severity=a),d.defined(h)&&(b.code=h),d.defined(l)&&(b.source=l),d.defined(_)&&(b.relatedInformation=_),b}e.create=t;function n(i){var s;let a=i;return d.defined(a)&&Y.is(a.range)&&(d.string(a.message)||dt.is(a.message))&&(d.number(a.severity)||d.undefined(a.severity))&&(d.integer(a.code)||d.string(a.code)||d.undefined(a.code))&&(d.undefined(a.codeDescription)||d.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(d.string(a.source)||d.undefined(a.source))&&(d.undefined(a.relatedInformation)||d.typedArray(a.relatedInformation,fr.is))}e.is=n;function r(i){return d.string(i.message)}e.is3_17=r;function o(i){if(d.string(i.message))return i.message;if(dt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(wn||(wn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return d.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.title)&&(o.tooltip===void 0||d.string(o.tooltip))&&d.string(o.command)}e.is=n})(St||(St={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return d.objectLiteral(s)&&d.string(s.newText)&&Y.is(s.range)}e.is=o})(He||(He={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(d.string(o.description)||o.description===void 0)}e.is=n})(lt||(lt={}));(function(e){function t(n){let r=n;return d.string(r)}e.is=t})(ne||(ne={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return He.is(s)&&(lt.is(s.annotationId)||ne.is(s.annotationId))}e.is=o})(Ye||(Ye={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Pn||(Pn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&d.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(Bt||(Bt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&d.string(o.oldUri)&&d.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(zt||(zt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&d.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||d.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||d.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})($t||($t={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>d.string(o.kind)?Bt.is(o)||zt.is(o)||$t.is(o):Pn.is(o)))}e.is=t})(mr||(mr={}));Ut=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=He.insert(t,n):ne.is(r)?(i=r,o=Ye.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ye.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=He.replace(t,n):ne.is(r)?(i=r,o=Ye.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ye.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=He.del(t):ne.is(n)?(o=n,r=Ye.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Ye.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return d.objectLiteral(r)&&Y.is(r.range)&&_r.isSnippet(r.snippet)&&(r.annotationId===void 0||lt.is(r.annotationId)||ne.is(r.annotationId))}e.is=t})(Fi||(Fi={}));hr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ne.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Li=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new hr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Pn.is(n)){let r=new Ut(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Ut(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Ut(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Ut(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new hr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;lt.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Bt.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=Bt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;lt.is(r)||ne.is(r)?i=r:o=r;let s,a;if(i===void 0?s=zt.create(t,n,o):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=zt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;lt.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=$t.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=$t.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)}e.is=n})(Hi||(Hi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.integer(o.version)}e.is=n})(Wi||(Wi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&(o.version===null||d.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Ui||(Ui={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.string(o.languageId)&&d.integer(o.version)&&d.string(o.text)}e.is=n})(Bi||(Bi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(gr||(gr={}));(function(e){function t(n){let r=n;return d.objectLiteral(n)&&gr.is(r.kind)&&d.string(r.value)}e.is=t})(dt||(dt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(zi||(zi={}));(function(e){e.PlainText=1,e.Snippet=2})($i||($i={}));(function(e){e.Deprecated=1})(Qi||(Qi={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&d.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(Vi||(Vi={}));(function(e){e.asIs=1,e.adjustIndentation=2})(Xi||(Xi={}));(function(e){e.Replace=1,e.Merge=2})(Yi||(Yi={}));(function(e){function t(n){let r=n;return r&&(d.string(r.detail)||r.detail===void 0)&&(d.string(r.description)||r.description===void 0)}e.is=t})(Ji||(Ji={}));(function(e){function t(n){return{label:n}}e.create=t})(Ki||(Ki={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(Zi||(Zi={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return d.string(o)||d.objectLiteral(o)&&d.string(o.language)&&d.string(o.value)}e.is=n})(On||(On={}));(function(e){function t(n){let r=n;return!!r&&d.objectLiteral(r)&&(dt.is(r.contents)||On.is(r.contents)||d.typedArray(r.contents,On.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(es||(es={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ts||(ts={}));(function(e){function t(n,r,...o){let i={label:n};return d.defined(r)&&(i.documentation=r),d.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ns||(ns={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(rs||(rs={}));(function(e){function t(n,r){let o={range:n};return d.number(r)&&(o.kind=r),o}e.create=t})(os||(os={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(is||(is={}));(function(e){e.Deprecated=1})(ss||(ss={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(cs||(cs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(as||(as={}));(function(e){function t(r,o,i,s,a,h){let l={name:r,detail:o,kind:i,range:s,selectionRange:a};return h!==void 0&&(l.children=h),l}e.create=t;function n(r){let o=r;return o&&d.string(o.name)&&d.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||d.string(o.detail))&&(o.deprecated===void 0||d.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(us||(us={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(ls||(ls={}));(function(e){e.Invoked=1,e.Automatic=2})(kn||(kn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.typedArray(o.diagnostics,wn.is)&&(o.only===void 0||d.typedArray(o.only,d.string))&&(o.triggerKind===void 0||o.triggerKind===kn.Invoked||o.triggerKind===kn.Automatic)}e.is=n})(ds||(ds={}));(function(e){e.LLMGenerated=1;function t(n){return d.defined(n)&&n===e.LLMGenerated}e.is=t})(pr||(pr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):St.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&d.string(o.title)&&(o.diagnostics===void 0||d.typedArray(o.diagnostics,wn.is))&&(o.kind===void 0||d.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||St.is(o.command))&&(o.isPreferred===void 0||d.boolean(o.isPreferred))&&(o.edit===void 0||mr.is(o.edit))&&(o.tags===void 0||d.typedArray(o.tags,pr.is))}e.is=n})(fs||(fs={}));(function(e){function t(r,o){let i={range:r};return d.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.command)||St.is(o.command))}e.is=n})(ms||(ms={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.uinteger(o.tabSize)&&d.boolean(o.insertSpaces)}e.is=n})(hs||(hs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.target)||d.string(o.target))}e.is=n})(gs||(gs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(ps||(ps={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(ys||(ys={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ts||(Ts={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(_s||(_s={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.string(o.text)}e.is=n})(bs||(bs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.boolean(o.caseSensitiveLookup)&&(d.string(o.variableName)||o.variableName===void 0)}e.is=n})(vs||(vs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(d.string(o.expression)||o.expression===void 0)}e.is=n})(Cs||(Cs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Is||(Is={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(yr||(yr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&(o.tooltip===void 0||d.string(o.tooltip)||dt.is(o.tooltip))&&(o.location===void 0||Dn.is(o.location))&&(o.command===void 0||St.is(o.command))}e.is=n})(Tr||(Tr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Re.is(o.position)&&(d.string(o.label)||d.typedArray(o.label,Tr.is))&&(o.kind===void 0||yr.is(o.kind))&&o.textEdits===void 0||d.typedArray(o.textEdits,He.is)&&(o.tooltip===void 0||d.string(o.tooltip)||dt.is(o.tooltip))&&(o.paddingLeft===void 0||d.boolean(o.paddingLeft))&&(o.paddingRight===void 0||d.boolean(o.paddingRight))}e.is=n})(Ss||(Ss={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return d.objectLiteral(o)&&o.kind==="snippet"&&d.string(o.value)}e.isSnippet=n})(_r||(_r={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Ds||(Ds={}));(function(e){function t(n){return{items:n}}e.create=t})(ws||(ws={}));(function(e){e.Invoked=1,e.Automatic=2})(Ps||(Ps={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Rs||(Rs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Os||(Os={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&lr.is(r.uri)&&d.string(r.name)}e.is=t})(ks||(ks={}));Sh=[` +"use strict";var Oo=Object.defineProperty;var jm=Object.getOwnPropertyDescriptor;var Fm=Object.getOwnPropertyNames;var Lm=Object.prototype.hasOwnProperty;var Ia=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Sa=(e,t)=>{for(var n in t)Oo(e,n,{get:t[n],enumerable:!0})},Hm=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fm(t))!Lm.call(e,o)&&o!==n&&Oo(e,o,{get:()=>t[o],enumerable:!(r=jm(t,o))||r.enumerable});return e};var Xn=e=>Hm(Oo({},"__esModule",{value:!0}),e);var Kn=S(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.boolean=Wm;qe.string=Da;qe.number=Um;qe.error=Bm;qe.func=wa;qe.array=Pa;qe.stringArray=zm;qe.typedArray=$m;qe.thenable=Qm;function Wm(e){return e===!0||e===!1}function Da(e){return typeof e=="string"||e instanceof String}function Um(e){return typeof e=="number"||e instanceof Number}function Bm(e){return e instanceof Error}function wa(e){return typeof e=="function"}function Pa(e){return Array.isArray(e)}function zm(e){return Pa(e)&&e.every(t=>Da(t))}function $m(e,t){return Array.isArray(e)&&e.every(t)}function Qm(e){return e&&wa(e.then)}});var At=S(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.boolean=Vm;Qe.string=Oa;Qe.number=Xm;Qe.error=Km;Qe.func=Ym;Qe.array=Ra;Qe.stringArray=Jm;function Vm(e){return e===!0||e===!1}function Oa(e){return typeof e=="string"||e instanceof String}function Xm(e){return typeof e=="number"||e instanceof Number}function Km(e){return e instanceof Error}function Ym(e){return typeof e=="function"}function Ra(e){return Array.isArray(e)}function Jm(e){return Ra(e)&&e.every(t=>Oa(t))}});var Zo=S(w=>{"use strict";var Zm=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),th=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.LRUCache=st.LinkedMap=st.Touch=void 0;var ae;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ae||(st.Touch=ae={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ae.None){let r=this._map.get(t);if(r)return n!==ae.None&&this.touch(r,n),r.value}set(t,n,r=ae.None){let o=this._map.get(t);if(o)o.value=n,r!==ae.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ae.None:this.addItemLast(o);break;case ae.First:this.addItemFirst(o);break;case ae.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ae.First&&n!==ae.Last)){if(n===ae.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ae.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};st.LinkedMap=Yn;var ei=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ae.AsNew){return super.get(t,n)}peek(t){return super.get(t,ae.None)}set(t,n){return super.set(t,n,ae.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};st.LRUCache=ei});var xa=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var Ma;(function(e){function t(n){return{dispose:n}}e.create=t})(Ma||(Jn.Disposable=Ma={}))});var ct=S(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});var ni;function ri(){if(ni===void 0)throw new Error("No runtime abstraction layer installed");return ni}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ni=n}e.install=t})(ri||(ri={}));oi.default=ri});var jt=S(at=>{"use strict";var nh=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.Emitter=at.Event=void 0;var rh=nh(ct()),qa;(function(e){let t={dispose(){}};e.None=function(){return t}})(qa||(at.Event=qa={}));var ii=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new ii),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};at.Emitter=si});var tr=S(ve=>{"use strict";var oh=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ih=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sh=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.SharedArrayReceiverStrategy=Ft.SharedArraySenderStrategy=void 0;var dh=tr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var ui=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Ft.SharedArraySenderStrategy=ui;var li=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},di=class{token;constructor(t){this.token=new li(t)}cancel(){}dispose(){}},fi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new dh.CancellationTokenSource:new di(n)}};Ft.SharedArrayReceiverStrategy=fi});var hi=S(Lt=>{"use strict";var fh=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Semaphore=void 0;var mh=fh(ct()),mi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,mh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Lt.Semaphore=mi});var Ga=S(ue=>{"use strict";var hh=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gh=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ph=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,pi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};ue.ReadableStreamMessageReader=Ti});var Ha=S(le=>{"use strict";var _h=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),bh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(Sh,r.byteLength.toString(),Fa),o.push(Fa),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};le.WriteableStreamMessageWriter=bi});var Wa=S(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AbstractMessageBuffer=void 0;var Dh=13,wh=10,Ph=`\r +`,vi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};or.AbstractMessageBuffer=vi});var $a=S(O=>{"use strict";var Oh=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Rh=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kh=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(O.Trace=F={}));var wi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(wi||(O.TraceValue=wi={}));O.TraceValues=wi;(function(e){function t(r){if(!X.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(O.Trace=F={}));var Se;(function(e){e.Text="text",e.JSON="json"})(Se||(O.TraceFormat=Se={}));(function(e){function t(n){return X.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Se||(O.TraceFormat=Se={}));var Pi;(function(e){e.type=new R.NotificationType("$/setTrace")})(Pi||(O.SetTraceNotification=Pi={}));var ir;(function(e){e.type=new R.NotificationType("$/logTrace")})(ir||(O.LogTraceNotification=ir={}));var In;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(In||(O.ConnectionErrors=In={}));var Wt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=Wt;var Oi;(function(e){function t(n){let r=n;return r&&X.func(r.cancelUndispatched)}e.is=t})(Oi||(O.ConnectionStrategy=Oi={}));var sr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(sr||(O.IdCancellationReceiverStrategy=sr={}));var Ri;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(Ri||(O.RequestCancellationReceiverStrategy=Ri={}));var cr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ci.CancellationTokenSource}});function t(n){return sr.is(n)||Ri.is(n)}e.is=t})(cr||(O.CancellationReceiverStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Sn.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&X.func(r.sendCancellation)&&X.func(r.cleanup)}e.is=t})(ar||(O.CancellationSenderStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({receiver:cr.Message,sender:ar.Message});function t(n){let r=n;return r&&cr.is(r.receiver)&&ar.is(r.sender)}e.is=t})(ur||(O.CancellationStrategy=ur={}));var lr;(function(e){function t(n){let r=n;return r&&X.func(r.handleMessage)}e.is=t})(lr||(O.MessageStrategy=lr={}));var za;(function(e){function t(n){let r=n;return r&&(ur.is(r.cancellationStrategy)||Oi.is(r.connectionStrategy)||lr.is(r.messageStrategy)||X.number(r.maxParallelism))}e.is=t})(za||(O.ConnectionOptions=za={}));var Ee;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Ee||(Ee={}));function xh(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,a=0,b="2.0",g=r?.maxParallelism??-1,d=0,T,h=new Map,I,q=new Map,N=new Map,B,M=new Ba.LinkedMap,f=new Map,m=new Set,v=new Map,x=F.Off,A=Se.Text,E,be=Ee.New,nt=new vn.Emitter,hn=new vn.Emitter,se=new vn.Emitter,gn=new vn.Emitter,rt=new vn.Emitter,Fe=r&&r.cancellationStrategy?r.cancellationStrategy:ur.Message;function vm(u){}function ha(){return be===Ee.Listening}function ga(){return be===Ee.Closed}function Nt(){return be===Ee.Disposed}function pa(){(be===Ee.New||be===Ee.Listening)&&(be=Ee.Closed,hn.fire(void 0))}function Cm(u){nt.fire([u,void 0,void 0])}function Im(u){nt.fire(u)}e.onClose(pa),e.onError(Cm),t.onClose(pa),t.onError(Im);function ya(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function Sm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Dm(){return"not-"+(++s).toString()}function wm(u,_){R.Message.isRequest(_)?u.set(ya(_.id),_):R.Message.isResponse(_)?g===-1?u.set(Sm(_.id),_):_a(_):u.set(Dm(),_)}function So(){B||M.size===0||g!==-1&&d>=g||(B=(0,Ua.default)().timer.setImmediate(async()=>{if(B=void 0,M.size===0||g!==-1&&d>=g)return;let u=M.shift(),_;try{d++;let C=r?.messageStrategy;lr.is(C)?_=C.handleMessage(u,Ta):_=Ta(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{_ instanceof Promise?_.then(()=>{d--,So()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):d--,So()}}))}async function Ta(u){return R.Message.isRequest(u)?Om(u):R.Message.isNotification(u)?Rm(u):R.Message.isResponse(u)?_a(u):km(u)}let Pm=u=>{try{if(R.Message.isNotification(u)&&u.method===Sn.type.method){let _=u.params.id,C=ya(_),P=M.get(C);if(R.Message.isRequest(P)){let V=r?.connectionStrategy,H=V&&V.cancelUndispatched?V.cancelUndispatched(P,vm):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){M.delete(C),v.delete(_),H.id=P.id,Do(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=v.get(_);if(j!==void 0){j.cancel(),wo(u);return}else m.add(_)}wm(M,u)}finally{So()}};async function Om(u){if(Nt())return Promise.resolve();function _(te,ce,Y){let J={jsonrpc:b,id:u.id};return te instanceof R.ResponseError?J.error=te.toJson():J.result=te===void 0?null:te,Do(J,ce,Y),t.write(J)}function C(te,ce,Y){let J={jsonrpc:b,id:u.id,error:te.toJson()};return Do(J,ce,Y),t.write(J)}qm(u);let P=h.get(u.method),j,V;P&&(j=P.type,V=P.handler);let H=Date.now();if(V||T){let te=u.id??String(Date.now()),ce=sr.is(Fe.receiver)?Fe.receiver.createCancellationTokenSource(te):Fe.receiver.createCancellationTokenSource(u);u.id!==null&&m.has(u.id)&&ce.cancel(),u.id!==null&&v.set(te,ce);try{let Y;if(V)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new R.ResponseError(R.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);Y=V(ce.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===R.ParameterStructures.byName)return C(new R.ResponseError(R.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);Y=V(...u.params,ce.token)}else{if(j!==void 0&&j.parameterStructures===R.ParameterStructures.byPosition)return C(new R.ResponseError(R.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);Y=V(u.params,ce.token)}else T&&(Y=T(u.method,u.params,ce.token));let J=await Y;await _(J,u.method,H)}catch(Y){Y instanceof R.ResponseError?await _(Y,u.method,H):Y&&X.string(Y.message)?await C(new R.ResponseError(R.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${Y.message}`),u.method,H):await C(new R.ResponseError(R.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{v.delete(te)}}else await C(new R.ResponseError(R.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function _a(u){if(!Nt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let _=u.id,C=f.get(_);if(Em(u,C),C!==void 0){f.delete(_);try{if(u.error){let P=u.error;C.reject(new R.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function Rm(u){if(Nt())return;let _,C;if(u.method===Sn.type.method){let P=u.params.id;m.delete(P),wo(u);return}else{let P=q.get(u.method);P&&(C=P.handler,_=P.type)}if(C||I)try{if(wo(u),C)if(u.params===void 0)_!==void 0&&_.numberOfParams!==0&&_.parameterStructures!==R.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Cn.type.method&&P.length===2&&Ii.is(P[0])?await C({token:P[0],value:P[1]}):(_!==void 0&&(_.parameterStructures===R.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),_.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else _!==void 0&&_.parameterStructures===R.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else I&&await I(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else se.fire(u)}function km(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let _=u;if(X.string(_.id)||X.number(_.id)){let C=_.id,P=f.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function ot(u){if(u!=null)switch(x){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Mm(u){if(!(x===F.Off||!E))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&u.params&&(_=`Params: ${ot(u.params)}`),E.log(`Sending request '${u.method} - (${u.id})'.`,_)}else Gt("send-request",u)}function xm(u){if(!(x===F.Off||!E))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&(u.params?_=`Params: ${ot(u.params)}`:_="No parameters provided."),E.log(`Sending notification '${u.method}'.`,_)}else Gt("send-notification",u)}function Do(u,_,C){if(!(x===F.Off||!E))if(A===Se.Text){let P;(x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${ot(u.error.data)}`:u.result?P=`Result: ${ot(u.result)}`:u.error===void 0&&(P="No result returned.")),E.log(`Sending response '${_} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Gt("send-response",u)}function qm(u){if(!(x===F.Off||!E))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&u.params&&(_=`Params: ${ot(u.params)}`),E.log(`Received request '${u.method} - (${u.id})'.`,_)}else Gt("receive-request",u)}function wo(u){if(!(x===F.Off||!E||u.method===ir.type.method))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&(u.params?_=`Params: ${ot(u.params)}`:_="No parameters provided."),E.log(`Received notification '${u.method}'.`,_)}else Gt("receive-notification",u)}function Em(u,_){if(!(x===F.Off||!E))if(A===Se.Text){let C;if((x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${ot(u.error.data)}`:u.result?C=`Result: ${ot(u.result)}`:u.error===void 0&&(C="No result returned.")),_){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";E.log(`Received response '${_.method} - (${u.id})' in ${Date.now()-_.timerStart}ms.${P}`,C)}else E.log(`Received response ${u.id} without active response promise.`,C)}else Gt("receive-response",u)}function Gt(u,_){if(!E||x===F.Off)return;let C={isLSPMessage:!0,type:u,message:_,timestamp:Date.now()};E.log(C)}function pn(){if(ga())throw new Wt(In.Closed,"Connection is closed.");if(Nt())throw new Wt(In.Disposed,"Connection is disposed.")}function Nm(){if(ha())throw new Wt(In.AlreadyListening,"Connection is already listening")}function Gm(){if(!ha())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function ba(u){if(u!==null)return u}function va(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Po(u,_){switch(u){case R.ParameterStructures.auto:return va(_)?ba(_):[yn(_)];case R.ParameterStructures.byName:if(!va(_))throw new Error("Received parameters by name but param is not an object literal.");return ba(_);case R.ParameterStructures.byPosition:return[yn(_)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ca(u,_){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Po(u.parameterStructures,_[0]);break;default:C=[];for(let j=0;j<_.length&&j{pn();let C,P;if(X.string(u)){C=u;let V=_[0],H=0,te=R.ParameterStructures.auto;R.ParameterStructures.is(V)&&(H=1,te=V);let ce=_.length,Y=ce-H;switch(Y){case 0:P=void 0;break;case 1:P=Po(te,_[H]);break;default:if(te===R.ParameterStructures.byName)throw new Error(`Received ${Y} parameters for 'by Name' notification parameter structure.`);P=_.slice(H,ce).map(J=>yn(J));break}}else{let V=_;C=u.method,P=Ca(u,V)}let j={jsonrpc:b,method:C,params:P};return xm(j),t.write(j).catch(V=>{throw o.error("Sending notification failed."),V})},onNotification:(u,_)=>{pn();let C;return X.func(u)?I=u:_&&(X.string(u)?(C=u,q.set(u,{type:void 0,handler:_})):(C=u.method,q.set(u.method,{type:u,handler:_}))),{dispose:()=>{C!==void 0?q.get(C)?.handler===_&&q.delete(C):I===u&&(I=void 0)}}},onProgress:(u,_,C)=>{if(N.has(_))throw new Error(`Progress handler for token ${_} already registered`);return N.set(_,C),{dispose:()=>{N.get(_)===C&&N.delete(_)}}},sendProgress:(u,_,C)=>vt.sendNotification(Cn.type,{token:_,value:C}),onUnhandledProgress:gn.event,sendRequest:(u,..._)=>{pn(),Gm();function C(J,xe){let $e=Fe.sender.sendCancellation(J,xe);$e===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${xe}`):$e.catch(()=>{o.log(`Sending cancellation messages for id ${xe} failed.`)})}let P,j,V;if(X.string(u)){P=u;let J=_[0],xe=_[_.length-1],$e=0,Tn=R.ParameterStructures.auto;R.ParameterStructures.is(J)&&($e=1,Tn=J);let Ct=_.length;Ci.CancellationToken.is(xe)&&(Ct=Ct-1,V=xe);let Le=Ct-$e;switch(Le){case 0:j=void 0;break;case 1:j=Po(Tn,_[$e]);break;default:if(Tn===R.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' request parameter structure.`);j=_.slice($e,Ct).map(Am=>yn(Am));break}}else{let J=_;P=u.method,j=Ca(u,J);let xe=u.numberOfParams;V=Ci.CancellationToken.is(J[xe])?J[xe]:void 0}let H=i++,te,ce=!1;V!==void 0&&(V.isCancellationRequested?ce=!0:te=V.onCancellationRequested(()=>{C(vt,H)}));let Y={jsonrpc:b,id:H,method:P,params:j};return Mm(Y),typeof Fe.sender.enableCancellation=="function"&&Fe.sender.enableCancellation(Y),new Promise(async(J,xe)=>{let $e=Le=>{J(Le),Fe.sender.cleanup(H),te?.dispose()},Tn=Le=>{xe(Le),Fe.sender.cleanup(H),te?.dispose()},Ct={method:P,timerStart:Date.now(),resolve:$e,reject:Tn};try{f.set(H,Ct),await t.write(Y),ce&&C(vt,H)}catch(Le){throw f.delete(H),Ct.reject(new R.ResponseError(R.ErrorCodes.MessageWriteError,Le.message?Le.message:"Unknown reason")),o.error("Sending request failed."),Le}})},onRequest:(u,_)=>{pn();let C=null;return Di.is(u)?(C=void 0,T=u):X.string(u)?(C=null,_!==void 0&&(C=u,h.set(u,{handler:_,type:void 0}))):_!==void 0&&(C=u.method,h.set(u.method,{type:u,handler:_})),{dispose:()=>{C!==null&&(C!==void 0?h.get(C)?.handler===_&&h.delete(C):T===u&&(T=void 0))}}},hasPendingResponse:()=>f.size>0,trace:async(u,_,C)=>{let P=!1,j=Se.Text;C!==void 0&&(X.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||Se.Text)),x=u,A=j,x===F.Off?E=void 0:E=_,P&&!ga()&&!Nt()&&await vt.sendNotification(Pi.type,{value:F.toString(u)})},onError:nt.event,onClose:hn.event,onUnhandledNotification:se.event,onDispose:rt.event,end:()=>{t.end()},dispose:()=>{if(Nt())return;be=Ee.Disposed,rt.fire(void 0);let u=new R.ResponseError(R.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let _ of f.values())_.reject(u);f=new Map,v=new Map,m=new Set,M=new Ba.LinkedMap,X.func(t.dispose)&&t.dispose(),X.func(e.dispose)&&e.dispose()},listen:()=>{pn(),Nm(),be=Ee.Listening,e.listen(Pm)},inspect:()=>{(0,Ua.default)().console.log("inspect")}};return vt.onNotification(ir.type,u=>{if(x===F.Off||!E)return;let _=x===F.Verbose||x===F.Compact;E.log(u.message,_?u.verbose:void 0)}),vt.onNotification(Cn.type,async u=>{let _=N.get(u.token);_?await _(u.value):gn.fire(u)}),vt}});var Ve=S(p=>{"use strict";var qh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var z=Zo();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return z.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return z.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return z.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return z.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return z.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return z.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return z.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return z.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return z.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return z.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return z.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return z.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return z.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return z.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return z.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return z.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return z.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return z.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return z.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return z.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return z.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return z.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return z.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return z.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return z.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return z.ParameterStructures}});var ki=ti();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return ki.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return ki.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return ki.Touch}});var Eh=xa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Eh.Disposable}});var Qa=jt();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return Qa.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return Qa.Emitter}});var Va=tr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return Va.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return Va.CancellationToken}});var Xa=Ea();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Xa.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Xa.SharedArrayReceiverStrategy}});var Mi=Ga();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Mi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Mi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Mi.ReadableStreamMessageReader}});var xi=Ha();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return xi.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return xi.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return xi.WriteableStreamMessageWriter}});var Nh=Wa();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Nh.AbstractMessageBuffer}});var ee=$a();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return ee.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return ee.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return ee.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return ee.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return ee.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return ee.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return ee.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return ee.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return ee.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return ee.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return ee.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return ee.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return ee.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ee.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return ee.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return ee.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return ee.TraceValues}});var Gh=qh(ct());p.RAL=Gh.default});var vr={};Sa(vr,{AnnotatedTextEdit:()=>Xe,ApplyKind:()=>es,ChangeAnnotation:()=>ut,ChangeAnnotationIdentifier:()=>ne,CodeAction:()=>ps,CodeActionContext:()=>gs,CodeActionKind:()=>hs,CodeActionTag:()=>yr,CodeActionTriggerKind:()=>Mn,CodeDescription:()=>Wi,CodeLens:()=>ys,Color:()=>fr,ColorInformation:()=>Gi,ColorPresentation:()=>Ai,Command:()=>St,CompletionItem:()=>ns,CompletionItemKind:()=>Xi,CompletionItemLabelDetails:()=>ts,CompletionItemTag:()=>Yi,CompletionList:()=>rs,CreateFile:()=>Bt,DeleteFile:()=>$t,Diagnostic:()=>Pn,DiagnosticRelatedInformation:()=>mr,DiagnosticSeverity:()=>Li,DiagnosticTag:()=>Hi,DocumentHighlight:()=>as,DocumentHighlightKind:()=>cs,DocumentLink:()=>_s,DocumentSymbol:()=>ms,DocumentUri:()=>qi,EOL:()=>Ah,FoldingRange:()=>Fi,FoldingRangeKind:()=>ji,FormattingOptions:()=>Ts,Hover:()=>os,InlayHint:()=>Os,InlayHintKind:()=>Tr,InlayHintLabelPart:()=>_r,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>Rs,InlineCompletionList:()=>ks,InlineCompletionTriggerKind:()=>Ms,InlineValueContext:()=>Ps,InlineValueEvaluatableExpression:()=>ws,InlineValueText:()=>Ss,InlineValueVariableLookup:()=>Ds,InsertReplaceEdit:()=>Ji,InsertTextFormat:()=>Ki,InsertTextMode:()=>Zi,LanguageKind:()=>Qi,Location:()=>wn,LocationLink:()=>Ni,MarkedString:()=>kn,MarkupContent:()=>lt,MarkupKind:()=>pr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>is,Position:()=>Oe,Range:()=>K,RenameFile:()=>zt,SelectedCompletionInfo:()=>xs,SelectionRange:()=>bs,SemanticTokenModifiers:()=>Cs,SemanticTokenTypes:()=>vs,SemanticTokens:()=>Is,SignatureInformation:()=>ss,SnippetTextEdit:()=>Ui,StringValue:()=>br,SymbolInformation:()=>ds,SymbolKind:()=>us,SymbolTag:()=>ls,TextDocument:()=>Ns,TextDocumentEdit:()=>On,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Vi,TextEdit:()=>He,URI:()=>dr,VersionedTextDocumentIdentifier:()=>$i,WorkspaceChange:()=>Bi,WorkspaceEdit:()=>hr,WorkspaceFolder:()=>Es,WorkspaceSymbol:()=>fs,integer:()=>Ei,uinteger:()=>Dn});var qi,dr,Ei,Dn,Oe,K,wn,Ni,fr,Gi,Ai,ji,Fi,mr,Li,Hi,Wi,Pn,St,He,ut,ne,Xe,On,Bt,zt,$t,hr,Ut,Ui,gr,Bi,zi,$i,Rn,Qi,Vi,pr,lt,Xi,Ki,Yi,Ji,Zi,es,ts,ns,rs,kn,os,is,ss,cs,as,us,ls,ds,fs,ms,hs,Mn,gs,yr,ps,ys,Ts,_s,bs,vs,Cs,Is,Ss,Ds,ws,Ps,Tr,_r,Os,br,Rs,ks,Ms,xs,qs,Es,Ah,Ns,Gs,l,Cr=Ia(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(dr||(dr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ei||(Ei={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.line)&&l.uinteger(o.character)}e.is=n})(Oe||(Oe={}));(function(e){function t(r,o,i,s){if(l.uinteger(r)&&l.uinteger(o)&&l.uinteger(i)&&l.uinteger(s))return{start:Oe.create(r,o),end:Oe.create(i,s)};if(Oe.is(r)&&Oe.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Oe.is(o.start)&&Oe.is(o.end)}e.is=n})(K||(K={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.range)&&(l.string(o.uri)||l.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.targetRange)&&l.string(o.targetUri)&&K.is(o.targetSelectionRange)&&(K.is(o.originSelectionRange)||l.undefined(o.originSelectionRange))}e.is=n})(Ni||(Ni={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.numberRange(o.red,0,1)&&l.numberRange(o.green,0,1)&&l.numberRange(o.blue,0,1)&&l.numberRange(o.alpha,0,1)}e.is=n})(fr||(fr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.range)&&fr.is(o.color)}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.undefined(o.textEdit)||He.is(o))&&(l.undefined(o.additionalTextEdits)||l.typedArray(o.additionalTextEdits,He.is))}e.is=n})(Ai||(Ai={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ji||(ji={}));(function(e){function t(r,o,i,s,a,b){let g={startLine:r,endLine:o};return l.defined(i)&&(g.startCharacter=i),l.defined(s)&&(g.endCharacter=s),l.defined(a)&&(g.kind=a),l.defined(b)&&(g.collapsedText=b),g}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.startLine)&&l.uinteger(o.startLine)&&(l.undefined(o.startCharacter)||l.uinteger(o.startCharacter))&&(l.undefined(o.endCharacter)||l.uinteger(o.endCharacter))&&(l.undefined(o.kind)||l.string(o.kind))}e.is=n})(Fi||(Fi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&wn.is(o.location)&&l.string(o.message)}e.is=n})(mr||(mr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Li||(Li={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Hi||(Hi={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&l.string(r.href)}e.is=t})(Wi||(Wi={}));(function(e){function t(i,s,a,b,g,d){let T={range:i,message:s};return l.defined(a)&&(T.severity=a),l.defined(b)&&(T.code=b),l.defined(g)&&(T.source=g),l.defined(d)&&(T.relatedInformation=d),T}e.create=t;function n(i){var s;let a=i;return l.defined(a)&&K.is(a.range)&&(l.string(a.message)||lt.is(a.message))&&(l.number(a.severity)||l.undefined(a.severity))&&(l.integer(a.code)||l.string(a.code)||l.undefined(a.code))&&(l.undefined(a.codeDescription)||l.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(l.string(a.source)||l.undefined(a.source))&&(l.undefined(a.relatedInformation)||l.typedArray(a.relatedInformation,mr.is))}e.is=n;function r(i){return l.string(i.message)}e.is3_17=r;function o(i){if(l.string(i.message))return i.message;if(lt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Pn||(Pn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return l.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.title)&&(o.tooltip===void 0||l.string(o.tooltip))&&l.string(o.command)}e.is=n})(St||(St={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return l.objectLiteral(s)&&l.string(s.newText)&&K.is(s.range)}e.is=o})(He||(He={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(l.string(o.description)||o.description===void 0)}e.is=n})(ut||(ut={}));(function(e){function t(n){let r=n;return l.string(r)}e.is=t})(ne||(ne={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return He.is(s)&&(ut.is(s.annotationId)||ne.is(s.annotationId))}e.is=o})(Xe||(Xe={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(On||(On={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&l.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(Bt||(Bt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&l.string(o.oldUri)&&l.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(zt||(zt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&l.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||l.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||l.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})($t||($t={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>l.string(o.kind)?Bt.is(o)||zt.is(o)||$t.is(o):On.is(o)))}e.is=t})(hr||(hr={}));Ut=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=He.insert(t,n):ne.is(r)?(i=r,o=Xe.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Xe.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=He.replace(t,n):ne.is(r)?(i=r,o=Xe.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Xe.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=He.del(t):ne.is(n)?(o=n,r=Xe.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Xe.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return l.objectLiteral(r)&&K.is(r.range)&&br.isSnippet(r.snippet)&&(r.annotationId===void 0||ut.is(r.annotationId)||ne.is(r.annotationId))}e.is=t})(Ui||(Ui={}));gr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ne.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Bi=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new gr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(On.is(n)){let r=new Ut(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Ut(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Ut(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Ut(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new gr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ut.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Bt.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=Bt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;ut.is(r)||ne.is(r)?i=r:o=r;let s,a;if(i===void 0?s=zt.create(t,n,o):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=zt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ut.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=$t.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=$t.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.integer(o.version)}e.is=n})($i||($i={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&(o.version===null||l.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Qi||(Qi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.string(o.languageId)&&l.integer(o.version)&&l.string(o.text)}e.is=n})(Vi||(Vi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(pr||(pr={}));(function(e){function t(n){let r=n;return l.objectLiteral(n)&&pr.is(r.kind)&&l.string(r.value)}e.is=t})(lt||(lt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Xi||(Xi={}));(function(e){e.PlainText=1,e.Snippet=2})(Ki||(Ki={}));(function(e){e.Deprecated=1})(Yi||(Yi={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&l.string(o.newText)&&K.is(o.insert)&&K.is(o.replace)}e.is=n})(Ji||(Ji={}));(function(e){e.asIs=1,e.adjustIndentation=2})(Zi||(Zi={}));(function(e){e.Replace=1,e.Merge=2})(es||(es={}));(function(e){function t(n){let r=n;return r&&(l.string(r.detail)||r.detail===void 0)&&(l.string(r.description)||r.description===void 0)}e.is=t})(ts||(ts={}));(function(e){function t(n){return{label:n}}e.create=t})(ns||(ns={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(rs||(rs={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return l.string(o)||l.objectLiteral(o)&&l.string(o.language)&&l.string(o.value)}e.is=n})(kn||(kn={}));(function(e){function t(n){let r=n;return!!r&&l.objectLiteral(r)&&(lt.is(r.contents)||kn.is(r.contents)||l.typedArray(r.contents,kn.is))&&(n.range===void 0||K.is(n.range))}e.is=t})(os||(os={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(is||(is={}));(function(e){function t(n,r,...o){let i={label:n};return l.defined(r)&&(i.documentation=r),l.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ss||(ss={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(cs||(cs={}));(function(e){function t(n,r){let o={range:n};return l.number(r)&&(o.kind=r),o}e.create=t})(as||(as={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(us||(us={}));(function(e){e.Deprecated=1})(ls||(ls={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(ds||(ds={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(fs||(fs={}));(function(e){function t(r,o,i,s,a,b){let g={name:r,detail:o,kind:i,range:s,selectionRange:a};return b!==void 0&&(g.children=b),g}e.create=t;function n(r){let o=r;return o&&l.string(o.name)&&l.number(o.kind)&&K.is(o.range)&&K.is(o.selectionRange)&&(o.detail===void 0||l.string(o.detail))&&(o.deprecated===void 0||l.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(ms||(ms={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(hs||(hs={}));(function(e){e.Invoked=1,e.Automatic=2})(Mn||(Mn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.typedArray(o.diagnostics,Pn.is)&&(o.only===void 0||l.typedArray(o.only,l.string))&&(o.triggerKind===void 0||o.triggerKind===Mn.Invoked||o.triggerKind===Mn.Automatic)}e.is=n})(gs||(gs={}));(function(e){e.LLMGenerated=1;function t(n){return l.defined(n)&&n===e.LLMGenerated}e.is=t})(yr||(yr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):St.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&l.string(o.title)&&(o.diagnostics===void 0||l.typedArray(o.diagnostics,Pn.is))&&(o.kind===void 0||l.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||St.is(o.command))&&(o.isPreferred===void 0||l.boolean(o.isPreferred))&&(o.edit===void 0||hr.is(o.edit))&&(o.tags===void 0||l.typedArray(o.tags,yr.is))}e.is=n})(ps||(ps={}));(function(e){function t(r,o){let i={range:r};return l.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return l.defined(o)&&K.is(o.range)&&(l.undefined(o.command)||St.is(o.command))}e.is=n})(ys||(ys={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.uinteger(o.tabSize)&&l.boolean(o.insertSpaces)}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return l.defined(o)&&K.is(o.range)&&(l.undefined(o.target)||l.string(o.target))}e.is=n})(_s||(_s={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(bs||(bs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(vs||(vs={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Cs||(Cs={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Is||(Is={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&K.is(o.range)&&l.string(o.text)}e.is=n})(Ss||(Ss={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&K.is(o.range)&&l.boolean(o.caseSensitiveLookup)&&(l.string(o.variableName)||o.variableName===void 0)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&K.is(o.range)&&(l.string(o.expression)||o.expression===void 0)}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&K.is(r.stoppedLocation)}e.is=n})(Ps||(Ps={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Tr||(Tr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&(o.tooltip===void 0||l.string(o.tooltip)||lt.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||St.is(o.command))}e.is=n})(_r||(_r={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Oe.is(o.position)&&(l.string(o.label)||l.typedArray(o.label,_r.is))&&(o.kind===void 0||Tr.is(o.kind))&&o.textEdits===void 0||l.typedArray(o.textEdits,He.is)&&(o.tooltip===void 0||l.string(o.tooltip)||lt.is(o.tooltip))&&(o.paddingLeft===void 0||l.boolean(o.paddingLeft))&&(o.paddingRight===void 0||l.boolean(o.paddingRight))}e.is=n})(Os||(Os={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return l.objectLiteral(o)&&o.kind==="snippet"&&l.string(o.value)}e.isSnippet=n})(br||(br={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Rs||(Rs={}));(function(e){function t(n){return{items:n}}e.create=t})(ks||(ks={}));(function(e){e.Invoked=1,e.Automatic=2})(Ms||(Ms={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(xs||(xs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&dr.is(r.uri)&&l.string(r.name)}e.is=t})(Es||(Es={}));Ah=[` `,`\r -`,"\r"];(function(e){function t(i,s,a,h){return new xs(i,s,a,h)}e.create=t;function n(i){let s=i;return!!(d.defined(s)&&d.string(s.uri)&&(d.undefined(s.languageId)||d.string(s.languageId))&&d.uinteger(s.lineCount)&&d.func(s.getText)&&d.func(s.positionAt)&&d.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),h=o(s,(_,b)=>{let g=_.range.start.line-b.range.start.line;return g===0?_.range.start.character-b.range.start.character:g}),l=a.length;for(let _=h.length-1;_>=0;_--){let b=h[_],g=i.offsetAt(b.range.start),D=i.offsetAt(b.range.end);if(D<=l)a=a.substring(0,g)+b.newText+a.substring(D,a.length);else throw new Error("Overlapping edit");l=g}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,h=i.slice(0,a),l=i.slice(a);o(h,s),o(l,s);let _=0,b=0,g=0;for(;_{let h=d.range.start.line-T.range.start.line;return h===0?d.range.start.character-T.range.start.character:h}),g=a.length;for(let d=b.length-1;d>=0;d--){let T=b[d],h=i.offsetAt(T.range.start),I=i.offsetAt(T.range.end);if(I<=g)a=a.substring(0,h)+T.newText+a.substring(I,a.length);else throw new Error("Overlapping edit");g=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,b=i.slice(0,a),g=i.slice(a);o(b,s),o(g,s);let d=0,T=0,h=0;for(;d0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Re.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Re.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(D){return D===!0||D===!1}e.boolean=o;function i(D){return t.call(D)==="[object String]"}e.string=i;function s(D){return t.call(D)==="[object Number]"}e.number=s;function a(D,N,A){return t.call(D)==="[object Number]"&&N<=D&&D<=A}e.numberRange=a;function h(D){return t.call(D)==="[object Number]"&&-2147483648<=D&&D<=2147483647}e.integer=h;function l(D){return t.call(D)==="[object Number]"&&0<=D&&D<=2147483647}e.uinteger=l;function _(D){return t.call(D)==="[object Function]"}e.func=_;function b(D){return D!==null&&typeof D=="object"}e.objectLiteral=b;function g(D,N){return Array.isArray(D)&&D.every(N)}e.typedArray=g})(d||(d={}))});var Q=I(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.CM=de.ProtocolNotificationType=de.ProtocolNotificationType0=de.ProtocolRequestType=de.ProtocolRequestType0=de.RegistrationType=de.MessageDirection=void 0;var Qt=Xe(),Wa;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Wa||(de.MessageDirection=Wa={}));var qs=class{____;method;constructor(t){this.method=t}};de.RegistrationType=qs;var Es=class extends Qt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};de.ProtocolRequestType0=Es;var Gs=class extends Qt.RequestType{__;___;____;_pr;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolRequestType=Gs;var Ns=class extends Qt.NotificationType0{___;____;constructor(t){super(t)}};de.ProtocolNotificationType0=Ns;var As=class extends Qt.NotificationType{___;____;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolNotificationType=As;var Ua;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(Ua||(de.CM=Ua={}))});var Cr=I(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Dh;Ge.string=Ba;Ge.number=wh;Ge.error=Ph;Ge.func=Rh;Ge.array=za;Ge.stringArray=Oh;Ge.typedArray=kh;Ge.objectLiteral=Mh;function Dh(e){return e===!0||e===!1}function Ba(e){return typeof e=="string"||e instanceof String}function wh(e){return typeof e=="number"||e instanceof Number}function Ph(e){return e instanceof Error}function Rh(e){return typeof e=="function"}function za(e){return Array.isArray(e)}function Oh(e){return za(e)&&e.every(t=>Ba(t))}function kh(e,t){return Array.isArray(e)&&e.every(t)}function Mh(e){return e!==null&&typeof e=="object"}});var Qa=I(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.ImplementationRequest=void 0;var js=Q(),$a;(function(e){e.method="textDocument/implementation",e.messageDirection=js.MessageDirection.clientToServer,e.type=new js.ProtocolRequestType(e.method),e.capabilities=js.CM.create("textDocument.implementation","implementationProvider")})($a||(Ir.ImplementationRequest=$a={}))});var Xa=I(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.TypeDefinitionRequest=void 0;var Fs=Q(),Va;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Fs.MessageDirection.clientToServer,e.type=new Fs.ProtocolRequestType(e.method),e.capabilities=Fs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(Va||(Sr.TypeDefinitionRequest=Va={}))});var Ka=I(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DidChangeWorkspaceFoldersNotification=Xt.WorkspaceFoldersRequest=void 0;var Vt=Q(),Ya;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Vt.MessageDirection.serverToClient,e.type=new Vt.ProtocolRequestType0(e.method),e.capabilities=Vt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Ya||(Xt.WorkspaceFoldersRequest=Ya={}));var Ja;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Vt.MessageDirection.clientToServer,e.type=new Vt.ProtocolNotificationType(e.method),e.capabilities=Vt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Ja||(Xt.DidChangeWorkspaceFoldersNotification=Ja={}))});var eu=I(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ConfigurationRequest=void 0;var Ls=Q(),Za;(function(e){e.method="workspace/configuration",e.messageDirection=Ls.MessageDirection.serverToClient,e.type=new Ls.ProtocolRequestType(e.method),e.capabilities=Ls.CM.create("workspace.configuration",void 0)})(Za||(Dr.ConfigurationRequest=Za={}))});var ru=I(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.ColorPresentationRequest=Jt.DocumentColorRequest=void 0;var Yt=Q(),tu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType(e.method),e.capabilities=Yt.CM.create("textDocument.colorProvider","colorProvider")})(tu||(Jt.DocumentColorRequest=tu={}));var nu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType(e.method),e.capabilities=Yt.CM.create("textDocument.colorProvider","colorProvider")})(nu||(Jt.ColorPresentationRequest=nu={}))});var su=I(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.FoldingRangeRefreshRequest=Zt.FoldingRangeRequest=void 0;var Kt=Q(),ou;(function(e){e.method="textDocument/foldingRange",e.messageDirection=Kt.MessageDirection.clientToServer,e.type=new Kt.ProtocolRequestType(e.method),e.capabilities=Kt.CM.create("textDocument.foldingRange","foldingRangeProvider")})(ou||(Zt.FoldingRangeRequest=ou={}));var iu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=Kt.MessageDirection.serverToClient,e.type=new Kt.ProtocolRequestType0(e.method),e.capabilities=Kt.CM.create("workspace.foldingRange.refreshSupport",void 0)})(iu||(Zt.FoldingRangeRefreshRequest=iu={}))});var au=I(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.DeclarationRequest=void 0;var Hs=Q(),cu;(function(e){e.method="textDocument/declaration",e.messageDirection=Hs.MessageDirection.clientToServer,e.type=new Hs.ProtocolRequestType(e.method),e.capabilities=Hs.CM.create("textDocument.declaration","declarationProvider")})(cu||(wr.DeclarationRequest=cu={}))});var lu=I(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.SelectionRangeRequest=void 0;var Ws=Q(),uu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Ws.MessageDirection.clientToServer,e.type=new Ws.ProtocolRequestType(e.method),e.capabilities=Ws.CM.create("textDocument.selectionRange","selectionRangeProvider")})(uu||(Pr.SelectionRangeRequest=uu={}))});var hu=I(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.WorkDoneProgressCancelNotification=ft.WorkDoneProgressCreateRequest=ft.WorkDoneProgress=void 0;var xh=Xe(),Mn=Q(),du;(function(e){e.type=new xh.ProgressType;function t(n){return n===e.type}e.is=t})(du||(ft.WorkDoneProgress=du={}));var fu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(fu||(ft.WorkDoneProgressCreateRequest=fu={}));var mu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(mu||(ft.WorkDoneProgressCancelNotification=mu={}))});var Tu=I(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.CallHierarchyOutgoingCallsRequest=mt.CallHierarchyIncomingCallsRequest=mt.CallHierarchyPrepareRequest=void 0;var Je=Q(),gu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Je.MessageDirection.clientToServer,e.type=new Je.ProtocolRequestType(e.method),e.capabilities=Je.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(gu||(mt.CallHierarchyPrepareRequest=gu={}));var pu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Je.MessageDirection.clientToServer,e.type=new Je.ProtocolRequestType(e.method),e.capabilities=Je.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(pu||(mt.CallHierarchyIncomingCallsRequest=pu={}));var yu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Je.MessageDirection.clientToServer,e.type=new Je.ProtocolRequestType(e.method),e.capabilities=Je.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(yu||(mt.CallHierarchyOutgoingCallsRequest=yu={}))});var Su=I(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.SemanticTokensRefreshRequest=Ce.SemanticTokensRangeRequest=Ce.SemanticTokensDeltaRequest=Ce.SemanticTokensRequest=Ce.SemanticTokensRegistrationType=Ce.TokenFormat=void 0;var De=Q(),_u;(function(e){e.Relative="relative"})(_u||(Ce.TokenFormat=_u={}));var xn;(function(e){e.method="textDocument/semanticTokens",e.type=new De.RegistrationType(e.method)})(xn||(Ce.SemanticTokensRegistrationType=xn={}));var bu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=xn.method,e.capabilities=De.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(bu||(Ce.SemanticTokensRequest=bu={}));var vu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=xn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(vu||(Ce.SemanticTokensDeltaRequest=vu={}));var Cu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=xn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Cu||(Ce.SemanticTokensRangeRequest=Cu={}));var Iu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=De.MessageDirection.serverToClient,e.type=new De.ProtocolRequestType0(e.method),e.capabilities=De.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Iu||(Ce.SemanticTokensRefreshRequest=Iu={}))});var wu=I(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Us=Q(),Du;(function(e){e.method="window/showDocument",e.messageDirection=Us.MessageDirection.serverToClient,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("window.showDocument.support",void 0)})(Du||(Rr.ShowDocumentRequest=Du={}))});var Ru=I(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.LinkedEditingRangeRequest=void 0;var Bs=Q(),Pu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Pu||(Or.LinkedEditingRangeRequest=Pu={}))});var Nu=I(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.WillDeleteFilesRequest=fe.DidDeleteFilesNotification=fe.DidRenameFilesNotification=fe.WillRenameFilesRequest=fe.DidCreateFilesNotification=fe.WillCreateFilesRequest=fe.FileOperationPatternKind=void 0;var re=Q(),Ou;(function(e){e.file="file",e.folder="folder"})(Ou||(fe.FileOperationPatternKind=Ou={}));var ku;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(ku||(fe.WillCreateFilesRequest=ku={}));var Mu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Mu||(fe.DidCreateFilesNotification=Mu={}));var xu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(xu||(fe.WillRenameFilesRequest=xu={}));var qu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(qu||(fe.DidRenameFilesNotification=qu={}));var Eu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Eu||(fe.DidDeleteFilesNotification=Eu={}));var Gu;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Gu||(fe.WillDeleteFilesRequest=Gu={}))});var Lu=I(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.MonikerRequest=ht.MonikerKind=ht.UniquenessLevel=void 0;var zs=Q(),Au;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Au||(ht.UniquenessLevel=Au={}));var ju;(function(e){e.$import="import",e.$export="export",e.local="local"})(ju||(ht.MonikerKind=ju={}));var Fu;(function(e){e.method="textDocument/moniker",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.moniker","monikerProvider")})(Fu||(ht.MonikerRequest=Fu={}))});var Bu=I(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.TypeHierarchySubtypesRequest=gt.TypeHierarchySupertypesRequest=gt.TypeHierarchyPrepareRequest=void 0;var Dt=Q(),Hu;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method),e.capabilities=Dt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Hu||(gt.TypeHierarchyPrepareRequest=Hu={}));var Wu;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Wu||(gt.TypeHierarchySupertypesRequest=Wu={}));var Uu;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Uu||(gt.TypeHierarchySubtypesRequest=Uu={}))});var Qu=I(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.InlineValueRefreshRequest=tn.InlineValueRequest=void 0;var en=Q(),zu;(function(e){e.method="textDocument/inlineValue",e.messageDirection=en.MessageDirection.clientToServer,e.type=new en.ProtocolRequestType(e.method),e.capabilities=en.CM.create("textDocument.inlineValue","inlineValueProvider")})(zu||(tn.InlineValueRequest=zu={}));var $u;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=en.MessageDirection.serverToClient,e.type=new en.ProtocolRequestType0(e.method),e.capabilities=en.CM.create("workspace.inlineValue.refreshSupport",void 0)})($u||(tn.InlineValueRefreshRequest=$u={}))});var Ju=I(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.InlayHintRefreshRequest=pt.InlayHintResolveRequest=pt.InlayHintRequest=void 0;var Ke=Q(),Vu;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.inlayHint","inlayHintProvider")})(Vu||(pt.InlayHintRequest=Vu={}));var Xu;(function(e){e.method="inlayHint/resolve",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Xu||(pt.InlayHintResolveRequest=Xu={}));var Yu;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Ke.MessageDirection.serverToClient,e.type=new Ke.ProtocolRequestType0(e.method),e.capabilities=Ke.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Yu||(pt.InlayHintRefreshRequest=Yu={}))});var ol=I(oe=>{"use strict";var qh=oe&&oe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eh=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gh=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Ah=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jh=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fh=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.InlineCompletionRequest=void 0;var Vs=Q(),fl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(fl||(Mr.InlineCompletionRequest=fl={}))});var pl=I(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.TextDocumentContentRefreshRequest=rn.TextDocumentContentRequest=void 0;var En=Q(),hl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=En.MessageDirection.clientToServer,e.type=new En.ProtocolRequestType(e.method),e.capabilities=En.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(hl||(rn.TextDocumentContentRequest=hl={}));var gl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=En.MessageDirection.serverToClient,e.type=new En.ProtocolRequestType(e.method)})(gl||(rn.TextDocumentContentRefreshRequest=gl={}))});var kd=I(c=>{"use strict";var Lh=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hh=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wh=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Sl||(c.StaticRegistrationOptions=Sl={}));var Dl;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||Ks.is(r.documentSelector))}e.is=t})(Dl||(c.TextDocumentRegistrationOptions=Dl={}));var wl;(function(e){function t(r){let o=r;return ie.objectLiteral(o)&&(o.workDoneProgress===void 0||ie.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ie.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(wl||(c.WorkDoneProgressOptions=wl={}));var Pl;(function(e){e.method="initialize",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method)})(Pl||(c.InitializeRequest=Pl={}));var Rl;(function(e){e.unknownProtocolVersion=1})(Rl||(c.InitializeErrorCodes=Rl={}));var Ol;(function(e){e.method="initialized",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method)})(Ol||(c.InitializedNotification=Ol={}));var kl;(function(e){e.method="shutdown",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType0(e.method)})(kl||(c.ShutdownRequest=kl={}));var Ml;(function(e){e.method="exit",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType0(e.method)})(Ml||(c.ExitNotification=Ml={}));var xl;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeConfiguration",void 0)})(xl||(c.DidChangeConfigurationNotification=xl={}));var ql;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ql||(c.MessageType=ql={}));var El;(function(e){e.method="window/showMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(El||(c.ShowMessageNotification=El={}));var Gl;(function(e){e.method="window/showMessageRequest",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(Gl||(c.ShowMessageRequest=Gl={}));var Nl;(function(e){e.method="window/logMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Nl||(c.LogMessageNotification=Nl={}));var Al;(function(e){e.method="telemetry/event",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Al||(c.TelemetryEventNotification=Al={}));var jl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(jl||(c.TextDocumentSyncKind=jl={}));var Fl;(function(e){e.method="textDocument/didOpen",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Fl||(c.DidOpenTextDocumentNotification=Fl={}));var Ll;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Ll||(c.TextDocumentContentChangeEvent=Ll={}));var Hl;(function(e){e.method="textDocument/didChange",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync")})(Hl||(c.DidChangeTextDocumentNotification=Hl={}));var Wl;(function(e){e.method="textDocument/didClose",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Wl||(c.DidCloseTextDocumentNotification=Wl={}));var Ul;(function(e){e.method="textDocument/didSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Ul||(c.DidSaveTextDocumentNotification=Ul={}));var Bl;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Bl||(c.TextDocumentSaveReason=Bl={}));var zl;(function(e){e.method="textDocument/willSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(zl||(c.WillSaveTextDocumentNotification=zl={}));var $l;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})($l||(c.WillSaveTextDocumentWaitUntilRequest=$l={}));var Ql;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeWatchedFiles",void 0)})(Ql||(c.DidChangeWatchedFilesNotification=Ql={}));var Vl;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Vl||(c.FileChangeType=Vl={}));var Zs;(function(e){function t(n){let r=n;return ie.objectLiteral(r)&&(yl.URI.is(r.baseUri)||yl.WorkspaceFolder.is(r.baseUri))&&ie.string(r.pattern)}e.is=t})(Zs||(c.RelativePattern=Zs={}));var ec;(function(e){function t(n){let r=n;return ie.string(r)||Zs.is(r)}e.is=t})(ec||(c.GlobPattern=ec={}));var Xl;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Xl||(c.WatchKind=Xl={}));var Yl;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.publishDiagnostics",void 0)})(Yl||(c.PublishDiagnosticsNotification=Yl={}));var Jl;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Jl||(c.CompletionTriggerKind=Jl={}));var Kl;(function(e){e.method="textDocument/completion",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion","completionProvider")})(Kl||(c.CompletionRequest=Kl={}));var Zl;(function(e){e.method="completionItem/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Zl||(c.CompletionResolveRequest=Zl={}));var ed;(function(e){e.method="textDocument/hover",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.hover","hoverProvider")})(ed||(c.HoverRequest=ed={}));var td;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(td||(c.SignatureHelpTriggerKind=td={}));var nd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(nd||(c.SignatureHelpRequest=nd={}));var rd;(function(e){e.method="textDocument/definition",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.definition","definitionProvider")})(rd||(c.DefinitionRequest=rd={}));var od;(function(e){e.method="textDocument/references",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.references","referencesProvider")})(od||(c.ReferencesRequest=od={}));var id;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(id||(c.DocumentHighlightRequest=id={}));var sd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(sd||(c.DocumentSymbolRequest=sd={}));var cd;(function(e){e.method="textDocument/codeAction",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction","codeActionProvider")})(cd||(c.CodeActionRequest=cd={}));var ad;(function(e){e.method="codeAction/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(ad||(c.CodeActionResolveRequest=ad={}));var ud;(function(e){e.method="workspace/symbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol","workspaceSymbolProvider")})(ud||(c.WorkspaceSymbolRequest=ud={}));var ld;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(ld||(c.WorkspaceSymbolResolveRequest=ld={}));var dd;(function(e){e.method="textDocument/codeLens",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens","codeLensProvider")})(dd||(c.CodeLensRequest=dd={}));var fd;(function(e){e.method="codeLens/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(fd||(c.CodeLensResolveRequest=fd={}));var md;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType0(e.method),e.capabilities=y.CM.create("workspace.codeLens",void 0)})(md||(c.CodeLensRefreshRequest=md={}));var hd;(function(e){e.method="textDocument/documentLink",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider")})(hd||(c.DocumentLinkRequest=hd={}));var gd;(function(e){e.method="documentLink/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(gd||(c.DocumentLinkResolveRequest=gd={}));var pd;(function(e){e.method="textDocument/formatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.formatting","documentFormattingProvider")})(pd||(c.DocumentFormattingRequest=pd={}));var yd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(yd||(c.DocumentRangeFormattingRequest=yd={}));var Td;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Td||(c.DocumentRangesFormattingRequest=Td={}));var _d;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(_d||(c.DocumentOnTypeFormattingRequest=_d={}));var bd;(function(e){e.Identifier=1})(bd||(c.PrepareSupportDefaultBehavior=bd={}));var vd;(function(e){e.method="textDocument/rename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename","renameProvider")})(vd||(c.RenameRequest=vd={}));var Cd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Cd||(c.PrepareRenameRequest=Cd={}));var Id;(function(e){e.method="workspace/executeCommand",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.executeCommand","executeCommandProvider")})(Id||(c.ExecuteCommandRequest=Id={}));var Sd;(function(e){e.method="workspace/applyEdit",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType("workspace/applyEdit"),e.capabilities=y.CM.create("workspace.applyEdit",void 0)})(Sd||(c.ApplyWorkspaceEditRequest=Sd={}))});var xd=I(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.createProtocolConnection=Jh;var Md=Xe();function Jh(e,t,n,r){return Md.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Md.createMessageConnection)(e,t,n,r)}});var Z=I(Ie=>{"use strict";var Kh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xr=Ie&&Ie.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Kh(t,e,n)};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.LSPErrorCodes=Ie.createProtocolConnection=void 0;xr(Xe(),Ie);xr((vr(),Vn(br)),Ie);xr(Q(),Ie);xr(kd(),Ie);var Zh=xd();Object.defineProperty(Ie,"createProtocolConnection",{enumerable:!0,get:function(){return Zh.createProtocolConnection}});var qd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(qd||(Ie.LSPErrorCodes=qd={}))});var ac=I(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.empty=void 0;yt.v4=Ed;yt.isUUID=Gd;yt.parse=tg;yt.generateUuid=ng;var Nn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},cc=class e extends Nn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};yt.empty=new Nn("00000000-0000-0000-0000-000000000000");function Ed(){return new cc}var eg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Gd(e){return eg.test(e)}function tg(e){if(!Gd(e))throw new Error("invalid uuid");return new Nn(e)}function ng(){return Ed().asHex()}});var Nd=I(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.ProgressFeature=void 0;cn.attachWorkDone=og;cn.attachPartialResult=sg;var Tt=Z(),rg=ac(),sn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(Tt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Tt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Tt.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends sn{_source;constructor(t,n){super(t,n),this._source=new Tt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},An=class{constructor(){}begin(){}report(){}done(){}},Er=class extends An{_source;constructor(){super(),this._source=new Tt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function og(e,t){if(t===void 0||t.workDoneToken===void 0)return new An;let n=t.workDoneToken;return delete t.workDoneToken,new sn(e,n)}var ig=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Tt.WorkDoneProgressCancelNotification.type,n=>{let r=sn.Instances.get(n.token);(r instanceof qr||r instanceof Er)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new An:new sn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,rg.generateUuid)();return this.connection.sendRequest(Tt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Er)}};cn.ProgressFeature=ig;var uc;(function(e){e.type=new Tt.ProgressType})(uc||(uc={}));var lc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(uc.type,this._token,t)}};function sg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new lc(e,n)}});var Ad=I(Be=>{"use strict";var cg=Be&&Be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ag=Be&&Be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ug=Be&&Be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?dg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(lg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Be.ConfigurationFeature=fg});var jd=I(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.WorkspaceFoldersFeature=void 0;var Gr=Z(),mg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Gr.Emitter,this.connection.onNotification(Gr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Gr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Gr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Nr.WorkspaceFoldersFeature=mg});var Fd=I(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.CallHierarchyFeature=void 0;var dc=Z(),hg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(dc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=dc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=dc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ar.CallHierarchyFeature=hg});var mc=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.SemanticTokensBuilder=_t.SemanticTokensDiff=_t.SemanticTokensFeature=void 0;var jr=Z(),gg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(jr.SemanticTokensRefreshRequest.type),on:t=>{let n=jr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=jr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=jr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};_t.SemanticTokensFeature=gg;var Fr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let h=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;h[this._dataLen++]=s,h[this._dataLen++]=a,h[this._dataLen++]=r,h[this._dataLen++]=o,h[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let l=t[5*a],_=t[5*h];if(l===_){let b=t[5*a+1],g=t[5*h+1];return b-g}return l-_});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ShowDocumentFeature=void 0;var pg=Z(),yg=e=>class extends e{showDocument(t){return this.connection.sendRequest(pg.ShowDocumentRequest.type,t)}};Lr.ShowDocumentFeature=yg});var Hd=I(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.FileOperationsFeature=void 0;var an=Z(),Tg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(an.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(an.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(an.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(an.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(an.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(an.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Hr.FileOperationsFeature=Tg});var Wd=I(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.LinkedEditingRangeFeature=void 0;var _g=Z(),bg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(_g.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Wr.LinkedEditingRangeFeature=bg});var Ud=I(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.TypeHierarchyFeature=void 0;var hc=Z(),vg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(hc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=hc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=hc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ur.TypeHierarchyFeature=vg});var zd=I(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.InlineValueFeature=void 0;var Bd=Z(),Cg=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Bd.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Bd.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Br.InlineValueFeature=Cg});var Qd=I(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var $d=Z(),Ig=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest($d.FoldingRangeRefreshRequest.type),on:t=>{let n=$d.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=Ig});var Vd=I($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlayHintFeature=void 0;var gc=Z(),Sg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(gc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(gc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(gc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};$r.InlayHintFeature=Sg});var Xd=I(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.DiagnosticFeature=void 0;var jn=Z(),Dg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(jn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(jn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(jn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(jn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(jn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Qr.DiagnosticFeature=Dg});var yc=I(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.TextDocuments=void 0;var Pt=Z(),pc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Pt.Emitter,this._onDidOpen=new Pt.Emitter,this._onDidClose=new Pt.Emitter,this._onDidSave=new Pt.Emitter,this._onWillSave=new Pt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Pt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Pt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Vr.TextDocuments=pc});var bc=I(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.NotebookDocuments=un.NotebookSyncFeature=void 0;var Oe=Z(),Yd=yc(),wg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Oe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Oe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Oe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Oe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};un.NotebookSyncFeature=wg;var Tc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Oe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Oe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Oe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},_c=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof Yd.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Yd.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Oe.Emitter,this._onDidChange=new Oe.Emitter,this._onDidSave=new Oe.Emitter,this._onDidClose=new Oe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Tc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,h=o.change;h.metadata!==void 0&&(a=!0,i.metadata=h.metadata);let l=[],_=[],b=[],g=[];if(h.cells!==void 0){let M=h.cells;if(M.structure!==void 0){let m=M.structure.array;if(i.cells.splice(m.start,m.deleteCount,...m.cells!==void 0?m.cells:[]),M.structure.didOpen!==void 0)for(let f of M.structure.didOpen)await n.openTextDocument({textDocument:f}),l.push(f.uri);if(M.structure.didClose)for(let f of M.structure.didClose)await n.closeTextDocument({textDocument:f}),_.push(f.uri)}if(M.data!==void 0){let m=new Map(M.data.map(f=>[f.document,f]));for(let f=0;f<=i.cells.length;f++){let v=m.get(i.cells[f].document);if(v!==void 0){let x=i.cells.splice(f,1,v);if(b.push({old:x[0],new:v}),m.delete(v.document),m.size===0)break}}}if(M.textContent!==void 0)for(let m of M.textContent)await n.changeTextDocument({textDocument:m.document,contentChanges:m.changes}),g.push(m.document.uri)}this.updateCellMap(i);let D={notebookDocument:i};a&&(D.metadata={old:s,new:i.metadata});let N=[];for(let M of l)N.push(this.getNotebookCell(M));let A=[];for(let M of _)A.push(this.getNotebookCell(M));let B=[];for(let M of g)B.push(this.getNotebookCell(M));(N.length>0||A.length>0||b.length>0||B.length>0)&&(D.cells={added:N,removed:A,changed:{data:b,textContent:B}}),(D.metadata!==void 0||D.cells!==void 0)&&this._onDidChange.fire(D)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Oe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};un.NotebookDocuments=_c});var Jd=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.MonikerFeature=void 0;var Pg=Z(),Rg=e=>class extends e{get moniker(){return{on:t=>{let n=Pg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Xr.MonikerFeature=Rg});var Kd=I(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Og=Z(),kg=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Og.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=kg});var ef=I(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var Zd=Z(),Mg=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Zd.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Zd.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=Mg});var wc=I(U=>{"use strict";var xg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qg=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),af=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Ic;var Kr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(S.MessageType.Error,t)}warn(t){this.send(S.MessageType.Warning,t)}info(t){this.send(S.MessageType.Info,t)}log(t){this.send(S.MessageType.Log,t)}debug(t){this.send(S.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(S.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,S.RAL)().console.error("Sending log message failed")})}},Sc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:S.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(S.ShowMessageRequest.type,r).then(vc)}showWarningMessage(t,...n){let r={type:S.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(S.ShowMessageRequest.type,r).then(vc)}showInformationMessage(t,...n){let r={type:S.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(S.ShowMessageRequest.type,r).then(vc)}},tf=(0,jg.ShowDocumentFeature)((0,k.ProgressFeature)(Sc)),nf;(function(e){function t(){return new Zr}e.create=t})(nf||(U.BulkRegistration=nf={}));var Zr=class{_registrations=[];_registered=new Set;add(t,n){let r=ke.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Cc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},rf;(function(e){function t(){return new Fn(void 0,[])}e.create=t})(rf||(U.BulkUnregistration=rf={}));var Fn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(S.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=ke.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(S.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},eo=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof Zr?this.registerMany(t):t instanceof Fn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=ke.string(n)?n:n.method,i=Cc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(S.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=ke.string(t)?t:t.method,o=Cc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(S.RegistrationRequest.type,i).then(s=>S.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(S.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(S.RegistrationRequest.type,n).then(()=>new Fn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Dc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(S.ApplyWorkspaceEditRequest.type,r)}},of=(0,Xg.TextDocumentContentFeature)((0,Fg.FileOperationsFeature)((0,Gg.WorkspaceFoldersFeature)((0,Eg.ConfigurationFeature)(Dc)))),to=class{_trace;_connection;constructor(){this._trace=S.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==S.Trace.Off&&this.connection.sendNotification(S.LogTraceNotification.type,{message:t,verbose:this._trace===S.Trace.Verbose?n:void 0}).catch(()=>{})}},no=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(S.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=ro;var sf=(0,Vg.InlineCompletionFeature)((0,Ug.FoldingRangeFeature)((0,Qg.MonikerFeature)((0,zg.DiagnosticFeature)((0,Bg.InlayHintFeature)((0,Wg.InlineValueFeature)((0,Hg.TypeHierarchyFeature)((0,Lg.LinkedEditingRangeFeature)((0,Ag.SemanticTokensFeature)((0,Ng.CallHierarchyFeature)(ro)))))))))),oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=oo;var cf=(0,$g.NotebookSyncFeature)(oo);function uf(e,t){return function(n){return t(e(n))}}function lf(e,t){return function(n){return t(e(n))}}function df(e,t){return function(n){return t(e(n))}}function ff(e,t){return function(n){return t(e(n))}}function mf(e,t){return function(n){return t(e(n))}}function hf(e,t){return function(n){return t(e(n))}}function gf(e,t){return function(n){return t(e(n))}}function pf(e,t){return function(n){return t(e(n))}}function Yg(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,uf),tracer:n(e.tracer,t.tracer,df),telemetry:n(e.telemetry,t.telemetry,lf),client:n(e.client,t.client,ff),window:n(e.window,t.window,mf),workspace:n(e.workspace,t.workspace,hf),languages:n(e.languages,t.languages,gf),notebooks:n(e.notebooks,t.notebooks,pf)}}function Jg(e,t,n){let r=n&&n.console?new(n.console(Kr)):new Kr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(to)):new to,s=n&&n.telemetry?new(n.telemetry(no)):new no,a=n&&n.client?new(n.client(eo)):new eo,h=n&&n.window?new(n.window(tf)):new tf,l=n&&n.workspace?new(n.workspace(of)):new of,_=n&&n.languages?new(n.languages(sf)):new sf,b=n&&n.notebooks?new(n.notebooks(cf)):new cf,g=[r,i,s,a,h,l,_,b];function D(m){return m instanceof Promise?m:ke.thenable(m)?new Promise((f,v)=>{m.then(x=>f(x),x=>v(x))}):Promise.resolve(m)}let N,A,B,M={listen:()=>o.listen(),sendRequest:(m,...f)=>o.sendRequest(ke.string(m)?m:m.method,...f),onRequest:(m,f)=>o.onRequest(m,f),sendNotification:(m,f)=>{let v=ke.string(m)?m:m.method;return o.sendNotification(v,f)},onNotification:(m,f)=>o.onNotification(m,f),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:m=>(A=m,{dispose:()=>{A=void 0}}),onInitialized:m=>o.onNotification(S.InitializedNotification.type,m),onShutdown:m=>(N=m,{dispose:()=>{N=void 0}}),onExit:m=>(B=m,{dispose:()=>{B=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return h},get workspace(){return l},get languages(){return _},get notebooks(){return b},onDidChangeConfiguration:m=>o.onNotification(S.DidChangeConfigurationNotification.type,m),onDidChangeWatchedFiles:m=>o.onNotification(S.DidChangeWatchedFilesNotification.type,m),__textDocumentSync:void 0,onDidOpenTextDocument:m=>o.onNotification(S.DidOpenTextDocumentNotification.type,m),onDidChangeTextDocument:m=>o.onNotification(S.DidChangeTextDocumentNotification.type,m),onDidCloseTextDocument:m=>o.onNotification(S.DidCloseTextDocumentNotification.type,m),onWillSaveTextDocument:m=>o.onNotification(S.WillSaveTextDocumentNotification.type,m),onWillSaveTextDocumentWaitUntil:m=>o.onRequest(S.WillSaveTextDocumentWaitUntilRequest.type,m),onDidSaveTextDocument:m=>o.onNotification(S.DidSaveTextDocumentNotification.type,m),sendDiagnostics:m=>o.sendNotification(S.PublishDiagnosticsNotification.type,m),onHover:m=>o.onRequest(S.HoverRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onCompletion:m=>o.onRequest(S.CompletionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onCompletionResolve:m=>o.onRequest(S.CompletionResolveRequest.type,m),onSignatureHelp:m=>o.onRequest(S.SignatureHelpRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onDeclaration:m=>o.onRequest(S.DeclarationRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDefinition:m=>o.onRequest(S.DefinitionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onTypeDefinition:m=>o.onRequest(S.TypeDefinitionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onImplementation:m=>o.onRequest(S.ImplementationRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onReferences:m=>o.onRequest(S.ReferencesRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDocumentHighlight:m=>o.onRequest(S.DocumentHighlightRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDocumentSymbol:m=>o.onRequest(S.DocumentSymbolRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onWorkspaceSymbol:m=>o.onRequest(S.WorkspaceSymbolRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onWorkspaceSymbolResolve:m=>o.onRequest(S.WorkspaceSymbolResolveRequest.type,m),onCodeAction:m=>o.onRequest(S.CodeActionRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onCodeActionResolve:m=>o.onRequest(S.CodeActionResolveRequest.type,(f,v)=>m(f,v)),onCodeLens:m=>o.onRequest(S.CodeLensRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onCodeLensResolve:m=>o.onRequest(S.CodeLensResolveRequest.type,(f,v)=>m(f,v)),onDocumentFormatting:m=>o.onRequest(S.DocumentFormattingRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onDocumentRangeFormatting:m=>o.onRequest(S.DocumentRangeFormattingRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onDocumentOnTypeFormatting:m=>o.onRequest(S.DocumentOnTypeFormattingRequest.type,(f,v)=>m(f,v)),onRenameRequest:m=>o.onRequest(S.RenameRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),onPrepareRename:m=>o.onRequest(S.PrepareRenameRequest.type,(f,v)=>m(f,v)),onDocumentLinks:m=>o.onRequest(S.DocumentLinkRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onDocumentLinkResolve:m=>o.onRequest(S.DocumentLinkResolveRequest.type,(f,v)=>m(f,v)),onDocumentColor:m=>o.onRequest(S.DocumentColorRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onColorPresentation:m=>o.onRequest(S.ColorPresentationRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onFoldingRanges:m=>o.onRequest(S.FoldingRangeRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onSelectionRanges:m=>o.onRequest(S.SelectionRangeRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),(0,k.attachPartialResult)(o,f))),onExecuteCommand:m=>o.onRequest(S.ExecuteCommandRequest.type,(f,v)=>m(f,v,(0,k.attachWorkDone)(o,f),void 0)),dispose:()=>o.dispose()};for(let m of g)m.attach(M);return o.onRequest(S.InitializeRequest.type,m=>{t.initialize(m),ke.string(m.trace)&&(i.trace=S.Trace.fromString(m.trace));for(let f of g)f.initialize(m.capabilities);if(A){let f=A(m,new S.CancellationTokenSource().token,(0,k.attachWorkDone)(o,m),void 0);return D(f).then(v=>{if(v instanceof S.ResponseError)return v;let x=v;x||(x={capabilities:{}});let G=x.capabilities;G||(G={},x.capabilities=G),G.textDocumentSync===void 0||G.textDocumentSync===null?G.textDocumentSync=ke.number(M.__textDocumentSync)?M.__textDocumentSync:S.TextDocumentSyncKind.None:!ke.number(G.textDocumentSync)&&!ke.number(G.textDocumentSync.change)&&(G.textDocumentSync.change=ke.number(M.__textDocumentSync)?M.__textDocumentSync:S.TextDocumentSyncKind.None);for(let q of g)q.fillServerCapabilities(G);return x})}else{let f={capabilities:{textDocumentSync:S.TextDocumentSyncKind.None}};for(let v of g)v.fillServerCapabilities(f.capabilities);return f}}),o.onRequest(S.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,N)return N(new S.CancellationTokenSource().token)}),o.onNotification(S.ExitNotification.type,()=>{try{if(B)return B()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(S.SetTraceNotification.type,m=>{i.trace=S.Trace.fromString(m.value)}),M}});var yf=I(pe=>{"use strict";var Kg=pe&&pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zg=pe&&pe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mc=pe&&pe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Ae.normalize(n.join("/"))}function Rc(){return process.platform==="win32"}function io(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let h=process.env,l=Object.create(null);Object.keys(h).forEach(_=>l[_]=h[_]),t&&Pc.existsSync(t)&&(l[o]?l[o]=t+Ae.delimiter+l[o]:l[o]=t,r&&r(`NODE_PATH value is: ${l[o]}`)),l.ELECTRON_RUN_AS_NODE="1";try{let _=(0,xc.fork)("",[],{cwd:n,env:l,execArgv:["-e",i]});if(_.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}_.on("error",g=>{a(g)}),_.on("message",g=>{g.c==="r"&&(_.send({c:"e"}),g.s?s(g.r):a(new Error(`Failed to resolve module: ${e}`)))});let b={c:"rs",a:e};_.send(b)}catch(_){a(_)}})}function Oc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Rc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,xc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Rc()?Ae.join(s,"node_modules"):Ae.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function np(e){let t="yarn",n={encoding:"utf8"};Rc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,xc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let h=JSON.parse(a);if(h.type==="log")return Ae.join(h.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var kc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Pc.existsSync(__filename.toUpperCase())||!Pc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Ae.normalize(i).indexOf(Ae.normalize(o))===0:Ae.normalize(i).toLowerCase().indexOf(Ae.normalize(o).toLowerCase())===0}e.isParent=r})(kc||(pe.FileSystem=kc={}));function rp(e,t,n,r){return n?(Ae.isAbsolute(n)||(n=Ae.join(e,n)),io(t,n,n,r).then(o=>kc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>io(t,Oc(r),e,r))):io(t,Oc(r),e,r)}});var bf=I(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Tf=require("util"),et=Xe(),qc=class e extends et.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Tf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Ec=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),et.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),et.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),et.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),et.Disposable.create(()=>this.stream.off("data",t))}},Gc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),et.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),et.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),et.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},_f=Object.freeze({messageBuffer:Object.freeze({create:e=>new qc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Tf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Ec(e),asWritableStream:e=>new Gc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Nc(){return _f}(function(e){function t(){et.RAL.install(_f)}e.install=t})(Nc||(Nc={}));Ac.default=Nc});var Uc=I(E=>{"use strict";var Cf=E&&E.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),op=E&&E.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wc=E&&E.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),we.Disposable.create(()=>this.process.off("message",t))}};E.IPCMessageReader=jc;var Fc=class extends we.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};E.IPCMessageWriter=Fc;var Lc=class extends we.AbstractMessageReader{onData;constructor(t){super(),this.onData=new we.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};E.PortMessageReader=Lc;var Hc=class extends we.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};E.PortMessageWriter=Hc;var Rt=class extends we.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Ln.default)().stream.asReadableStream(t),n)}};E.SocketMessageReader=Rt;var Ot=class extends we.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};E.SocketMessageWriter=Ot;var so=class extends we.ReadableStreamMessageReader{constructor(t,n){super((0,Ln.default)().stream.asReadableStream(t),n)}};E.StreamMessageReader=so;var co=class extends we.WriteableStreamMessageWriter{constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n)}};E.StreamMessageWriter=co;var lp=process.env.XDG_RUNTIME_DIR,dp=new Map([["linux",107],["darwin",102]]);function fp(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,vf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=up.realpathSync(lp??ap.tmpdir()),r=dp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,vf.randomBytes)(Math.floor(e/2)).toString("hex");return cp.join(n,`lsp-${o}.sock`)}function mp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ao.createServer)(a=>{s.close(),n([new Rt(a,t),new Ot(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function hp(e,t="utf-8"){let n=(0,ao.createConnection)(e);return[new Rt(n,t),new Ot(n,t)]}function gp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ao.createServer)(a=>{s.close(),n([new Rt(a,t),new Ot(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function pp(e,t="utf-8"){let n=(0,ao.createConnection)(e,"127.0.0.1");return[new Rt(n,t),new Ot(n,t)]}function yp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Tp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function _p(e,t,n,r){n||(n=we.NullLogger);let o=yp(e)?new so(e):e,i=Tp(t)?new co(t):t;return we.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,we.createMessageConnection)(o,i,n,r)}});var Bc=I(tt=>{"use strict";var bp=tt&&tt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),If=tt&&tt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&bp(t,e,n)};Object.defineProperty(tt,"__esModule",{value:!0});tt.createProtocolConnection=Cp;var vp=Uc();If(Uc(),tt);If(Z(),tt);function Cp(e,t,n,r){return(0,vp.createMessageConnection)(e,t,n,r)}});var zc=I(me=>{"use strict";var Ip=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Df=me&&me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ip(t,e,n)};Object.defineProperty(me,"__esModule",{value:!0});me.ProposedFeatures=me.NotebookDocuments=me.TextDocuments=me.SemanticTokensBuilder=void 0;var Sp=mc();Object.defineProperty(me,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Sp.SemanticTokensBuilder}});Df(Z(),me);var Dp=yc();Object.defineProperty(me,"TextDocuments",{enumerable:!0,get:function(){return Dp.TextDocuments}});var wp=bc();Object.defineProperty(me,"NotebookDocuments",{enumerable:!0,get:function(){return wp.NotebookDocuments}});Df(wc(),me);var Sf;(function(e){e.all={__brand:"features"}})(Sf||(me.ProposedFeatures=Sf={}))});var Qc=I(ye=>{"use strict";var Of=ye&&ye.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kf=ye&&ye.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{uo(),process.exit(ln?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;$c.number(t)&&xf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(ln?0:1)}},3e3)},get shutdownReceived(){return ln},set shutdownReceived(e){ln=e},exit:e=>{uo(),process.exit(e)}};function Mp(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),kt.ConnectionStrategy.is(e)||kt.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),xp(i,s,a,o)}function xp(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,h,l=process.argv.slice(2);for(let _=0;_{uo(),process.exit(ln?0:1)}),a.on("close",()=>{uo(),process.exit(ln?0:1)})}let s=a=>{let h=(0,kt.createProtocolConnection)(e,t,a,n);return o&&qp(a),h};return(0,Rp.createConnection)(s,kp,r)}function qp(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,wf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,wf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Nf={};pa(Nf,{TextDocument:()=>Vc});function Xc(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);Xc(r,t),Xc(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ep(e){let t=Gf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var lo,Vc,Af=ga(()=>{"use strict";lo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Gf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),h=Math.max(o.end.line,0),l=this._lineOffsets,_=qf(r.text,!1,i);if(h-a===_.length)for(let g=0,D=_.length;gt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Ef(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new lo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof lo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=Xc(i.map(Ep),(_,b)=>{let g=_.range.start.line-b.range.start.line;return g===0?_.range.start.character-b.range.start.character:g}),h=0,l=[];for(let _ of a){let b=o.offsetAt(_.range.start);if(bh&&l.push(s.substring(h,b)),_.newText.length&&l.push(_.newText),h=o.offsetAt(_.range.end)}return l.push(s.substr(h)),l.join("")}e.applyEdits=r})(Vc||(Vc={}))});var Wn=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.DATATYPE_SET=he.KEYWORD_SET=he.PUNCTUATION=he.OPERATORS=he.DATATYPES=he.KEYWORDS=void 0;he.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];he.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];he.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];he.PUNCTUATION=["(",")","[","]",";",",",":","."];he.KEYWORD_SET=new Set(he.KEYWORDS);he.DATATYPE_SET=new Set(he.DATATYPES)});var Mt=I(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TokenKind=void 0;var jf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(jf||(fo.TokenKind=jf={}))});var go=I(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.tokenize=Ap;var ho=Wn(),Pe=Mt();function Gp(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function Ff(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function mo(e){return e!==void 0&&/[0-9]/.test(e)}function Np(e){let t=e.toUpperCase();return ho.DATATYPE_SET.has(t)?Pe.TokenKind.Datatype:ho.KEYWORD_SET.has(t)?Pe.TokenKind.Keyword:Pe.TokenKind.Identifier}function Ap(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=l=>{for(;n{let b=n,g=i();s(_),t.push({kind:l,lexeme:e.slice(b,_),span:{start:b,end:_},range:{start:g,end:i()}})};for(;ne.startsWith(g,n));if(_!==void 0){a(Pe.TokenKind.Operator,n+_.length);continue}if(ho.PUNCTUATION.includes(l)){a(Pe.TokenKind.Punctuation,n+1);continue}let b=e.codePointAt(n);a(Pe.TokenKind.Unknown,n+(b!==void 0&&b>65535?2:1))}let h=i();return t.push({kind:Pe.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:h,end:{...h}}}),t}});var po=I(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.positionAt=Kc;Un.offsetAt=Fp;Un.sourceRange=Lp;function Jc(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Lf(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function Hf(e){let t=[0];for(let n=0;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Oe.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Oe.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(I){return I===!0||I===!1}e.boolean=o;function i(I){return t.call(I)==="[object String]"}e.string=i;function s(I){return t.call(I)==="[object Number]"}e.number=s;function a(I,q,N){return t.call(I)==="[object Number]"&&q<=I&&I<=N}e.numberRange=a;function b(I){return t.call(I)==="[object Number]"&&-2147483648<=I&&I<=2147483647}e.integer=b;function g(I){return t.call(I)==="[object Number]"&&0<=I&&I<=2147483647}e.uinteger=g;function d(I){return t.call(I)==="[object Function]"}e.func=d;function T(I){return I!==null&&typeof I=="object"}e.objectLiteral=T;function h(I,q){return Array.isArray(I)&&I.every(q)}e.typedArray=h})(l||(l={}))});var Q=S(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.CM=de.ProtocolNotificationType=de.ProtocolNotificationType0=de.ProtocolRequestType=de.ProtocolRequestType0=de.RegistrationType=de.MessageDirection=void 0;var Qt=Ve(),Ka;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Ka||(de.MessageDirection=Ka={}));var As=class{____;method;constructor(t){this.method=t}};de.RegistrationType=As;var js=class extends Qt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};de.ProtocolRequestType0=js;var Fs=class extends Qt.RequestType{__;___;____;_pr;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolRequestType=Fs;var Ls=class extends Qt.NotificationType0{___;____;constructor(t){super(t)}};de.ProtocolNotificationType0=Ls;var Hs=class extends Qt.NotificationType{___;____;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolNotificationType=Hs;var Ya;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(Ya||(de.CM=Ya={}))});var Ir=S(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.boolean=jh;Ne.string=Ja;Ne.number=Fh;Ne.error=Lh;Ne.func=Hh;Ne.array=Za;Ne.stringArray=Wh;Ne.typedArray=Uh;Ne.objectLiteral=Bh;function jh(e){return e===!0||e===!1}function Ja(e){return typeof e=="string"||e instanceof String}function Fh(e){return typeof e=="number"||e instanceof Number}function Lh(e){return e instanceof Error}function Hh(e){return typeof e=="function"}function Za(e){return Array.isArray(e)}function Wh(e){return Za(e)&&e.every(t=>Ja(t))}function Uh(e,t){return Array.isArray(e)&&e.every(t)}function Bh(e){return e!==null&&typeof e=="object"}});var tu=S(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.ImplementationRequest=void 0;var Ws=Q(),eu;(function(e){e.method="textDocument/implementation",e.messageDirection=Ws.MessageDirection.clientToServer,e.type=new Ws.ProtocolRequestType(e.method),e.capabilities=Ws.CM.create("textDocument.implementation","implementationProvider")})(eu||(Sr.ImplementationRequest=eu={}))});var ru=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeDefinitionRequest=void 0;var Us=Q(),nu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Us.MessageDirection.clientToServer,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(nu||(Dr.TypeDefinitionRequest=nu={}))});var su=S(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DidChangeWorkspaceFoldersNotification=Xt.WorkspaceFoldersRequest=void 0;var Vt=Q(),ou;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Vt.MessageDirection.serverToClient,e.type=new Vt.ProtocolRequestType0(e.method),e.capabilities=Vt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(ou||(Xt.WorkspaceFoldersRequest=ou={}));var iu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Vt.MessageDirection.clientToServer,e.type=new Vt.ProtocolNotificationType(e.method),e.capabilities=Vt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(iu||(Xt.DidChangeWorkspaceFoldersNotification=iu={}))});var au=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var Bs=Q(),cu;(function(e){e.method="workspace/configuration",e.messageDirection=Bs.MessageDirection.serverToClient,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("workspace.configuration",void 0)})(cu||(wr.ConfigurationRequest=cu={}))});var du=S(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.ColorPresentationRequest=Yt.DocumentColorRequest=void 0;var Kt=Q(),uu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Kt.MessageDirection.clientToServer,e.type=new Kt.ProtocolRequestType(e.method),e.capabilities=Kt.CM.create("textDocument.colorProvider","colorProvider")})(uu||(Yt.DocumentColorRequest=uu={}));var lu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Kt.MessageDirection.clientToServer,e.type=new Kt.ProtocolRequestType(e.method),e.capabilities=Kt.CM.create("textDocument.colorProvider","colorProvider")})(lu||(Yt.ColorPresentationRequest=lu={}))});var hu=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.FoldingRangeRefreshRequest=Zt.FoldingRangeRequest=void 0;var Jt=Q(),fu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=Jt.MessageDirection.clientToServer,e.type=new Jt.ProtocolRequestType(e.method),e.capabilities=Jt.CM.create("textDocument.foldingRange","foldingRangeProvider")})(fu||(Zt.FoldingRangeRequest=fu={}));var mu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=Jt.MessageDirection.serverToClient,e.type=new Jt.ProtocolRequestType0(e.method),e.capabilities=Jt.CM.create("workspace.foldingRange.refreshSupport",void 0)})(mu||(Zt.FoldingRangeRefreshRequest=mu={}))});var pu=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=Q(),gu;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(gu||(Pr.DeclarationRequest=gu={}))});var Tu=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var $s=Q(),yu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=$s.MessageDirection.clientToServer,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("textDocument.selectionRange","selectionRangeProvider")})(yu||(Or.SelectionRangeRequest=yu={}))});var Cu=S(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.WorkDoneProgressCancelNotification=dt.WorkDoneProgressCreateRequest=dt.WorkDoneProgress=void 0;var zh=Ve(),xn=Q(),_u;(function(e){e.type=new zh.ProgressType;function t(n){return n===e.type}e.is=t})(_u||(dt.WorkDoneProgress=_u={}));var bu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=xn.MessageDirection.serverToClient,e.type=new xn.ProtocolRequestType(e.method),e.capabilities=xn.CM.create("window.workDoneProgress",void 0)})(bu||(dt.WorkDoneProgressCreateRequest=bu={}));var vu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=xn.MessageDirection.clientToServer,e.type=new xn.ProtocolNotificationType(e.method)})(vu||(dt.WorkDoneProgressCancelNotification=vu={}))});var wu=S(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.CallHierarchyOutgoingCallsRequest=ft.CallHierarchyIncomingCallsRequest=ft.CallHierarchyPrepareRequest=void 0;var Ke=Q(),Iu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Iu||(ft.CallHierarchyPrepareRequest=Iu={}));var Su;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Su||(ft.CallHierarchyIncomingCallsRequest=Su={}));var Du;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Du||(ft.CallHierarchyOutgoingCallsRequest=Du={}))});var xu=S(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.SemanticTokensRefreshRequest=Ce.SemanticTokensRangeRequest=Ce.SemanticTokensDeltaRequest=Ce.SemanticTokensRequest=Ce.SemanticTokensRegistrationType=Ce.TokenFormat=void 0;var De=Q(),Pu;(function(e){e.Relative="relative"})(Pu||(Ce.TokenFormat=Pu={}));var qn;(function(e){e.method="textDocument/semanticTokens",e.type=new De.RegistrationType(e.method)})(qn||(Ce.SemanticTokensRegistrationType=qn={}));var Ou;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=De.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Ou||(Ce.SemanticTokensRequest=Ou={}));var Ru;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Ru||(Ce.SemanticTokensDeltaRequest=Ru={}));var ku;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(ku||(Ce.SemanticTokensRangeRequest=ku={}));var Mu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=De.MessageDirection.serverToClient,e.type=new De.ProtocolRequestType0(e.method),e.capabilities=De.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Mu||(Ce.SemanticTokensRefreshRequest=Mu={}))});var Eu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Qs=Q(),qu;(function(e){e.method="window/showDocument",e.messageDirection=Qs.MessageDirection.serverToClient,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("window.showDocument.support",void 0)})(qu||(Rr.ShowDocumentRequest=qu={}))});var Gu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.LinkedEditingRangeRequest=void 0;var Vs=Q(),Nu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Nu||(kr.LinkedEditingRangeRequest=Nu={}))});var Bu=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.WillDeleteFilesRequest=fe.DidDeleteFilesNotification=fe.DidRenameFilesNotification=fe.WillRenameFilesRequest=fe.DidCreateFilesNotification=fe.WillCreateFilesRequest=fe.FileOperationPatternKind=void 0;var re=Q(),Au;(function(e){e.file="file",e.folder="folder"})(Au||(fe.FileOperationPatternKind=Au={}));var ju;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(ju||(fe.WillCreateFilesRequest=ju={}));var Fu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Fu||(fe.DidCreateFilesNotification=Fu={}));var Lu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Lu||(fe.WillRenameFilesRequest=Lu={}));var Hu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Hu||(fe.DidRenameFilesNotification=Hu={}));var Wu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Wu||(fe.DidDeleteFilesNotification=Wu={}));var Uu;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Uu||(fe.WillDeleteFilesRequest=Uu={}))});var Vu=S(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.MonikerRequest=mt.MonikerKind=mt.UniquenessLevel=void 0;var Xs=Q(),zu;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(zu||(mt.UniquenessLevel=zu={}));var $u;(function(e){e.$import="import",e.$export="export",e.local="local"})($u||(mt.MonikerKind=$u={}));var Qu;(function(e){e.method="textDocument/moniker",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.moniker","monikerProvider")})(Qu||(mt.MonikerRequest=Qu={}))});var Ju=S(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.TypeHierarchySubtypesRequest=ht.TypeHierarchySupertypesRequest=ht.TypeHierarchyPrepareRequest=void 0;var Dt=Q(),Xu;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method),e.capabilities=Dt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Xu||(ht.TypeHierarchyPrepareRequest=Xu={}));var Ku;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Ku||(ht.TypeHierarchySupertypesRequest=Ku={}));var Yu;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Yu||(ht.TypeHierarchySubtypesRequest=Yu={}))});var tl=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.InlineValueRefreshRequest=tn.InlineValueRequest=void 0;var en=Q(),Zu;(function(e){e.method="textDocument/inlineValue",e.messageDirection=en.MessageDirection.clientToServer,e.type=new en.ProtocolRequestType(e.method),e.capabilities=en.CM.create("textDocument.inlineValue","inlineValueProvider")})(Zu||(tn.InlineValueRequest=Zu={}));var el;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=en.MessageDirection.serverToClient,e.type=new en.ProtocolRequestType0(e.method),e.capabilities=en.CM.create("workspace.inlineValue.refreshSupport",void 0)})(el||(tn.InlineValueRefreshRequest=el={}))});var il=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.InlayHintRefreshRequest=gt.InlayHintResolveRequest=gt.InlayHintRequest=void 0;var Ye=Q(),nl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Ye.MessageDirection.clientToServer,e.type=new Ye.ProtocolRequestType(e.method),e.capabilities=Ye.CM.create("textDocument.inlayHint","inlayHintProvider")})(nl||(gt.InlayHintRequest=nl={}));var rl;(function(e){e.method="inlayHint/resolve",e.messageDirection=Ye.MessageDirection.clientToServer,e.type=new Ye.ProtocolRequestType(e.method),e.capabilities=Ye.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(rl||(gt.InlayHintResolveRequest=rl={}));var ol;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Ye.MessageDirection.serverToClient,e.type=new Ye.ProtocolRequestType0(e.method),e.capabilities=Ye.CM.create("workspace.inlayHint.refreshSupport",void 0)})(ol||(gt.InlayHintRefreshRequest=ol={}))});var fl=S(oe=>{"use strict";var $h=oe&&oe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Qh=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vh=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Kh=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Yh=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jh=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.InlineCompletionRequest=void 0;var Js=Q(),bl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Js.MessageDirection.clientToServer,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(bl||(xr.InlineCompletionRequest=bl={}))});var Sl=S(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.TextDocumentContentRefreshRequest=rn.TextDocumentContentRequest=void 0;var Nn=Q(),Cl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Nn.MessageDirection.clientToServer,e.type=new Nn.ProtocolRequestType(e.method),e.capabilities=Nn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Cl||(rn.TextDocumentContentRequest=Cl={}));var Il;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Nn.MessageDirection.serverToClient,e.type=new Nn.ProtocolRequestType(e.method)})(Il||(rn.TextDocumentContentRefreshRequest=Il={}))});var jd=S(c=>{"use strict";var Zh=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(xl||(c.StaticRegistrationOptions=xl={}));var ql;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||nc.is(r.documentSelector))}e.is=t})(ql||(c.TextDocumentRegistrationOptions=ql={}));var El;(function(e){function t(r){let o=r;return ie.objectLiteral(o)&&(o.workDoneProgress===void 0||ie.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ie.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(El||(c.WorkDoneProgressOptions=El={}));var Nl;(function(e){e.method="initialize",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method)})(Nl||(c.InitializeRequest=Nl={}));var Gl;(function(e){e.unknownProtocolVersion=1})(Gl||(c.InitializeErrorCodes=Gl={}));var Al;(function(e){e.method="initialized",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method)})(Al||(c.InitializedNotification=Al={}));var jl;(function(e){e.method="shutdown",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType0(e.method)})(jl||(c.ShutdownRequest=jl={}));var Fl;(function(e){e.method="exit",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType0(e.method)})(Fl||(c.ExitNotification=Fl={}));var Ll;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeConfiguration",void 0)})(Ll||(c.DidChangeConfigurationNotification=Ll={}));var Hl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Hl||(c.MessageType=Hl={}));var Wl;(function(e){e.method="window/showMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(Wl||(c.ShowMessageNotification=Wl={}));var Ul;(function(e){e.method="window/showMessageRequest",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(Ul||(c.ShowMessageRequest=Ul={}));var Bl;(function(e){e.method="window/logMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Bl||(c.LogMessageNotification=Bl={}));var zl;(function(e){e.method="telemetry/event",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(zl||(c.TelemetryEventNotification=zl={}));var $l;(function(e){e.None=0,e.Full=1,e.Incremental=2})($l||(c.TextDocumentSyncKind=$l={}));var Ql;(function(e){e.method="textDocument/didOpen",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Ql||(c.DidOpenTextDocumentNotification=Ql={}));var Vl;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Vl||(c.TextDocumentContentChangeEvent=Vl={}));var Xl;(function(e){e.method="textDocument/didChange",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync")})(Xl||(c.DidChangeTextDocumentNotification=Xl={}));var Kl;(function(e){e.method="textDocument/didClose",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Kl||(c.DidCloseTextDocumentNotification=Kl={}));var Yl;(function(e){e.method="textDocument/didSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Yl||(c.DidSaveTextDocumentNotification=Yl={}));var Jl;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Jl||(c.TextDocumentSaveReason=Jl={}));var Zl;(function(e){e.method="textDocument/willSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Zl||(c.WillSaveTextDocumentNotification=Zl={}));var ed;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(ed||(c.WillSaveTextDocumentWaitUntilRequest=ed={}));var td;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeWatchedFiles",void 0)})(td||(c.DidChangeWatchedFilesNotification=td={}));var nd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(nd||(c.FileChangeType=nd={}));var rc;(function(e){function t(n){let r=n;return ie.objectLiteral(r)&&(Dl.URI.is(r.baseUri)||Dl.WorkspaceFolder.is(r.baseUri))&&ie.string(r.pattern)}e.is=t})(rc||(c.RelativePattern=rc={}));var oc;(function(e){function t(n){let r=n;return ie.string(r)||rc.is(r)}e.is=t})(oc||(c.GlobPattern=oc={}));var rd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(rd||(c.WatchKind=rd={}));var od;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.publishDiagnostics",void 0)})(od||(c.PublishDiagnosticsNotification=od={}));var id;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(id||(c.CompletionTriggerKind=id={}));var sd;(function(e){e.method="textDocument/completion",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion","completionProvider")})(sd||(c.CompletionRequest=sd={}));var cd;(function(e){e.method="completionItem/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(cd||(c.CompletionResolveRequest=cd={}));var ad;(function(e){e.method="textDocument/hover",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.hover","hoverProvider")})(ad||(c.HoverRequest=ad={}));var ud;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(ud||(c.SignatureHelpTriggerKind=ud={}));var ld;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(ld||(c.SignatureHelpRequest=ld={}));var dd;(function(e){e.method="textDocument/definition",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.definition","definitionProvider")})(dd||(c.DefinitionRequest=dd={}));var fd;(function(e){e.method="textDocument/references",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.references","referencesProvider")})(fd||(c.ReferencesRequest=fd={}));var md;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(md||(c.DocumentHighlightRequest=md={}));var hd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(hd||(c.DocumentSymbolRequest=hd={}));var gd;(function(e){e.method="textDocument/codeAction",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction","codeActionProvider")})(gd||(c.CodeActionRequest=gd={}));var pd;(function(e){e.method="codeAction/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(pd||(c.CodeActionResolveRequest=pd={}));var yd;(function(e){e.method="workspace/symbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol","workspaceSymbolProvider")})(yd||(c.WorkspaceSymbolRequest=yd={}));var Td;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Td||(c.WorkspaceSymbolResolveRequest=Td={}));var _d;(function(e){e.method="textDocument/codeLens",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens","codeLensProvider")})(_d||(c.CodeLensRequest=_d={}));var bd;(function(e){e.method="codeLens/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(bd||(c.CodeLensResolveRequest=bd={}));var vd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType0(e.method),e.capabilities=y.CM.create("workspace.codeLens",void 0)})(vd||(c.CodeLensRefreshRequest=vd={}));var Cd;(function(e){e.method="textDocument/documentLink",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider")})(Cd||(c.DocumentLinkRequest=Cd={}));var Id;(function(e){e.method="documentLink/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Id||(c.DocumentLinkResolveRequest=Id={}));var Sd;(function(e){e.method="textDocument/formatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.formatting","documentFormattingProvider")})(Sd||(c.DocumentFormattingRequest=Sd={}));var Dd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Dd||(c.DocumentRangeFormattingRequest=Dd={}));var wd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(wd||(c.DocumentRangesFormattingRequest=wd={}));var Pd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Pd||(c.DocumentOnTypeFormattingRequest=Pd={}));var Od;(function(e){e.Identifier=1})(Od||(c.PrepareSupportDefaultBehavior=Od={}));var Rd;(function(e){e.method="textDocument/rename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename","renameProvider")})(Rd||(c.RenameRequest=Rd={}));var kd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(kd||(c.PrepareRenameRequest=kd={}));var Md;(function(e){e.method="workspace/executeCommand",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.executeCommand","executeCommandProvider")})(Md||(c.ExecuteCommandRequest=Md={}));var xd;(function(e){e.method="workspace/applyEdit",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType("workspace/applyEdit"),e.capabilities=y.CM.create("workspace.applyEdit",void 0)})(xd||(c.ApplyWorkspaceEditRequest=xd={}))});var Ld=S(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.createProtocolConnection=lg;var Fd=Ve();function lg(e,t,n,r){return Fd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Fd.createMessageConnection)(e,t,n,r)}});var Z=S(Ie=>{"use strict";var dg=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qr=Ie&&Ie.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&dg(t,e,n)};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.LSPErrorCodes=Ie.createProtocolConnection=void 0;qr(Ve(),Ie);qr((Cr(),Xn(vr)),Ie);qr(Q(),Ie);qr(jd(),Ie);var fg=Ld();Object.defineProperty(Ie,"createProtocolConnection",{enumerable:!0,get:function(){return fg.createProtocolConnection}});var Hd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Hd||(Ie.LSPErrorCodes=Hd={}))});var fc=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.empty=void 0;pt.v4=Wd;pt.isUUID=Ud;pt.parse=hg;pt.generateUuid=gg;var An=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},dc=class e extends An{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};pt.empty=new An("00000000-0000-0000-0000-000000000000");function Wd(){return new dc}var mg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ud(e){return mg.test(e)}function hg(e){if(!Ud(e))throw new Error("invalid uuid");return new An(e)}function gg(){return Wd().asHex()}});var Bd=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.ProgressFeature=void 0;cn.attachWorkDone=yg;cn.attachPartialResult=_g;var yt=Z(),pg=fc(),sn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(yt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(yt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(yt.WorkDoneProgress.type,this._token,{kind:"end"})}},Er=class extends sn{_source;constructor(t,n){super(t,n),this._source=new yt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends jn{_source;constructor(){super(),this._source=new yt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function yg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new sn(e,n)}var Tg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(yt.WorkDoneProgressCancelNotification.type,n=>{let r=sn.Instances.get(n.token);(r instanceof Er||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new sn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,pg.generateUuid)();return this.connection.sendRequest(yt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new Er(this.connection,t))}else return Promise.resolve(new Nr)}};cn.ProgressFeature=Tg;var mc;(function(e){e.type=new yt.ProgressType})(mc||(mc={}));var hc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(mc.type,this._token,t)}};function _g(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new hc(e,n)}});var zd=S(Be=>{"use strict";var bg=Be&&Be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),vg=Be&&Be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Cg=Be&&Be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?Sg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Ig.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Be.ConfigurationFeature=Dg});var $d=S(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.WorkspaceFoldersFeature=void 0;var Gr=Z(),wg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Gr.Emitter,this.connection.onNotification(Gr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Gr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Gr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Ar.WorkspaceFoldersFeature=wg});var Qd=S(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.CallHierarchyFeature=void 0;var gc=Z(),Pg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(gc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=gc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=gc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};jr.CallHierarchyFeature=Pg});var yc=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.SemanticTokensBuilder=Tt.SemanticTokensDiff=Tt.SemanticTokensFeature=void 0;var Fr=Z(),Og=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Fr.SemanticTokensRefreshRequest.type),on:t=>{let n=Fr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Fr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Fr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Tt.SemanticTokensFeature=Og;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let b=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;b[this._dataLen++]=s,b[this._dataLen++]=a,b[this._dataLen++]=r,b[this._dataLen++]=o,b[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let g=t[5*a],d=t[5*b];if(g===d){let T=t[5*a+1],h=t[5*b+1];return T-h}return g-d});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ShowDocumentFeature=void 0;var Rg=Z(),kg=e=>class extends e{showDocument(t){return this.connection.sendRequest(Rg.ShowDocumentRequest.type,t)}};Hr.ShowDocumentFeature=kg});var Xd=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.FileOperationsFeature=void 0;var an=Z(),Mg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(an.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(an.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(an.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(an.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(an.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(an.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Wr.FileOperationsFeature=Mg});var Kd=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeFeature=void 0;var xg=Z(),qg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(xg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Ur.LinkedEditingRangeFeature=qg});var Yd=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.TypeHierarchyFeature=void 0;var Tc=Z(),Eg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Tc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Tc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Tc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.TypeHierarchyFeature=Eg});var Zd=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.InlineValueFeature=void 0;var Jd=Z(),Ng=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Jd.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Jd.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};zr.InlineValueFeature=Ng});var tf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.FoldingRangeFeature=void 0;var ef=Z(),Gg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(ef.FoldingRangeRefreshRequest.type),on:t=>{let n=ef.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};$r.FoldingRangeFeature=Gg});var nf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlayHintFeature=void 0;var _c=Z(),Ag=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(_c.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(_c.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(_c.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Qr.InlayHintFeature=Ag});var rf=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DiagnosticFeature=void 0;var Fn=Z(),jg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Vr.DiagnosticFeature=jg});var vc=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.TextDocuments=void 0;var Pt=Z(),bc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Pt.Emitter,this._onDidOpen=new Pt.Emitter,this._onDidClose=new Pt.Emitter,this._onDidSave=new Pt.Emitter,this._onWillSave=new Pt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Pt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Pt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Xr.TextDocuments=bc});var Sc=S(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.NotebookDocuments=un.NotebookSyncFeature=void 0;var Re=Z(),of=vc(),Fg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Re.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Re.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Re.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Re.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};un.NotebookSyncFeature=Fg;var Cc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Re.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Re.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Re.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ic=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof of.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new of.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Re.Emitter,this._onDidChange=new Re.Emitter,this._onDidSave=new Re.Emitter,this._onDidClose=new Re.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Cc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,b=o.change;b.metadata!==void 0&&(a=!0,i.metadata=b.metadata);let g=[],d=[],T=[],h=[];if(b.cells!==void 0){let M=b.cells;if(M.structure!==void 0){let f=M.structure.array;if(i.cells.splice(f.start,f.deleteCount,...f.cells!==void 0?f.cells:[]),M.structure.didOpen!==void 0)for(let m of M.structure.didOpen)await n.openTextDocument({textDocument:m}),g.push(m.uri);if(M.structure.didClose)for(let m of M.structure.didClose)await n.closeTextDocument({textDocument:m}),d.push(m.uri)}if(M.data!==void 0){let f=new Map(M.data.map(m=>[m.document,m]));for(let m=0;m<=i.cells.length;m++){let v=f.get(i.cells[m].document);if(v!==void 0){let x=i.cells.splice(m,1,v);if(T.push({old:x[0],new:v}),f.delete(v.document),f.size===0)break}}}if(M.textContent!==void 0)for(let f of M.textContent)await n.changeTextDocument({textDocument:f.document,contentChanges:f.changes}),h.push(f.document.uri)}this.updateCellMap(i);let I={notebookDocument:i};a&&(I.metadata={old:s,new:i.metadata});let q=[];for(let M of g)q.push(this.getNotebookCell(M));let N=[];for(let M of d)N.push(this.getNotebookCell(M));let B=[];for(let M of h)B.push(this.getNotebookCell(M));(q.length>0||N.length>0||T.length>0||B.length>0)&&(I.cells={added:q,removed:N,changed:{data:T,textContent:B}}),(I.metadata!==void 0||I.cells!==void 0)&&this._onDidChange.fire(I)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Re.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};un.NotebookDocuments=Ic});var sf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.MonikerFeature=void 0;var Lg=Z(),Hg=e=>class extends e{get moniker(){return{on:t=>{let n=Lg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.MonikerFeature=Hg});var cf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Wg=Z(),Ug=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Wg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=Ug});var uf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var af=Z(),Bg=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(af.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(af.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=Bg});var kc=S(U=>{"use strict";var zg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$g=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pf=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Pc;var Zr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Oc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(Dc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(Dc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(Dc)}},lf=(0,Yg.ShowDocumentFeature)((0,k.ProgressFeature)(Oc)),df;(function(e){function t(){return new eo}e.create=t})(df||(U.BulkRegistration=df={}));var eo=class{_registrations=[];_registered=new Set;add(t,n){let r=ke.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=wc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},ff;(function(e){function t(){return new Ln(void 0,[])}e.create=t})(ff||(U.BulkUnregistration=ff={}));var Ln=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=ke.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},to=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof eo?this.registerMany(t):t instanceof Ln?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=ke.string(n)?n:n.method,i=wc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=ke.string(t)?t:t.method,o=wc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Ln(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},mf=(0,ap.TextDocumentContentFeature)((0,Jg.FileOperationsFeature)((0,Vg.WorkspaceFoldersFeature)((0,Qg.ConfigurationFeature)(Rc)))),no=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=oo;var hf=(0,cp.InlineCompletionFeature)((0,np.FoldingRangeFeature)((0,sp.MonikerFeature)((0,op.DiagnosticFeature)((0,rp.InlayHintFeature)((0,tp.InlineValueFeature)((0,ep.TypeHierarchyFeature)((0,Zg.LinkedEditingRangeFeature)((0,Kg.SemanticTokensFeature)((0,Xg.CallHierarchyFeature)(oo)))))))))),io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=io;var gf=(0,ip.NotebookSyncFeature)(io);function yf(e,t){return function(n){return t(e(n))}}function Tf(e,t){return function(n){return t(e(n))}}function _f(e,t){return function(n){return t(e(n))}}function bf(e,t){return function(n){return t(e(n))}}function vf(e,t){return function(n){return t(e(n))}}function Cf(e,t){return function(n){return t(e(n))}}function If(e,t){return function(n){return t(e(n))}}function Sf(e,t){return function(n){return t(e(n))}}function up(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,yf),tracer:n(e.tracer,t.tracer,_f),telemetry:n(e.telemetry,t.telemetry,Tf),client:n(e.client,t.client,bf),window:n(e.window,t.window,vf),workspace:n(e.workspace,t.workspace,Cf),languages:n(e.languages,t.languages,If),notebooks:n(e.notebooks,t.notebooks,Sf)}}function lp(e,t,n){let r=n&&n.console?new(n.console(Zr)):new Zr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(no)):new no,s=n&&n.telemetry?new(n.telemetry(ro)):new ro,a=n&&n.client?new(n.client(to)):new to,b=n&&n.window?new(n.window(lf)):new lf,g=n&&n.workspace?new(n.workspace(mf)):new mf,d=n&&n.languages?new(n.languages(hf)):new hf,T=n&&n.notebooks?new(n.notebooks(gf)):new gf,h=[r,i,s,a,b,g,d,T];function I(f){return f instanceof Promise?f:ke.thenable(f)?new Promise((m,v)=>{f.then(x=>m(x),x=>v(x))}):Promise.resolve(f)}let q,N,B,M={listen:()=>o.listen(),sendRequest:(f,...m)=>o.sendRequest(ke.string(f)?f:f.method,...m),onRequest:(f,m)=>o.onRequest(f,m),sendNotification:(f,m)=>{let v=ke.string(f)?f:f.method;return o.sendNotification(v,m)},onNotification:(f,m)=>o.onNotification(f,m),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:f=>(N=f,{dispose:()=>{N=void 0}}),onInitialized:f=>o.onNotification(D.InitializedNotification.type,f),onShutdown:f=>(q=f,{dispose:()=>{q=void 0}}),onExit:f=>(B=f,{dispose:()=>{B=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return b},get workspace(){return g},get languages(){return d},get notebooks(){return T},onDidChangeConfiguration:f=>o.onNotification(D.DidChangeConfigurationNotification.type,f),onDidChangeWatchedFiles:f=>o.onNotification(D.DidChangeWatchedFilesNotification.type,f),__textDocumentSync:void 0,onDidOpenTextDocument:f=>o.onNotification(D.DidOpenTextDocumentNotification.type,f),onDidChangeTextDocument:f=>o.onNotification(D.DidChangeTextDocumentNotification.type,f),onDidCloseTextDocument:f=>o.onNotification(D.DidCloseTextDocumentNotification.type,f),onWillSaveTextDocument:f=>o.onNotification(D.WillSaveTextDocumentNotification.type,f),onWillSaveTextDocumentWaitUntil:f=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,f),onDidSaveTextDocument:f=>o.onNotification(D.DidSaveTextDocumentNotification.type,f),sendDiagnostics:f=>o.sendNotification(D.PublishDiagnosticsNotification.type,f),onHover:f=>o.onRequest(D.HoverRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onCompletion:f=>o.onRequest(D.CompletionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onCompletionResolve:f=>o.onRequest(D.CompletionResolveRequest.type,f),onSignatureHelp:f=>o.onRequest(D.SignatureHelpRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onDeclaration:f=>o.onRequest(D.DeclarationRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDefinition:f=>o.onRequest(D.DefinitionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onTypeDefinition:f=>o.onRequest(D.TypeDefinitionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onImplementation:f=>o.onRequest(D.ImplementationRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onReferences:f=>o.onRequest(D.ReferencesRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDocumentHighlight:f=>o.onRequest(D.DocumentHighlightRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDocumentSymbol:f=>o.onRequest(D.DocumentSymbolRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onWorkspaceSymbol:f=>o.onRequest(D.WorkspaceSymbolRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onWorkspaceSymbolResolve:f=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,f),onCodeAction:f=>o.onRequest(D.CodeActionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onCodeActionResolve:f=>o.onRequest(D.CodeActionResolveRequest.type,(m,v)=>f(m,v)),onCodeLens:f=>o.onRequest(D.CodeLensRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onCodeLensResolve:f=>o.onRequest(D.CodeLensResolveRequest.type,(m,v)=>f(m,v)),onDocumentFormatting:f=>o.onRequest(D.DocumentFormattingRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onDocumentRangeFormatting:f=>o.onRequest(D.DocumentRangeFormattingRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onDocumentOnTypeFormatting:f=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(m,v)=>f(m,v)),onRenameRequest:f=>o.onRequest(D.RenameRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onPrepareRename:f=>o.onRequest(D.PrepareRenameRequest.type,(m,v)=>f(m,v)),onDocumentLinks:f=>o.onRequest(D.DocumentLinkRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDocumentLinkResolve:f=>o.onRequest(D.DocumentLinkResolveRequest.type,(m,v)=>f(m,v)),onDocumentColor:f=>o.onRequest(D.DocumentColorRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onColorPresentation:f=>o.onRequest(D.ColorPresentationRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onFoldingRanges:f=>o.onRequest(D.FoldingRangeRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onSelectionRanges:f=>o.onRequest(D.SelectionRangeRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onExecuteCommand:f=>o.onRequest(D.ExecuteCommandRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),dispose:()=>o.dispose()};for(let f of h)f.attach(M);return o.onRequest(D.InitializeRequest.type,f=>{t.initialize(f),ke.string(f.trace)&&(i.trace=D.Trace.fromString(f.trace));for(let m of h)m.initialize(f.capabilities);if(N){let m=N(f,new D.CancellationTokenSource().token,(0,k.attachWorkDone)(o,f),void 0);return I(m).then(v=>{if(v instanceof D.ResponseError)return v;let x=v;x||(x={capabilities:{}});let A=x.capabilities;A||(A={},x.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=ke.number(M.__textDocumentSync)?M.__textDocumentSync:D.TextDocumentSyncKind.None:!ke.number(A.textDocumentSync)&&!ke.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=ke.number(M.__textDocumentSync)?M.__textDocumentSync:D.TextDocumentSyncKind.None);for(let E of h)E.fillServerCapabilities(A);return x})}else{let m={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let v of h)v.fillServerCapabilities(m.capabilities);return m}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,q)return q(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(B)return B()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,f=>{i.trace=D.Trace.fromString(f.value)}),M}});var Df=S(ye=>{"use strict";var dp=ye&&ye.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),fp=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Nc=ye&&ye.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Ae.normalize(n.join("/"))}function xc(){return process.platform==="win32"}function so(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let b=process.env,g=Object.create(null);Object.keys(b).forEach(d=>g[d]=b[d]),t&&Mc.existsSync(t)&&(g[o]?g[o]=t+Ae.delimiter+g[o]:g[o]=t,r&&r(`NODE_PATH value is: ${g[o]}`)),g.ELECTRON_RUN_AS_NODE="1";try{let d=(0,Gc.fork)("",[],{cwd:n,env:g,execArgv:["-e",i]});if(d.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}d.on("error",h=>{a(h)}),d.on("message",h=>{h.c==="r"&&(d.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let T={c:"rs",a:e};d.send(T)}catch(d){a(d)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};xc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Gc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?xc()?Ae.join(s,"node_modules"):Ae.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function gp(e){let t="yarn",n={encoding:"utf8"};xc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Gc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let b=JSON.parse(a);if(b.type==="log")return Ae.join(b.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Ec;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Mc.existsSync(__filename.toUpperCase())||!Mc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Ae.normalize(i).indexOf(Ae.normalize(o))===0:Ae.normalize(i).toLowerCase().indexOf(Ae.normalize(o).toLowerCase())===0}e.isParent=r})(Ec||(ye.FileSystem=Ec={}));function pp(e,t,n,r){return n?(Ae.isAbsolute(n)||(n=Ae.join(e,n)),so(t,n,n,r).then(o=>Ec.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>so(t,qc(r),e,r))):so(t,qc(r),e,r)}});var Of=S(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var wf=require("util"),Ze=Ve(),Ac=class e extends Ze.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new wf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},jc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),Ze.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),Ze.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),Ze.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),Ze.Disposable.create(()=>this.stream.off("data",t))}},Fc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),Ze.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),Ze.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),Ze.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},Pf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Ac(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new wf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new jc(e),asWritableStream:e=>new Fc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Lc(){return Pf}(function(e){function t(){Ze.RAL.install(Pf)}e.install=t})(Lc||(Lc={}));Hc.default=Lc});var Qc=S(G=>{"use strict";var kf=G&&G.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),yp=G&&G.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$c=G&&G.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),we.Disposable.create(()=>this.process.off("message",t))}};G.IPCMessageReader=Wc;var Uc=class extends we.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.IPCMessageWriter=Uc;var Bc=class extends we.AbstractMessageReader{onData;constructor(t){super(),this.onData=new we.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};G.PortMessageReader=Bc;var zc=class extends we.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.PortMessageWriter=zc;var Ot=class extends we.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Hn.default)().stream.asReadableStream(t),n)}};G.SocketMessageReader=Ot;var Rt=class extends we.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};G.SocketMessageWriter=Rt;var co=class extends we.ReadableStreamMessageReader{constructor(t,n){super((0,Hn.default)().stream.asReadableStream(t),n)}};G.StreamMessageReader=co;var ao=class extends we.WriteableStreamMessageWriter{constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n)}};G.StreamMessageWriter=ao;var Ip=process.env.XDG_RUNTIME_DIR,Sp=new Map([["linux",107],["darwin",102]]);function Dp(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Rf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Cp.realpathSync(Ip??vp.tmpdir()),r=Sp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Rf.randomBytes)(Math.floor(e/2)).toString("hex");return bp.join(n,`lsp-${o}.sock`)}function wp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Ot(a,t),new Rt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Pp(e,t="utf-8"){let n=(0,uo.createConnection)(e);return[new Ot(n,t),new Rt(n,t)]}function Op(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Ot(a,t),new Rt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Rp(e,t="utf-8"){let n=(0,uo.createConnection)(e,"127.0.0.1");return[new Ot(n,t),new Rt(n,t)]}function kp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Mp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function xp(e,t,n,r){n||(n=we.NullLogger);let o=kp(e)?new co(e):e,i=Mp(t)?new ao(t):t;return we.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,we.createMessageConnection)(o,i,n,r)}});var Vc=S(et=>{"use strict";var qp=et&&et.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Mf=et&&et.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&qp(t,e,n)};Object.defineProperty(et,"__esModule",{value:!0});et.createProtocolConnection=Np;var Ep=Qc();Mf(Qc(),et);Mf(Z(),et);function Np(e,t,n,r){return(0,Ep.createMessageConnection)(e,t,n,r)}});var Xc=S(me=>{"use strict";var Gp=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qf=me&&me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Gp(t,e,n)};Object.defineProperty(me,"__esModule",{value:!0});me.ProposedFeatures=me.NotebookDocuments=me.TextDocuments=me.SemanticTokensBuilder=void 0;var Ap=yc();Object.defineProperty(me,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Ap.SemanticTokensBuilder}});qf(Z(),me);var jp=vc();Object.defineProperty(me,"TextDocuments",{enumerable:!0,get:function(){return jp.TextDocuments}});var Fp=Sc();Object.defineProperty(me,"NotebookDocuments",{enumerable:!0,get:function(){return Fp.NotebookDocuments}});qf(kc(),me);var xf;(function(e){e.all={__brand:"features"}})(xf||(me.ProposedFeatures=xf={}))});var Yc=S(Te=>{"use strict";var Af=Te&&Te.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lp=Te&&Te.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jf=Te&&Te.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{lo(),process.exit(ln?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Kc.number(t)&&Lf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(ln?0:1)}},3e3)},get shutdownReceived(){return ln},set shutdownReceived(e){ln=e},exit:e=>{lo(),process.exit(e)}};function Bp(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),kt.ConnectionStrategy.is(e)||kt.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),zp(i,s,a,o)}function zp(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,b,g=process.argv.slice(2);for(let d=0;d{lo(),process.exit(ln?0:1)}),a.on("close",()=>{lo(),process.exit(ln?0:1)})}let s=a=>{let b=(0,kt.createProtocolConnection)(e,t,a,n);return o&&$p(a),b};return(0,Hp.createConnection)(s,Up,r)}function $p(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Ef.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Ef.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Bf={};Sa(Bf,{TextDocument:()=>Jc});function Zc(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);Zc(r,t),Zc(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Qp(e){let t=Uf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var fo,Jc,zf=Ia(()=>{"use strict";fo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Uf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),b=Math.max(o.end.line,0),g=this._lineOffsets,d=Hf(r.text,!1,i);if(b-a===d.length)for(let h=0,I=d.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Wf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new fo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof fo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=Zc(i.map(Qp),(d,T)=>{let h=d.range.start.line-T.range.start.line;return h===0?d.range.start.character-T.range.start.character:h}),b=0,g=[];for(let d of a){let T=o.offsetAt(d.range.start);if(Tb&&g.push(s.substring(b,T)),d.newText.length&&g.push(d.newText),b=o.offsetAt(d.range.end)}return g.push(s.substr(b)),g.join("")}e.applyEdits=r})(Jc||(Jc={}))});var Un=S(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.DATATYPE_SET=he.KEYWORD_SET=he.PUNCTUATION=he.OPERATORS=he.DATATYPES=he.KEYWORDS=void 0;he.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];he.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];he.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];he.PUNCTUATION=["(",")","[","]",";",",",":","."];he.KEYWORD_SET=new Set(he.KEYWORDS);he.DATATYPE_SET=new Set(he.DATATYPES)});var Mt=S(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.TokenKind=void 0;var $f;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})($f||(mo.TokenKind=$f={}))});var po=S(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.tokenize=Kp;var go=Un(),Pe=Mt();function Vp(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function Qf(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function ho(e){return e!==void 0&&/[0-9]/.test(e)}function Xp(e){let t=e.toUpperCase();return go.DATATYPE_SET.has(t)?Pe.TokenKind.Datatype:go.KEYWORD_SET.has(t)?Pe.TokenKind.Keyword:Pe.TokenKind.Identifier}function Kp(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=g=>{for(;n{let T=n,h=i();s(d),t.push({kind:g,lexeme:e.slice(T,d),span:{start:T,end:d},range:{start:h,end:i()}})};for(;n",n)||e.startsWith("{<",n))&&(q===-1||q>I);a(Pe.TokenKind.Comment,N?I:q===-1?e.length:q+1);continue}if(g==="'"){let h=n+1;for(;he.startsWith(h,n));if(d!==void 0){a(Pe.TokenKind.Operator,n+d.length);continue}if(go.PUNCTUATION.includes(g)){a(Pe.TokenKind.Punctuation,n+1);continue}let T=e.codePointAt(n);a(Pe.TokenKind.Unknown,n+(T!==void 0&&T>65535?2:1))}let b=i();return t.push({kind:Pe.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:b,end:{...b}}}),t}});var yo=S(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.positionAt=na;Bn.offsetAt=Jp;Bn.sourceRange=Zp;function ta(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Vf(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function Xf(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function Kc(e,t){Jc(e,t);let n=Hf(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=jp(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function Lp(e,t){if(Jc(e,t.start),Jc(e,t.end),t.end{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.parseQuickScript=$p;var Hp=Wn(),Zc=po(),bt=Mt(),Wp=go();function Up(e){return e.kind===bt.TokenKind.Whitespace||e.kind===bt.TokenKind.Newline||e.kind===bt.TokenKind.Comment||e.kind===bt.TokenKind.EOF}function xt(e){return e?.kind===bt.TokenKind.Keyword?e.lexeme.toUpperCase():void 0}function Wf(e,t,n=t){return(0,Zc.sourceRange)(e,{start:t.span.start,end:n.span.end})}function yo(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function Bp(e){switch(e){case"DIM":return"dim";case"CALL":return"call";case"IF":return"if";case"ELSE":return"else";case"ENDIF":return"endif";case"FOR":return"for";case"NEXT":return"next";case"WHILE":return"while";default:return"unknown"}}function zp(e,t){return e.filter(n=>n.range.start.line===t&&!Up(n))}function $p(e){let t=(0,Wp.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=[],o=[],i=[],s=[],a=[],h;for(let b=0;bm.kind===bt.TokenKind.Comment&&m.range.end.line>m.range.start.line&&m.range.start.line<=b&&m.range.end.line>=b),N=a.length,A=!1,B=g.map(xt).find(m=>m!==void 0);(B==="ELSE"||B==="ENDIF"||B==="NEXT")&&(N=Math.max(0,N-1),A=!0),h!==void 0&&(N=h.baseDepth+2),s.push({line:b,indentDepth:N,preserveIndent:D});for(let m=0;mFe>G&&xt(ot)==="AS"),hn=se>=0?g[se+1]:void 0;for(let ot of g.slice(G+1,se>=0?se:void 0))ot.kind===bt.TokenKind.Identifier&&(r.push({...rt,name:ot.lexeme,nameRange:ot.range,datatype:hn?.lexeme,datatypeRange:hn?.range}),mn=!0)}else if(v==="CALL"){let se=g[G+1];se?.kind===bt.TokenKind.Identifier&&(rt.name=se.lexeme,rt.nameRange=se.range)}mn||r.push(rt)}let x=xt(g[m-1]);if(!((v==="FOR"||v==="WHILE")&&x==="EXIT")){if(v==="IF"||v==="FOR"||v==="WHILE"){let G=a[a.length-1]?.block,q=Wf(e,f),be={id:o.length,kind:v.toLowerCase(),parentId:G?.id,childIds:[],...q,bodyRange:{start:f.range.end,end:f.range.end},bodySpan:{start:f.span.end,end:f.span.end},opener:f.range};o.push(be),G?.childIds.push(be.id),a.push({block:be,opener:f,hasElse:!1});continue}if(v==="ELSE"){let G=a[a.length-1];G?.block.kind!=="if"?i.push(yo("invalid-nesting","ELSE has no matching IF.",f)):G.hasElse?i.push(yo("duplicate-else","IF block has more than one ELSE.",f)):(G.hasElse=!0,G.block.middle=f.range);continue}if(v==="ENDIF"||v==="NEXT"){let G=v==="ENDIF"?["if"]:["for","while"],q=a[a.length-1];q===void 0||!G.includes(q.block.kind)?i.push(yo("invalid-nesting",`${v} has no matching ${v==="ENDIF"?"IF":"FOR or WHILE"}.`,f)):(a.pop(),q.block.closer=f.range,q.block.span.end=f.span.end,q.block.range.end=f.range.end,q.block.bodySpan.end=f.span.start,q.block.bodyRange.end=f.range.start)}}}let M=g.map(xt);h!==void 0&&M.includes("THEN")?h=void 0:!A&&M.includes("IF")&&!M.includes("THEN")&&["AND","OR","NOT"].includes(M[M.length-1]??"")&&(h={baseDepth:Math.max(0,a.length-1)})}for(let b of a){let g=b.block.kind==="if"?"ENDIF":"NEXT";i.push(yo(`missing-${g.toLowerCase()}`,`${b.block.kind.toUpperCase()} block is missing ${g}.`,b.opener)),b.block.span.end=e.length,b.block.range.end=(0,Zc.sourceRange)(e,{start:e.length,end:e.length}).range.end,b.block.bodySpan.end=e.length,b.block.bodyRange.end=b.block.range.end}let l=new Set;for(let b of r.filter(g=>g.kind==="dim"&&g.datatype!==void 0))if(!Hp.DATATYPE_SET.has(b.datatype.toUpperCase())){let g=b.datatypeRange??b.range,D=`${g.start.line}:${g.start.character}`;if(l.has(D))continue;l.add(D),i.push({code:"unknown-datatype",message:`Unknown datatype '${b.datatype}'.`,severity:"error",range:g})}let _=(0,Zc.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:r,blocks:o,diagnostics:i,lines:s,..._}}});var Vf=I(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=$f;zn.formatQuickScriptStructure=Qf;zn.formatQuickScript=Kp;var L=Mt(),Bf=go(),Qp=To();function Uf(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function na(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function zf(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ta(e){Bn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function Vp(e,t){if(e[t].lexeme!=="-"||zf(e,t)?.kind!==L.TokenKind.Number)return!1;let n=na(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Xp(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function $f(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Bf.tokenize)(r);if(o.some(h=>h.kind===L.TokenKind.String&&!h.lexeme.endsWith('"'))||o.some(h=>h.kind===L.TokenKind.Unknown&&h.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1;for(let h=0;h=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function Jp(e){let t=(0,Bf.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function dn(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function Qf(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Qp.parseQuickScript)(r),i=r.split(n),s=[],a=Yp(t),h=0,l=0,_=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let g=0;g")||dn(A,t.regionBlockCodeBegin??"{region"))&&(h+=1)}let b=s.join(n);return{text:b,changed:b!==e,diagnostics:o.diagnostics}}function Kp(e,t={}){let n=$f(e,t);return Qf(n.text,t)}});var ra=I(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.KNOWN_FUNCTIONS=void 0;_o.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Kf=I($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.completions=ey;$n.hoverAt=ty;$n.documentSymbols=ny;var Jf=ra(),Xf=Wn(),Yf=Mt();function Zp(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of Xf.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of Xf.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of Jf.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function ty(e,t){let n=e.document.tokens.find(i=>Zp(i.range,t));if(n===void 0)return;if(n.kind===Yf.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Yf.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=Jf.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function ny(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var tm=I(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.analyzeQuickScript=iy;Qn.definitionAt=sy;Qn.referencesAt=cy;var ry=To(),Zf=po(),qt=Mt();function em(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![qt.TokenKind.Whitespace,qt.TokenKind.Newline,qt.TokenKind.Comment].includes(e[n].kind))return e[n]}function iy(e){let t=(0,ry.parseQuickScript)(e),n=[...t.diagnostics],r=[],o=new Map;for(let h of t.statements.filter(l=>l.kind==="dim"&&l.name!==void 0&&l.nameRange!==void 0)){let l=h.name.toUpperCase();if(o.get(l)!==void 0){n.push({code:"duplicate-local",message:`Local variable '${h.name}' is already declared.`,severity:"error",range:h.nameRange});continue}let b={id:r.length,name:h.name,kind:"variable",range:h.range,selectionRange:h.nameRange,datatype:h.datatype,scopeId:0};r.push(b),o.set(l,b)}let i=new Map;for(let h of r)i.set((0,Zf.offsetAt)(e,h.selectionRange.start),h);let s=new Map;for(let h of t.statements.filter(l=>l.kind==="call"&&l.name!==void 0&&l.nameRange!==void 0))s.set((0,Zf.offsetAt)(e,h.nameRange.start),h.name);let a=[];for(let h=0;h")continue;let g=o.get(l.lexeme.toUpperCase()),D=s.get(l.span.start);if(g!==void 0||D!==void 0){let N=t.tokens.slice(h+1).find(B=>![qt.TokenKind.Whitespace,qt.TokenKind.Newline,qt.TokenKind.Comment].includes(B.kind)),A=D!==void 0?"call":N?.lexeme==="="?"write":"read";a.push({name:l.lexeme,kind:A,range:l.range,declarationId:g?.id})}}return{document:t,scopes:[{id:0,kind:"document",range:t.range,symbolIds:r.map(h=>h.id)}],symbols:r,references:a,diagnostics:n}}function sy(e,t){let n=e.references.find(r=>em(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function cy(e,t,n=!0){let r=e.references.find(o=>em(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var nm=I(Te=>{"use strict";var ay=Te&&Te.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),nt=Te&&Te.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ay(t,e,n)};Object.defineProperty(Te,"__esModule",{value:!0});nt(Wn(),Te);nt(Vf(),Te);nt(ra(),Te);nt(Kf(),Te);nt(To(),Te);nt(tm(),Te);nt(po(),Te);nt(Mt(),Te);nt(go(),Te)});var rm=I(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.serverCapabilities=uy;ze.diagnosticsFor=dy;ze.formattingEdits=fy;ze.symbolsFor=my;ze.definitionFor=hy;ze.referencesFor=gy;ze.completionsFor=py;ze.hoverFor=yy;var ge=Qc(),Me=nm();function uy(){return{capabilities:{textDocumentSync:ge.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function ly(e){switch(e){case"keyword":return ge.CompletionItemKind.Keyword;case"datatype":return ge.CompletionItemKind.TypeParameter;case"variable":return ge.CompletionItemKind.Variable;case"call-target":return ge.CompletionItemKind.Method;default:return ge.CompletionItemKind.Function}}function dy(e){return(0,Me.analyzeQuickScript)(e.getText()).diagnostics.map(t=>({code:t.code,message:t.message,range:t.range,severity:t.severity==="error"?ge.DiagnosticSeverity.Error:ge.DiagnosticSeverity.Warning,source:"intouch-language"}))}function fy(e,t){let n=(0,Me.formatQuickScript)(e.getText(),t);return n.changed?[ge.TextEdit.replace(ge.Range.create(ge.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function my(e){let t=n=>ge.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ge.SymbolKind.Variable:ge.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Me.documentSymbols)((0,Me.analyzeQuickScript)(e.getText())).map(t)}function hy(e,t){let n=(0,Me.definitionAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ge.Location.create(e.uri,n)}function gy(e,t,n){return(0,Me.referencesAt)((0,Me.analyzeQuickScript)(e.getText()),t,n).map(r=>ge.Location.create(e.uri,r))}function py(e){return(0,Me.completions)((0,Me.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:ly(t.kind),detail:t.detail}))}function yy(e,t){let n=(0,Me.hoverAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** +`)&&t.push(n+1);return t}function Yp(e,t,n){if(n+1>=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function na(e,t){ta(e,t);let n=Xf(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=Yp(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function Zp(e,t){if(ta(e,t.start),ta(e,t.end),t.end{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.parseQuickScript=iy;var ey=Un(),ra=yo(),_t=Mt(),ty=po();function ny(e){return e.kind===_t.TokenKind.Whitespace||e.kind===_t.TokenKind.Newline||e.kind===_t.TokenKind.Comment||e.kind===_t.TokenKind.EOF}function xt(e){return e?.kind===_t.TokenKind.Keyword?e.lexeme.toUpperCase():void 0}function Kf(e,t,n=t){return(0,ra.sourceRange)(e,{start:t.span.start,end:n.span.end})}function To(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function ry(e){switch(e){case"DIM":return"dim";case"CALL":return"call";case"IF":return"if";case"ELSE":return"else";case"ENDIF":return"endif";case"FOR":return"for";case"NEXT":return"next";case"WHILE":return"while";default:return"unknown"}}function oy(e,t){return e.filter(n=>n.range.start.line===t&&!ny(n))}function iy(e){let t=(0,ty.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=[],o=[],i=[],s=[],a=[],b;for(let T=0;Tf.kind===_t.TokenKind.Comment&&f.range.end.line>f.range.start.line&&f.range.start.line<=T&&f.range.end.line>=T),q=a.length,N=!1,B=h.map(xt).find(f=>f!==void 0);(B==="ELSE"||B==="ENDIF"||B==="NEXT")&&(q=Math.max(0,q-1),N=!0),b!==void 0&&(q=b.baseDepth+2),s.push({line:T,indentDepth:q,preserveIndent:I});for(let f=0;fFe>A&&xt(rt)==="AS"),gn=se>=0?h[se+1]:void 0;for(let rt of h.slice(A+1,se>=0?se:void 0))rt.kind===_t.TokenKind.Identifier&&(r.push({...nt,name:rt.lexeme,nameRange:rt.range,datatype:gn?.lexeme,datatypeRange:gn?.range}),hn=!0)}else if(v==="CALL"){let se=h[A+1];se?.kind===_t.TokenKind.Identifier&&(nt.name=se.lexeme,nt.nameRange=se.range)}hn||r.push(nt)}let x=xt(h[f-1]);if(!((v==="FOR"||v==="WHILE")&&x==="EXIT")){if(v==="IF"||v==="FOR"||v==="WHILE"){let A=a[a.length-1]?.block,E=Kf(e,m),be={id:o.length,kind:v.toLowerCase(),parentId:A?.id,childIds:[],...E,bodyRange:{start:m.range.end,end:m.range.end},bodySpan:{start:m.span.end,end:m.span.end},opener:m.range};o.push(be),A?.childIds.push(be.id),a.push({block:be,opener:m,hasElse:!1});continue}if(v==="ELSE"){let A=a[a.length-1];A?.block.kind!=="if"?i.push(To("invalid-nesting","ELSE has no matching IF.",m)):A.hasElse?i.push(To("duplicate-else","IF block has more than one ELSE.",m)):(A.hasElse=!0,A.block.middle=m.range);continue}if(v==="ENDIF"||v==="NEXT"){let A=v==="ENDIF"?["if"]:["for","while"],E=a[a.length-1];E===void 0||!A.includes(E.block.kind)?i.push(To("invalid-nesting",`${v} has no matching ${v==="ENDIF"?"IF":"FOR or WHILE"}.`,m)):(a.pop(),E.block.closer=m.range,E.block.span.end=m.span.end,E.block.range.end=m.range.end,E.block.bodySpan.end=m.span.start,E.block.bodyRange.end=m.range.start)}}}let M=h.map(xt);b!==void 0&&M.includes("THEN")?b=void 0:!N&&M.includes("IF")&&!M.includes("THEN")&&["AND","OR","NOT"].includes(M[M.length-1]??"")&&(b={baseDepth:Math.max(0,a.length-1)})}for(let T of a){let h=T.block.kind==="if"?"ENDIF":"NEXT";i.push(To(`missing-${h.toLowerCase()}`,`${T.block.kind.toUpperCase()} block is missing ${h}.`,T.opener)),T.block.span.end=e.length,T.block.range.end=(0,ra.sourceRange)(e,{start:e.length,end:e.length}).range.end,T.block.bodySpan.end=e.length,T.block.bodyRange.end=T.block.range.end}let g=new Set;for(let T of r.filter(h=>h.kind==="dim"&&h.datatype!==void 0))if(!ey.DATATYPE_SET.has(T.datatype.toUpperCase())){let h=T.datatypeRange??T.range,I=`${h.start.line}:${h.start.character}`;if(g.has(I))continue;g.add(I),i.push({code:"unknown-datatype",message:`Unknown datatype '${T.datatype}'.`,severity:"error",range:h})}let d=(0,ra.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:r,blocks:o,diagnostics:i,lines:s,...d}}});var nm=S($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.formatQuickScriptLexically=em;$n.formatQuickScriptStructure=tm;$n.formatQuickScript=dy;var L=Mt(),Jf=po(),sy=_o();function Yf(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function sa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function Zf(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ia(e){zn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function cy(e,t){if(e[t].lexeme!=="-"||Zf(e,t)?.kind!==L.TokenKind.Number)return!1;let n=sa(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function ay(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function em(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Jf.tokenize)(r);if(o.some(g=>g.kind===L.TokenKind.String&&!g.lexeme.endsWith('"'))||o.some(g=>g.kind===L.TokenKind.Unknown&&g.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let g=0;g"&&(a=!0),h!==void 0&&(h.kind===L.TokenKind.Identifier||h.kind===L.TokenKind.Keyword||h.kind===L.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(d.lexeme)}let b=ay(i.join(""),n);return{text:b,changed:b!==e}}function uy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function ly(e){let t=(0,Jf.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function dn(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function tm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,sy.parseQuickScript)(r),i=r.split(n),s=[],a=uy(t),b=0,g=0,d=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let h=0;h")||dn(N,t.regionBlockCodeBegin??"{region"))&&(b+=1)}let T=s.join(n);return{text:T,changed:T!==e,diagnostics:o.diagnostics}}function dy(e,t={}){let n=em(e,t);return tm(n.text,t)}});var vo=S(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.KNOWN_FUNCTIONS=void 0;bo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var sm=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.completions=my;Qn.hoverAt=hy;Qn.documentSymbols=gy;var im=vo(),rm=Un(),om=Mt();function fy(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of rm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of rm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of im.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function hy(e,t){let n=e.document.tokens.find(i=>fy(i.range,t));if(n===void 0)return;if(n.kind===om.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===om.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=im.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function gy(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var lm=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.quickFunctionNames=um;fn.analyzeQuickScript=by;fn.definitionAt=vy;fn.referencesAt=Cy;var py=_o(),yy=vo(),cm=yo(),qt=Mt();function am(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![qt.TokenKind.Whitespace,qt.TokenKind.Newline,qt.TokenKind.Comment].includes(e[n].kind))return e[n]}function _y(e,t){for(let n=t+1;nd.name.toUpperCase()));for(let d of um(e))s.add(d.toUpperCase());for(let d of t.knownFunctionNames??[])s.add(d.toUpperCase());for(let d of n.statements.filter(T=>T.kind==="dim"&&T.name!==void 0&&T.nameRange!==void 0)){let T=d.name.toUpperCase();if(i.get(T)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${d.name}' is already declared.`,severity:"error",range:d.nameRange});continue}let I={id:o.length,name:d.name,kind:"variable",range:d.range,selectionRange:d.nameRange,datatype:d.datatype,scopeId:0};o.push(I),i.set(T,I)}let a=new Map;for(let d of o)a.set((0,cm.offsetAt)(e,d.selectionRange.start),d);let b=new Map;for(let d of n.statements.filter(T=>T.kind==="call"&&T.name!==void 0&&T.nameRange!==void 0))b.set((0,cm.offsetAt)(e,d.nameRange.start),d.name);let g=[];for(let d=0;d")continue;let q=i.get(T.lexeme.toUpperCase()),N=b.get(T.span.start),B=_y(n.tokens,d);if((N!==void 0||B?.lexeme==="(")&&!s.has(T.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${T.lexeme}'.`,severity:"warning",range:T.range}),q!==void 0||N!==void 0){let f=N!==void 0?"call":B?.lexeme==="="?"write":"read";g.push({name:T.lexeme,kind:f,range:T.range,declarationId:q?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(d=>d.id)}],symbols:o,references:g,diagnostics:r}}function vy(e,t){let n=e.references.find(r=>am(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Cy(e,t,n=!0){let r=e.references.find(o=>am(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var ca=S(_e=>{"use strict";var Iy=_e&&_e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),tt=_e&&_e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Iy(t,e,n)};Object.defineProperty(_e,"__esModule",{value:!0});tt(Un(),_e);tt(nm(),_e);tt(vo(),_e);tt(sm(),_e);tt(_o(),_e);tt(lm(),_e);tt(yo(),_e);tt(Mt(),_e);tt(po(),_e)});var dm=S(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.serverCapabilities=Sy;ze.diagnosticsFor=wy;ze.formattingEdits=Py;ze.symbolsFor=Oy;ze.definitionFor=Ry;ze.referencesFor=ky;ze.completionsFor=My;ze.hoverFor=xy;var ge=Yc(),Me=ca();function Sy(){return{capabilities:{textDocumentSync:ge.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Dy(e){switch(e){case"keyword":return ge.CompletionItemKind.Keyword;case"datatype":return ge.CompletionItemKind.TypeParameter;case"variable":return ge.CompletionItemKind.Variable;case"call-target":return ge.CompletionItemKind.Method;default:return ge.CompletionItemKind.Function}}function wy(e,t){return(0,Me.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?ge.DiagnosticSeverity.Error:ge.DiagnosticSeverity.Warning,source:"intouch-language"}))}function Py(e,t){let n=(0,Me.formatQuickScript)(e.getText(),t);return n.changed?[ge.TextEdit.replace(ge.Range.create(ge.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function Oy(e){let t=n=>ge.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ge.SymbolKind.Variable:ge.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Me.documentSymbols)((0,Me.analyzeQuickScript)(e.getText())).map(t)}function Ry(e,t){let n=(0,Me.definitionAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ge.Location.create(e.uri,n)}function ky(e,t,n){return(0,Me.referencesAt)((0,Me.analyzeQuickScript)(e.getText()),t,n).map(r=>ge.Location.create(e.uri,r))}function My(e){return(0,Me.completions)((0,Me.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Dy(t.kind),detail:t.detail}))}function xy(e,t){let n=(0,Me.hoverAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** -${n.detail}`},range:n.range}}});var im=I(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.readSettings=Ty;function Et(e){return typeof e=="object"&&e!==null?e:{}}function om(e){return typeof e=="number"?e:void 0}function oa(e){return typeof e=="boolean"?e:void 0}function fn(e){return typeof e=="string"?e:void 0}function Ty(e){let t=Et(e),n=t.VBI===void 0?t:Et(t.VBI),r=Et(n.formatter),o=Et(r.EmptyLine),i=Et(r.BC),s=Et(r.Region),a=Et(r.Misc);return{allowedNumberOfEmptyLines:om(o.allowedNumberOfEmptyLines),removeEmptyLines:oa(o.RemoveEmptyLines),removeEmptyLinesInComments:oa(o.EmptyLinesAlsoInComment),blockCodeBegin:fn(i.BlockCodeBegin),blockCodeEnd:fn(i.BlockCodeEnd),blockCodeExclude:fn(i.BlockCodeExclude),regionBlockCodeBegin:fn(s.BlockCodeBegin),regionBlockCodeEnd:fn(s.BlockCodeEnd),regionBlockCodeExclude:fn(s.BlockCodeExclude),insertSpaces:oa(a.ReplaceTabToSpaces),indentSize:om(a.IndentSize)}}});Object.defineProperty(exports,"__esModule",{value:!0});var sm=Qc(),_y=(Af(),Vn(Nf)),by=zc(),$e=rm(),vy=im(),_e=(0,sm.createConnection)(sm.ProposedFeatures.all),je=new by.TextDocuments(_y.TextDocument),cm={};_e.onInitialize(()=>(0,$e.serverCapabilities)());_e.onDidChangeConfiguration(e=>{cm=(0,vy.readSettings)(e.settings);for(let t of je.all())_e.sendDiagnostics({uri:t.uri,diagnostics:(0,$e.diagnosticsFor)(t)})});je.onDidOpen(e=>_e.sendDiagnostics({uri:e.document.uri,diagnostics:(0,$e.diagnosticsFor)(e.document)}));je.onDidChangeContent(e=>_e.sendDiagnostics({uri:e.document.uri,diagnostics:(0,$e.diagnosticsFor)(e.document)}));je.onDidClose(e=>_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}));_e.onDocumentFormatting(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.formattingEdits)(t,{...cm,insertSpaces:e.options.insertSpaces,indentSize:e.options.tabSize})});_e.onDocumentSymbol(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.symbolsFor)(t)});_e.onDefinition(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,$e.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,$e.completionsFor)(t)});_e.onHover(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,$e.hoverFor)(t,e.position)});_e.onShutdown(()=>{});je.listen(_e);_e.listen(); +${n.detail}`},range:n.range}}});var mm=S(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.readSettings=qy;function Et(e){return typeof e=="object"&&e!==null?e:{}}function fm(e){return typeof e=="number"?e:void 0}function aa(e){return typeof e=="boolean"?e:void 0}function mn(e){return typeof e=="string"?e:void 0}function qy(e){let t=Et(e),n=t.VBI===void 0?t:Et(t.VBI),r=Et(n.formatter),o=Et(r.EmptyLine),i=Et(r.BC),s=Et(r.Region),a=Et(r.Misc);return{allowedNumberOfEmptyLines:fm(o.allowedNumberOfEmptyLines),removeEmptyLines:aa(o.RemoveEmptyLines),removeEmptyLinesInComments:aa(o.EmptyLinesAlsoInComment),blockCodeBegin:mn(i.BlockCodeBegin),blockCodeEnd:mn(i.BlockCodeEnd),blockCodeExclude:mn(i.BlockCodeExclude),regionBlockCodeBegin:mn(s.BlockCodeBegin),regionBlockCodeEnd:mn(s.BlockCodeEnd),regionBlockCodeExclude:mn(s.BlockCodeExclude),insertSpaces:aa(a.ReplaceTabToSpaces),indentSize:fm(a.IndentSize)}}});var gm=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.WorkspaceFunctionIndex=void 0;var hm=ca(),la=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,hm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,hm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};Co.WorkspaceFunctionIndex=la});var Ey=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ny=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gy=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(da=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,Ly.fileURLToPath)(n)),bm(da),(0,bt.serverCapabilities)()));pe.onInitialized(async()=>{let e=await pe.workspace.getConfiguration({section:"VBI"});fa=(0,Tm.readSettings)({VBI:e}),Io()});pe.onDidChangeConfiguration(e=>{fa=(0,Tm.readSettings)(e.settings),Io()});pe.onDidChangeWatchedFiles(()=>{bm(da)});je.onDidOpen(e=>{Vn.updateDocument(e.document),ma(e.document)});je.onDidChangeContent(e=>{Vn.updateDocument(e.document),ma(e.document)});je.onDidClose(e=>{Vn.removeDocument(e.document.uri),pe.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Io()});pe.onDocumentFormatting(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.formattingEdits)(t,{...fa,insertSpaces:e.options.insertSpaces,indentSize:e.options.tabSize})});pe.onDocumentSymbol(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.symbolsFor)(t)});pe.onDefinition(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,bt.definitionFor)(t,e.position)});pe.onReferences(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.referencesFor)(t,e.position,e.context.includeDeclaration)});pe.onCompletion(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.completionsFor)(t)});pe.onHover(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,bt.hoverFor)(t,e.position)});pe.onShutdown(()=>{});je.listen(pe);pe.listen(); //# sourceMappingURL=server.js.map diff --git a/packages/core/src/formatter.ts b/packages/core/src/formatter.ts index 8009258..2d5c23b 100644 --- a/packages/core/src/formatter.ts +++ b/packages/core/src/formatter.ts @@ -91,11 +91,20 @@ export function formatQuickScriptLexically(source: string, options: FormatOption const output: string[] = []; let skipWhitespace = false; + let preserveStandaloneDirectiveContent = false; for (let index = 0; index < tokens.length; index += 1) { const token = tokens[index]; if (token.kind === TokenKind.EOF) { break; } + const standaloneDirective = token.kind === TokenKind.Comment ? token.lexeme.trim() : undefined; + if (standaloneDirective === '{<' || standaloneDirective === '{<}') { + preserveStandaloneDirectiveContent = false; + } + if (preserveStandaloneDirectiveContent) { + output.push(token.lexeme); + continue; + } if (token.kind === TokenKind.Newline) { trimHorizontalWhitespace(output); output.push(lineEnding); @@ -169,6 +178,9 @@ export function formatQuickScriptLexically(source: string, options: FormatOption appendSingleSpace(output); } output.push(token.lexeme); + if (standaloneDirective === '{>') { + preserveStandaloneDirectiveContent = true; + } if (next !== undefined && (next.kind === TokenKind.Identifier || next.kind === TokenKind.Keyword || next.kind === TokenKind.Datatype)) { output.push(' '); skipWhitespace = true; diff --git a/packages/core/src/generatedFunctionCatalog.ts b/packages/core/src/generatedFunctionCatalog.ts index 669a9d6..8679f99 100644 --- a/packages/core/src/generatedFunctionCatalog.ts +++ b/packages/core/src/generatedFunctionCatalog.ts @@ -2113,6 +2113,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "xHerDebug", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, { "name": "xHerGATEWAYSettings", "category": "Hermes helper", diff --git a/packages/core/src/semantics.ts b/packages/core/src/semantics.ts index 22d08b5..a8c6412 100644 --- a/packages/core/src/semantics.ts +++ b/packages/core/src/semantics.ts @@ -1,4 +1,5 @@ import { CoreDiagnostic, QuickScriptDocument, parseQuickScript } from './parser'; +import { KNOWN_FUNCTIONS } from './generatedFunctionCatalog'; import { Position, Range, offsetAt } from './source'; import { Token, TokenKind } from './token'; @@ -37,6 +38,11 @@ export interface SemanticModel { diagnostics: CoreDiagnostic[]; } +export interface AnalyzeOptions { + /** Additional QuickFunctions resolved by the language-server workspace index. */ + knownFunctionNames?: Iterable; +} + function contains(range: Range, position: Position): boolean { return (position.line > range.start.line || (position.line === range.start.line && position.character >= range.start.character)) && (position.line < range.end.line || (position.line === range.end.line && position.character < range.end.character)); @@ -51,12 +57,39 @@ function precedingSignificant(tokens: readonly Token[], index: number): Token | return undefined; } +function nextSignificant(tokens: readonly Token[], index: number): Token | undefined { + for (let current = index + 1; current < tokens.length; current += 1) { + if (![TokenKind.Whitespace, TokenKind.Newline, TokenKind.Comment].includes(tokens[current].kind)) { + return tokens[current]; + } + } + return undefined; +} + +/** Extract documented QuickFunction names from established Script metadata blocks. */ +export function quickFunctionNames(source: string): string[] { + const names = new Map(); + const metadata = /\bType\s*:\s*QuickFunction\b[\s\S]{0,1000}?\bName\s*:\s*([A-Za-z_$][A-Za-z0-9_$-]*)\b/gi; + for (const match of source.matchAll(metadata)) { + const name = match[1]; + names.set(name.toUpperCase(), name); + } + return [...names.values()]; +} + /** Build document-local QuickScript declarations, uses, scopes, and semantic diagnostics. */ -export function analyzeQuickScript(source: string): SemanticModel { +export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}): SemanticModel { const document = parseQuickScript(source); const diagnostics = [...document.diagnostics]; const symbols: QuickSymbol[] = []; const declarationsByName = new Map(); + const knownCallableNames = new Set(KNOWN_FUNCTIONS.map(item => item.name.toUpperCase())); + for (const name of quickFunctionNames(source)) { + knownCallableNames.add(name.toUpperCase()); + } + for (const name of options.knownFunctionNames ?? []) { + knownCallableNames.add(name.toUpperCase()); + } for (const declaration of document.statements.filter(statement => statement.kind === 'dim' && statement.name !== undefined && statement.nameRange !== undefined)) { const normalized = declaration.name!.toUpperCase(); @@ -109,8 +142,17 @@ export function analyzeQuickScript(source: string): SemanticModel { } const resolved = declarationsByName.get(token.lexeme.toUpperCase()); const callName = callRanges.get(token.span.start); + const next = nextSignificant(document.tokens, index); + const isFunctionCall = callName !== undefined || next?.lexeme === '('; + if (isFunctionCall && !knownCallableNames.has(token.lexeme.toUpperCase())) { + diagnostics.push({ + code: 'unknown-function', + message: `Unknown QuickScript function '${token.lexeme}'.`, + severity: 'warning', + range: token.range, + }); + } if (resolved !== undefined || callName !== undefined) { - const next = document.tokens.slice(index + 1).find(candidate => ![TokenKind.Whitespace, TokenKind.Newline, TokenKind.Comment].includes(candidate.kind)); const kind: ReferenceKind = callName !== undefined ? 'call' : next?.lexeme === '=' ? 'write' : 'read'; references.push({ name: token.lexeme, kind, range: token.range, declarationId: resolved?.id }); } diff --git a/packages/core/src/tokenizer.ts b/packages/core/src/tokenizer.ts index cbd244a..6334429 100644 --- a/packages/core/src/tokenizer.ts +++ b/packages/core/src/tokenizer.ts @@ -95,8 +95,12 @@ export function tokenize(source: string): Token[] { } if (current === '{') { + const lineEnd = source.slice(offset).search(/\r|\n/); + const endOfLine = lineEnd === -1 ? source.length : offset + lineEnd; const closingBrace = source.indexOf('}', offset + 1); - emit(TokenKind.Comment, closingBrace === -1 ? source.length : closingBrace + 1); + const isStandaloneNestingMarker = (source.startsWith('{>', offset) || source.startsWith('{<', offset)) + && (closingBrace === -1 || closingBrace > endOfLine); + emit(TokenKind.Comment, isStandaloneNestingMarker ? endOfLine : closingBrace === -1 ? source.length : closingBrace + 1); continue; } diff --git a/packages/core/test/tokenizer.test.ts b/packages/core/test/tokenizer.test.ts index 4e0c07b..1cc6419 100644 --- a/packages/core/test/tokenizer.test.ts +++ b/packages/core/test/tokenizer.test.ts @@ -69,6 +69,14 @@ suite('QuickScript tokenizer', () => { ); }); + test('keeps standalone comment nesting markers on their own line', () => { + const tokens = tokenize('{>\nScript:\n{<}'); + const comments = tokens.filter(token => token.kind === TokenKind.Comment); + + assert.deepStrictEqual(comments.map(token => token.lexeme), ['{>', '{<}']); + assert.ok(tokens.some(token => token.lexeme === 'Script')); + }); + test('matches operators longest-first and recognizes QuickScript punctuation', () => { const tokens = significant(tokenize('A==B; C<>D; E<=F; G>=H; Tag.Field->Method()[1], X:Y;')); diff --git a/packages/language-server/src/features.ts b/packages/language-server/src/features.ts index c6ef3e4..3b95ea0 100644 --- a/packages/language-server/src/features.ts +++ b/packages/language-server/src/features.ts @@ -51,8 +51,8 @@ function completionKind(kind: string): CompletionItemKind { } } -export function diagnosticsFor(document: TextDocument): Diagnostic[] { - return analyzeQuickScript(document.getText()).diagnostics.map(item => ({ +export function diagnosticsFor(document: TextDocument, knownFunctionNames?: Iterable): Diagnostic[] { + return analyzeQuickScript(document.getText(), { knownFunctionNames }).diagnostics.map(item => ({ code: item.code, message: item.message, range: item.range, diff --git a/packages/language-server/src/server.ts b/packages/language-server/src/server.ts index fa84a19..00b6878 100644 --- a/packages/language-server/src/server.ts +++ b/packages/language-server/src/server.ts @@ -4,6 +4,9 @@ import { } from 'vscode-languageserver/node'; import { TextDocument } from 'vscode-languageserver-textdocument'; import { TextDocuments } from 'vscode-languageserver'; +import { promises as fs } from 'node:fs'; +import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { ServerSettings, @@ -17,21 +20,88 @@ import { symbolsFor, } from './features'; import { readSettings } from './settings'; +import { WorkspaceFunctionIndex } from './workspaceFunctions'; const connection = createConnection(ProposedFeatures.all); const documents = new TextDocuments(TextDocument); +const workspaceFunctions = new WorkspaceFunctionIndex(); let settings: ServerSettings = {}; +let workspaceFolders: string[] = []; -connection.onInitialize(() => serverCapabilities()); -connection.onDidChangeConfiguration(change => { - settings = readSettings(change.settings); +function publishDiagnostics(document: TextDocument): void { + connection.sendDiagnostics({ + uri: document.uri, + diagnostics: diagnosticsFor(document, workspaceFunctions.knownFunctionNames()), + }); +} + +function republishOpenDocuments(): void { for (const document of documents.all()) { - connection.sendDiagnostics({ uri: document.uri, diagnostics: diagnosticsFor(document) }); + publishDiagnostics(document); } +} + +async function quickFunctionSources(folder: string): Promise { + const sources: string[] = []; + const entries = await fs.readdir(folder, { withFileTypes: true }); + for (const entry of entries) { + if (entry.name === '.git' || entry.name === 'node_modules') { + continue; + } + const candidate = path.join(folder, entry.name); + if (entry.isDirectory()) { + sources.push(...await quickFunctionSources(candidate)); + } else if (entry.isFile() && /\.vbi?$/i.test(entry.name)) { + sources.push(await fs.readFile(candidate, 'utf8')); + } + } + return sources; +} + +async function refreshWorkspaceFunctions(folders: readonly string[]): Promise { + try { + const sources = (await Promise.all(folders.map(quickFunctionSources))).flat(); + workspaceFunctions.replaceWorkspaceSources(sources); + republishOpenDocuments(); + } catch { + // Keep diagnostics available for open documents when a workspace file cannot be read. + } +} + +connection.onInitialize(params => { + const folders = params.workspaceFolders?.map(folder => folder.uri) + ?? (params.rootUri === null || params.rootUri === undefined ? [] : [params.rootUri]); + workspaceFolders = folders + .filter(uri => uri.startsWith('file:')) + .map(uri => fileURLToPath(uri)); + void refreshWorkspaceFunctions(workspaceFolders); + return serverCapabilities(); +}); +connection.onInitialized(async () => { + const vbi = await connection.workspace.getConfiguration({ section: 'VBI' }); + settings = readSettings({ VBI: vbi }); + republishOpenDocuments(); +}); +connection.onDidChangeConfiguration(change => { + settings = readSettings(change.settings); + republishOpenDocuments(); +}); +connection.onDidChangeWatchedFiles(() => { + void refreshWorkspaceFunctions(workspaceFolders); +}); +documents.onDidOpen(change => { + workspaceFunctions.updateDocument(change.document); + publishDiagnostics(change.document); +}); +documents.onDidChangeContent(change => { + workspaceFunctions.updateDocument(change.document); + publishDiagnostics(change.document); +}); +documents.onDidClose(change => { + workspaceFunctions.removeDocument(change.document.uri); + connection.sendDiagnostics({ uri: change.document.uri, diagnostics: [] }); + republishOpenDocuments(); }); -documents.onDidOpen(change => connection.sendDiagnostics({ uri: change.document.uri, diagnostics: diagnosticsFor(change.document) })); -documents.onDidChangeContent(change => connection.sendDiagnostics({ uri: change.document.uri, diagnostics: diagnosticsFor(change.document) })); -documents.onDidClose(change => connection.sendDiagnostics({ uri: change.document.uri, diagnostics: [] })); connection.onDocumentFormatting(params => { const document = documents.get(params.textDocument.uri); diff --git a/packages/language-server/src/workspaceFunctions.ts b/packages/language-server/src/workspaceFunctions.ts new file mode 100644 index 0000000..9d623dc --- /dev/null +++ b/packages/language-server/src/workspaceFunctions.ts @@ -0,0 +1,34 @@ +import { quickFunctionNames } from '@intouch-language/core'; +import { TextDocument } from 'vscode-languageserver-textdocument'; + +/** Tracks QuickFunctions from workspace files and the language server's open documents. */ +export class WorkspaceFunctionIndex { + private readonly workspaceNames = new Set(); + private readonly openDocuments = new Map(); + + public replaceWorkspaceSources(sources: Iterable): void { + this.workspaceNames.clear(); + for (const source of sources) { + for (const name of quickFunctionNames(source)) { + this.workspaceNames.add(name); + } + } + } + + public updateDocument(document: TextDocument): void { + this.openDocuments.set(document.uri, quickFunctionNames(document.getText())); + } + + public removeDocument(uri: string): void { + this.openDocuments.delete(uri); + } + + public knownFunctionNames(): string[] { + const names = new Map(); + for (const name of this.workspaceNames) names.set(name.toUpperCase(), name); + for (const documentNames of this.openDocuments.values()) { + for (const name of documentNames) names.set(name.toUpperCase(), name); + } + return [...names.values()]; + } +} diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index 184adc3..1af5a3b 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -1,5 +1,8 @@ import * as assert from 'assert'; +import * as fs from 'fs'; +import * as path from 'path'; + import { TextDocument } from 'vscode-languageserver-textdocument'; import { @@ -13,6 +16,12 @@ import { symbolsFor, } from '../src/features'; import { readSettings } from '../src/settings'; +import { WorkspaceFunctionIndex } from '../src/workspaceFunctions'; + +function formattedText(document: TextDocument, settings = {}): string { + const [edit] = formattingEdits(document, settings); + return edit === undefined ? document.getText() : edit.newText; +} suite('QuickScript language server features', () => { const document = TextDocument.create( @@ -74,4 +83,99 @@ suite('QuickScript language server features', () => { indentSize: 3, }); }); + + test('formats the established comment nesting fixture through the language-server formatter entrypoint', () => { + const fixtureDirectory = path.resolve(__dirname, '../../../src/test/suite/testfiles'); + const source = fs.readFileSync(path.join(fixtureDirectory, '05.comment_rules.nesting.test.vbi'), 'utf8'); + const expected = fs.readFileSync(path.join(fixtureDirectory, '05.comment_rules.nesting.tobe.vbi'), 'utf8'); + const document = TextDocument.create('file:///nesting.vbi', 'intouch', 1, source); + const settings = { indentSize: 4, insertSpaces: true }; + + const once = formattedText(document, settings); + const twice = formattedText(TextDocument.create(document.uri, 'intouch', 2, once), settings); + + assert.strictEqual(once, expected); + assert.strictEqual(twice, expected); + }); + + test('keeps extra comment nesting across blank lines through the language-server formatter entrypoint', () => { + const source = [ + '{>', + 'Script:', + '', + 'Type: QuickFunction', + '', + 'Name: GetFullTopic', + '', + 'Parameters:', + '', + 'Message Topic', + '', + 'Usage:', + '', + 'CALL GetFullTopic( ... );', + '', + '{<}', + ].join('\r\n'); + const expected = [ + '{>', + ' Script:', + '', + ' Type: QuickFunction', + '', + ' Name: GetFullTopic', + '', + ' Parameters:', + '', + ' Message Topic', + '', + ' Usage:', + '', + ' CALL GetFullTopic( ... );', + '', + '{<}', + ].join('\r\n'); + const document = TextDocument.create('file:///hil-nesting.vbi', 'intouch', 1, source); + + const once = formattedText(document, { indentSize: 4, insertSpaces: true }); + const twice = formattedText(TextDocument.create(document.uri, 'intouch', 2, once), { indentSize: 4, insertSpaces: true }); + + assert.strictEqual(once, expected); + assert.strictEqual(twice, expected); + }); + + test('diagnoses unresolved CALL and expression functions while resolving catalogs and QuickFunctions', () => { + const source = [ + 'CALL xHerDebuga(Funkt + " ", 40);', + 'a = StringLaft(Test, 4);', + 'a = StringLeft(Test, StringInString(Test, ".", 1, 0) - 1);', + 'CALL xHerDebug(Funkt, 40);', + '{>', + 'Type: QuickFunction', + 'Name: GetFullTopic', + '{<}', + 'CALL GetFullTopic();', + 'CALL GetFullTopica();', + ].join('\n'); + const document = TextDocument.create('file:///functions.vbi', 'intouch', 1, source); + const diagnostics = diagnosticsFor(document); + const unknown = diagnostics.filter(diagnostic => diagnostic.code === 'unknown-function'); + + assert.deepStrictEqual(unknown.map(diagnostic => [diagnostic.range.start.line, diagnostic.range.start.character]), [ + [0, 5], + [1, 4], + [9, 5], + ]); + assert.ok(unknown.every(diagnostic => diagnostic.severity === 2)); + }); + + test('resolves QuickFunctions from open workspace documents case-insensitively', () => { + const definitions = TextDocument.create('file:///definitions.vi', 'intouch', 1, 'Type: QuickFunction\nName: WorkspaceFunction'); + const caller = TextDocument.create('file:///caller.vbi', 'intouch', 1, 'CALL workspacefunction();\nCALL WorkspaceFunctio();'); + const workspace = new WorkspaceFunctionIndex(); + workspace.updateDocument(definitions); + + const diagnostics = diagnosticsFor(caller, workspace.knownFunctionNames()).filter(diagnostic => diagnostic.code === 'unknown-function'); + assert.deepStrictEqual(diagnostics.map(diagnostic => diagnostic.range.start), [{ line: 1, character: 5 }]); + }); }); diff --git a/src/extension.ts b/src/extension.ts index 7707093..ecefcfc 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -17,7 +17,10 @@ export async function activate(context: vscode.ExtensionContext): Promise { scheme: 'file', language: 'intouch' }, { scheme: 'untitled', language: 'intouch' }, ], - synchronize: { configurationSection: 'VBI' }, + synchronize: { + configurationSection: 'VBI', + fileEvents: vscode.workspace.createFileSystemWatcher('**/*.{vbi,vi}'), + }, }; client = new LanguageClient( diff --git a/syntaxes/intouch.tmLanguage.json b/syntaxes/intouch.tmLanguage.json index 17363cf..9de0cf3 100644 --- a/syntaxes/intouch.tmLanguage.json +++ b/syntaxes/intouch.tmLanguage.json @@ -130,7 +130,7 @@ }, { - "match": "(?i:\\s*\\b(GetSplittByIndex|HerGATEWAYanzeigeAktualisieren|HerGATEWAYtriggerFreigabe|HerGATEWAYueberwachen|SetReferenceBool|SetReferenceByte|SetReferenceDINT|SetReferenceDINTs|SetReferenceMerkerByte|SetReferenceReal|SetReferenceString|SetReferenceWord|SetVarInputBoolsch|SetVarToggleBoolsch|BDEDatenLesen|BDEDatenSpeichern|BDEDatenSuchen|BDESchichtSchreiben|BDESchichtwerteDatenOK|BDESchichtwerteZuweisen|BDETageswerteDatenOK|BDETageswerteSchreiben|BDETageswerteZuweisen|BZBetriebsstunden|BZZaehlerAbfragen|ExterneModuleUeberwachen|FUWerte|GetSplittByIndex|HerBACKUP|HerProViewStart|HideAllPLS|KonfigLesen|KonfigSpeichern|QFFilter|QFFilterRegler15Schritt|QFLuftwerte|QFRinne|SessionUserInfoAkt|Sollwertaenderung|StatusExtApp|StatusleistenInfofelder|SWReal|wwalmdbtrigger|xAnlagenConfig|xBZVZSettings|xGatawaySettings|xHerGATEWAYSettings|xLoggingConfig|xSetDateiPfade|xSetSQLConfig|xSetTSStation|xSetUhrzeitserver)\\b\\s*)", + "match": "(?i:\\s*\\b(GetSplittByIndex|HerGATEWAYanzeigeAktualisieren|HerGATEWAYtriggerFreigabe|HerGATEWAYueberwachen|SetReferenceBool|SetReferenceByte|SetReferenceDINT|SetReferenceDINTs|SetReferenceMerkerByte|SetReferenceReal|SetReferenceString|SetReferenceWord|SetVarInputBoolsch|SetVarToggleBoolsch|BDEDatenLesen|BDEDatenSpeichern|BDEDatenSuchen|BDESchichtSchreiben|BDESchichtwerteDatenOK|BDESchichtwerteZuweisen|BDETageswerteDatenOK|BDETageswerteSchreiben|BDETageswerteZuweisen|BZBetriebsstunden|BZZaehlerAbfragen|ExterneModuleUeberwachen|FUWerte|GetSplittByIndex|HerBACKUP|HerProViewStart|HideAllPLS|KonfigLesen|KonfigSpeichern|QFFilter|QFFilterRegler15Schritt|QFLuftwerte|QFRinne|SessionUserInfoAkt|Sollwertaenderung|StatusExtApp|StatusleistenInfofelder|SWReal|wwalmdbtrigger|xAnlagenConfig|xBZVZSettings|xGatawaySettings|xHerDebug|xHerGATEWAYSettings|xLoggingConfig|xSetDateiPfade|xSetSQLConfig|xSetTSStation|xSetUhrzeitserver)\\b\\s*)", "name": "keyword.other", "comment": "Hermes Own functions 1" }, From c0477619b72019e9291192418940bf616c8b585b Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 16:07:06 +0200 Subject: [PATCH 13/40] docs(testing): record first manual HIL findings --- README.md | 2 +- docs/testing/manual-hil.md | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6fd2329..e0dd73d 100644 --- a/README.md +++ b/README.md @@ -287,6 +287,6 @@ Become a patron, by simply clicking on this button (**very appreciated!**): ## Copyright -`2021-2025 (c)Vitaly Ruhl` +`2021-2026 (c)Vitaly Ruhl` License: GNU General Public License v3.0 diff --git a/docs/testing/manual-hil.md b/docs/testing/manual-hil.md index 90c1e86..ee38301 100644 --- a/docs/testing/manual-hil.md +++ b/docs/testing/manual-hil.md @@ -66,5 +66,37 @@ and completion remain available, and removing the error clears the diagnostic. ## Result recording Record the tested file types, representative constructs, any formatter diff, -and pass/fail status. Do not change the extension version, merge, publish, or -release until the user confirms this HIL gate. +and pass/fail status. Do not merge, publish, tag, or release until the user +confirms this HIL gate. A HIL correction round may explicitly require a new +locally committed patch version for its uniquely identifiable VSIX artifact. + +## 2026-08-20 manual HIL round 1 + +Status: `MANUAL HIL ROUND 1: FAIL – FIXABLE FINDINGS`. + +- F1 LOW: The visible copyright range still ended in 2025. +- F2 HIGH: Standalone `{>` / `{<}` comment-nesting markers caused the tokenizer + to treat the enclosed content as one brace comment, so the formatter skipped + the required extra indentation. +- F3 HIGH: Unknown `CALL` targets were not resolved or diagnosed. +- F4 HIGH: Unknown function calls in expressions were not resolved or + diagnosed. + +Confirmed checks from the manual run: + +- PASS: language id is `intouch`. +- PASS: the language-server diagnostic pipeline is active. +- PASS: unknown datatype diagnostics are visible. +- PASS: general formatting outside extra nesting looked plausible in the + sampled file. + +The local fix build for the retest uses package version `1.5.1` and the +expected file name `intouch-language-1.5.1.vsix`. This is an HIL artifact only: +there is no tag, publish, Marketplace release, GitHub release, or merge to +`main`. + +Artifact created on 2026-08-20: + +- Path: `intouch-language-1.5.1.vsix` +- Size: 221154 bytes +- SHA-256: `5A2394245744E0790AD9151F513A4F62E1A8DCE9F497BE733F569D0764435428` From 2174d3bd9bf8b5be59a109d850358fa567146ba3 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 16:08:17 +0200 Subject: [PATCH 14/40] delete old todo --- LanguageDefinition/ToDo_V1.5.x.md | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 LanguageDefinition/ToDo_V1.5.x.md diff --git a/LanguageDefinition/ToDo_V1.5.x.md b/LanguageDefinition/ToDo_V1.5.x.md deleted file mode 100644 index d882885..0000000 --- a/LanguageDefinition/ToDo_V1.5.x.md +++ /dev/null @@ -1,20 +0,0 @@ -# ToDo V1.5.x (Ongoing Tasks) - -Status: 25.09.2025 - -Goal: Stabilize current formatting rules, consolidate tests, no behavioral changes outside the items listed here. - -## Rules / Clarifications (Documentation) - -- Parenthesis spacing in control structures: Target style "IF (a == b) THEN" (no space directly after `(` nor before `)`). -- Remove trailing whitespace at end of lines. -- Empty lines: At most one consecutive empty line—even inside comment blocks consisting only of tabs/spaces. -- EOL/EOF: Edge cases covered by separate tests; monitor. -- Implement EOL edge case test (mixed LF/CRLF + no final newline). -- add a error-finder in code like (e.g. missing semicolons, unmatched brackets, missing END-Keywords). - - - -## Tests -- Dynamic formatting settings testrunner: Implement a runner that can adjust settings (e.g. EmptyLinesAlsoInComment, allowedNumberOfEmptyLines) per test case to cover all configuration variants. -- idempotent formatting: Ensure that applying the formatter multiple times does not change the output after the first application (pure function behavior). but for all.test.vbi! From 8389eb2cfce64e3e6e467df20588e2fee1c67d07 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:08:30 +0200 Subject: [PATCH 15/40] fix(language): address HIL round 2 findings --- dist/server.js | 44 +++++++-------- package-lock.json | 4 +- package.json | 2 +- packages/core/src/formatter.ts | 11 +++- packages/core/src/parser.ts | 54 +++++++++++++++++- packages/core/test/formatter.test.ts | 37 ++++++++++++ packages/core/test/parser.test.ts | 42 ++++++++++++++ packages/core/test/tokenizer.test.ts | 21 +++++++ packages/language-server/src/server.ts | 8 +-- packages/language-server/src/settings.ts | 10 ++++ .../language-server/test/features.test.ts | 44 ++++++++++++++- .../language-server/test/protocol.test.ts | 56 ++++++++++++++++++- src/test/suite/extension.test.ts | 29 ++++++++++ 13 files changed, 324 insertions(+), 38 deletions(-) diff --git a/dist/server.js b/dist/server.js index 09502f3..089c1f0 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,27 +1,27 @@ -"use strict";var Oo=Object.defineProperty;var jm=Object.getOwnPropertyDescriptor;var Fm=Object.getOwnPropertyNames;var Lm=Object.prototype.hasOwnProperty;var Ia=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Sa=(e,t)=>{for(var n in t)Oo(e,n,{get:t[n],enumerable:!0})},Hm=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fm(t))!Lm.call(e,o)&&o!==n&&Oo(e,o,{get:()=>t[o],enumerable:!(r=jm(t,o))||r.enumerable});return e};var Xn=e=>Hm(Oo({},"__esModule",{value:!0}),e);var Kn=S(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.boolean=Wm;qe.string=Da;qe.number=Um;qe.error=Bm;qe.func=wa;qe.array=Pa;qe.stringArray=zm;qe.typedArray=$m;qe.thenable=Qm;function Wm(e){return e===!0||e===!1}function Da(e){return typeof e=="string"||e instanceof String}function Um(e){return typeof e=="number"||e instanceof Number}function Bm(e){return e instanceof Error}function wa(e){return typeof e=="function"}function Pa(e){return Array.isArray(e)}function zm(e){return Pa(e)&&e.every(t=>Da(t))}function $m(e,t){return Array.isArray(e)&&e.every(t)}function Qm(e){return e&&wa(e.then)}});var At=S(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.boolean=Vm;Qe.string=Oa;Qe.number=Xm;Qe.error=Km;Qe.func=Ym;Qe.array=Ra;Qe.stringArray=Jm;function Vm(e){return e===!0||e===!1}function Oa(e){return typeof e=="string"||e instanceof String}function Xm(e){return typeof e=="number"||e instanceof Number}function Km(e){return e instanceof Error}function Ym(e){return typeof e=="function"}function Ra(e){return Array.isArray(e)}function Jm(e){return Ra(e)&&e.every(t=>Oa(t))}});var Zo=S(w=>{"use strict";var Zm=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),th=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.LRUCache=st.LinkedMap=st.Touch=void 0;var ae;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ae||(st.Touch=ae={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ae.None){let r=this._map.get(t);if(r)return n!==ae.None&&this.touch(r,n),r.value}set(t,n,r=ae.None){let o=this._map.get(t);if(o)o.value=n,r!==ae.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ae.None:this.addItemLast(o);break;case ae.First:this.addItemFirst(o);break;case ae.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ae.First&&n!==ae.Last)){if(n===ae.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ae.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};st.LinkedMap=Yn;var ei=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ae.AsNew){return super.get(t,n)}peek(t){return super.get(t,ae.None)}set(t,n){return super.set(t,n,ae.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};st.LRUCache=ei});var xa=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var Ma;(function(e){function t(n){return{dispose:n}}e.create=t})(Ma||(Jn.Disposable=Ma={}))});var ct=S(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});var ni;function ri(){if(ni===void 0)throw new Error("No runtime abstraction layer installed");return ni}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ni=n}e.install=t})(ri||(ri={}));oi.default=ri});var jt=S(at=>{"use strict";var nh=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.Emitter=at.Event=void 0;var rh=nh(ct()),qa;(function(e){let t={dispose(){}};e.None=function(){return t}})(qa||(at.Event=qa={}));var ii=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new ii),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};at.Emitter=si});var tr=S(ve=>{"use strict";var oh=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ih=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sh=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.SharedArrayReceiverStrategy=Ft.SharedArraySenderStrategy=void 0;var dh=tr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var ui=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Ft.SharedArraySenderStrategy=ui;var li=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},di=class{token;constructor(t){this.token=new li(t)}cancel(){}dispose(){}},fi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new dh.CancellationTokenSource:new di(n)}};Ft.SharedArrayReceiverStrategy=fi});var hi=S(Lt=>{"use strict";var fh=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Semaphore=void 0;var mh=fh(ct()),mi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,mh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Lt.Semaphore=mi});var Ga=S(ue=>{"use strict";var hh=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gh=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ph=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,pi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};ue.ReadableStreamMessageReader=Ti});var Ha=S(le=>{"use strict";var _h=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),bh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(Sh,r.byteLength.toString(),Fa),o.push(Fa),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};le.WriteableStreamMessageWriter=bi});var Wa=S(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AbstractMessageBuffer=void 0;var Dh=13,wh=10,Ph=`\r -`,vi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};or.AbstractMessageBuffer=vi});var $a=S(O=>{"use strict";var Oh=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Rh=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kh=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(O.Trace=F={}));var wi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(wi||(O.TraceValue=wi={}));O.TraceValues=wi;(function(e){function t(r){if(!X.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(O.Trace=F={}));var Se;(function(e){e.Text="text",e.JSON="json"})(Se||(O.TraceFormat=Se={}));(function(e){function t(n){return X.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Se||(O.TraceFormat=Se={}));var Pi;(function(e){e.type=new R.NotificationType("$/setTrace")})(Pi||(O.SetTraceNotification=Pi={}));var ir;(function(e){e.type=new R.NotificationType("$/logTrace")})(ir||(O.LogTraceNotification=ir={}));var In;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(In||(O.ConnectionErrors=In={}));var Wt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=Wt;var Oi;(function(e){function t(n){let r=n;return r&&X.func(r.cancelUndispatched)}e.is=t})(Oi||(O.ConnectionStrategy=Oi={}));var sr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(sr||(O.IdCancellationReceiverStrategy=sr={}));var Ri;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(Ri||(O.RequestCancellationReceiverStrategy=Ri={}));var cr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ci.CancellationTokenSource}});function t(n){return sr.is(n)||Ri.is(n)}e.is=t})(cr||(O.CancellationReceiverStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Sn.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&X.func(r.sendCancellation)&&X.func(r.cleanup)}e.is=t})(ar||(O.CancellationSenderStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({receiver:cr.Message,sender:ar.Message});function t(n){let r=n;return r&&cr.is(r.receiver)&&ar.is(r.sender)}e.is=t})(ur||(O.CancellationStrategy=ur={}));var lr;(function(e){function t(n){let r=n;return r&&X.func(r.handleMessage)}e.is=t})(lr||(O.MessageStrategy=lr={}));var za;(function(e){function t(n){let r=n;return r&&(ur.is(r.cancellationStrategy)||Oi.is(r.connectionStrategy)||lr.is(r.messageStrategy)||X.number(r.maxParallelism))}e.is=t})(za||(O.ConnectionOptions=za={}));var Ee;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Ee||(Ee={}));function xh(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,a=0,b="2.0",g=r?.maxParallelism??-1,d=0,T,h=new Map,I,q=new Map,N=new Map,B,M=new Ba.LinkedMap,f=new Map,m=new Set,v=new Map,x=F.Off,A=Se.Text,E,be=Ee.New,nt=new vn.Emitter,hn=new vn.Emitter,se=new vn.Emitter,gn=new vn.Emitter,rt=new vn.Emitter,Fe=r&&r.cancellationStrategy?r.cancellationStrategy:ur.Message;function vm(u){}function ha(){return be===Ee.Listening}function ga(){return be===Ee.Closed}function Nt(){return be===Ee.Disposed}function pa(){(be===Ee.New||be===Ee.Listening)&&(be=Ee.Closed,hn.fire(void 0))}function Cm(u){nt.fire([u,void 0,void 0])}function Im(u){nt.fire(u)}e.onClose(pa),e.onError(Cm),t.onClose(pa),t.onError(Im);function ya(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function Sm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Dm(){return"not-"+(++s).toString()}function wm(u,_){R.Message.isRequest(_)?u.set(ya(_.id),_):R.Message.isResponse(_)?g===-1?u.set(Sm(_.id),_):_a(_):u.set(Dm(),_)}function So(){B||M.size===0||g!==-1&&d>=g||(B=(0,Ua.default)().timer.setImmediate(async()=>{if(B=void 0,M.size===0||g!==-1&&d>=g)return;let u=M.shift(),_;try{d++;let C=r?.messageStrategy;lr.is(C)?_=C.handleMessage(u,Ta):_=Ta(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{_ instanceof Promise?_.then(()=>{d--,So()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):d--,So()}}))}async function Ta(u){return R.Message.isRequest(u)?Om(u):R.Message.isNotification(u)?Rm(u):R.Message.isResponse(u)?_a(u):km(u)}let Pm=u=>{try{if(R.Message.isNotification(u)&&u.method===Sn.type.method){let _=u.params.id,C=ya(_),P=M.get(C);if(R.Message.isRequest(P)){let V=r?.connectionStrategy,H=V&&V.cancelUndispatched?V.cancelUndispatched(P,vm):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){M.delete(C),v.delete(_),H.id=P.id,Do(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=v.get(_);if(j!==void 0){j.cancel(),wo(u);return}else m.add(_)}wm(M,u)}finally{So()}};async function Om(u){if(Nt())return Promise.resolve();function _(te,ce,Y){let J={jsonrpc:b,id:u.id};return te instanceof R.ResponseError?J.error=te.toJson():J.result=te===void 0?null:te,Do(J,ce,Y),t.write(J)}function C(te,ce,Y){let J={jsonrpc:b,id:u.id,error:te.toJson()};return Do(J,ce,Y),t.write(J)}qm(u);let P=h.get(u.method),j,V;P&&(j=P.type,V=P.handler);let H=Date.now();if(V||T){let te=u.id??String(Date.now()),ce=sr.is(Fe.receiver)?Fe.receiver.createCancellationTokenSource(te):Fe.receiver.createCancellationTokenSource(u);u.id!==null&&m.has(u.id)&&ce.cancel(),u.id!==null&&v.set(te,ce);try{let Y;if(V)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new R.ResponseError(R.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);Y=V(ce.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===R.ParameterStructures.byName)return C(new R.ResponseError(R.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);Y=V(...u.params,ce.token)}else{if(j!==void 0&&j.parameterStructures===R.ParameterStructures.byPosition)return C(new R.ResponseError(R.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);Y=V(u.params,ce.token)}else T&&(Y=T(u.method,u.params,ce.token));let J=await Y;await _(J,u.method,H)}catch(Y){Y instanceof R.ResponseError?await _(Y,u.method,H):Y&&X.string(Y.message)?await C(new R.ResponseError(R.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${Y.message}`),u.method,H):await C(new R.ResponseError(R.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{v.delete(te)}}else await C(new R.ResponseError(R.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function _a(u){if(!Nt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let _=u.id,C=f.get(_);if(Em(u,C),C!==void 0){f.delete(_);try{if(u.error){let P=u.error;C.reject(new R.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function Rm(u){if(Nt())return;let _,C;if(u.method===Sn.type.method){let P=u.params.id;m.delete(P),wo(u);return}else{let P=q.get(u.method);P&&(C=P.handler,_=P.type)}if(C||I)try{if(wo(u),C)if(u.params===void 0)_!==void 0&&_.numberOfParams!==0&&_.parameterStructures!==R.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Cn.type.method&&P.length===2&&Ii.is(P[0])?await C({token:P[0],value:P[1]}):(_!==void 0&&(_.parameterStructures===R.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),_.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else _!==void 0&&_.parameterStructures===R.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else I&&await I(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else se.fire(u)}function km(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let _=u;if(X.string(_.id)||X.number(_.id)){let C=_.id,P=f.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function ot(u){if(u!=null)switch(x){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Mm(u){if(!(x===F.Off||!E))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&u.params&&(_=`Params: ${ot(u.params)}`),E.log(`Sending request '${u.method} - (${u.id})'.`,_)}else Gt("send-request",u)}function xm(u){if(!(x===F.Off||!E))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&(u.params?_=`Params: ${ot(u.params)}`:_="No parameters provided."),E.log(`Sending notification '${u.method}'.`,_)}else Gt("send-notification",u)}function Do(u,_,C){if(!(x===F.Off||!E))if(A===Se.Text){let P;(x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${ot(u.error.data)}`:u.result?P=`Result: ${ot(u.result)}`:u.error===void 0&&(P="No result returned.")),E.log(`Sending response '${_} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Gt("send-response",u)}function qm(u){if(!(x===F.Off||!E))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&u.params&&(_=`Params: ${ot(u.params)}`),E.log(`Received request '${u.method} - (${u.id})'.`,_)}else Gt("receive-request",u)}function wo(u){if(!(x===F.Off||!E||u.method===ir.type.method))if(A===Se.Text){let _;(x===F.Verbose||x===F.Compact)&&(u.params?_=`Params: ${ot(u.params)}`:_="No parameters provided."),E.log(`Received notification '${u.method}'.`,_)}else Gt("receive-notification",u)}function Em(u,_){if(!(x===F.Off||!E))if(A===Se.Text){let C;if((x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${ot(u.error.data)}`:u.result?C=`Result: ${ot(u.result)}`:u.error===void 0&&(C="No result returned.")),_){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";E.log(`Received response '${_.method} - (${u.id})' in ${Date.now()-_.timerStart}ms.${P}`,C)}else E.log(`Received response ${u.id} without active response promise.`,C)}else Gt("receive-response",u)}function Gt(u,_){if(!E||x===F.Off)return;let C={isLSPMessage:!0,type:u,message:_,timestamp:Date.now()};E.log(C)}function pn(){if(ga())throw new Wt(In.Closed,"Connection is closed.");if(Nt())throw new Wt(In.Disposed,"Connection is disposed.")}function Nm(){if(ha())throw new Wt(In.AlreadyListening,"Connection is already listening")}function Gm(){if(!ha())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function ba(u){if(u!==null)return u}function va(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Po(u,_){switch(u){case R.ParameterStructures.auto:return va(_)?ba(_):[yn(_)];case R.ParameterStructures.byName:if(!va(_))throw new Error("Received parameters by name but param is not an object literal.");return ba(_);case R.ParameterStructures.byPosition:return[yn(_)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ca(u,_){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Po(u.parameterStructures,_[0]);break;default:C=[];for(let j=0;j<_.length&&j{pn();let C,P;if(X.string(u)){C=u;let V=_[0],H=0,te=R.ParameterStructures.auto;R.ParameterStructures.is(V)&&(H=1,te=V);let ce=_.length,Y=ce-H;switch(Y){case 0:P=void 0;break;case 1:P=Po(te,_[H]);break;default:if(te===R.ParameterStructures.byName)throw new Error(`Received ${Y} parameters for 'by Name' notification parameter structure.`);P=_.slice(H,ce).map(J=>yn(J));break}}else{let V=_;C=u.method,P=Ca(u,V)}let j={jsonrpc:b,method:C,params:P};return xm(j),t.write(j).catch(V=>{throw o.error("Sending notification failed."),V})},onNotification:(u,_)=>{pn();let C;return X.func(u)?I=u:_&&(X.string(u)?(C=u,q.set(u,{type:void 0,handler:_})):(C=u.method,q.set(u.method,{type:u,handler:_}))),{dispose:()=>{C!==void 0?q.get(C)?.handler===_&&q.delete(C):I===u&&(I=void 0)}}},onProgress:(u,_,C)=>{if(N.has(_))throw new Error(`Progress handler for token ${_} already registered`);return N.set(_,C),{dispose:()=>{N.get(_)===C&&N.delete(_)}}},sendProgress:(u,_,C)=>vt.sendNotification(Cn.type,{token:_,value:C}),onUnhandledProgress:gn.event,sendRequest:(u,..._)=>{pn(),Gm();function C(J,xe){let $e=Fe.sender.sendCancellation(J,xe);$e===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${xe}`):$e.catch(()=>{o.log(`Sending cancellation messages for id ${xe} failed.`)})}let P,j,V;if(X.string(u)){P=u;let J=_[0],xe=_[_.length-1],$e=0,Tn=R.ParameterStructures.auto;R.ParameterStructures.is(J)&&($e=1,Tn=J);let Ct=_.length;Ci.CancellationToken.is(xe)&&(Ct=Ct-1,V=xe);let Le=Ct-$e;switch(Le){case 0:j=void 0;break;case 1:j=Po(Tn,_[$e]);break;default:if(Tn===R.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' request parameter structure.`);j=_.slice($e,Ct).map(Am=>yn(Am));break}}else{let J=_;P=u.method,j=Ca(u,J);let xe=u.numberOfParams;V=Ci.CancellationToken.is(J[xe])?J[xe]:void 0}let H=i++,te,ce=!1;V!==void 0&&(V.isCancellationRequested?ce=!0:te=V.onCancellationRequested(()=>{C(vt,H)}));let Y={jsonrpc:b,id:H,method:P,params:j};return Mm(Y),typeof Fe.sender.enableCancellation=="function"&&Fe.sender.enableCancellation(Y),new Promise(async(J,xe)=>{let $e=Le=>{J(Le),Fe.sender.cleanup(H),te?.dispose()},Tn=Le=>{xe(Le),Fe.sender.cleanup(H),te?.dispose()},Ct={method:P,timerStart:Date.now(),resolve:$e,reject:Tn};try{f.set(H,Ct),await t.write(Y),ce&&C(vt,H)}catch(Le){throw f.delete(H),Ct.reject(new R.ResponseError(R.ErrorCodes.MessageWriteError,Le.message?Le.message:"Unknown reason")),o.error("Sending request failed."),Le}})},onRequest:(u,_)=>{pn();let C=null;return Di.is(u)?(C=void 0,T=u):X.string(u)?(C=null,_!==void 0&&(C=u,h.set(u,{handler:_,type:void 0}))):_!==void 0&&(C=u.method,h.set(u.method,{type:u,handler:_})),{dispose:()=>{C!==null&&(C!==void 0?h.get(C)?.handler===_&&h.delete(C):T===u&&(T=void 0))}}},hasPendingResponse:()=>f.size>0,trace:async(u,_,C)=>{let P=!1,j=Se.Text;C!==void 0&&(X.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||Se.Text)),x=u,A=j,x===F.Off?E=void 0:E=_,P&&!ga()&&!Nt()&&await vt.sendNotification(Pi.type,{value:F.toString(u)})},onError:nt.event,onClose:hn.event,onUnhandledNotification:se.event,onDispose:rt.event,end:()=>{t.end()},dispose:()=>{if(Nt())return;be=Ee.Disposed,rt.fire(void 0);let u=new R.ResponseError(R.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let _ of f.values())_.reject(u);f=new Map,v=new Map,m=new Set,M=new Ba.LinkedMap,X.func(t.dispose)&&t.dispose(),X.func(e.dispose)&&e.dispose()},listen:()=>{pn(),Nm(),be=Ee.Listening,e.listen(Pm)},inspect:()=>{(0,Ua.default)().console.log("inspect")}};return vt.onNotification(ir.type,u=>{if(x===F.Off||!E)return;let _=x===F.Verbose||x===F.Compact;E.log(u.message,_?u.verbose:void 0)}),vt.onNotification(Cn.type,async u=>{let _=N.get(u.token);_?await _(u.value):gn.fire(u)}),vt}});var Ve=S(p=>{"use strict";var qh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var z=Zo();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return z.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return z.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return z.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return z.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return z.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return z.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return z.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return z.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return z.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return z.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return z.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return z.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return z.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return z.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return z.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return z.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return z.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return z.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return z.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return z.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return z.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return z.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return z.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return z.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return z.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return z.ParameterStructures}});var ki=ti();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return ki.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return ki.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return ki.Touch}});var Eh=xa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Eh.Disposable}});var Qa=jt();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return Qa.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return Qa.Emitter}});var Va=tr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return Va.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return Va.CancellationToken}});var Xa=Ea();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Xa.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Xa.SharedArrayReceiverStrategy}});var Mi=Ga();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Mi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Mi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Mi.ReadableStreamMessageReader}});var xi=Ha();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return xi.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return xi.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return xi.WriteableStreamMessageWriter}});var Nh=Wa();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Nh.AbstractMessageBuffer}});var ee=$a();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return ee.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return ee.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return ee.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return ee.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return ee.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return ee.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return ee.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return ee.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return ee.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return ee.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return ee.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return ee.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return ee.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ee.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ee.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return ee.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return ee.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return ee.TraceValues}});var Gh=qh(ct());p.RAL=Gh.default});var vr={};Sa(vr,{AnnotatedTextEdit:()=>Xe,ApplyKind:()=>es,ChangeAnnotation:()=>ut,ChangeAnnotationIdentifier:()=>ne,CodeAction:()=>ps,CodeActionContext:()=>gs,CodeActionKind:()=>hs,CodeActionTag:()=>yr,CodeActionTriggerKind:()=>Mn,CodeDescription:()=>Wi,CodeLens:()=>ys,Color:()=>fr,ColorInformation:()=>Gi,ColorPresentation:()=>Ai,Command:()=>St,CompletionItem:()=>ns,CompletionItemKind:()=>Xi,CompletionItemLabelDetails:()=>ts,CompletionItemTag:()=>Yi,CompletionList:()=>rs,CreateFile:()=>Bt,DeleteFile:()=>$t,Diagnostic:()=>Pn,DiagnosticRelatedInformation:()=>mr,DiagnosticSeverity:()=>Li,DiagnosticTag:()=>Hi,DocumentHighlight:()=>as,DocumentHighlightKind:()=>cs,DocumentLink:()=>_s,DocumentSymbol:()=>ms,DocumentUri:()=>qi,EOL:()=>Ah,FoldingRange:()=>Fi,FoldingRangeKind:()=>ji,FormattingOptions:()=>Ts,Hover:()=>os,InlayHint:()=>Os,InlayHintKind:()=>Tr,InlayHintLabelPart:()=>_r,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>Rs,InlineCompletionList:()=>ks,InlineCompletionTriggerKind:()=>Ms,InlineValueContext:()=>Ps,InlineValueEvaluatableExpression:()=>ws,InlineValueText:()=>Ss,InlineValueVariableLookup:()=>Ds,InsertReplaceEdit:()=>Ji,InsertTextFormat:()=>Ki,InsertTextMode:()=>Zi,LanguageKind:()=>Qi,Location:()=>wn,LocationLink:()=>Ni,MarkedString:()=>kn,MarkupContent:()=>lt,MarkupKind:()=>pr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>is,Position:()=>Oe,Range:()=>K,RenameFile:()=>zt,SelectedCompletionInfo:()=>xs,SelectionRange:()=>bs,SemanticTokenModifiers:()=>Cs,SemanticTokenTypes:()=>vs,SemanticTokens:()=>Is,SignatureInformation:()=>ss,SnippetTextEdit:()=>Ui,StringValue:()=>br,SymbolInformation:()=>ds,SymbolKind:()=>us,SymbolTag:()=>ls,TextDocument:()=>Ns,TextDocumentEdit:()=>On,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Vi,TextEdit:()=>He,URI:()=>dr,VersionedTextDocumentIdentifier:()=>$i,WorkspaceChange:()=>Bi,WorkspaceEdit:()=>hr,WorkspaceFolder:()=>Es,WorkspaceSymbol:()=>fs,integer:()=>Ei,uinteger:()=>Dn});var qi,dr,Ei,Dn,Oe,K,wn,Ni,fr,Gi,Ai,ji,Fi,mr,Li,Hi,Wi,Pn,St,He,ut,ne,Xe,On,Bt,zt,$t,hr,Ut,Ui,gr,Bi,zi,$i,Rn,Qi,Vi,pr,lt,Xi,Ki,Yi,Ji,Zi,es,ts,ns,rs,kn,os,is,ss,cs,as,us,ls,ds,fs,ms,hs,Mn,gs,yr,ps,ys,Ts,_s,bs,vs,Cs,Is,Ss,Ds,ws,Ps,Tr,_r,Os,br,Rs,ks,Ms,xs,qs,Es,Ah,Ns,Gs,l,Cr=Ia(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(dr||(dr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ei||(Ei={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.line)&&l.uinteger(o.character)}e.is=n})(Oe||(Oe={}));(function(e){function t(r,o,i,s){if(l.uinteger(r)&&l.uinteger(o)&&l.uinteger(i)&&l.uinteger(s))return{start:Oe.create(r,o),end:Oe.create(i,s)};if(Oe.is(r)&&Oe.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Oe.is(o.start)&&Oe.is(o.end)}e.is=n})(K||(K={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.range)&&(l.string(o.uri)||l.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.targetRange)&&l.string(o.targetUri)&&K.is(o.targetSelectionRange)&&(K.is(o.originSelectionRange)||l.undefined(o.originSelectionRange))}e.is=n})(Ni||(Ni={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.numberRange(o.red,0,1)&&l.numberRange(o.green,0,1)&&l.numberRange(o.blue,0,1)&&l.numberRange(o.alpha,0,1)}e.is=n})(fr||(fr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.range)&&fr.is(o.color)}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.undefined(o.textEdit)||He.is(o))&&(l.undefined(o.additionalTextEdits)||l.typedArray(o.additionalTextEdits,He.is))}e.is=n})(Ai||(Ai={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ji||(ji={}));(function(e){function t(r,o,i,s,a,b){let g={startLine:r,endLine:o};return l.defined(i)&&(g.startCharacter=i),l.defined(s)&&(g.endCharacter=s),l.defined(a)&&(g.kind=a),l.defined(b)&&(g.collapsedText=b),g}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.startLine)&&l.uinteger(o.startLine)&&(l.undefined(o.startCharacter)||l.uinteger(o.startCharacter))&&(l.undefined(o.endCharacter)||l.uinteger(o.endCharacter))&&(l.undefined(o.kind)||l.string(o.kind))}e.is=n})(Fi||(Fi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&wn.is(o.location)&&l.string(o.message)}e.is=n})(mr||(mr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Li||(Li={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Hi||(Hi={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&l.string(r.href)}e.is=t})(Wi||(Wi={}));(function(e){function t(i,s,a,b,g,d){let T={range:i,message:s};return l.defined(a)&&(T.severity=a),l.defined(b)&&(T.code=b),l.defined(g)&&(T.source=g),l.defined(d)&&(T.relatedInformation=d),T}e.create=t;function n(i){var s;let a=i;return l.defined(a)&&K.is(a.range)&&(l.string(a.message)||lt.is(a.message))&&(l.number(a.severity)||l.undefined(a.severity))&&(l.integer(a.code)||l.string(a.code)||l.undefined(a.code))&&(l.undefined(a.codeDescription)||l.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(l.string(a.source)||l.undefined(a.source))&&(l.undefined(a.relatedInformation)||l.typedArray(a.relatedInformation,mr.is))}e.is=n;function r(i){return l.string(i.message)}e.is3_17=r;function o(i){if(l.string(i.message))return i.message;if(lt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Pn||(Pn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return l.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.title)&&(o.tooltip===void 0||l.string(o.tooltip))&&l.string(o.command)}e.is=n})(St||(St={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return l.objectLiteral(s)&&l.string(s.newText)&&K.is(s.range)}e.is=o})(He||(He={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(l.string(o.description)||o.description===void 0)}e.is=n})(ut||(ut={}));(function(e){function t(n){let r=n;return l.string(r)}e.is=t})(ne||(ne={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return He.is(s)&&(ut.is(s.annotationId)||ne.is(s.annotationId))}e.is=o})(Xe||(Xe={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(On||(On={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&l.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(Bt||(Bt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&l.string(o.oldUri)&&l.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})(zt||(zt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&l.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||l.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||l.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ne.is(o.annotationId))}e.is=n})($t||($t={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>l.string(o.kind)?Bt.is(o)||zt.is(o)||$t.is(o):On.is(o)))}e.is=t})(hr||(hr={}));Ut=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=He.insert(t,n):ne.is(r)?(i=r,o=Xe.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Xe.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=He.replace(t,n):ne.is(r)?(i=r,o=Xe.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Xe.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=He.del(t):ne.is(n)?(o=n,r=Xe.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Xe.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return l.objectLiteral(r)&&K.is(r.range)&&br.isSnippet(r.snippet)&&(r.annotationId===void 0||ut.is(r.annotationId)||ne.is(r.annotationId))}e.is=t})(Ui||(Ui={}));gr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ne.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Bi=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new gr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(On.is(n)){let r=new Ut(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Ut(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Ut(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Ut(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new gr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ut.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Bt.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=Bt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;ut.is(r)||ne.is(r)?i=r:o=r;let s,a;if(i===void 0?s=zt.create(t,n,o):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=zt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ut.is(n)||ne.is(n)?o=n:r=n;let i,s;if(o===void 0?i=$t.create(t,r):(s=ne.is(o)?o:this._changeAnnotations.manage(o),i=$t.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.integer(o.version)}e.is=n})($i||($i={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&(o.version===null||l.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Qi||(Qi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.string(o.languageId)&&l.integer(o.version)&&l.string(o.text)}e.is=n})(Vi||(Vi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(pr||(pr={}));(function(e){function t(n){let r=n;return l.objectLiteral(n)&&pr.is(r.kind)&&l.string(r.value)}e.is=t})(lt||(lt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Xi||(Xi={}));(function(e){e.PlainText=1,e.Snippet=2})(Ki||(Ki={}));(function(e){e.Deprecated=1})(Yi||(Yi={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&l.string(o.newText)&&K.is(o.insert)&&K.is(o.replace)}e.is=n})(Ji||(Ji={}));(function(e){e.asIs=1,e.adjustIndentation=2})(Zi||(Zi={}));(function(e){e.Replace=1,e.Merge=2})(es||(es={}));(function(e){function t(n){let r=n;return r&&(l.string(r.detail)||r.detail===void 0)&&(l.string(r.description)||r.description===void 0)}e.is=t})(ts||(ts={}));(function(e){function t(n){return{label:n}}e.create=t})(ns||(ns={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(rs||(rs={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return l.string(o)||l.objectLiteral(o)&&l.string(o.language)&&l.string(o.value)}e.is=n})(kn||(kn={}));(function(e){function t(n){let r=n;return!!r&&l.objectLiteral(r)&&(lt.is(r.contents)||kn.is(r.contents)||l.typedArray(r.contents,kn.is))&&(n.range===void 0||K.is(n.range))}e.is=t})(os||(os={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(is||(is={}));(function(e){function t(n,r,...o){let i={label:n};return l.defined(r)&&(i.documentation=r),l.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ss||(ss={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(cs||(cs={}));(function(e){function t(n,r){let o={range:n};return l.number(r)&&(o.kind=r),o}e.create=t})(as||(as={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(us||(us={}));(function(e){e.Deprecated=1})(ls||(ls={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(ds||(ds={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(fs||(fs={}));(function(e){function t(r,o,i,s,a,b){let g={name:r,detail:o,kind:i,range:s,selectionRange:a};return b!==void 0&&(g.children=b),g}e.create=t;function n(r){let o=r;return o&&l.string(o.name)&&l.number(o.kind)&&K.is(o.range)&&K.is(o.selectionRange)&&(o.detail===void 0||l.string(o.detail))&&(o.deprecated===void 0||l.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(ms||(ms={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(hs||(hs={}));(function(e){e.Invoked=1,e.Automatic=2})(Mn||(Mn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.typedArray(o.diagnostics,Pn.is)&&(o.only===void 0||l.typedArray(o.only,l.string))&&(o.triggerKind===void 0||o.triggerKind===Mn.Invoked||o.triggerKind===Mn.Automatic)}e.is=n})(gs||(gs={}));(function(e){e.LLMGenerated=1;function t(n){return l.defined(n)&&n===e.LLMGenerated}e.is=t})(yr||(yr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):St.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&l.string(o.title)&&(o.diagnostics===void 0||l.typedArray(o.diagnostics,Pn.is))&&(o.kind===void 0||l.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||St.is(o.command))&&(o.isPreferred===void 0||l.boolean(o.isPreferred))&&(o.edit===void 0||hr.is(o.edit))&&(o.tags===void 0||l.typedArray(o.tags,yr.is))}e.is=n})(ps||(ps={}));(function(e){function t(r,o){let i={range:r};return l.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return l.defined(o)&&K.is(o.range)&&(l.undefined(o.command)||St.is(o.command))}e.is=n})(ys||(ys={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.uinteger(o.tabSize)&&l.boolean(o.insertSpaces)}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return l.defined(o)&&K.is(o.range)&&(l.undefined(o.target)||l.string(o.target))}e.is=n})(_s||(_s={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&K.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(bs||(bs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(vs||(vs={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Cs||(Cs={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Is||(Is={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&K.is(o.range)&&l.string(o.text)}e.is=n})(Ss||(Ss={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&K.is(o.range)&&l.boolean(o.caseSensitiveLookup)&&(l.string(o.variableName)||o.variableName===void 0)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&K.is(o.range)&&(l.string(o.expression)||o.expression===void 0)}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&K.is(r.stoppedLocation)}e.is=n})(Ps||(Ps={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Tr||(Tr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&(o.tooltip===void 0||l.string(o.tooltip)||lt.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||St.is(o.command))}e.is=n})(_r||(_r={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Oe.is(o.position)&&(l.string(o.label)||l.typedArray(o.label,_r.is))&&(o.kind===void 0||Tr.is(o.kind))&&o.textEdits===void 0||l.typedArray(o.textEdits,He.is)&&(o.tooltip===void 0||l.string(o.tooltip)||lt.is(o.tooltip))&&(o.paddingLeft===void 0||l.boolean(o.paddingLeft))&&(o.paddingRight===void 0||l.boolean(o.paddingRight))}e.is=n})(Os||(Os={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return l.objectLiteral(o)&&o.kind==="snippet"&&l.string(o.value)}e.isSnippet=n})(br||(br={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Rs||(Rs={}));(function(e){function t(n){return{items:n}}e.create=t})(ks||(ks={}));(function(e){e.Invoked=1,e.Automatic=2})(Ms||(Ms={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(xs||(xs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&dr.is(r.uri)&&l.string(r.name)}e.is=t})(Es||(Es={}));Ah=[` +"use strict";var No=Object.defineProperty;var Hm=Object.getOwnPropertyDescriptor;var Wm=Object.getOwnPropertyNames;var Um=Object.prototype.hasOwnProperty;var wa=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Pa=(e,t)=>{for(var n in t)No(e,n,{get:t[n],enumerable:!0})},Bm=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wm(t))!Um.call(e,o)&&o!==n&&No(e,o,{get:()=>t[o],enumerable:!(r=Hm(t,o))||r.enumerable});return e};var tr=e=>Bm(No({},"__esModule",{value:!0}),e);var nr=I(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.boolean=zm;Ae.string=Oa;Ae.number=$m;Ae.error=Qm;Ae.func=Ra;Ae.array=ka;Ae.stringArray=Vm;Ae.typedArray=Xm;Ae.thenable=Km;function zm(e){return e===!0||e===!1}function Oa(e){return typeof e=="string"||e instanceof String}function $m(e){return typeof e=="number"||e instanceof Number}function Qm(e){return e instanceof Error}function Ra(e){return typeof e=="function"}function ka(e){return Array.isArray(e)}function Vm(e){return ka(e)&&e.every(t=>Oa(t))}function Xm(e,t){return Array.isArray(e)&&e.every(t)}function Km(e){return e&&Ra(e.then)}});var Wt=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.boolean=Ym;et.string=Ma;et.number=Jm;et.error=Zm;et.func=eh;et.array=xa;et.stringArray=th;function Ym(e){return e===!0||e===!1}function Ma(e){return typeof e=="string"||e instanceof String}function Jm(e){return typeof e=="number"||e instanceof Number}function Zm(e){return e instanceof Error}function eh(e){return typeof e=="function"}function xa(e){return Array.isArray(e)}function th(e){return xa(e)&&e.every(t=>Ma(t))}});var si=I(w=>{"use strict";var nh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),oh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.LRUCache=ft.LinkedMap=ft.Touch=void 0;var le;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(le||(ft.Touch=le={}));var rr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=le.None){let r=this._map.get(t);if(r)return n!==le.None&&this.touch(r,n),r.value}set(t,n,r=le.None){let o=this._map.get(t);if(o)o.value=n,r!==le.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case le.None:this.addItemLast(o);break;case le.First:this.addItemFirst(o);break;case le.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==le.First&&n!==le.Last)){if(n===le.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===le.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};ft.LinkedMap=rr;var ci=class extends rr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=le.AsNew){return super.get(t,n)}peek(t){return super.get(t,le.None)}set(t,n){return super.set(t,n,le.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ft.LRUCache=ci});var Na=I(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.Disposable=void 0;var Ea;(function(e){function t(n){return{dispose:n}}e.create=t})(Ea||(or.Disposable=Ea={}))});var mt=I(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});var ui;function li(){if(ui===void 0)throw new Error("No runtime abstraction layer installed");return ui}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ui=n}e.install=t})(li||(li={}));di.default=li});var Ut=I(ht=>{"use strict";var ih=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.Emitter=ht.Event=void 0;var sh=ih(mt()),Ga;(function(e){let t={dispose(){}};e.None=function(){return t}})(Ga||(ht.Event=Ga={}));var fi=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new fi),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ht.Emitter=mi});var cr=I(Ce=>{"use strict";var ch=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ah=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),uh=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.SharedArrayReceiverStrategy=Bt.SharedArraySenderStrategy=void 0;var hh=cr(),Sn;(function(e){e.Continue=0,e.Cancelled=1})(Sn||(Sn={}));var pi=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Sn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Sn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Bt.SharedArraySenderStrategy=pi;var yi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Sn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ti=class{token;constructor(t){this.token=new yi(t)}cancel(){}dispose(){}},_i=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new hh.CancellationTokenSource:new Ti(n)}};Bt.SharedArrayReceiverStrategy=_i});var vi=I(zt=>{"use strict";var gh=zt&&zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zt,"__esModule",{value:!0});zt.Semaphore=void 0;var ph=gh(mt()),bi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ph.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};zt.Semaphore=bi});var Fa=I(de=>{"use strict";var yh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Th=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_h=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Ii.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};de.ReadableStreamMessageReader=Di});var Ba=I(fe=>{"use strict";var Ch=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ih=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(Ph,r.byteLength.toString(),Wa),o.push(Wa),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};fe.WriteableStreamMessageWriter=Pi});var za=I(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.AbstractMessageBuffer=void 0;var Oh=13,Rh=10,kh=`\r +`,Oi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};lr.AbstractMessageBuffer=Oi});var Xa=I(O=>{"use strict";var Mh=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xh=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qh=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(O.Trace=F={}));var qi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(qi||(O.TraceValue=qi={}));O.TraceValues=qi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(O.Trace=F={}));var we;(function(e){e.Text="text",e.JSON="json"})(we||(O.TraceFormat=we={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(we||(O.TraceFormat=we={}));var Ei;(function(e){e.type=new k.NotificationType("$/setTrace")})(Ei||(O.SetTraceNotification=Ei={}));var dr;(function(e){e.type=new k.NotificationType("$/logTrace")})(dr||(O.LogTraceNotification=dr={}));var On;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(On||(O.ConnectionErrors=On={}));var Qt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=Qt;var Ni;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ni||(O.ConnectionStrategy=Ni={}));var fr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(fr||(O.IdCancellationReceiverStrategy=fr={}));var Gi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(Gi||(O.RequestCancellationReceiverStrategy=Gi={}));var mr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ri.CancellationTokenSource}});function t(n){return fr.is(n)||Gi.is(n)}e.is=t})(mr||(O.CancellationReceiverStrategy=mr={}));var hr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Rn.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(hr||(O.CancellationSenderStrategy=hr={}));var gr;(function(e){e.Message=Object.freeze({receiver:mr.Message,sender:hr.Message});function t(n){let r=n;return r&&mr.is(r.receiver)&&hr.is(r.sender)}e.is=t})(gr||(O.CancellationStrategy=gr={}));var pr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(pr||(O.MessageStrategy=pr={}));var Va;(function(e){function t(n){let r=n;return r&&(gr.is(r.cancellationStrategy)||Ni.is(r.connectionStrategy)||pr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Va||(O.ConnectionOptions=Va={}));var je;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(je||(je={}));function Nh(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,a=0,_="2.0",f=r?.maxParallelism??-1,d=0,v,h=new Map,b,R=new Map,E=new Map,z,N=new Qa.LinkedMap,m=new Map,p=new Set,S=new Map,x=F.Off,A=we.Text,q,B=je.New,Tn=new wn.Emitter,ne=new wn.Emitter,ke=new wn.Emitter,ae=new wn.Emitter,wt=new wn.Emitter,Ne=r&&r.cancellationStrategy?r.cancellationStrategy:gr.Message;function De(u){}function _n(){return B===je.Listening}function Pt(){return B===je.Closed}function Je(){return B===je.Disposed}function Be(){(B===je.New||B===je.Listening)&&(B=je.Closed,ne.fire(void 0))}function bn(u){Tn.fire([u,void 0,void 0])}function wm(u){Tn.fire(u)}e.onClose(Be),e.onError(bn),t.onClose(Be),t.onError(wm);function ba(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function Pm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Om(){return"not-"+(++s).toString()}function Rm(u,T){k.Message.isRequest(T)?u.set(ba(T.id),T):k.Message.isResponse(T)?f===-1?u.set(Pm(T.id),T):Ca(T):u.set(Om(),T)}function Mo(){z||N.size===0||f!==-1&&d>=f||(z=(0,$a.default)().timer.setImmediate(async()=>{if(z=void 0,N.size===0||f!==-1&&d>=f)return;let u=N.shift(),T;try{d++;let C=r?.messageStrategy;pr.is(C)?T=C.handleMessage(u,va):T=va(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{T instanceof Promise?T.then(()=>{d--,Mo()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):d--,Mo()}}))}async function va(u){return k.Message.isRequest(u)?Mm(u):k.Message.isNotification(u)?xm(u):k.Message.isResponse(u)?Ca(u):qm(u)}let km=u=>{try{if(k.Message.isNotification(u)&&u.method===Rn.type.method){let T=u.params.id,C=ba(T),P=N.get(C);if(k.Message.isRequest(P)){let X=r?.connectionStrategy,H=X&&X.cancelUndispatched?X.cancelUndispatched(P,De):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){N.delete(C),S.delete(T),H.id=P.id,xo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=S.get(T);if(j!==void 0){j.cancel(),qo(u);return}else p.add(T)}Rm(N,u)}finally{Mo()}};async function Mm(u){if(Je())return Promise.resolve();function T(re,ue,J){let Z={jsonrpc:_,id:u.id};return re instanceof k.ResponseError?Z.error=re.toJson():Z.result=re===void 0?null:re,xo(Z,ue,J),t.write(Z)}function C(re,ue,J){let Z={jsonrpc:_,id:u.id,error:re.toJson()};return xo(Z,ue,J),t.write(Z)}Gm(u);let P=h.get(u.method),j,X;P&&(j=P.type,X=P.handler);let H=Date.now();if(X||v){let re=u.id??String(Date.now()),ue=fr.is(Ne.receiver)?Ne.receiver.createCancellationTokenSource(re):Ne.receiver.createCancellationTokenSource(u);u.id!==null&&p.has(u.id)&&ue.cancel(),u.id!==null&&S.set(re,ue);try{let J;if(X)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new k.ResponseError(k.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);J=X(ue.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===k.ParameterStructures.byName)return C(new k.ResponseError(k.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=X(...u.params,ue.token)}else{if(j!==void 0&&j.parameterStructures===k.ParameterStructures.byPosition)return C(new k.ResponseError(k.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=X(u.params,ue.token)}else v&&(J=v(u.method,u.params,ue.token));let Z=await J;await T(Z,u.method,H)}catch(J){J instanceof k.ResponseError?await T(J,u.method,H):J&&K.string(J.message)?await C(new k.ResponseError(k.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new k.ResponseError(k.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{S.delete(re)}}else await C(new k.ResponseError(k.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function Ca(u){if(!Je())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let T=u.id,C=m.get(T);if(Am(u,C),C!==void 0){m.delete(T);try{if(u.error){let P=u.error;C.reject(new k.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function xm(u){if(Je())return;let T,C;if(u.method===Rn.type.method){let P=u.params.id;p.delete(P),qo(u);return}else{let P=R.get(u.method);P&&(C=P.handler,T=P.type)}if(C||b)try{if(qo(u),C)if(u.params===void 0)T!==void 0&&T.numberOfParams!==0&&T.parameterStructures!==k.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Pn.type.method&&P.length===2&&ki.is(P[0])?await C({token:P[0],value:P[1]}):(T!==void 0&&(T.parameterStructures===k.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),T.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else T!==void 0&&T.parameterStructures===k.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else b&&await b(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else ke.fire(u)}function qm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let T=u;if(K.string(T.id)||K.number(T.id)){let C=T.id,P=m.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function lt(u){if(u!=null)switch(x){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Em(u){if(!(x===F.Off||!q))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${lt(u.params)}`),q.log(`Sending request '${u.method} - (${u.id})'.`,T)}else Ht("send-request",u)}function Nm(u){if(!(x===F.Off||!q))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${lt(u.params)}`:T="No parameters provided."),q.log(`Sending notification '${u.method}'.`,T)}else Ht("send-notification",u)}function xo(u,T,C){if(!(x===F.Off||!q))if(A===we.Text){let P;(x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${lt(u.error.data)}`:u.result?P=`Result: ${lt(u.result)}`:u.error===void 0&&(P="No result returned.")),q.log(`Sending response '${T} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Ht("send-response",u)}function Gm(u){if(!(x===F.Off||!q))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${lt(u.params)}`),q.log(`Received request '${u.method} - (${u.id})'.`,T)}else Ht("receive-request",u)}function qo(u){if(!(x===F.Off||!q||u.method===dr.type.method))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${lt(u.params)}`:T="No parameters provided."),q.log(`Received notification '${u.method}'.`,T)}else Ht("receive-notification",u)}function Am(u,T){if(!(x===F.Off||!q))if(A===we.Text){let C;if((x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${lt(u.error.data)}`:u.result?C=`Result: ${lt(u.result)}`:u.error===void 0&&(C="No result returned.")),T){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";q.log(`Received response '${T.method} - (${u.id})' in ${Date.now()-T.timerStart}ms.${P}`,C)}else q.log(`Received response ${u.id} without active response promise.`,C)}else Ht("receive-response",u)}function Ht(u,T){if(!q||x===F.Off)return;let C={isLSPMessage:!0,type:u,message:T,timestamp:Date.now()};q.log(C)}function vn(){if(Pt())throw new Qt(On.Closed,"Connection is closed.");if(Je())throw new Qt(On.Disposed,"Connection is disposed.")}function jm(){if(_n())throw new Qt(On.AlreadyListening,"Connection is already listening")}function Fm(){if(!_n())throw new Error("Call listen() first.")}function Cn(u){return u===void 0?null:u}function Ia(u){if(u!==null)return u}function Sa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Eo(u,T){switch(u){case k.ParameterStructures.auto:return Sa(T)?Ia(T):[Cn(T)];case k.ParameterStructures.byName:if(!Sa(T))throw new Error("Received parameters by name but param is not an object literal.");return Ia(T);case k.ParameterStructures.byPosition:return[Cn(T)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Da(u,T){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Eo(u.parameterStructures,T[0]);break;default:C=[];for(let j=0;j{vn();let C,P;if(K.string(u)){C=u;let X=T[0],H=0,re=k.ParameterStructures.auto;k.ParameterStructures.is(X)&&(H=1,re=X);let ue=T.length,J=ue-H;switch(J){case 0:P=void 0;break;case 1:P=Eo(re,T[H]);break;default:if(re===k.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=T.slice(H,ue).map(Z=>Cn(Z));break}}else{let X=T;C=u.method,P=Da(u,X)}let j={jsonrpc:_,method:C,params:P};return Nm(j),t.write(j).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,T)=>{vn();let C;return K.func(u)?b=u:T&&(K.string(u)?(C=u,R.set(u,{type:void 0,handler:T})):(C=u.method,R.set(u.method,{type:u,handler:T}))),{dispose:()=>{C!==void 0?R.get(C)?.handler===T&&R.delete(C):b===u&&(b=void 0)}}},onProgress:(u,T,C)=>{if(E.has(T))throw new Error(`Progress handler for token ${T} already registered`);return E.set(T,C),{dispose:()=>{E.get(T)===C&&E.delete(T)}}},sendProgress:(u,T,C)=>Ot.sendNotification(Pn.type,{token:T,value:C}),onUnhandledProgress:ae.event,sendRequest:(u,...T)=>{vn(),Fm();function C(Z,Ge){let Ze=Ne.sender.sendCancellation(Z,Ge);Ze===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ge}`):Ze.catch(()=>{o.log(`Sending cancellation messages for id ${Ge} failed.`)})}let P,j,X;if(K.string(u)){P=u;let Z=T[0],Ge=T[T.length-1],Ze=0,In=k.ParameterStructures.auto;k.ParameterStructures.is(Z)&&(Ze=1,In=Z);let Rt=T.length;Ri.CancellationToken.is(Ge)&&(Rt=Rt-1,X=Ge);let ze=Rt-Ze;switch(ze){case 0:j=void 0;break;case 1:j=Eo(In,T[Ze]);break;default:if(In===k.ParameterStructures.byName)throw new Error(`Received ${ze} parameters for 'by Name' request parameter structure.`);j=T.slice(Ze,Rt).map(Lm=>Cn(Lm));break}}else{let Z=T;P=u.method,j=Da(u,Z);let Ge=u.numberOfParams;X=Ri.CancellationToken.is(Z[Ge])?Z[Ge]:void 0}let H=i++,re,ue=!1;X!==void 0&&(X.isCancellationRequested?ue=!0:re=X.onCancellationRequested(()=>{C(Ot,H)}));let J={jsonrpc:_,id:H,method:P,params:j};return Em(J),typeof Ne.sender.enableCancellation=="function"&&Ne.sender.enableCancellation(J),new Promise(async(Z,Ge)=>{let Ze=ze=>{Z(ze),Ne.sender.cleanup(H),re?.dispose()},In=ze=>{Ge(ze),Ne.sender.cleanup(H),re?.dispose()},Rt={method:P,timerStart:Date.now(),resolve:Ze,reject:In};try{m.set(H,Rt),await t.write(J),ue&&C(Ot,H)}catch(ze){throw m.delete(H),Rt.reject(new k.ResponseError(k.ErrorCodes.MessageWriteError,ze.message?ze.message:"Unknown reason")),o.error("Sending request failed."),ze}})},onRequest:(u,T)=>{vn();let C=null;return xi.is(u)?(C=void 0,v=u):K.string(u)?(C=null,T!==void 0&&(C=u,h.set(u,{handler:T,type:void 0}))):T!==void 0&&(C=u.method,h.set(u.method,{type:u,handler:T})),{dispose:()=>{C!==null&&(C!==void 0?h.get(C)?.handler===T&&h.delete(C):v===u&&(v=void 0))}}},hasPendingResponse:()=>m.size>0,trace:async(u,T,C)=>{let P=!1,j=we.Text;C!==void 0&&(K.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||we.Text)),x=u,A=j,x===F.Off?q=void 0:q=T,P&&!Pt()&&!Je()&&await Ot.sendNotification(Ei.type,{value:F.toString(u)})},onError:Tn.event,onClose:ne.event,onUnhandledNotification:ke.event,onDispose:wt.event,end:()=>{t.end()},dispose:()=>{if(Je())return;B=je.Disposed,wt.fire(void 0);let u=new k.ResponseError(k.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let T of m.values())T.reject(u);m=new Map,S=new Map,p=new Set,N=new Qa.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{vn(),jm(),B=je.Listening,e.listen(km)},inspect:()=>{(0,$a.default)().console.log("inspect")}};return Ot.onNotification(dr.type,u=>{if(x===F.Off||!q)return;let T=x===F.Verbose||x===F.Compact;q.log(u.message,T?u.verbose:void 0)}),Ot.onNotification(Pn.type,async u=>{let T=E.get(u.token);T?await T(u.value):ae.fire(u)}),Ot}});var tt=I(g=>{"use strict";var Gh=g&&g.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g,"__esModule",{value:!0});g.ProgressType=g.ProgressToken=g.createMessageConnection=g.NullLogger=g.ConnectionOptions=g.ConnectionStrategy=g.AbstractMessageBuffer=g.WriteableStreamMessageWriter=g.AbstractMessageWriter=g.MessageWriter=g.ReadableStreamMessageReader=g.AbstractMessageReader=g.MessageReader=g.SharedArrayReceiverStrategy=g.SharedArraySenderStrategy=g.CancellationToken=g.CancellationTokenSource=g.Emitter=g.Event=g.Disposable=g.LRUCache=g.Touch=g.LinkedMap=g.ParameterStructures=g.NotificationType9=g.NotificationType8=g.NotificationType7=g.NotificationType6=g.NotificationType5=g.NotificationType4=g.NotificationType3=g.NotificationType2=g.NotificationType1=g.NotificationType0=g.NotificationType=g.ErrorCodes=g.ResponseError=g.RequestType9=g.RequestType8=g.RequestType7=g.RequestType6=g.RequestType5=g.RequestType4=g.RequestType3=g.RequestType2=g.RequestType1=g.RequestType0=g.RequestType=g.Message=g.RAL=void 0;g.MessageStrategy=g.CancellationStrategy=g.CancellationSenderStrategy=g.RequestCancellationReceiverStrategy=g.IdCancellationReceiverStrategy=g.CancellationReceiverStrategy=g.ConnectionError=g.ConnectionErrors=g.LogTraceNotification=g.SetTraceNotification=g.TraceFormat=g.TraceValues=g.TraceValue=g.Trace=void 0;var $=si();Object.defineProperty(g,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(g,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(g,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(g,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(g,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(g,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(g,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(g,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(g,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(g,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(g,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(g,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(g,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(g,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(g,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(g,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(g,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(g,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(g,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(g,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(g,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(g,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(g,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(g,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(g,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(g,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var Ai=ai();Object.defineProperty(g,"LinkedMap",{enumerable:!0,get:function(){return Ai.LinkedMap}});Object.defineProperty(g,"LRUCache",{enumerable:!0,get:function(){return Ai.LRUCache}});Object.defineProperty(g,"Touch",{enumerable:!0,get:function(){return Ai.Touch}});var Ah=Na();Object.defineProperty(g,"Disposable",{enumerable:!0,get:function(){return Ah.Disposable}});var Ka=Ut();Object.defineProperty(g,"Event",{enumerable:!0,get:function(){return Ka.Event}});Object.defineProperty(g,"Emitter",{enumerable:!0,get:function(){return Ka.Emitter}});var Ya=cr();Object.defineProperty(g,"CancellationTokenSource",{enumerable:!0,get:function(){return Ya.CancellationTokenSource}});Object.defineProperty(g,"CancellationToken",{enumerable:!0,get:function(){return Ya.CancellationToken}});var Ja=Aa();Object.defineProperty(g,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Ja.SharedArraySenderStrategy}});Object.defineProperty(g,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Ja.SharedArrayReceiverStrategy}});var ji=Fa();Object.defineProperty(g,"MessageReader",{enumerable:!0,get:function(){return ji.MessageReader}});Object.defineProperty(g,"AbstractMessageReader",{enumerable:!0,get:function(){return ji.AbstractMessageReader}});Object.defineProperty(g,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return ji.ReadableStreamMessageReader}});var Fi=Ba();Object.defineProperty(g,"MessageWriter",{enumerable:!0,get:function(){return Fi.MessageWriter}});Object.defineProperty(g,"AbstractMessageWriter",{enumerable:!0,get:function(){return Fi.AbstractMessageWriter}});Object.defineProperty(g,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Fi.WriteableStreamMessageWriter}});var jh=za();Object.defineProperty(g,"AbstractMessageBuffer",{enumerable:!0,get:function(){return jh.AbstractMessageBuffer}});var te=Xa();Object.defineProperty(g,"ConnectionStrategy",{enumerable:!0,get:function(){return te.ConnectionStrategy}});Object.defineProperty(g,"ConnectionOptions",{enumerable:!0,get:function(){return te.ConnectionOptions}});Object.defineProperty(g,"NullLogger",{enumerable:!0,get:function(){return te.NullLogger}});Object.defineProperty(g,"createMessageConnection",{enumerable:!0,get:function(){return te.createMessageConnection}});Object.defineProperty(g,"ProgressToken",{enumerable:!0,get:function(){return te.ProgressToken}});Object.defineProperty(g,"ProgressType",{enumerable:!0,get:function(){return te.ProgressType}});Object.defineProperty(g,"Trace",{enumerable:!0,get:function(){return te.Trace}});Object.defineProperty(g,"TraceValue",{enumerable:!0,get:function(){return te.TraceValue}});Object.defineProperty(g,"TraceFormat",{enumerable:!0,get:function(){return te.TraceFormat}});Object.defineProperty(g,"SetTraceNotification",{enumerable:!0,get:function(){return te.SetTraceNotification}});Object.defineProperty(g,"LogTraceNotification",{enumerable:!0,get:function(){return te.LogTraceNotification}});Object.defineProperty(g,"ConnectionErrors",{enumerable:!0,get:function(){return te.ConnectionErrors}});Object.defineProperty(g,"ConnectionError",{enumerable:!0,get:function(){return te.ConnectionError}});Object.defineProperty(g,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return te.CancellationReceiverStrategy}});Object.defineProperty(g,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.IdCancellationReceiverStrategy}});Object.defineProperty(g,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.RequestCancellationReceiverStrategy}});Object.defineProperty(g,"CancellationSenderStrategy",{enumerable:!0,get:function(){return te.CancellationSenderStrategy}});Object.defineProperty(g,"CancellationStrategy",{enumerable:!0,get:function(){return te.CancellationStrategy}});Object.defineProperty(g,"MessageStrategy",{enumerable:!0,get:function(){return te.MessageStrategy}});Object.defineProperty(g,"TraceValues",{enumerable:!0,get:function(){return te.TraceValues}});var Fh=Gh(mt());g.RAL=Fh.default});var Pr={};Pa(Pr,{AnnotatedTextEdit:()=>nt,ApplyKind:()=>cs,ChangeAnnotation:()=>gt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>Is,CodeActionContext:()=>Cs,CodeActionKind:()=>vs,CodeActionTag:()=>Ir,CodeActionTriggerKind:()=>Gn,CodeDescription:()=>Xi,CodeLens:()=>Ss,Color:()=>Tr,ColorInformation:()=>Ui,ColorPresentation:()=>Bi,Command:()=>Mt,CompletionItem:()=>us,CompletionItemKind:()=>ns,CompletionItemLabelDetails:()=>as,CompletionItemTag:()=>os,CompletionList:()=>ls,CreateFile:()=>Xt,DeleteFile:()=>Yt,Diagnostic:()=>xn,DiagnosticRelatedInformation:()=>_r,DiagnosticSeverity:()=>Qi,DiagnosticTag:()=>Vi,DocumentHighlight:()=>gs,DocumentHighlightKind:()=>hs,DocumentLink:()=>ws,DocumentSymbol:()=>bs,DocumentUri:()=>Li,EOL:()=>Lh,FoldingRange:()=>$i,FoldingRangeKind:()=>zi,FormattingOptions:()=>Ds,Hover:()=>ds,InlayHint:()=>Ns,InlayHintKind:()=>Sr,InlayHintLabelPart:()=>Dr,InlineCompletionContext:()=>Ls,InlineCompletionItem:()=>Gs,InlineCompletionList:()=>As,InlineCompletionTriggerKind:()=>js,InlineValueContext:()=>Es,InlineValueEvaluatableExpression:()=>qs,InlineValueText:()=>Ms,InlineValueVariableLookup:()=>xs,InsertReplaceEdit:()=>is,InsertTextFormat:()=>rs,InsertTextMode:()=>ss,LanguageKind:()=>es,Location:()=>Mn,LocationLink:()=>Wi,MarkedString:()=>Nn,MarkupContent:()=>pt,MarkupKind:()=>Cr,OptionalVersionedTextDocumentIdentifier:()=>En,ParameterInformation:()=>fs,Position:()=>Me,Range:()=>Y,RenameFile:()=>Kt,SelectedCompletionInfo:()=>Fs,SelectionRange:()=>Ps,SemanticTokenModifiers:()=>Rs,SemanticTokenTypes:()=>Os,SemanticTokens:()=>ks,SignatureInformation:()=>ms,SnippetTextEdit:()=>Ki,StringValue:()=>wr,SymbolInformation:()=>Ts,SymbolKind:()=>ps,SymbolTag:()=>ys,TextDocument:()=>Ws,TextDocumentEdit:()=>qn,TextDocumentIdentifier:()=>Ji,TextDocumentItem:()=>ts,TextEdit:()=>$e,URI:()=>yr,VersionedTextDocumentIdentifier:()=>Zi,WorkspaceChange:()=>Yi,WorkspaceEdit:()=>br,WorkspaceFolder:()=>Hs,WorkspaceSymbol:()=>_s,integer:()=>Hi,uinteger:()=>kn});var Li,yr,Hi,kn,Me,Y,Mn,Wi,Tr,Ui,Bi,zi,$i,_r,Qi,Vi,Xi,xn,Mt,$e,gt,oe,nt,qn,Xt,Kt,Yt,br,Vt,Ki,vr,Yi,Ji,Zi,En,es,ts,Cr,pt,ns,rs,os,is,ss,cs,as,us,ls,Nn,ds,fs,ms,hs,gs,ps,ys,Ts,_s,bs,vs,Gn,Cs,Ir,Is,Ss,Ds,ws,Ps,Os,Rs,ks,Ms,xs,qs,Es,Sr,Dr,Ns,wr,Gs,As,js,Fs,Ls,Hs,Lh,Ws,Us,l,Or=wa(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Li||(Li={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(yr||(yr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Hi||(Hi={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(kn||(kn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=kn.MAX_VALUE),o===Number.MAX_VALUE&&(o=kn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.line)&&l.uinteger(o.character)}e.is=n})(Me||(Me={}));(function(e){function t(r,o,i,s){if(l.uinteger(r)&&l.uinteger(o)&&l.uinteger(i)&&l.uinteger(s))return{start:Me.create(r,o),end:Me.create(i,s)};if(Me.is(r)&&Me.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Me.is(o.start)&&Me.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.range)&&(l.string(o.uri)||l.undefined(o.uri))}e.is=n})(Mn||(Mn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.targetRange)&&l.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||l.undefined(o.originSelectionRange))}e.is=n})(Wi||(Wi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.numberRange(o.red,0,1)&&l.numberRange(o.green,0,1)&&l.numberRange(o.blue,0,1)&&l.numberRange(o.alpha,0,1)}e.is=n})(Tr||(Tr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.range)&&Tr.is(o.color)}e.is=n})(Ui||(Ui={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.undefined(o.textEdit)||$e.is(o))&&(l.undefined(o.additionalTextEdits)||l.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(Bi||(Bi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(zi||(zi={}));(function(e){function t(r,o,i,s,a,_){let f={startLine:r,endLine:o};return l.defined(i)&&(f.startCharacter=i),l.defined(s)&&(f.endCharacter=s),l.defined(a)&&(f.kind=a),l.defined(_)&&(f.collapsedText=_),f}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.startLine)&&l.uinteger(o.startLine)&&(l.undefined(o.startCharacter)||l.uinteger(o.startCharacter))&&(l.undefined(o.endCharacter)||l.uinteger(o.endCharacter))&&(l.undefined(o.kind)||l.string(o.kind))}e.is=n})($i||($i={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&Mn.is(o.location)&&l.string(o.message)}e.is=n})(_r||(_r={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Qi||(Qi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Vi||(Vi={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&l.string(r.href)}e.is=t})(Xi||(Xi={}));(function(e){function t(i,s,a,_,f,d){let v={range:i,message:s};return l.defined(a)&&(v.severity=a),l.defined(_)&&(v.code=_),l.defined(f)&&(v.source=f),l.defined(d)&&(v.relatedInformation=d),v}e.create=t;function n(i){var s;let a=i;return l.defined(a)&&Y.is(a.range)&&(l.string(a.message)||pt.is(a.message))&&(l.number(a.severity)||l.undefined(a.severity))&&(l.integer(a.code)||l.string(a.code)||l.undefined(a.code))&&(l.undefined(a.codeDescription)||l.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(l.string(a.source)||l.undefined(a.source))&&(l.undefined(a.relatedInformation)||l.typedArray(a.relatedInformation,_r.is))}e.is=n;function r(i){return l.string(i.message)}e.is3_17=r;function o(i){if(l.string(i.message))return i.message;if(pt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(xn||(xn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return l.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.title)&&(o.tooltip===void 0||l.string(o.tooltip))&&l.string(o.command)}e.is=n})(Mt||(Mt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return l.objectLiteral(s)&&l.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(l.string(o.description)||o.description===void 0)}e.is=n})(gt||(gt={}));(function(e){function t(n){let r=n;return l.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(gt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(nt||(nt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&En.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(qn||(qn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&l.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&l.string(o.oldUri)&&l.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Kt||(Kt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&l.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||l.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||l.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Yt||(Yt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>l.string(o.kind)?Xt.is(o)||Kt.is(o)||Yt.is(o):qn.is(o)))}e.is=t})(br||(br={}));Vt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):oe.is(r)?(i=r,o=nt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):oe.is(r)?(i=r,o=nt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):oe.is(n)?(o=n,r=nt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=nt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return l.objectLiteral(r)&&Y.is(r.range)&&wr.isSnippet(r.snippet)&&(r.annotationId===void 0||gt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Ki||(Ki={}));vr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Yi=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new vr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(qn.is(n)){let r=new Vt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Vt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(En.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Vt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Vt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new vr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;gt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;gt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Kt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Kt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;gt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Yt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Yt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)}e.is=n})(Ji||(Ji={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.integer(o.version)}e.is=n})(Zi||(Zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&(o.version===null||l.integer(o.version))}e.is=n})(En||(En={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(es||(es={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.string(o.languageId)&&l.integer(o.version)&&l.string(o.text)}e.is=n})(ts||(ts={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Cr||(Cr={}));(function(e){function t(n){let r=n;return l.objectLiteral(n)&&Cr.is(r.kind)&&l.string(r.value)}e.is=t})(pt||(pt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ns||(ns={}));(function(e){e.PlainText=1,e.Snippet=2})(rs||(rs={}));(function(e){e.Deprecated=1})(os||(os={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&l.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(is||(is={}));(function(e){e.asIs=1,e.adjustIndentation=2})(ss||(ss={}));(function(e){e.Replace=1,e.Merge=2})(cs||(cs={}));(function(e){function t(n){let r=n;return r&&(l.string(r.detail)||r.detail===void 0)&&(l.string(r.description)||r.description===void 0)}e.is=t})(as||(as={}));(function(e){function t(n){return{label:n}}e.create=t})(us||(us={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ls||(ls={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return l.string(o)||l.objectLiteral(o)&&l.string(o.language)&&l.string(o.value)}e.is=n})(Nn||(Nn={}));(function(e){function t(n){let r=n;return!!r&&l.objectLiteral(r)&&(pt.is(r.contents)||Nn.is(r.contents)||l.typedArray(r.contents,Nn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(ds||(ds={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(fs||(fs={}));(function(e){function t(n,r,...o){let i={label:n};return l.defined(r)&&(i.documentation=r),l.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ms||(ms={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(hs||(hs={}));(function(e){function t(n,r){let o={range:n};return l.number(r)&&(o.kind=r),o}e.create=t})(gs||(gs={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ps||(ps={}));(function(e){e.Deprecated=1})(ys||(ys={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(Ts||(Ts={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(_s||(_s={}));(function(e){function t(r,o,i,s,a,_){let f={name:r,detail:o,kind:i,range:s,selectionRange:a};return _!==void 0&&(f.children=_),f}e.create=t;function n(r){let o=r;return o&&l.string(o.name)&&l.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||l.string(o.detail))&&(o.deprecated===void 0||l.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(bs||(bs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(vs||(vs={}));(function(e){e.Invoked=1,e.Automatic=2})(Gn||(Gn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.typedArray(o.diagnostics,xn.is)&&(o.only===void 0||l.typedArray(o.only,l.string))&&(o.triggerKind===void 0||o.triggerKind===Gn.Invoked||o.triggerKind===Gn.Automatic)}e.is=n})(Cs||(Cs={}));(function(e){e.LLMGenerated=1;function t(n){return l.defined(n)&&n===e.LLMGenerated}e.is=t})(Ir||(Ir={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Mt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&l.string(o.title)&&(o.diagnostics===void 0||l.typedArray(o.diagnostics,xn.is))&&(o.kind===void 0||l.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Mt.is(o.command))&&(o.isPreferred===void 0||l.boolean(o.isPreferred))&&(o.edit===void 0||br.is(o.edit))&&(o.tags===void 0||l.typedArray(o.tags,Ir.is))}e.is=n})(Is||(Is={}));(function(e){function t(r,o){let i={range:r};return l.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return l.defined(o)&&Y.is(o.range)&&(l.undefined(o.command)||Mt.is(o.command))}e.is=n})(Ss||(Ss={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.uinteger(o.tabSize)&&l.boolean(o.insertSpaces)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return l.defined(o)&&Y.is(o.range)&&(l.undefined(o.target)||l.string(o.target))}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(Ps||(Ps={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Os||(Os={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Rs||(Rs={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(ks||(ks={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&l.string(o.text)}e.is=n})(Ms||(Ms={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&l.boolean(o.caseSensitiveLookup)&&(l.string(o.variableName)||o.variableName===void 0)}e.is=n})(xs||(xs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(l.string(o.expression)||o.expression===void 0)}e.is=n})(qs||(qs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Es||(Es={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Sr||(Sr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&(o.tooltip===void 0||l.string(o.tooltip)||pt.is(o.tooltip))&&(o.location===void 0||Mn.is(o.location))&&(o.command===void 0||Mt.is(o.command))}e.is=n})(Dr||(Dr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Me.is(o.position)&&(l.string(o.label)||l.typedArray(o.label,Dr.is))&&(o.kind===void 0||Sr.is(o.kind))&&o.textEdits===void 0||l.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||l.string(o.tooltip)||pt.is(o.tooltip))&&(o.paddingLeft===void 0||l.boolean(o.paddingLeft))&&(o.paddingRight===void 0||l.boolean(o.paddingRight))}e.is=n})(Ns||(Ns={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return l.objectLiteral(o)&&o.kind==="snippet"&&l.string(o.value)}e.isSnippet=n})(wr||(wr={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Gs||(Gs={}));(function(e){function t(n){return{items:n}}e.create=t})(As||(As={}));(function(e){e.Invoked=1,e.Automatic=2})(js||(js={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Fs||(Fs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Ls||(Ls={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&yr.is(r.uri)&&l.string(r.name)}e.is=t})(Hs||(Hs={}));Lh=[` `,`\r -`,"\r"];(function(e){function t(i,s,a,b){return new Gs(i,s,a,b)}e.create=t;function n(i){let s=i;return!!(l.defined(s)&&l.string(s.uri)&&(l.undefined(s.languageId)||l.string(s.languageId))&&l.uinteger(s.lineCount)&&l.func(s.getText)&&l.func(s.positionAt)&&l.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),b=o(s,(d,T)=>{let h=d.range.start.line-T.range.start.line;return h===0?d.range.start.character-T.range.start.character:h}),g=a.length;for(let d=b.length-1;d>=0;d--){let T=b[d],h=i.offsetAt(T.range.start),I=i.offsetAt(T.range.end);if(I<=g)a=a.substring(0,h)+T.newText+a.substring(I,a.length);else throw new Error("Overlapping edit");g=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,b=i.slice(0,a),g=i.slice(a);o(b,s),o(g,s);let d=0,T=0,h=0;for(;d{let h=d.range.start.line-v.range.start.line;return h===0?d.range.start.character-v.range.start.character:h}),f=a.length;for(let d=_.length-1;d>=0;d--){let v=_[d],h=i.offsetAt(v.range.start),b=i.offsetAt(v.range.end);if(b<=f)a=a.substring(0,h)+v.newText+a.substring(b,a.length);else throw new Error("Overlapping edit");f=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,_=i.slice(0,a),f=i.slice(a);o(_,s),o(f,s);let d=0,v=0,h=0;for(;d<_.length&&v0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Oe.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Oe.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(I){return I===!0||I===!1}e.boolean=o;function i(I){return t.call(I)==="[object String]"}e.string=i;function s(I){return t.call(I)==="[object Number]"}e.number=s;function a(I,q,N){return t.call(I)==="[object Number]"&&q<=I&&I<=N}e.numberRange=a;function b(I){return t.call(I)==="[object Number]"&&-2147483648<=I&&I<=2147483647}e.integer=b;function g(I){return t.call(I)==="[object Number]"&&0<=I&&I<=2147483647}e.uinteger=g;function d(I){return t.call(I)==="[object Function]"}e.func=d;function T(I){return I!==null&&typeof I=="object"}e.objectLiteral=T;function h(I,q){return Array.isArray(I)&&I.every(q)}e.typedArray=h})(l||(l={}))});var Q=S(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.CM=de.ProtocolNotificationType=de.ProtocolNotificationType0=de.ProtocolRequestType=de.ProtocolRequestType0=de.RegistrationType=de.MessageDirection=void 0;var Qt=Ve(),Ka;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Ka||(de.MessageDirection=Ka={}));var As=class{____;method;constructor(t){this.method=t}};de.RegistrationType=As;var js=class extends Qt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};de.ProtocolRequestType0=js;var Fs=class extends Qt.RequestType{__;___;____;_pr;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolRequestType=Fs;var Ls=class extends Qt.NotificationType0{___;____;constructor(t){super(t)}};de.ProtocolNotificationType0=Ls;var Hs=class extends Qt.NotificationType{___;____;constructor(t){super(t,Qt.ParameterStructures.byName)}};de.ProtocolNotificationType=Hs;var Ya;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(Ya||(de.CM=Ya={}))});var Ir=S(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.boolean=jh;Ne.string=Ja;Ne.number=Fh;Ne.error=Lh;Ne.func=Hh;Ne.array=Za;Ne.stringArray=Wh;Ne.typedArray=Uh;Ne.objectLiteral=Bh;function jh(e){return e===!0||e===!1}function Ja(e){return typeof e=="string"||e instanceof String}function Fh(e){return typeof e=="number"||e instanceof Number}function Lh(e){return e instanceof Error}function Hh(e){return typeof e=="function"}function Za(e){return Array.isArray(e)}function Wh(e){return Za(e)&&e.every(t=>Ja(t))}function Uh(e,t){return Array.isArray(e)&&e.every(t)}function Bh(e){return e!==null&&typeof e=="object"}});var tu=S(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.ImplementationRequest=void 0;var Ws=Q(),eu;(function(e){e.method="textDocument/implementation",e.messageDirection=Ws.MessageDirection.clientToServer,e.type=new Ws.ProtocolRequestType(e.method),e.capabilities=Ws.CM.create("textDocument.implementation","implementationProvider")})(eu||(Sr.ImplementationRequest=eu={}))});var ru=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeDefinitionRequest=void 0;var Us=Q(),nu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Us.MessageDirection.clientToServer,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(nu||(Dr.TypeDefinitionRequest=nu={}))});var su=S(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DidChangeWorkspaceFoldersNotification=Xt.WorkspaceFoldersRequest=void 0;var Vt=Q(),ou;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Vt.MessageDirection.serverToClient,e.type=new Vt.ProtocolRequestType0(e.method),e.capabilities=Vt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(ou||(Xt.WorkspaceFoldersRequest=ou={}));var iu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Vt.MessageDirection.clientToServer,e.type=new Vt.ProtocolNotificationType(e.method),e.capabilities=Vt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(iu||(Xt.DidChangeWorkspaceFoldersNotification=iu={}))});var au=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var Bs=Q(),cu;(function(e){e.method="workspace/configuration",e.messageDirection=Bs.MessageDirection.serverToClient,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("workspace.configuration",void 0)})(cu||(wr.ConfigurationRequest=cu={}))});var du=S(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.ColorPresentationRequest=Yt.DocumentColorRequest=void 0;var Kt=Q(),uu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Kt.MessageDirection.clientToServer,e.type=new Kt.ProtocolRequestType(e.method),e.capabilities=Kt.CM.create("textDocument.colorProvider","colorProvider")})(uu||(Yt.DocumentColorRequest=uu={}));var lu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Kt.MessageDirection.clientToServer,e.type=new Kt.ProtocolRequestType(e.method),e.capabilities=Kt.CM.create("textDocument.colorProvider","colorProvider")})(lu||(Yt.ColorPresentationRequest=lu={}))});var hu=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.FoldingRangeRefreshRequest=Zt.FoldingRangeRequest=void 0;var Jt=Q(),fu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=Jt.MessageDirection.clientToServer,e.type=new Jt.ProtocolRequestType(e.method),e.capabilities=Jt.CM.create("textDocument.foldingRange","foldingRangeProvider")})(fu||(Zt.FoldingRangeRequest=fu={}));var mu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=Jt.MessageDirection.serverToClient,e.type=new Jt.ProtocolRequestType0(e.method),e.capabilities=Jt.CM.create("workspace.foldingRange.refreshSupport",void 0)})(mu||(Zt.FoldingRangeRefreshRequest=mu={}))});var pu=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=Q(),gu;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(gu||(Pr.DeclarationRequest=gu={}))});var Tu=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var $s=Q(),yu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=$s.MessageDirection.clientToServer,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("textDocument.selectionRange","selectionRangeProvider")})(yu||(Or.SelectionRangeRequest=yu={}))});var Cu=S(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.WorkDoneProgressCancelNotification=dt.WorkDoneProgressCreateRequest=dt.WorkDoneProgress=void 0;var zh=Ve(),xn=Q(),_u;(function(e){e.type=new zh.ProgressType;function t(n){return n===e.type}e.is=t})(_u||(dt.WorkDoneProgress=_u={}));var bu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=xn.MessageDirection.serverToClient,e.type=new xn.ProtocolRequestType(e.method),e.capabilities=xn.CM.create("window.workDoneProgress",void 0)})(bu||(dt.WorkDoneProgressCreateRequest=bu={}));var vu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=xn.MessageDirection.clientToServer,e.type=new xn.ProtocolNotificationType(e.method)})(vu||(dt.WorkDoneProgressCancelNotification=vu={}))});var wu=S(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.CallHierarchyOutgoingCallsRequest=ft.CallHierarchyIncomingCallsRequest=ft.CallHierarchyPrepareRequest=void 0;var Ke=Q(),Iu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Iu||(ft.CallHierarchyPrepareRequest=Iu={}));var Su;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Su||(ft.CallHierarchyIncomingCallsRequest=Su={}));var Du;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Ke.MessageDirection.clientToServer,e.type=new Ke.ProtocolRequestType(e.method),e.capabilities=Ke.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Du||(ft.CallHierarchyOutgoingCallsRequest=Du={}))});var xu=S(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.SemanticTokensRefreshRequest=Ce.SemanticTokensRangeRequest=Ce.SemanticTokensDeltaRequest=Ce.SemanticTokensRequest=Ce.SemanticTokensRegistrationType=Ce.TokenFormat=void 0;var De=Q(),Pu;(function(e){e.Relative="relative"})(Pu||(Ce.TokenFormat=Pu={}));var qn;(function(e){e.method="textDocument/semanticTokens",e.type=new De.RegistrationType(e.method)})(qn||(Ce.SemanticTokensRegistrationType=qn={}));var Ou;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=De.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Ou||(Ce.SemanticTokensRequest=Ou={}));var Ru;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Ru||(Ce.SemanticTokensDeltaRequest=Ru={}));var ku;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=De.MessageDirection.clientToServer,e.type=new De.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=De.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(ku||(Ce.SemanticTokensRangeRequest=ku={}));var Mu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=De.MessageDirection.serverToClient,e.type=new De.ProtocolRequestType0(e.method),e.capabilities=De.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Mu||(Ce.SemanticTokensRefreshRequest=Mu={}))});var Eu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Qs=Q(),qu;(function(e){e.method="window/showDocument",e.messageDirection=Qs.MessageDirection.serverToClient,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("window.showDocument.support",void 0)})(qu||(Rr.ShowDocumentRequest=qu={}))});var Gu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.LinkedEditingRangeRequest=void 0;var Vs=Q(),Nu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Nu||(kr.LinkedEditingRangeRequest=Nu={}))});var Bu=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.WillDeleteFilesRequest=fe.DidDeleteFilesNotification=fe.DidRenameFilesNotification=fe.WillRenameFilesRequest=fe.DidCreateFilesNotification=fe.WillCreateFilesRequest=fe.FileOperationPatternKind=void 0;var re=Q(),Au;(function(e){e.file="file",e.folder="folder"})(Au||(fe.FileOperationPatternKind=Au={}));var ju;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(ju||(fe.WillCreateFilesRequest=ju={}));var Fu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Fu||(fe.DidCreateFilesNotification=Fu={}));var Lu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Lu||(fe.WillRenameFilesRequest=Lu={}));var Hu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Hu||(fe.DidRenameFilesNotification=Hu={}));var Wu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Wu||(fe.DidDeleteFilesNotification=Wu={}));var Uu;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method),e.capabilities=re.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Uu||(fe.WillDeleteFilesRequest=Uu={}))});var Vu=S(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.MonikerRequest=mt.MonikerKind=mt.UniquenessLevel=void 0;var Xs=Q(),zu;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(zu||(mt.UniquenessLevel=zu={}));var $u;(function(e){e.$import="import",e.$export="export",e.local="local"})($u||(mt.MonikerKind=$u={}));var Qu;(function(e){e.method="textDocument/moniker",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.moniker","monikerProvider")})(Qu||(mt.MonikerRequest=Qu={}))});var Ju=S(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.TypeHierarchySubtypesRequest=ht.TypeHierarchySupertypesRequest=ht.TypeHierarchyPrepareRequest=void 0;var Dt=Q(),Xu;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method),e.capabilities=Dt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Xu||(ht.TypeHierarchyPrepareRequest=Xu={}));var Ku;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Ku||(ht.TypeHierarchySupertypesRequest=Ku={}));var Yu;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Dt.MessageDirection.clientToServer,e.type=new Dt.ProtocolRequestType(e.method)})(Yu||(ht.TypeHierarchySubtypesRequest=Yu={}))});var tl=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.InlineValueRefreshRequest=tn.InlineValueRequest=void 0;var en=Q(),Zu;(function(e){e.method="textDocument/inlineValue",e.messageDirection=en.MessageDirection.clientToServer,e.type=new en.ProtocolRequestType(e.method),e.capabilities=en.CM.create("textDocument.inlineValue","inlineValueProvider")})(Zu||(tn.InlineValueRequest=Zu={}));var el;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=en.MessageDirection.serverToClient,e.type=new en.ProtocolRequestType0(e.method),e.capabilities=en.CM.create("workspace.inlineValue.refreshSupport",void 0)})(el||(tn.InlineValueRefreshRequest=el={}))});var il=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.InlayHintRefreshRequest=gt.InlayHintResolveRequest=gt.InlayHintRequest=void 0;var Ye=Q(),nl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Ye.MessageDirection.clientToServer,e.type=new Ye.ProtocolRequestType(e.method),e.capabilities=Ye.CM.create("textDocument.inlayHint","inlayHintProvider")})(nl||(gt.InlayHintRequest=nl={}));var rl;(function(e){e.method="inlayHint/resolve",e.messageDirection=Ye.MessageDirection.clientToServer,e.type=new Ye.ProtocolRequestType(e.method),e.capabilities=Ye.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(rl||(gt.InlayHintResolveRequest=rl={}));var ol;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Ye.MessageDirection.serverToClient,e.type=new Ye.ProtocolRequestType0(e.method),e.capabilities=Ye.CM.create("workspace.inlayHint.refreshSupport",void 0)})(ol||(gt.InlayHintRefreshRequest=ol={}))});var fl=S(oe=>{"use strict";var $h=oe&&oe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Qh=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vh=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Kh=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Yh=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jh=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.InlineCompletionRequest=void 0;var Js=Q(),bl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Js.MessageDirection.clientToServer,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(bl||(xr.InlineCompletionRequest=bl={}))});var Sl=S(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.TextDocumentContentRefreshRequest=rn.TextDocumentContentRequest=void 0;var Nn=Q(),Cl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Nn.MessageDirection.clientToServer,e.type=new Nn.ProtocolRequestType(e.method),e.capabilities=Nn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Cl||(rn.TextDocumentContentRequest=Cl={}));var Il;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Nn.MessageDirection.serverToClient,e.type=new Nn.ProtocolRequestType(e.method)})(Il||(rn.TextDocumentContentRefreshRequest=Il={}))});var jd=S(c=>{"use strict";var Zh=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(xl||(c.StaticRegistrationOptions=xl={}));var ql;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||nc.is(r.documentSelector))}e.is=t})(ql||(c.TextDocumentRegistrationOptions=ql={}));var El;(function(e){function t(r){let o=r;return ie.objectLiteral(o)&&(o.workDoneProgress===void 0||ie.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ie.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(El||(c.WorkDoneProgressOptions=El={}));var Nl;(function(e){e.method="initialize",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method)})(Nl||(c.InitializeRequest=Nl={}));var Gl;(function(e){e.unknownProtocolVersion=1})(Gl||(c.InitializeErrorCodes=Gl={}));var Al;(function(e){e.method="initialized",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method)})(Al||(c.InitializedNotification=Al={}));var jl;(function(e){e.method="shutdown",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType0(e.method)})(jl||(c.ShutdownRequest=jl={}));var Fl;(function(e){e.method="exit",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType0(e.method)})(Fl||(c.ExitNotification=Fl={}));var Ll;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeConfiguration",void 0)})(Ll||(c.DidChangeConfigurationNotification=Ll={}));var Hl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Hl||(c.MessageType=Hl={}));var Wl;(function(e){e.method="window/showMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(Wl||(c.ShowMessageNotification=Wl={}));var Ul;(function(e){e.method="window/showMessageRequest",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(Ul||(c.ShowMessageRequest=Ul={}));var Bl;(function(e){e.method="window/logMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Bl||(c.LogMessageNotification=Bl={}));var zl;(function(e){e.method="telemetry/event",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(zl||(c.TelemetryEventNotification=zl={}));var $l;(function(e){e.None=0,e.Full=1,e.Incremental=2})($l||(c.TextDocumentSyncKind=$l={}));var Ql;(function(e){e.method="textDocument/didOpen",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Ql||(c.DidOpenTextDocumentNotification=Ql={}));var Vl;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Vl||(c.TextDocumentContentChangeEvent=Vl={}));var Xl;(function(e){e.method="textDocument/didChange",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync")})(Xl||(c.DidChangeTextDocumentNotification=Xl={}));var Kl;(function(e){e.method="textDocument/didClose",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Kl||(c.DidCloseTextDocumentNotification=Kl={}));var Yl;(function(e){e.method="textDocument/didSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Yl||(c.DidSaveTextDocumentNotification=Yl={}));var Jl;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Jl||(c.TextDocumentSaveReason=Jl={}));var Zl;(function(e){e.method="textDocument/willSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Zl||(c.WillSaveTextDocumentNotification=Zl={}));var ed;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(ed||(c.WillSaveTextDocumentWaitUntilRequest=ed={}));var td;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeWatchedFiles",void 0)})(td||(c.DidChangeWatchedFilesNotification=td={}));var nd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(nd||(c.FileChangeType=nd={}));var rc;(function(e){function t(n){let r=n;return ie.objectLiteral(r)&&(Dl.URI.is(r.baseUri)||Dl.WorkspaceFolder.is(r.baseUri))&&ie.string(r.pattern)}e.is=t})(rc||(c.RelativePattern=rc={}));var oc;(function(e){function t(n){let r=n;return ie.string(r)||rc.is(r)}e.is=t})(oc||(c.GlobPattern=oc={}));var rd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(rd||(c.WatchKind=rd={}));var od;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.publishDiagnostics",void 0)})(od||(c.PublishDiagnosticsNotification=od={}));var id;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(id||(c.CompletionTriggerKind=id={}));var sd;(function(e){e.method="textDocument/completion",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion","completionProvider")})(sd||(c.CompletionRequest=sd={}));var cd;(function(e){e.method="completionItem/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(cd||(c.CompletionResolveRequest=cd={}));var ad;(function(e){e.method="textDocument/hover",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.hover","hoverProvider")})(ad||(c.HoverRequest=ad={}));var ud;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(ud||(c.SignatureHelpTriggerKind=ud={}));var ld;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(ld||(c.SignatureHelpRequest=ld={}));var dd;(function(e){e.method="textDocument/definition",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.definition","definitionProvider")})(dd||(c.DefinitionRequest=dd={}));var fd;(function(e){e.method="textDocument/references",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.references","referencesProvider")})(fd||(c.ReferencesRequest=fd={}));var md;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(md||(c.DocumentHighlightRequest=md={}));var hd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(hd||(c.DocumentSymbolRequest=hd={}));var gd;(function(e){e.method="textDocument/codeAction",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction","codeActionProvider")})(gd||(c.CodeActionRequest=gd={}));var pd;(function(e){e.method="codeAction/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(pd||(c.CodeActionResolveRequest=pd={}));var yd;(function(e){e.method="workspace/symbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol","workspaceSymbolProvider")})(yd||(c.WorkspaceSymbolRequest=yd={}));var Td;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Td||(c.WorkspaceSymbolResolveRequest=Td={}));var _d;(function(e){e.method="textDocument/codeLens",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens","codeLensProvider")})(_d||(c.CodeLensRequest=_d={}));var bd;(function(e){e.method="codeLens/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(bd||(c.CodeLensResolveRequest=bd={}));var vd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType0(e.method),e.capabilities=y.CM.create("workspace.codeLens",void 0)})(vd||(c.CodeLensRefreshRequest=vd={}));var Cd;(function(e){e.method="textDocument/documentLink",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider")})(Cd||(c.DocumentLinkRequest=Cd={}));var Id;(function(e){e.method="documentLink/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Id||(c.DocumentLinkResolveRequest=Id={}));var Sd;(function(e){e.method="textDocument/formatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.formatting","documentFormattingProvider")})(Sd||(c.DocumentFormattingRequest=Sd={}));var Dd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Dd||(c.DocumentRangeFormattingRequest=Dd={}));var wd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(wd||(c.DocumentRangesFormattingRequest=wd={}));var Pd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Pd||(c.DocumentOnTypeFormattingRequest=Pd={}));var Od;(function(e){e.Identifier=1})(Od||(c.PrepareSupportDefaultBehavior=Od={}));var Rd;(function(e){e.method="textDocument/rename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename","renameProvider")})(Rd||(c.RenameRequest=Rd={}));var kd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(kd||(c.PrepareRenameRequest=kd={}));var Md;(function(e){e.method="workspace/executeCommand",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.executeCommand","executeCommandProvider")})(Md||(c.ExecuteCommandRequest=Md={}));var xd;(function(e){e.method="workspace/applyEdit",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType("workspace/applyEdit"),e.capabilities=y.CM.create("workspace.applyEdit",void 0)})(xd||(c.ApplyWorkspaceEditRequest=xd={}))});var Ld=S(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.createProtocolConnection=lg;var Fd=Ve();function lg(e,t,n,r){return Fd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Fd.createMessageConnection)(e,t,n,r)}});var Z=S(Ie=>{"use strict";var dg=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qr=Ie&&Ie.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&dg(t,e,n)};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.LSPErrorCodes=Ie.createProtocolConnection=void 0;qr(Ve(),Ie);qr((Cr(),Xn(vr)),Ie);qr(Q(),Ie);qr(jd(),Ie);var fg=Ld();Object.defineProperty(Ie,"createProtocolConnection",{enumerable:!0,get:function(){return fg.createProtocolConnection}});var Hd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Hd||(Ie.LSPErrorCodes=Hd={}))});var fc=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.empty=void 0;pt.v4=Wd;pt.isUUID=Ud;pt.parse=hg;pt.generateUuid=gg;var An=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},dc=class e extends An{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};pt.empty=new An("00000000-0000-0000-0000-000000000000");function Wd(){return new dc}var mg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ud(e){return mg.test(e)}function hg(e){if(!Ud(e))throw new Error("invalid uuid");return new An(e)}function gg(){return Wd().asHex()}});var Bd=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.ProgressFeature=void 0;cn.attachWorkDone=yg;cn.attachPartialResult=_g;var yt=Z(),pg=fc(),sn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(yt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(yt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(yt.WorkDoneProgress.type,this._token,{kind:"end"})}},Er=class extends sn{_source;constructor(t,n){super(t,n),this._source=new yt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends jn{_source;constructor(){super(),this._source=new yt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function yg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new sn(e,n)}var Tg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(yt.WorkDoneProgressCancelNotification.type,n=>{let r=sn.Instances.get(n.token);(r instanceof Er||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new sn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,pg.generateUuid)();return this.connection.sendRequest(yt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new Er(this.connection,t))}else return Promise.resolve(new Nr)}};cn.ProgressFeature=Tg;var mc;(function(e){e.type=new yt.ProgressType})(mc||(mc={}));var hc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(mc.type,this._token,t)}};function _g(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new hc(e,n)}});var zd=S(Be=>{"use strict";var bg=Be&&Be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),vg=Be&&Be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Cg=Be&&Be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?Sg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Ig.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Be.ConfigurationFeature=Dg});var $d=S(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.WorkspaceFoldersFeature=void 0;var Gr=Z(),wg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Gr.Emitter,this.connection.onNotification(Gr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Gr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Gr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Ar.WorkspaceFoldersFeature=wg});var Qd=S(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.CallHierarchyFeature=void 0;var gc=Z(),Pg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(gc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=gc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=gc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};jr.CallHierarchyFeature=Pg});var yc=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.SemanticTokensBuilder=Tt.SemanticTokensDiff=Tt.SemanticTokensFeature=void 0;var Fr=Z(),Og=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Fr.SemanticTokensRefreshRequest.type),on:t=>{let n=Fr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Fr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Fr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Tt.SemanticTokensFeature=Og;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let b=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;b[this._dataLen++]=s,b[this._dataLen++]=a,b[this._dataLen++]=r,b[this._dataLen++]=o,b[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let g=t[5*a],d=t[5*b];if(g===d){let T=t[5*a+1],h=t[5*b+1];return T-h}return g-d});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ShowDocumentFeature=void 0;var Rg=Z(),kg=e=>class extends e{showDocument(t){return this.connection.sendRequest(Rg.ShowDocumentRequest.type,t)}};Hr.ShowDocumentFeature=kg});var Xd=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.FileOperationsFeature=void 0;var an=Z(),Mg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(an.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(an.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(an.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(an.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(an.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(an.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Wr.FileOperationsFeature=Mg});var Kd=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeFeature=void 0;var xg=Z(),qg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(xg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Ur.LinkedEditingRangeFeature=qg});var Yd=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.TypeHierarchyFeature=void 0;var Tc=Z(),Eg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Tc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Tc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Tc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.TypeHierarchyFeature=Eg});var Zd=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.InlineValueFeature=void 0;var Jd=Z(),Ng=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Jd.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Jd.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};zr.InlineValueFeature=Ng});var tf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.FoldingRangeFeature=void 0;var ef=Z(),Gg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(ef.FoldingRangeRefreshRequest.type),on:t=>{let n=ef.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};$r.FoldingRangeFeature=Gg});var nf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlayHintFeature=void 0;var _c=Z(),Ag=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(_c.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(_c.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(_c.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Qr.InlayHintFeature=Ag});var rf=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DiagnosticFeature=void 0;var Fn=Z(),jg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Vr.DiagnosticFeature=jg});var vc=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.TextDocuments=void 0;var Pt=Z(),bc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Pt.Emitter,this._onDidOpen=new Pt.Emitter,this._onDidClose=new Pt.Emitter,this._onDidSave=new Pt.Emitter,this._onWillSave=new Pt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Pt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Pt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Xr.TextDocuments=bc});var Sc=S(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.NotebookDocuments=un.NotebookSyncFeature=void 0;var Re=Z(),of=vc(),Fg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Re.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Re.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Re.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Re.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};un.NotebookSyncFeature=Fg;var Cc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Re.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Re.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Re.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ic=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof of.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new of.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Re.Emitter,this._onDidChange=new Re.Emitter,this._onDidSave=new Re.Emitter,this._onDidClose=new Re.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Cc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,b=o.change;b.metadata!==void 0&&(a=!0,i.metadata=b.metadata);let g=[],d=[],T=[],h=[];if(b.cells!==void 0){let M=b.cells;if(M.structure!==void 0){let f=M.structure.array;if(i.cells.splice(f.start,f.deleteCount,...f.cells!==void 0?f.cells:[]),M.structure.didOpen!==void 0)for(let m of M.structure.didOpen)await n.openTextDocument({textDocument:m}),g.push(m.uri);if(M.structure.didClose)for(let m of M.structure.didClose)await n.closeTextDocument({textDocument:m}),d.push(m.uri)}if(M.data!==void 0){let f=new Map(M.data.map(m=>[m.document,m]));for(let m=0;m<=i.cells.length;m++){let v=f.get(i.cells[m].document);if(v!==void 0){let x=i.cells.splice(m,1,v);if(T.push({old:x[0],new:v}),f.delete(v.document),f.size===0)break}}}if(M.textContent!==void 0)for(let f of M.textContent)await n.changeTextDocument({textDocument:f.document,contentChanges:f.changes}),h.push(f.document.uri)}this.updateCellMap(i);let I={notebookDocument:i};a&&(I.metadata={old:s,new:i.metadata});let q=[];for(let M of g)q.push(this.getNotebookCell(M));let N=[];for(let M of d)N.push(this.getNotebookCell(M));let B=[];for(let M of h)B.push(this.getNotebookCell(M));(q.length>0||N.length>0||T.length>0||B.length>0)&&(I.cells={added:q,removed:N,changed:{data:T,textContent:B}}),(I.metadata!==void 0||I.cells!==void 0)&&this._onDidChange.fire(I)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Re.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};un.NotebookDocuments=Ic});var sf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.MonikerFeature=void 0;var Lg=Z(),Hg=e=>class extends e{get moniker(){return{on:t=>{let n=Lg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.MonikerFeature=Hg});var cf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Wg=Z(),Ug=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Wg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=Ug});var uf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var af=Z(),Bg=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(af.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(af.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=Bg});var kc=S(U=>{"use strict";var zg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$g=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pf=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Pc;var Zr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Oc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(Dc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(Dc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(Dc)}},lf=(0,Yg.ShowDocumentFeature)((0,k.ProgressFeature)(Oc)),df;(function(e){function t(){return new eo}e.create=t})(df||(U.BulkRegistration=df={}));var eo=class{_registrations=[];_registered=new Set;add(t,n){let r=ke.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=wc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},ff;(function(e){function t(){return new Ln(void 0,[])}e.create=t})(ff||(U.BulkUnregistration=ff={}));var Ln=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=ke.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},to=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof eo?this.registerMany(t):t instanceof Ln?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=ke.string(n)?n:n.method,i=wc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=ke.string(t)?t:t.method,o=wc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Ln(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},mf=(0,ap.TextDocumentContentFeature)((0,Jg.FileOperationsFeature)((0,Vg.WorkspaceFoldersFeature)((0,Qg.ConfigurationFeature)(Rc)))),no=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=oo;var hf=(0,cp.InlineCompletionFeature)((0,np.FoldingRangeFeature)((0,sp.MonikerFeature)((0,op.DiagnosticFeature)((0,rp.InlayHintFeature)((0,tp.InlineValueFeature)((0,ep.TypeHierarchyFeature)((0,Zg.LinkedEditingRangeFeature)((0,Kg.SemanticTokensFeature)((0,Xg.CallHierarchyFeature)(oo)))))))))),io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,k.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,k.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=io;var gf=(0,ip.NotebookSyncFeature)(io);function yf(e,t){return function(n){return t(e(n))}}function Tf(e,t){return function(n){return t(e(n))}}function _f(e,t){return function(n){return t(e(n))}}function bf(e,t){return function(n){return t(e(n))}}function vf(e,t){return function(n){return t(e(n))}}function Cf(e,t){return function(n){return t(e(n))}}function If(e,t){return function(n){return t(e(n))}}function Sf(e,t){return function(n){return t(e(n))}}function up(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,yf),tracer:n(e.tracer,t.tracer,_f),telemetry:n(e.telemetry,t.telemetry,Tf),client:n(e.client,t.client,bf),window:n(e.window,t.window,vf),workspace:n(e.workspace,t.workspace,Cf),languages:n(e.languages,t.languages,If),notebooks:n(e.notebooks,t.notebooks,Sf)}}function lp(e,t,n){let r=n&&n.console?new(n.console(Zr)):new Zr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(no)):new no,s=n&&n.telemetry?new(n.telemetry(ro)):new ro,a=n&&n.client?new(n.client(to)):new to,b=n&&n.window?new(n.window(lf)):new lf,g=n&&n.workspace?new(n.workspace(mf)):new mf,d=n&&n.languages?new(n.languages(hf)):new hf,T=n&&n.notebooks?new(n.notebooks(gf)):new gf,h=[r,i,s,a,b,g,d,T];function I(f){return f instanceof Promise?f:ke.thenable(f)?new Promise((m,v)=>{f.then(x=>m(x),x=>v(x))}):Promise.resolve(f)}let q,N,B,M={listen:()=>o.listen(),sendRequest:(f,...m)=>o.sendRequest(ke.string(f)?f:f.method,...m),onRequest:(f,m)=>o.onRequest(f,m),sendNotification:(f,m)=>{let v=ke.string(f)?f:f.method;return o.sendNotification(v,m)},onNotification:(f,m)=>o.onNotification(f,m),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:f=>(N=f,{dispose:()=>{N=void 0}}),onInitialized:f=>o.onNotification(D.InitializedNotification.type,f),onShutdown:f=>(q=f,{dispose:()=>{q=void 0}}),onExit:f=>(B=f,{dispose:()=>{B=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return b},get workspace(){return g},get languages(){return d},get notebooks(){return T},onDidChangeConfiguration:f=>o.onNotification(D.DidChangeConfigurationNotification.type,f),onDidChangeWatchedFiles:f=>o.onNotification(D.DidChangeWatchedFilesNotification.type,f),__textDocumentSync:void 0,onDidOpenTextDocument:f=>o.onNotification(D.DidOpenTextDocumentNotification.type,f),onDidChangeTextDocument:f=>o.onNotification(D.DidChangeTextDocumentNotification.type,f),onDidCloseTextDocument:f=>o.onNotification(D.DidCloseTextDocumentNotification.type,f),onWillSaveTextDocument:f=>o.onNotification(D.WillSaveTextDocumentNotification.type,f),onWillSaveTextDocumentWaitUntil:f=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,f),onDidSaveTextDocument:f=>o.onNotification(D.DidSaveTextDocumentNotification.type,f),sendDiagnostics:f=>o.sendNotification(D.PublishDiagnosticsNotification.type,f),onHover:f=>o.onRequest(D.HoverRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onCompletion:f=>o.onRequest(D.CompletionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onCompletionResolve:f=>o.onRequest(D.CompletionResolveRequest.type,f),onSignatureHelp:f=>o.onRequest(D.SignatureHelpRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onDeclaration:f=>o.onRequest(D.DeclarationRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDefinition:f=>o.onRequest(D.DefinitionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onTypeDefinition:f=>o.onRequest(D.TypeDefinitionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onImplementation:f=>o.onRequest(D.ImplementationRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onReferences:f=>o.onRequest(D.ReferencesRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDocumentHighlight:f=>o.onRequest(D.DocumentHighlightRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDocumentSymbol:f=>o.onRequest(D.DocumentSymbolRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onWorkspaceSymbol:f=>o.onRequest(D.WorkspaceSymbolRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onWorkspaceSymbolResolve:f=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,f),onCodeAction:f=>o.onRequest(D.CodeActionRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onCodeActionResolve:f=>o.onRequest(D.CodeActionResolveRequest.type,(m,v)=>f(m,v)),onCodeLens:f=>o.onRequest(D.CodeLensRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onCodeLensResolve:f=>o.onRequest(D.CodeLensResolveRequest.type,(m,v)=>f(m,v)),onDocumentFormatting:f=>o.onRequest(D.DocumentFormattingRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onDocumentRangeFormatting:f=>o.onRequest(D.DocumentRangeFormattingRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onDocumentOnTypeFormatting:f=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(m,v)=>f(m,v)),onRenameRequest:f=>o.onRequest(D.RenameRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),onPrepareRename:f=>o.onRequest(D.PrepareRenameRequest.type,(m,v)=>f(m,v)),onDocumentLinks:f=>o.onRequest(D.DocumentLinkRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onDocumentLinkResolve:f=>o.onRequest(D.DocumentLinkResolveRequest.type,(m,v)=>f(m,v)),onDocumentColor:f=>o.onRequest(D.DocumentColorRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onColorPresentation:f=>o.onRequest(D.ColorPresentationRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onFoldingRanges:f=>o.onRequest(D.FoldingRangeRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onSelectionRanges:f=>o.onRequest(D.SelectionRangeRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),(0,k.attachPartialResult)(o,m))),onExecuteCommand:f=>o.onRequest(D.ExecuteCommandRequest.type,(m,v)=>f(m,v,(0,k.attachWorkDone)(o,m),void 0)),dispose:()=>o.dispose()};for(let f of h)f.attach(M);return o.onRequest(D.InitializeRequest.type,f=>{t.initialize(f),ke.string(f.trace)&&(i.trace=D.Trace.fromString(f.trace));for(let m of h)m.initialize(f.capabilities);if(N){let m=N(f,new D.CancellationTokenSource().token,(0,k.attachWorkDone)(o,f),void 0);return I(m).then(v=>{if(v instanceof D.ResponseError)return v;let x=v;x||(x={capabilities:{}});let A=x.capabilities;A||(A={},x.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=ke.number(M.__textDocumentSync)?M.__textDocumentSync:D.TextDocumentSyncKind.None:!ke.number(A.textDocumentSync)&&!ke.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=ke.number(M.__textDocumentSync)?M.__textDocumentSync:D.TextDocumentSyncKind.None);for(let E of h)E.fillServerCapabilities(A);return x})}else{let m={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let v of h)v.fillServerCapabilities(m.capabilities);return m}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,q)return q(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(B)return B()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,f=>{i.trace=D.Trace.fromString(f.value)}),M}});var Df=S(ye=>{"use strict";var dp=ye&&ye.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),fp=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Nc=ye&&ye.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Ae.normalize(n.join("/"))}function xc(){return process.platform==="win32"}function so(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let b=process.env,g=Object.create(null);Object.keys(b).forEach(d=>g[d]=b[d]),t&&Mc.existsSync(t)&&(g[o]?g[o]=t+Ae.delimiter+g[o]:g[o]=t,r&&r(`NODE_PATH value is: ${g[o]}`)),g.ELECTRON_RUN_AS_NODE="1";try{let d=(0,Gc.fork)("",[],{cwd:n,env:g,execArgv:["-e",i]});if(d.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}d.on("error",h=>{a(h)}),d.on("message",h=>{h.c==="r"&&(d.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let T={c:"rs",a:e};d.send(T)}catch(d){a(d)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};xc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Gc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?xc()?Ae.join(s,"node_modules"):Ae.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function gp(e){let t="yarn",n={encoding:"utf8"};xc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Gc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let b=JSON.parse(a);if(b.type==="log")return Ae.join(b.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Ec;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Mc.existsSync(__filename.toUpperCase())||!Mc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Ae.normalize(i).indexOf(Ae.normalize(o))===0:Ae.normalize(i).toLowerCase().indexOf(Ae.normalize(o).toLowerCase())===0}e.isParent=r})(Ec||(ye.FileSystem=Ec={}));function pp(e,t,n,r){return n?(Ae.isAbsolute(n)||(n=Ae.join(e,n)),so(t,n,n,r).then(o=>Ec.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>so(t,qc(r),e,r))):so(t,qc(r),e,r)}});var Of=S(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var wf=require("util"),Ze=Ve(),Ac=class e extends Ze.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new wf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},jc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),Ze.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),Ze.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),Ze.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),Ze.Disposable.create(()=>this.stream.off("data",t))}},Fc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),Ze.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),Ze.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),Ze.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},Pf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Ac(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new wf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new jc(e),asWritableStream:e=>new Fc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Lc(){return Pf}(function(e){function t(){Ze.RAL.install(Pf)}e.install=t})(Lc||(Lc={}));Hc.default=Lc});var Qc=S(G=>{"use strict";var kf=G&&G.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),yp=G&&G.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$c=G&&G.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),we.Disposable.create(()=>this.process.off("message",t))}};G.IPCMessageReader=Wc;var Uc=class extends we.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.IPCMessageWriter=Uc;var Bc=class extends we.AbstractMessageReader{onData;constructor(t){super(),this.onData=new we.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};G.PortMessageReader=Bc;var zc=class extends we.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.PortMessageWriter=zc;var Ot=class extends we.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Hn.default)().stream.asReadableStream(t),n)}};G.SocketMessageReader=Ot;var Rt=class extends we.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};G.SocketMessageWriter=Rt;var co=class extends we.ReadableStreamMessageReader{constructor(t,n){super((0,Hn.default)().stream.asReadableStream(t),n)}};G.StreamMessageReader=co;var ao=class extends we.WriteableStreamMessageWriter{constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n)}};G.StreamMessageWriter=ao;var Ip=process.env.XDG_RUNTIME_DIR,Sp=new Map([["linux",107],["darwin",102]]);function Dp(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Rf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Cp.realpathSync(Ip??vp.tmpdir()),r=Sp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Rf.randomBytes)(Math.floor(e/2)).toString("hex");return bp.join(n,`lsp-${o}.sock`)}function wp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Ot(a,t),new Rt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Pp(e,t="utf-8"){let n=(0,uo.createConnection)(e);return[new Ot(n,t),new Rt(n,t)]}function Op(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Ot(a,t),new Rt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Rp(e,t="utf-8"){let n=(0,uo.createConnection)(e,"127.0.0.1");return[new Ot(n,t),new Rt(n,t)]}function kp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Mp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function xp(e,t,n,r){n||(n=we.NullLogger);let o=kp(e)?new co(e):e,i=Mp(t)?new ao(t):t;return we.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,we.createMessageConnection)(o,i,n,r)}});var Vc=S(et=>{"use strict";var qp=et&&et.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Mf=et&&et.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&qp(t,e,n)};Object.defineProperty(et,"__esModule",{value:!0});et.createProtocolConnection=Np;var Ep=Qc();Mf(Qc(),et);Mf(Z(),et);function Np(e,t,n,r){return(0,Ep.createMessageConnection)(e,t,n,r)}});var Xc=S(me=>{"use strict";var Gp=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qf=me&&me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Gp(t,e,n)};Object.defineProperty(me,"__esModule",{value:!0});me.ProposedFeatures=me.NotebookDocuments=me.TextDocuments=me.SemanticTokensBuilder=void 0;var Ap=yc();Object.defineProperty(me,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Ap.SemanticTokensBuilder}});qf(Z(),me);var jp=vc();Object.defineProperty(me,"TextDocuments",{enumerable:!0,get:function(){return jp.TextDocuments}});var Fp=Sc();Object.defineProperty(me,"NotebookDocuments",{enumerable:!0,get:function(){return Fp.NotebookDocuments}});qf(kc(),me);var xf;(function(e){e.all={__brand:"features"}})(xf||(me.ProposedFeatures=xf={}))});var Yc=S(Te=>{"use strict";var Af=Te&&Te.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lp=Te&&Te.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jf=Te&&Te.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{lo(),process.exit(ln?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Kc.number(t)&&Lf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(ln?0:1)}},3e3)},get shutdownReceived(){return ln},set shutdownReceived(e){ln=e},exit:e=>{lo(),process.exit(e)}};function Bp(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),kt.ConnectionStrategy.is(e)||kt.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),zp(i,s,a,o)}function zp(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,b,g=process.argv.slice(2);for(let d=0;d{lo(),process.exit(ln?0:1)}),a.on("close",()=>{lo(),process.exit(ln?0:1)})}let s=a=>{let b=(0,kt.createProtocolConnection)(e,t,a,n);return o&&$p(a),b};return(0,Hp.createConnection)(s,Up,r)}function $p(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Ef.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Ef.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Bf={};Sa(Bf,{TextDocument:()=>Jc});function Zc(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);Zc(r,t),Zc(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Qp(e){let t=Uf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var fo,Jc,zf=Ia(()=>{"use strict";fo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Uf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),b=Math.max(o.end.line,0),g=this._lineOffsets,d=Hf(r.text,!1,i);if(b-a===d.length)for(let h=0,I=d.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Wf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new fo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof fo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=Zc(i.map(Qp),(d,T)=>{let h=d.range.start.line-T.range.start.line;return h===0?d.range.start.character-T.range.start.character:h}),b=0,g=[];for(let d of a){let T=o.offsetAt(d.range.start);if(Tb&&g.push(s.substring(b,T)),d.newText.length&&g.push(d.newText),b=o.offsetAt(d.range.end)}return g.push(s.substr(b)),g.join("")}e.applyEdits=r})(Jc||(Jc={}))});var Un=S(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.DATATYPE_SET=he.KEYWORD_SET=he.PUNCTUATION=he.OPERATORS=he.DATATYPES=he.KEYWORDS=void 0;he.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];he.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];he.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];he.PUNCTUATION=["(",")","[","]",";",",",":","."];he.KEYWORD_SET=new Set(he.KEYWORDS);he.DATATYPE_SET=new Set(he.DATATYPES)});var Mt=S(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.TokenKind=void 0;var $f;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})($f||(mo.TokenKind=$f={}))});var po=S(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.tokenize=Kp;var go=Un(),Pe=Mt();function Vp(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function Qf(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function ho(e){return e!==void 0&&/[0-9]/.test(e)}function Xp(e){let t=e.toUpperCase();return go.DATATYPE_SET.has(t)?Pe.TokenKind.Datatype:go.KEYWORD_SET.has(t)?Pe.TokenKind.Keyword:Pe.TokenKind.Identifier}function Kp(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=g=>{for(;n{let T=n,h=i();s(d),t.push({kind:g,lexeme:e.slice(T,d),span:{start:T,end:d},range:{start:h,end:i()}})};for(;n",n)||e.startsWith("{<",n))&&(q===-1||q>I);a(Pe.TokenKind.Comment,N?I:q===-1?e.length:q+1);continue}if(g==="'"){let h=n+1;for(;he.startsWith(h,n));if(d!==void 0){a(Pe.TokenKind.Operator,n+d.length);continue}if(go.PUNCTUATION.includes(g)){a(Pe.TokenKind.Punctuation,n+1);continue}let T=e.codePointAt(n);a(Pe.TokenKind.Unknown,n+(T!==void 0&&T>65535?2:1))}let b=i();return t.push({kind:Pe.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:b,end:{...b}}}),t}});var yo=S(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.positionAt=na;Bn.offsetAt=Jp;Bn.sourceRange=Zp;function ta(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Vf(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function Xf(e){let t=[0];for(let n=0;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Me.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Me.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(b){return b===!0||b===!1}e.boolean=o;function i(b){return t.call(b)==="[object String]"}e.string=i;function s(b){return t.call(b)==="[object Number]"}e.number=s;function a(b,R,E){return t.call(b)==="[object Number]"&&R<=b&&b<=E}e.numberRange=a;function _(b){return t.call(b)==="[object Number]"&&-2147483648<=b&&b<=2147483647}e.integer=_;function f(b){return t.call(b)==="[object Number]"&&0<=b&&b<=2147483647}e.uinteger=f;function d(b){return t.call(b)==="[object Function]"}e.func=d;function v(b){return b!==null&&typeof b=="object"}e.objectLiteral=v;function h(b,R){return Array.isArray(b)&&b.every(R)}e.typedArray=h})(l||(l={}))});var V=I(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CM=me.ProtocolNotificationType=me.ProtocolNotificationType0=me.ProtocolRequestType=me.ProtocolRequestType0=me.RegistrationType=me.MessageDirection=void 0;var Jt=tt(),Za;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Za||(me.MessageDirection=Za={}));var Bs=class{____;method;constructor(t){this.method=t}};me.RegistrationType=Bs;var zs=class extends Jt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};me.ProtocolRequestType0=zs;var $s=class extends Jt.RequestType{__;___;____;_pr;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolRequestType=$s;var Qs=class extends Jt.NotificationType0{___;____;constructor(t){super(t)}};me.ProtocolNotificationType0=Qs;var Vs=class extends Jt.NotificationType{___;____;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolNotificationType=Vs;var eu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(eu||(me.CM=eu={}))});var Rr=I(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Hh;Fe.string=tu;Fe.number=Wh;Fe.error=Uh;Fe.func=Bh;Fe.array=nu;Fe.stringArray=zh;Fe.typedArray=$h;Fe.objectLiteral=Qh;function Hh(e){return e===!0||e===!1}function tu(e){return typeof e=="string"||e instanceof String}function Wh(e){return typeof e=="number"||e instanceof Number}function Uh(e){return e instanceof Error}function Bh(e){return typeof e=="function"}function nu(e){return Array.isArray(e)}function zh(e){return nu(e)&&e.every(t=>tu(t))}function $h(e,t){return Array.isArray(e)&&e.every(t)}function Qh(e){return e!==null&&typeof e=="object"}});var ou=I(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.ImplementationRequest=void 0;var Xs=V(),ru;(function(e){e.method="textDocument/implementation",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.implementation","implementationProvider")})(ru||(kr.ImplementationRequest=ru={}))});var su=I(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.TypeDefinitionRequest=void 0;var Ks=V(),iu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(iu||(Mr.TypeDefinitionRequest=iu={}))});var uu=I(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.DidChangeWorkspaceFoldersNotification=en.WorkspaceFoldersRequest=void 0;var Zt=V(),cu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Zt.MessageDirection.serverToClient,e.type=new Zt.ProtocolRequestType0(e.method),e.capabilities=Zt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(cu||(en.WorkspaceFoldersRequest=cu={}));var au;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolNotificationType(e.method),e.capabilities=Zt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(au||(en.DidChangeWorkspaceFoldersNotification=au={}))});var du=I(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.ConfigurationRequest=void 0;var Ys=V(),lu;(function(e){e.method="workspace/configuration",e.messageDirection=Ys.MessageDirection.serverToClient,e.type=new Ys.ProtocolRequestType(e.method),e.capabilities=Ys.CM.create("workspace.configuration",void 0)})(lu||(xr.ConfigurationRequest=lu={}))});var hu=I(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.ColorPresentationRequest=nn.DocumentColorRequest=void 0;var tn=V(),fu;(function(e){e.method="textDocument/documentColor",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.colorProvider","colorProvider")})(fu||(nn.DocumentColorRequest=fu={}));var mu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.colorProvider","colorProvider")})(mu||(nn.ColorPresentationRequest=mu={}))});var yu=I(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.FoldingRangeRefreshRequest=on.FoldingRangeRequest=void 0;var rn=V(),gu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(gu||(on.FoldingRangeRequest=gu={}));var pu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(pu||(on.FoldingRangeRefreshRequest=pu={}))});var _u=I(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.DeclarationRequest=void 0;var Js=V(),Tu;(function(e){e.method="textDocument/declaration",e.messageDirection=Js.MessageDirection.clientToServer,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("textDocument.declaration","declarationProvider")})(Tu||(qr.DeclarationRequest=Tu={}))});var vu=I(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.SelectionRangeRequest=void 0;var Zs=V(),bu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(bu||(Er.SelectionRangeRequest=bu={}))});var Du=I(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.WorkDoneProgressCancelNotification=yt.WorkDoneProgressCreateRequest=yt.WorkDoneProgress=void 0;var Vh=tt(),An=V(),Cu;(function(e){e.type=new Vh.ProgressType;function t(n){return n===e.type}e.is=t})(Cu||(yt.WorkDoneProgress=Cu={}));var Iu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=An.MessageDirection.serverToClient,e.type=new An.ProtocolRequestType(e.method),e.capabilities=An.CM.create("window.workDoneProgress",void 0)})(Iu||(yt.WorkDoneProgressCreateRequest=Iu={}));var Su;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=An.MessageDirection.clientToServer,e.type=new An.ProtocolNotificationType(e.method)})(Su||(yt.WorkDoneProgressCancelNotification=Su={}))});var Ru=I(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.CallHierarchyOutgoingCallsRequest=Tt.CallHierarchyIncomingCallsRequest=Tt.CallHierarchyPrepareRequest=void 0;var rt=V(),wu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(wu||(Tt.CallHierarchyPrepareRequest=wu={}));var Pu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Pu||(Tt.CallHierarchyIncomingCallsRequest=Pu={}));var Ou;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ou||(Tt.CallHierarchyOutgoingCallsRequest=Ou={}))});var Nu=I(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SemanticTokensRefreshRequest=Ie.SemanticTokensRangeRequest=Ie.SemanticTokensDeltaRequest=Ie.SemanticTokensRequest=Ie.SemanticTokensRegistrationType=Ie.TokenFormat=void 0;var Pe=V(),ku;(function(e){e.Relative="relative"})(ku||(Ie.TokenFormat=ku={}));var jn;(function(e){e.method="textDocument/semanticTokens",e.type=new Pe.RegistrationType(e.method)})(jn||(Ie.SemanticTokensRegistrationType=jn={}));var Mu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=jn.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Mu||(Ie.SemanticTokensRequest=Mu={}));var xu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=jn.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(xu||(Ie.SemanticTokensDeltaRequest=xu={}));var qu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=jn.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(qu||(Ie.SemanticTokensRangeRequest=qu={}));var Eu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Pe.MessageDirection.serverToClient,e.type=new Pe.ProtocolRequestType0(e.method),e.capabilities=Pe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Eu||(Ie.SemanticTokensRefreshRequest=Eu={}))});var Au=I(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ShowDocumentRequest=void 0;var ec=V(),Gu;(function(e){e.method="window/showDocument",e.messageDirection=ec.MessageDirection.serverToClient,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("window.showDocument.support",void 0)})(Gu||(Nr.ShowDocumentRequest=Gu={}))});var Fu=I(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.LinkedEditingRangeRequest=void 0;var tc=V(),ju;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(ju||(Gr.LinkedEditingRangeRequest=ju={}))});var Qu=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.WillDeleteFilesRequest=he.DidDeleteFilesNotification=he.DidRenameFilesNotification=he.WillRenameFilesRequest=he.DidCreateFilesNotification=he.WillCreateFilesRequest=he.FileOperationPatternKind=void 0;var ie=V(),Lu;(function(e){e.file="file",e.folder="folder"})(Lu||(he.FileOperationPatternKind=Lu={}));var Hu;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Hu||(he.WillCreateFilesRequest=Hu={}));var Wu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Wu||(he.DidCreateFilesNotification=Wu={}));var Uu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Uu||(he.WillRenameFilesRequest=Uu={}));var Bu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Bu||(he.DidRenameFilesNotification=Bu={}));var zu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(zu||(he.DidDeleteFilesNotification=zu={}));var $u;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})($u||(he.WillDeleteFilesRequest=$u={}))});var Yu=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.MonikerRequest=_t.MonikerKind=_t.UniquenessLevel=void 0;var nc=V(),Vu;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Vu||(_t.UniquenessLevel=Vu={}));var Xu;(function(e){e.$import="import",e.$export="export",e.local="local"})(Xu||(_t.MonikerKind=Xu={}));var Ku;(function(e){e.method="textDocument/moniker",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.moniker","monikerProvider")})(Ku||(_t.MonikerRequest=Ku={}))});var tl=I(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.TypeHierarchySubtypesRequest=bt.TypeHierarchySupertypesRequest=bt.TypeHierarchyPrepareRequest=void 0;var xt=V(),Ju;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=xt.MessageDirection.clientToServer,e.type=new xt.ProtocolRequestType(e.method),e.capabilities=xt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Ju||(bt.TypeHierarchyPrepareRequest=Ju={}));var Zu;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=xt.MessageDirection.clientToServer,e.type=new xt.ProtocolRequestType(e.method)})(Zu||(bt.TypeHierarchySupertypesRequest=Zu={}));var el;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=xt.MessageDirection.clientToServer,e.type=new xt.ProtocolRequestType(e.method)})(el||(bt.TypeHierarchySubtypesRequest=el={}))});var ol=I(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.InlineValueRefreshRequest=cn.InlineValueRequest=void 0;var sn=V(),nl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=sn.MessageDirection.clientToServer,e.type=new sn.ProtocolRequestType(e.method),e.capabilities=sn.CM.create("textDocument.inlineValue","inlineValueProvider")})(nl||(cn.InlineValueRequest=nl={}));var rl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=sn.MessageDirection.serverToClient,e.type=new sn.ProtocolRequestType0(e.method),e.capabilities=sn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(rl||(cn.InlineValueRefreshRequest=rl={}))});var al=I(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.InlayHintRefreshRequest=vt.InlayHintResolveRequest=vt.InlayHintRequest=void 0;var ot=V(),il;(function(e){e.method="textDocument/inlayHint",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint","inlayHintProvider")})(il||(vt.InlayHintRequest=il={}));var sl;(function(e){e.method="inlayHint/resolve",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(sl||(vt.InlayHintResolveRequest=sl={}));var cl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=ot.MessageDirection.serverToClient,e.type=new ot.ProtocolRequestType0(e.method),e.capabilities=ot.CM.create("workspace.inlayHint.refreshSupport",void 0)})(cl||(vt.InlayHintRefreshRequest=cl={}))});var gl=I(se=>{"use strict";var Xh=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Kh=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yh=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Zh=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tg=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.InlineCompletionRequest=void 0;var ic=V(),Il;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Il||(jr.InlineCompletionRequest=Il={}))});var Pl=I(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.TextDocumentContentRefreshRequest=un.TextDocumentContentRequest=void 0;var Ln=V(),Dl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Ln.MessageDirection.clientToServer,e.type=new Ln.ProtocolRequestType(e.method),e.capabilities=Ln.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Dl||(un.TextDocumentContentRequest=Dl={}));var wl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Ln.MessageDirection.serverToClient,e.type=new Ln.ProtocolRequestType(e.method)})(wl||(un.TextDocumentContentRefreshRequest=wl={}))});var Hd=I(c=>{"use strict";var ng=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),og=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Nl||(c.StaticRegistrationOptions=Nl={}));var Gl;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||uc.is(r.documentSelector))}e.is=t})(Gl||(c.TextDocumentRegistrationOptions=Gl={}));var Al;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Al||(c.WorkDoneProgressOptions=Al={}));var jl;(function(e){e.method="initialize",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method)})(jl||(c.InitializeRequest=jl={}));var Fl;(function(e){e.unknownProtocolVersion=1})(Fl||(c.InitializeErrorCodes=Fl={}));var Ll;(function(e){e.method="initialized",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method)})(Ll||(c.InitializedNotification=Ll={}));var Hl;(function(e){e.method="shutdown",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType0(e.method)})(Hl||(c.ShutdownRequest=Hl={}));var Wl;(function(e){e.method="exit",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType0(e.method)})(Wl||(c.ExitNotification=Wl={}));var Ul;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeConfiguration",void 0)})(Ul||(c.DidChangeConfigurationNotification=Ul={}));var Bl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Bl||(c.MessageType=Bl={}));var zl;(function(e){e.method="window/showMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(zl||(c.ShowMessageNotification=zl={}));var $l;(function(e){e.method="window/showMessageRequest",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})($l||(c.ShowMessageRequest=$l={}));var Ql;(function(e){e.method="window/logMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Ql||(c.LogMessageNotification=Ql={}));var Vl;(function(e){e.method="telemetry/event",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Vl||(c.TelemetryEventNotification=Vl={}));var Xl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Xl||(c.TextDocumentSyncKind=Xl={}));var Kl;(function(e){e.method="textDocument/didOpen",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Kl||(c.DidOpenTextDocumentNotification=Kl={}));var Yl;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Yl||(c.TextDocumentContentChangeEvent=Yl={}));var Jl;(function(e){e.method="textDocument/didChange",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync")})(Jl||(c.DidChangeTextDocumentNotification=Jl={}));var Zl;(function(e){e.method="textDocument/didClose",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Zl||(c.DidCloseTextDocumentNotification=Zl={}));var ed;(function(e){e.method="textDocument/didSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(ed||(c.DidSaveTextDocumentNotification=ed={}));var td;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(td||(c.TextDocumentSaveReason=td={}));var nd;(function(e){e.method="textDocument/willSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(nd||(c.WillSaveTextDocumentNotification=nd={}));var rd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(rd||(c.WillSaveTextDocumentWaitUntilRequest=rd={}));var od;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeWatchedFiles",void 0)})(od||(c.DidChangeWatchedFilesNotification=od={}));var id;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(id||(c.FileChangeType=id={}));var lc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Ol.URI.is(r.baseUri)||Ol.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(lc||(c.RelativePattern=lc={}));var dc;(function(e){function t(n){let r=n;return ce.string(r)||lc.is(r)}e.is=t})(dc||(c.GlobPattern=dc={}));var sd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(sd||(c.WatchKind=sd={}));var cd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.publishDiagnostics",void 0)})(cd||(c.PublishDiagnosticsNotification=cd={}));var ad;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(ad||(c.CompletionTriggerKind=ad={}));var ud;(function(e){e.method="textDocument/completion",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion","completionProvider")})(ud||(c.CompletionRequest=ud={}));var ld;(function(e){e.method="completionItem/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(ld||(c.CompletionResolveRequest=ld={}));var dd;(function(e){e.method="textDocument/hover",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.hover","hoverProvider")})(dd||(c.HoverRequest=dd={}));var fd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(fd||(c.SignatureHelpTriggerKind=fd={}));var md;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(md||(c.SignatureHelpRequest=md={}));var hd;(function(e){e.method="textDocument/definition",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.definition","definitionProvider")})(hd||(c.DefinitionRequest=hd={}));var gd;(function(e){e.method="textDocument/references",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.references","referencesProvider")})(gd||(c.ReferencesRequest=gd={}));var pd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(pd||(c.DocumentHighlightRequest=pd={}));var yd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(yd||(c.DocumentSymbolRequest=yd={}));var Td;(function(e){e.method="textDocument/codeAction",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction","codeActionProvider")})(Td||(c.CodeActionRequest=Td={}));var _d;(function(e){e.method="codeAction/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(_d||(c.CodeActionResolveRequest=_d={}));var bd;(function(e){e.method="workspace/symbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol","workspaceSymbolProvider")})(bd||(c.WorkspaceSymbolRequest=bd={}));var vd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(vd||(c.WorkspaceSymbolResolveRequest=vd={}));var Cd;(function(e){e.method="textDocument/codeLens",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens","codeLensProvider")})(Cd||(c.CodeLensRequest=Cd={}));var Id;(function(e){e.method="codeLens/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Id||(c.CodeLensResolveRequest=Id={}));var Sd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType0(e.method),e.capabilities=y.CM.create("workspace.codeLens",void 0)})(Sd||(c.CodeLensRefreshRequest=Sd={}));var Dd;(function(e){e.method="textDocument/documentLink",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider")})(Dd||(c.DocumentLinkRequest=Dd={}));var wd;(function(e){e.method="documentLink/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(wd||(c.DocumentLinkResolveRequest=wd={}));var Pd;(function(e){e.method="textDocument/formatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.formatting","documentFormattingProvider")})(Pd||(c.DocumentFormattingRequest=Pd={}));var Od;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Od||(c.DocumentRangeFormattingRequest=Od={}));var Rd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Rd||(c.DocumentRangesFormattingRequest=Rd={}));var kd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(kd||(c.DocumentOnTypeFormattingRequest=kd={}));var Md;(function(e){e.Identifier=1})(Md||(c.PrepareSupportDefaultBehavior=Md={}));var xd;(function(e){e.method="textDocument/rename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename","renameProvider")})(xd||(c.RenameRequest=xd={}));var qd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(qd||(c.PrepareRenameRequest=qd={}));var Ed;(function(e){e.method="workspace/executeCommand",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.executeCommand","executeCommandProvider")})(Ed||(c.ExecuteCommandRequest=Ed={}));var Nd;(function(e){e.method="workspace/applyEdit",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType("workspace/applyEdit"),e.capabilities=y.CM.create("workspace.applyEdit",void 0)})(Nd||(c.ApplyWorkspaceEditRequest=Nd={}))});var Ud=I(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.createProtocolConnection=mg;var Wd=tt();function mg(e,t,n,r){return Wd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Wd.createMessageConnection)(e,t,n,r)}});var ee=I(Se=>{"use strict";var hg=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fr=Se&&Se.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&hg(t,e,n)};Object.defineProperty(Se,"__esModule",{value:!0});Se.LSPErrorCodes=Se.createProtocolConnection=void 0;Fr(tt(),Se);Fr((Or(),tr(Pr)),Se);Fr(V(),Se);Fr(Hd(),Se);var gg=Ud();Object.defineProperty(Se,"createProtocolConnection",{enumerable:!0,get:function(){return gg.createProtocolConnection}});var Bd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Bd||(Se.LSPErrorCodes=Bd={}))});var _c=I(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.empty=void 0;Ct.v4=zd;Ct.isUUID=$d;Ct.parse=yg;Ct.generateUuid=Tg;var Wn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Tc=class e extends Wn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};Ct.empty=new Wn("00000000-0000-0000-0000-000000000000");function zd(){return new Tc}var pg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function $d(e){return pg.test(e)}function yg(e){if(!$d(e))throw new Error("invalid uuid");return new Wn(e)}function Tg(){return zd().asHex()}});var Qd=I(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.ProgressFeature=void 0;fn.attachWorkDone=bg;fn.attachPartialResult=Cg;var It=ee(),_g=_c(),dn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(It.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,{kind:"end"})}},Lr=class extends dn{_source;constructor(t,n){super(t,n),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Un=class{constructor(){}begin(){}report(){}done(){}},Hr=class extends Un{_source;constructor(){super(),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function bg(e,t){if(t===void 0||t.workDoneToken===void 0)return new Un;let n=t.workDoneToken;return delete t.workDoneToken,new dn(e,n)}var vg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(It.WorkDoneProgressCancelNotification.type,n=>{let r=dn.Instances.get(n.token);(r instanceof Lr||r instanceof Hr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Un:new dn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,_g.generateUuid)();return this.connection.sendRequest(It.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new Lr(this.connection,t))}else return Promise.resolve(new Hr)}};fn.ProgressFeature=vg;var bc;(function(e){e.type=new It.ProgressType})(bc||(bc={}));var vc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(bc.type,this._token,t)}};function Cg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new vc(e,n)}});var Vd=I(Xe=>{"use strict";var Ig=Xe&&Xe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sg=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dg=Xe&&Xe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?Pg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(wg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Xe.ConfigurationFeature=Og});var Xd=I(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.WorkspaceFoldersFeature=void 0;var Wr=ee(),Rg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Wr.Emitter,this.connection.onNotification(Wr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Wr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Wr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Ur.WorkspaceFoldersFeature=Rg});var Kd=I(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.CallHierarchyFeature=void 0;var Cc=ee(),kg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Cc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Cc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Cc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.CallHierarchyFeature=kg});var Sc=I(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.SemanticTokensBuilder=St.SemanticTokensDiff=St.SemanticTokensFeature=void 0;var zr=ee(),Mg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(zr.SemanticTokensRefreshRequest.type),on:t=>{let n=zr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=zr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=zr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};St.SemanticTokensFeature=Mg;var $r=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let _=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;_[this._dataLen++]=s,_[this._dataLen++]=a,_[this._dataLen++]=r,_[this._dataLen++]=o,_[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let f=t[5*a],d=t[5*_];if(f===d){let v=t[5*a+1],h=t[5*_+1];return v-h}return f-d});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.ShowDocumentFeature=void 0;var xg=ee(),qg=e=>class extends e{showDocument(t){return this.connection.sendRequest(xg.ShowDocumentRequest.type,t)}};Qr.ShowDocumentFeature=qg});var Jd=I(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.FileOperationsFeature=void 0;var mn=ee(),Eg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(mn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(mn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(mn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(mn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(mn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(mn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Vr.FileOperationsFeature=Eg});var Zd=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.LinkedEditingRangeFeature=void 0;var Ng=ee(),Gg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Ng.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Xr.LinkedEditingRangeFeature=Gg});var ef=I(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.TypeHierarchyFeature=void 0;var Dc=ee(),Ag=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Dc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Dc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Dc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.TypeHierarchyFeature=Ag});var nf=I(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineValueFeature=void 0;var tf=ee(),jg=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(tf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(tf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineValueFeature=jg});var of=I(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.FoldingRangeFeature=void 0;var rf=ee(),Fg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(rf.FoldingRangeRefreshRequest.type),on:t=>{let n=rf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Jr.FoldingRangeFeature=Fg});var sf=I(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.InlayHintFeature=void 0;var wc=ee(),Lg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(wc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(wc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(wc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Zr.InlayHintFeature=Lg});var cf=I(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.DiagnosticFeature=void 0;var Bn=ee(),Hg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Bn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Bn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Bn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Bn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Bn.WorkspaceDiagnosticRequest.partialResult,n)))}}};eo.DiagnosticFeature=Hg});var Oc=I(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.TextDocuments=void 0;var Et=ee(),Pc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Et.Emitter,this._onDidOpen=new Et.Emitter,this._onDidClose=new Et.Emitter,this._onDidSave=new Et.Emitter,this._onWillSave=new Et.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Et.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Et.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};to.TextDocuments=Pc});var Mc=I(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.NotebookDocuments=hn.NotebookSyncFeature=void 0;var xe=ee(),af=Oc(),Wg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(xe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(xe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(xe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(xe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};hn.NotebookSyncFeature=Wg;var Rc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,xe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,xe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,xe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},kc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof af.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new af.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new xe.Emitter,this._onDidChange=new xe.Emitter,this._onDidSave=new xe.Emitter,this._onDidClose=new xe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Rc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,_=o.change;_.metadata!==void 0&&(a=!0,i.metadata=_.metadata);let f=[],d=[],v=[],h=[];if(_.cells!==void 0){let N=_.cells;if(N.structure!==void 0){let m=N.structure.array;if(i.cells.splice(m.start,m.deleteCount,...m.cells!==void 0?m.cells:[]),N.structure.didOpen!==void 0)for(let p of N.structure.didOpen)await n.openTextDocument({textDocument:p}),f.push(p.uri);if(N.structure.didClose)for(let p of N.structure.didClose)await n.closeTextDocument({textDocument:p}),d.push(p.uri)}if(N.data!==void 0){let m=new Map(N.data.map(p=>[p.document,p]));for(let p=0;p<=i.cells.length;p++){let S=m.get(i.cells[p].document);if(S!==void 0){let x=i.cells.splice(p,1,S);if(v.push({old:x[0],new:S}),m.delete(S.document),m.size===0)break}}}if(N.textContent!==void 0)for(let m of N.textContent)await n.changeTextDocument({textDocument:m.document,contentChanges:m.changes}),h.push(m.document.uri)}this.updateCellMap(i);let b={notebookDocument:i};a&&(b.metadata={old:s,new:i.metadata});let R=[];for(let N of f)R.push(this.getNotebookCell(N));let E=[];for(let N of d)E.push(this.getNotebookCell(N));let z=[];for(let N of h)z.push(this.getNotebookCell(N));(R.length>0||E.length>0||v.length>0||z.length>0)&&(b.cells={added:R,removed:E,changed:{data:v,textContent:z}}),(b.metadata!==void 0||b.cells!==void 0)&&this._onDidChange.fire(b)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),xe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};hn.NotebookDocuments=kc});var uf=I(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.MonikerFeature=void 0;var Ug=ee(),Bg=e=>class extends e{get moniker(){return{on:t=>{let n=Ug.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};no.MonikerFeature=Bg});var lf=I(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.InlineCompletionFeature=void 0;var zg=ee(),$g=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(zg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};ro.InlineCompletionFeature=$g});var ff=I(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.TextDocumentContentFeature=void 0;var df=ee(),Qg=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(df.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(df.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};oo.TextDocumentContentFeature=Qg});var Ac=I(U=>{"use strict";var Vg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Xg=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_f=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Ec;var io=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Nc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}},mf=(0,ep.ShowDocumentFeature)((0,M.ProgressFeature)(Nc)),hf;(function(e){function t(){return new so}e.create=t})(hf||(U.BulkRegistration=hf={}));var so=class{_registrations=[];_registered=new Set;add(t,n){let r=qe.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=qc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},gf;(function(e){function t(){return new zn(void 0,[])}e.create=t})(gf||(U.BulkUnregistration=gf={}));var zn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=qe.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},co=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof so?this.registerMany(t):t instanceof zn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=qe.string(n)?n:n.method,i=qc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=qe.string(t)?t:t.method,o=qc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new zn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Gc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},pf=(0,dp.TextDocumentContentFeature)((0,tp.FileOperationsFeature)((0,Yg.WorkspaceFoldersFeature)((0,Kg.ConfigurationFeature)(Gc)))),ao=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},uo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},lo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=lo;var yf=(0,lp.InlineCompletionFeature)((0,ip.FoldingRangeFeature)((0,up.MonikerFeature)((0,cp.DiagnosticFeature)((0,sp.InlayHintFeature)((0,op.InlineValueFeature)((0,rp.TypeHierarchyFeature)((0,np.LinkedEditingRangeFeature)((0,Zg.SemanticTokensFeature)((0,Jg.CallHierarchyFeature)(lo)))))))))),fo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=fo;var Tf=(0,ap.NotebookSyncFeature)(fo);function bf(e,t){return function(n){return t(e(n))}}function vf(e,t){return function(n){return t(e(n))}}function Cf(e,t){return function(n){return t(e(n))}}function If(e,t){return function(n){return t(e(n))}}function Sf(e,t){return function(n){return t(e(n))}}function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function fp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,bf),tracer:n(e.tracer,t.tracer,Cf),telemetry:n(e.telemetry,t.telemetry,vf),client:n(e.client,t.client,If),window:n(e.window,t.window,Sf),workspace:n(e.workspace,t.workspace,Df),languages:n(e.languages,t.languages,wf),notebooks:n(e.notebooks,t.notebooks,Pf)}}function mp(e,t,n){let r=n&&n.console?new(n.console(io)):new io,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(ao)):new ao,s=n&&n.telemetry?new(n.telemetry(uo)):new uo,a=n&&n.client?new(n.client(co)):new co,_=n&&n.window?new(n.window(mf)):new mf,f=n&&n.workspace?new(n.workspace(pf)):new pf,d=n&&n.languages?new(n.languages(yf)):new yf,v=n&&n.notebooks?new(n.notebooks(Tf)):new Tf,h=[r,i,s,a,_,f,d,v];function b(m){return m instanceof Promise?m:qe.thenable(m)?new Promise((p,S)=>{m.then(x=>p(x),x=>S(x))}):Promise.resolve(m)}let R,E,z,N={listen:()=>o.listen(),sendRequest:(m,...p)=>o.sendRequest(qe.string(m)?m:m.method,...p),onRequest:(m,p)=>o.onRequest(m,p),sendNotification:(m,p)=>{let S=qe.string(m)?m:m.method;return o.sendNotification(S,p)},onNotification:(m,p)=>o.onNotification(m,p),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:m=>(E=m,{dispose:()=>{E=void 0}}),onInitialized:m=>o.onNotification(D.InitializedNotification.type,m),onShutdown:m=>(R=m,{dispose:()=>{R=void 0}}),onExit:m=>(z=m,{dispose:()=>{z=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return _},get workspace(){return f},get languages(){return d},get notebooks(){return v},onDidChangeConfiguration:m=>o.onNotification(D.DidChangeConfigurationNotification.type,m),onDidChangeWatchedFiles:m=>o.onNotification(D.DidChangeWatchedFilesNotification.type,m),__textDocumentSync:void 0,onDidOpenTextDocument:m=>o.onNotification(D.DidOpenTextDocumentNotification.type,m),onDidChangeTextDocument:m=>o.onNotification(D.DidChangeTextDocumentNotification.type,m),onDidCloseTextDocument:m=>o.onNotification(D.DidCloseTextDocumentNotification.type,m),onWillSaveTextDocument:m=>o.onNotification(D.WillSaveTextDocumentNotification.type,m),onWillSaveTextDocumentWaitUntil:m=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,m),onDidSaveTextDocument:m=>o.onNotification(D.DidSaveTextDocumentNotification.type,m),sendDiagnostics:m=>o.sendNotification(D.PublishDiagnosticsNotification.type,m),onHover:m=>o.onRequest(D.HoverRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onCompletion:m=>o.onRequest(D.CompletionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onCompletionResolve:m=>o.onRequest(D.CompletionResolveRequest.type,m),onSignatureHelp:m=>o.onRequest(D.SignatureHelpRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onDeclaration:m=>o.onRequest(D.DeclarationRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDefinition:m=>o.onRequest(D.DefinitionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onTypeDefinition:m=>o.onRequest(D.TypeDefinitionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onImplementation:m=>o.onRequest(D.ImplementationRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onReferences:m=>o.onRequest(D.ReferencesRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDocumentHighlight:m=>o.onRequest(D.DocumentHighlightRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDocumentSymbol:m=>o.onRequest(D.DocumentSymbolRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onWorkspaceSymbol:m=>o.onRequest(D.WorkspaceSymbolRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onWorkspaceSymbolResolve:m=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,m),onCodeAction:m=>o.onRequest(D.CodeActionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onCodeActionResolve:m=>o.onRequest(D.CodeActionResolveRequest.type,(p,S)=>m(p,S)),onCodeLens:m=>o.onRequest(D.CodeLensRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onCodeLensResolve:m=>o.onRequest(D.CodeLensResolveRequest.type,(p,S)=>m(p,S)),onDocumentFormatting:m=>o.onRequest(D.DocumentFormattingRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onDocumentRangeFormatting:m=>o.onRequest(D.DocumentRangeFormattingRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onDocumentOnTypeFormatting:m=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(p,S)=>m(p,S)),onRenameRequest:m=>o.onRequest(D.RenameRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onPrepareRename:m=>o.onRequest(D.PrepareRenameRequest.type,(p,S)=>m(p,S)),onDocumentLinks:m=>o.onRequest(D.DocumentLinkRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDocumentLinkResolve:m=>o.onRequest(D.DocumentLinkResolveRequest.type,(p,S)=>m(p,S)),onDocumentColor:m=>o.onRequest(D.DocumentColorRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onColorPresentation:m=>o.onRequest(D.ColorPresentationRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onFoldingRanges:m=>o.onRequest(D.FoldingRangeRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onSelectionRanges:m=>o.onRequest(D.SelectionRangeRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onExecuteCommand:m=>o.onRequest(D.ExecuteCommandRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),dispose:()=>o.dispose()};for(let m of h)m.attach(N);return o.onRequest(D.InitializeRequest.type,m=>{t.initialize(m),qe.string(m.trace)&&(i.trace=D.Trace.fromString(m.trace));for(let p of h)p.initialize(m.capabilities);if(E){let p=E(m,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,m),void 0);return b(p).then(S=>{if(S instanceof D.ResponseError)return S;let x=S;x||(x={capabilities:{}});let A=x.capabilities;A||(A={},x.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=qe.number(N.__textDocumentSync)?N.__textDocumentSync:D.TextDocumentSyncKind.None:!qe.number(A.textDocumentSync)&&!qe.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=qe.number(N.__textDocumentSync)?N.__textDocumentSync:D.TextDocumentSyncKind.None);for(let q of h)q.fillServerCapabilities(A);return x})}else{let p={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let S of h)S.fillServerCapabilities(p.capabilities);return p}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,R)return R(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(z)return z()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,m=>{i.trace=D.Trace.fromString(m.value)}),N}});var Of=I(_e=>{"use strict";var hp=_e&&_e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gp=_e&&_e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wc=_e&&_e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return He.normalize(n.join("/"))}function Fc(){return process.platform==="win32"}function mo(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let _=process.env,f=Object.create(null);Object.keys(_).forEach(d=>f[d]=_[d]),t&&jc.existsSync(t)&&(f[o]?f[o]=t+He.delimiter+f[o]:f[o]=t,r&&r(`NODE_PATH value is: ${f[o]}`)),f.ELECTRON_RUN_AS_NODE="1";try{let d=(0,Uc.fork)("",[],{cwd:n,env:f,execArgv:["-e",i]});if(d.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}d.on("error",h=>{a(h)}),d.on("message",h=>{h.c==="r"&&(d.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let v={c:"rs",a:e};d.send(v)}catch(d){a(d)}})}function Lc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Fc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Uc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Fc()?He.join(s,"node_modules"):He.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Tp(e){let t="yarn",n={encoding:"utf8"};Fc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Uc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let _=JSON.parse(a);if(_.type==="log")return He.join(_.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Hc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!jc.existsSync(__filename.toUpperCase())||!jc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?He.normalize(i).indexOf(He.normalize(o))===0:He.normalize(i).toLowerCase().indexOf(He.normalize(o).toLowerCase())===0}e.isParent=r})(Hc||(_e.FileSystem=Hc={}));function _p(e,t,n,r){return n?(He.isAbsolute(n)||(n=He.join(e,n)),mo(t,n,n,r).then(o=>Hc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>mo(t,Lc(r),e,r))):mo(t,Lc(r),e,r)}});var Mf=I(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var Rf=require("util"),st=tt(),Bc=class e extends st.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Rf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},zc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),st.Disposable.create(()=>this.stream.off("data",t))}},$c=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},kf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Bc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Rf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new zc(e),asWritableStream:e=>new $c(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Qc(){return kf}(function(e){function t(){st.RAL.install(kf)}e.install=t})(Qc||(Qc={}));Vc.default=Qc});var ea=I(G=>{"use strict";var qf=G&&G.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),bp=G&&G.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Zc=G&&G.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};G.IPCMessageReader=Xc;var Kc=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.IPCMessageWriter=Kc;var Yc=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};G.PortMessageReader=Yc;var Jc=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.PortMessageWriter=Jc;var Nt=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,$n.default)().stream.asReadableStream(t),n)}};G.SocketMessageReader=Nt;var Gt=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,$n.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};G.SocketMessageWriter=Gt;var ho=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,$n.default)().stream.asReadableStream(t),n)}};G.StreamMessageReader=ho;var go=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,$n.default)().stream.asWritableStream(t),n)}};G.StreamMessageWriter=go;var wp=process.env.XDG_RUNTIME_DIR,Pp=new Map([["linux",107],["darwin",102]]);function Op(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,xf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Dp.realpathSync(wp??Sp.tmpdir()),r=Pp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,xf.randomBytes)(Math.floor(e/2)).toString("hex");return Ip.join(n,`lsp-${o}.sock`)}function Rp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,po.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function kp(e,t="utf-8"){let n=(0,po.createConnection)(e);return[new Nt(n,t),new Gt(n,t)]}function Mp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,po.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function xp(e,t="utf-8"){let n=(0,po.createConnection)(e,"127.0.0.1");return[new Nt(n,t),new Gt(n,t)]}function qp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Ep(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Np(e,t,n,r){n||(n=Oe.NullLogger);let o=qp(e)?new ho(e):e,i=Ep(t)?new go(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var ta=I(ct=>{"use strict";var Gp=ct&&ct.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ef=ct&&ct.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Gp(t,e,n)};Object.defineProperty(ct,"__esModule",{value:!0});ct.createProtocolConnection=jp;var Ap=ea();Ef(ea(),ct);Ef(ee(),ct);function jp(e,t,n,r){return(0,Ap.createMessageConnection)(e,t,n,r)}});var na=I(ge=>{"use strict";var Fp=ge&&ge.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gf=ge&&ge.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Fp(t,e,n)};Object.defineProperty(ge,"__esModule",{value:!0});ge.ProposedFeatures=ge.NotebookDocuments=ge.TextDocuments=ge.SemanticTokensBuilder=void 0;var Lp=Sc();Object.defineProperty(ge,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Lp.SemanticTokensBuilder}});Gf(ee(),ge);var Hp=Oc();Object.defineProperty(ge,"TextDocuments",{enumerable:!0,get:function(){return Hp.TextDocuments}});var Wp=Mc();Object.defineProperty(ge,"NotebookDocuments",{enumerable:!0,get:function(){return Wp.NotebookDocuments}});Gf(Ac(),ge);var Nf;(function(e){e.all={__brand:"features"}})(Nf||(ge.ProposedFeatures=Nf={}))});var oa=I(be=>{"use strict";var Lf=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Up=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hf=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{yo(),process.exit(gn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;ra.number(t)&&Uf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(gn?0:1)}},3e3)},get shutdownReceived(){return gn},set shutdownReceived(e){gn=e},exit:e=>{yo(),process.exit(e)}};function Qp(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),At.ConnectionStrategy.is(e)||At.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),Vp(i,s,a,o)}function Vp(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,_,f=process.argv.slice(2);for(let d=0;d{yo(),process.exit(gn?0:1)}),a.on("close",()=>{yo(),process.exit(gn?0:1)})}let s=a=>{let _=(0,At.createProtocolConnection)(e,t,a,n);return o&&Xp(a),_};return(0,Bp.createConnection)(s,$p,r)}function Xp(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Af.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Af.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Qf={};Pa(Qf,{TextDocument:()=>ia});function sa(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);sa(r,t),sa(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Kp(e){let t=$f(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var To,ia,Vf=wa(()=>{"use strict";To=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=$f(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),_=Math.max(o.end.line,0),f=this._lineOffsets,d=Bf(r.text,!1,i);if(_-a===d.length)for(let h=0,b=d.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&zf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new To(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof To)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=sa(i.map(Kp),(d,v)=>{let h=d.range.start.line-v.range.start.line;return h===0?d.range.start.character-v.range.start.character:h}),_=0,f=[];for(let d of a){let v=o.offsetAt(d.range.start);if(v<_)throw new Error("Overlapping edit");v>_&&f.push(s.substring(_,v)),d.newText.length&&f.push(d.newText),_=o.offsetAt(d.range.end)}return f.push(s.substr(_)),f.join("")}e.applyEdits=r})(ia||(ia={}))});var Vn=I(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.DATATYPE_SET=pe.KEYWORD_SET=pe.PUNCTUATION=pe.OPERATORS=pe.DATATYPES=pe.KEYWORDS=void 0;pe.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];pe.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];pe.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];pe.PUNCTUATION=["(",")","[","]",";",",",":","."];pe.KEYWORD_SET=new Set(pe.KEYWORDS);pe.DATATYPE_SET=new Set(pe.DATATYPES)});var jt=I(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.TokenKind=void 0;var Xf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Xf||(_o.TokenKind=Xf={}))});var Co=I(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.tokenize=Zp;var vo=Vn(),Re=jt();function Yp(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function Kf(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function bo(e){return e!==void 0&&/[0-9]/.test(e)}function Jp(e){let t=e.toUpperCase();return vo.DATATYPE_SET.has(t)?Re.TokenKind.Datatype:vo.KEYWORD_SET.has(t)?Re.TokenKind.Keyword:Re.TokenKind.Identifier}function Zp(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=f=>{for(;n{let v=n,h=i();s(d),t.push({kind:f,lexeme:e.slice(v,d),span:{start:v,end:d},range:{start:h,end:i()}})};for(;n",n)||e.startsWith("{<",n))&&(R===-1||R>b);a(Re.TokenKind.Comment,E?b:R===-1?e.length:R+1);continue}if(f==="'"){let h=n+1;for(;he.startsWith(h,n));if(d!==void 0){a(Re.TokenKind.Operator,n+d.length);continue}if(vo.PUNCTUATION.includes(f)){a(Re.TokenKind.Punctuation,n+1);continue}let v=e.codePointAt(n);a(Re.TokenKind.Unknown,n+(v!==void 0&&v>65535?2:1))}let _=i();return t.push({kind:Re.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:_,end:{..._}}}),t}});var Io=I(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.positionAt=ua;Xn.offsetAt=ty;Xn.sourceRange=ny;function aa(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Yf(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function Jf(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function na(e,t){ta(e,t);let n=Xf(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=Yp(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function Zp(e,t){if(ta(e,t.start),ta(e,t.end),t.end{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.parseQuickScript=iy;var ey=Un(),ra=yo(),_t=Mt(),ty=po();function ny(e){return e.kind===_t.TokenKind.Whitespace||e.kind===_t.TokenKind.Newline||e.kind===_t.TokenKind.Comment||e.kind===_t.TokenKind.EOF}function xt(e){return e?.kind===_t.TokenKind.Keyword?e.lexeme.toUpperCase():void 0}function Kf(e,t,n=t){return(0,ra.sourceRange)(e,{start:t.span.start,end:n.span.end})}function To(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function ry(e){switch(e){case"DIM":return"dim";case"CALL":return"call";case"IF":return"if";case"ELSE":return"else";case"ENDIF":return"endif";case"FOR":return"for";case"NEXT":return"next";case"WHILE":return"while";default:return"unknown"}}function oy(e,t){return e.filter(n=>n.range.start.line===t&&!ny(n))}function iy(e){let t=(0,ty.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=[],o=[],i=[],s=[],a=[],b;for(let T=0;Tf.kind===_t.TokenKind.Comment&&f.range.end.line>f.range.start.line&&f.range.start.line<=T&&f.range.end.line>=T),q=a.length,N=!1,B=h.map(xt).find(f=>f!==void 0);(B==="ELSE"||B==="ENDIF"||B==="NEXT")&&(q=Math.max(0,q-1),N=!0),b!==void 0&&(q=b.baseDepth+2),s.push({line:T,indentDepth:q,preserveIndent:I});for(let f=0;fFe>A&&xt(rt)==="AS"),gn=se>=0?h[se+1]:void 0;for(let rt of h.slice(A+1,se>=0?se:void 0))rt.kind===_t.TokenKind.Identifier&&(r.push({...nt,name:rt.lexeme,nameRange:rt.range,datatype:gn?.lexeme,datatypeRange:gn?.range}),hn=!0)}else if(v==="CALL"){let se=h[A+1];se?.kind===_t.TokenKind.Identifier&&(nt.name=se.lexeme,nt.nameRange=se.range)}hn||r.push(nt)}let x=xt(h[f-1]);if(!((v==="FOR"||v==="WHILE")&&x==="EXIT")){if(v==="IF"||v==="FOR"||v==="WHILE"){let A=a[a.length-1]?.block,E=Kf(e,m),be={id:o.length,kind:v.toLowerCase(),parentId:A?.id,childIds:[],...E,bodyRange:{start:m.range.end,end:m.range.end},bodySpan:{start:m.span.end,end:m.span.end},opener:m.range};o.push(be),A?.childIds.push(be.id),a.push({block:be,opener:m,hasElse:!1});continue}if(v==="ELSE"){let A=a[a.length-1];A?.block.kind!=="if"?i.push(To("invalid-nesting","ELSE has no matching IF.",m)):A.hasElse?i.push(To("duplicate-else","IF block has more than one ELSE.",m)):(A.hasElse=!0,A.block.middle=m.range);continue}if(v==="ENDIF"||v==="NEXT"){let A=v==="ENDIF"?["if"]:["for","while"],E=a[a.length-1];E===void 0||!A.includes(E.block.kind)?i.push(To("invalid-nesting",`${v} has no matching ${v==="ENDIF"?"IF":"FOR or WHILE"}.`,m)):(a.pop(),E.block.closer=m.range,E.block.span.end=m.span.end,E.block.range.end=m.range.end,E.block.bodySpan.end=m.span.start,E.block.bodyRange.end=m.range.start)}}}let M=h.map(xt);b!==void 0&&M.includes("THEN")?b=void 0:!N&&M.includes("IF")&&!M.includes("THEN")&&["AND","OR","NOT"].includes(M[M.length-1]??"")&&(b={baseDepth:Math.max(0,a.length-1)})}for(let T of a){let h=T.block.kind==="if"?"ENDIF":"NEXT";i.push(To(`missing-${h.toLowerCase()}`,`${T.block.kind.toUpperCase()} block is missing ${h}.`,T.opener)),T.block.span.end=e.length,T.block.range.end=(0,ra.sourceRange)(e,{start:e.length,end:e.length}).range.end,T.block.bodySpan.end=e.length,T.block.bodyRange.end=T.block.range.end}let g=new Set;for(let T of r.filter(h=>h.kind==="dim"&&h.datatype!==void 0))if(!ey.DATATYPE_SET.has(T.datatype.toUpperCase())){let h=T.datatypeRange??T.range,I=`${h.start.line}:${h.start.character}`;if(g.has(I))continue;g.add(I),i.push({code:"unknown-datatype",message:`Unknown datatype '${T.datatype}'.`,severity:"error",range:h})}let d=(0,ra.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:r,blocks:o,diagnostics:i,lines:s,...d}}});var nm=S($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.formatQuickScriptLexically=em;$n.formatQuickScriptStructure=tm;$n.formatQuickScript=dy;var L=Mt(),Jf=po(),sy=_o();function Yf(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function sa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function Zf(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ia(e){zn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function cy(e,t){if(e[t].lexeme!=="-"||Zf(e,t)?.kind!==L.TokenKind.Number)return!1;let n=sa(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function ay(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function em(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Jf.tokenize)(r);if(o.some(g=>g.kind===L.TokenKind.String&&!g.lexeme.endsWith('"'))||o.some(g=>g.kind===L.TokenKind.Unknown&&g.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let g=0;g"&&(a=!0),h!==void 0&&(h.kind===L.TokenKind.Identifier||h.kind===L.TokenKind.Keyword||h.kind===L.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(d.lexeme)}let b=ay(i.join(""),n);return{text:b,changed:b!==e}}function uy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function ly(e){let t=(0,Jf.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function dn(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function tm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,sy.parseQuickScript)(r),i=r.split(n),s=[],a=uy(t),b=0,g=0,d=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let h=0;h")||dn(N,t.regionBlockCodeBegin??"{region"))&&(b+=1)}let T=s.join(n);return{text:T,changed:T!==e,diagnostics:o.diagnostics}}function dy(e,t={}){let n=em(e,t);return tm(n.text,t)}});var vo=S(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.KNOWN_FUNCTIONS=void 0;bo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var sm=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.completions=my;Qn.hoverAt=hy;Qn.documentSymbols=gy;var im=vo(),rm=Un(),om=Mt();function fy(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of rm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of rm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of im.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function hy(e,t){let n=e.document.tokens.find(i=>fy(i.range,t));if(n===void 0)return;if(n.kind===om.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===om.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=im.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function gy(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var lm=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.quickFunctionNames=um;fn.analyzeQuickScript=by;fn.definitionAt=vy;fn.referencesAt=Cy;var py=_o(),yy=vo(),cm=yo(),qt=Mt();function am(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![qt.TokenKind.Whitespace,qt.TokenKind.Newline,qt.TokenKind.Comment].includes(e[n].kind))return e[n]}function _y(e,t){for(let n=t+1;nd.name.toUpperCase()));for(let d of um(e))s.add(d.toUpperCase());for(let d of t.knownFunctionNames??[])s.add(d.toUpperCase());for(let d of n.statements.filter(T=>T.kind==="dim"&&T.name!==void 0&&T.nameRange!==void 0)){let T=d.name.toUpperCase();if(i.get(T)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${d.name}' is already declared.`,severity:"error",range:d.nameRange});continue}let I={id:o.length,name:d.name,kind:"variable",range:d.range,selectionRange:d.nameRange,datatype:d.datatype,scopeId:0};o.push(I),i.set(T,I)}let a=new Map;for(let d of o)a.set((0,cm.offsetAt)(e,d.selectionRange.start),d);let b=new Map;for(let d of n.statements.filter(T=>T.kind==="call"&&T.name!==void 0&&T.nameRange!==void 0))b.set((0,cm.offsetAt)(e,d.nameRange.start),d.name);let g=[];for(let d=0;d")continue;let q=i.get(T.lexeme.toUpperCase()),N=b.get(T.span.start),B=_y(n.tokens,d);if((N!==void 0||B?.lexeme==="(")&&!s.has(T.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${T.lexeme}'.`,severity:"warning",range:T.range}),q!==void 0||N!==void 0){let f=N!==void 0?"call":B?.lexeme==="="?"write":"read";g.push({name:T.lexeme,kind:f,range:T.range,declarationId:q?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(d=>d.id)}],symbols:o,references:g,diagnostics:r}}function vy(e,t){let n=e.references.find(r=>am(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Cy(e,t,n=!0){let r=e.references.find(o=>am(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var ca=S(_e=>{"use strict";var Iy=_e&&_e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),tt=_e&&_e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Iy(t,e,n)};Object.defineProperty(_e,"__esModule",{value:!0});tt(Un(),_e);tt(nm(),_e);tt(vo(),_e);tt(sm(),_e);tt(_o(),_e);tt(lm(),_e);tt(yo(),_e);tt(Mt(),_e);tt(po(),_e)});var dm=S(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.serverCapabilities=Sy;ze.diagnosticsFor=wy;ze.formattingEdits=Py;ze.symbolsFor=Oy;ze.definitionFor=Ry;ze.referencesFor=ky;ze.completionsFor=My;ze.hoverFor=xy;var ge=Yc(),Me=ca();function Sy(){return{capabilities:{textDocumentSync:ge.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Dy(e){switch(e){case"keyword":return ge.CompletionItemKind.Keyword;case"datatype":return ge.CompletionItemKind.TypeParameter;case"variable":return ge.CompletionItemKind.Variable;case"call-target":return ge.CompletionItemKind.Method;default:return ge.CompletionItemKind.Function}}function wy(e,t){return(0,Me.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?ge.DiagnosticSeverity.Error:ge.DiagnosticSeverity.Warning,source:"intouch-language"}))}function Py(e,t){let n=(0,Me.formatQuickScript)(e.getText(),t);return n.changed?[ge.TextEdit.replace(ge.Range.create(ge.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function Oy(e){let t=n=>ge.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ge.SymbolKind.Variable:ge.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Me.documentSymbols)((0,Me.analyzeQuickScript)(e.getText())).map(t)}function Ry(e,t){let n=(0,Me.definitionAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ge.Location.create(e.uri,n)}function ky(e,t,n){return(0,Me.referencesAt)((0,Me.analyzeQuickScript)(e.getText()),t,n).map(r=>ge.Location.create(e.uri,r))}function My(e){return(0,Me.completions)((0,Me.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Dy(t.kind),detail:t.detail}))}function xy(e,t){let n=(0,Me.hoverAt)((0,Me.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** +`)&&t.push(n+1);return t}function ey(e,t,n){if(n+1>=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ua(e,t){aa(e,t);let n=Jf(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=ey(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function ny(e,t){if(aa(e,t.start),aa(e,t.end),t.end{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.parseQuickScript=uy;var ry=Vn(),So=Io(),We=jt(),oy=Co(),Zf=["DIM","CALL","IF","ELSE","ENDIF","FOR","NEXT","WHILE"];function iy(e){return e.kind===We.TokenKind.Whitespace||e.kind===We.TokenKind.Newline||e.kind===We.TokenKind.Comment||e.kind===We.TokenKind.EOF}function at(e){return e?.kind===We.TokenKind.Keyword?e.lexeme.toUpperCase():void 0}function em(e,t,n=t){return(0,So.sourceRange)(e,{start:t.span.start,end:n.span.end})}function Kn(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function sy(e){switch(e){case"DIM":return"dim";case"CALL":return"call";case"IF":return"if";case"ELSE":return"else";case"ENDIF":return"endif";case"FOR":return"for";case"NEXT":return"next";case"WHILE":return"while";default:return"unknown"}}function cy(e,t){return e.filter(n=>n.range.start.line===t&&!iy(n))}function tm(e,t){return e.some(n=>at(n)===t)}function nm(e,t){return e.some(n=>n.lexeme===t)}function ay(e,t){let n=t[t.length-1];return(0,So.sourceRange)(e,{start:n.span.end,end:n.span.end}).range}function uy(e){let t=(0,oy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=[],o=[],i=[],s=[],a=[],_=[],f;for(let h=0;hA.kind===We.TokenKind.Comment&&A.range.end.line>A.range.start.line&&A.range.start.line<=h&&A.range.end.line>=h),E=a.length+_.length,z=!1,N=b.map(at).find(A=>A!==void 0);(N==="ELSE"||N==="ENDIF"||N==="NEXT")&&(E=Math.max(0,E-1),z=!0),f!==void 0&&(E=f.baseDepth+2),s.push({line:h,indentDepth:E,preserveIndent:R});let m=b[0],p=m?.kind===We.TokenKind.Identifier&&tm(b,"AS")&&b.some(A=>A.kind===We.TokenKind.Datatype),S=m?.kind===We.TokenKind.Identifier&&nm(b,"=")&&tm(b,"TO");(p||S)&&(i.push(Kn("invalid-statement",`Unknown or invalid QuickScript statement '${m.lexeme}'.`,m)),S&&_.push(a.length));for(let A=0;Abn>ne&&Zf.includes(at(Be)??"")),_n=b.slice(ne,De<0?void 0:De);nm(_n,";")||i.push({code:"missing-semicolon",message:"DIM statement is missing the required semicolon.",severity:"error",range:ay(e,_n)});let Pt=b.findIndex((Be,bn)=>bn>ne&&at(Be)==="AS"),Je=Pt>=0?b[Pt+1]:void 0;for(let Be of b.slice(ne+1,Pt>=0?Pt:void 0))Be.kind===We.TokenKind.Identifier&&(r.push({...wt,name:Be.lexeme,nameRange:Be.range,datatype:Je?.lexeme,datatypeRange:Je?.range}),Ne=!0)}else if(B==="CALL"){let De=b[ne+1];De?.kind===We.TokenKind.Identifier&&(wt.name=De.lexeme,wt.nameRange=De.range)}Ne||r.push(wt)}let Tn=at(b[A-1]);if(!((B==="FOR"||B==="WHILE")&&Tn==="EXIT")){if(B==="IF"||B==="FOR"||B==="WHILE"){let ne=a[a.length-1]?.block,ke=em(e,q),ae={id:o.length,kind:B.toLowerCase(),parentId:ne?.id,childIds:[],...ke,bodyRange:{start:q.range.end,end:q.range.end},bodySpan:{start:q.span.end,end:q.span.end},opener:q.range};o.push(ae),ne?.childIds.push(ae.id),a.push({block:ae,opener:q,hasElse:!1});continue}if(B==="ELSE"){let ne=a[a.length-1];ne?.block.kind!=="if"?i.push(Kn("invalid-nesting","ELSE has no matching IF.",q)):ne.hasElse?i.push(Kn("duplicate-else","IF block has more than one ELSE.",q)):(ne.hasElse=!0,ne.block.middle=q.range);continue}if(B==="ENDIF"||B==="NEXT"){let ne=_[_.length-1];if(B==="NEXT"&&ne===a.length){_.pop();continue}let ke=B==="ENDIF"?["if"]:["for","while"],ae=a[a.length-1];ae===void 0||!ke.includes(ae.block.kind)?i.push(Kn("invalid-nesting",`${B} has no matching ${B==="ENDIF"?"IF":"FOR or WHILE"}.`,q)):(a.pop(),ae.block.closer=q.range,ae.block.span.end=q.span.end,ae.block.range.end=q.range.end,ae.block.bodySpan.end=q.span.start,ae.block.bodyRange.end=q.range.start)}}}let x=b.map(at);f!==void 0&&x.includes("THEN")?f=void 0:!z&&x.includes("IF")&&!x.includes("THEN")&&["AND","OR","NOT"].includes(x[x.length-1]??"")&&(f={baseDepth:Math.max(0,a.length-1)})}for(let h of a){let b=h.block.kind==="if"?"ENDIF":"NEXT";i.push(Kn(`missing-${b.toLowerCase()}`,`${h.block.kind.toUpperCase()} block is missing ${b}.`,h.opener)),h.block.span.end=e.length,h.block.range.end=(0,So.sourceRange)(e,{start:e.length,end:e.length}).range.end,h.block.bodySpan.end=e.length,h.block.bodyRange.end=h.block.range.end}let d=new Set;for(let h of r.filter(b=>b.kind==="dim"&&b.datatype!==void 0))if(!ry.DATATYPE_SET.has(h.datatype.toUpperCase())){let b=h.datatypeRange??h.range,R=`${b.start.line}:${b.start.character}`;if(d.has(R))continue;d.add(R),i.push({code:"unknown-datatype",message:`Unknown datatype '${h.datatype}'.`,severity:"error",range:b})}let v=(0,So.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:r,blocks:o,diagnostics:i,lines:s,...v}}});var am=I(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.formatQuickScriptLexically=sm;Jn.formatQuickScriptStructure=cm;Jn.formatQuickScript=gy;var L=jt(),om=Co(),ly=Do();function rm(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function fa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function im(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function da(e){Yn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function dy(e,t){if(e[t].lexeme!=="-"||im(e,t)?.kind!==L.TokenKind.Number)return!1;let n=fa(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function fy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function sm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,om.tokenize)(r);if(o.some(f=>f.kind===L.TokenKind.String&&!f.lexeme.endsWith('"'))||o.some(f=>f.kind===L.TokenKind.Unknown&&f.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let f=0;f")||Ke(v,t.regionBlockCodeBegin??"{region"))&&(a=!0),b!==void 0&&(b.kind===L.TokenKind.Identifier||b.kind===L.TokenKind.Keyword||b.kind===L.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(d.lexeme)}let _=fy(i.join(""),n);return{text:_,changed:_!==e}}function my(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function hy(e){let t=(0,om.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function Ke(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function cm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ly.parseQuickScript)(r),i=r.split(n),s=[],a=my(t),_=0,f=0,d=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let h=0;h")||Ke(E,t.regionBlockCodeBegin??"{region"))&&(_+=1)}let v=s.join(n);return{text:v,changed:v!==e,diagnostics:o.diagnostics}}function gy(e,t={}){let n=sm(e,t);return cm(n.text,t)}});var Po=I(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.KNOWN_FUNCTIONS=void 0;wo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var fm=I(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.completions=yy;Zn.hoverAt=Ty;Zn.documentSymbols=_y;var dm=Po(),um=Vn(),lm=jt();function py(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of um.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of um.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of dm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function Ty(e,t){let n=e.document.tokens.find(i=>py(i.range,t));if(n===void 0)return;if(n.kind===lm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===lm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=dm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function _y(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var pm=I(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.quickFunctionNames=gm;pn.analyzeQuickScript=Sy;pn.definitionAt=Dy;pn.referencesAt=wy;var by=Do(),vy=Po(),mm=Io(),Ft=jt();function hm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Ft.TokenKind.Whitespace,Ft.TokenKind.Newline,Ft.TokenKind.Comment].includes(e[n].kind))return e[n]}function Iy(e,t){for(let n=t+1;nd.name.toUpperCase()));for(let d of gm(e))s.add(d.toUpperCase());for(let d of t.knownFunctionNames??[])s.add(d.toUpperCase());for(let d of n.statements.filter(v=>v.kind==="dim"&&v.name!==void 0&&v.nameRange!==void 0)){let v=d.name.toUpperCase();if(i.get(v)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${d.name}' is already declared.`,severity:"error",range:d.nameRange});continue}let b={id:o.length,name:d.name,kind:"variable",range:d.range,selectionRange:d.nameRange,datatype:d.datatype,scopeId:0};o.push(b),i.set(v,b)}let a=new Map;for(let d of o)a.set((0,mm.offsetAt)(e,d.selectionRange.start),d);let _=new Map;for(let d of n.statements.filter(v=>v.kind==="call"&&v.name!==void 0&&v.nameRange!==void 0))_.set((0,mm.offsetAt)(e,d.nameRange.start),d.name);let f=[];for(let d=0;d")continue;let R=i.get(v.lexeme.toUpperCase()),E=_.get(v.span.start),z=Iy(n.tokens,d);if((E!==void 0||z?.lexeme==="(")&&!s.has(v.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${v.lexeme}'.`,severity:"warning",range:v.range}),R!==void 0||E!==void 0){let m=E!==void 0?"call":z?.lexeme==="="?"write":"read";f.push({name:v.lexeme,kind:m,range:v.range,declarationId:R?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(d=>d.id)}],symbols:o,references:f,diagnostics:r}}function Dy(e,t){let n=e.references.find(r=>hm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function wy(e,t,n=!0){let r=e.references.find(o=>hm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var ma=I(ve=>{"use strict";var Py=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ut=ve&&ve.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Py(t,e,n)};Object.defineProperty(ve,"__esModule",{value:!0});ut(Vn(),ve);ut(am(),ve);ut(Po(),ve);ut(fm(),ve);ut(Do(),ve);ut(pm(),ve);ut(Io(),ve);ut(jt(),ve);ut(Co(),ve)});var ym=I(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.serverCapabilities=Oy;Ye.diagnosticsFor=ky;Ye.formattingEdits=My;Ye.symbolsFor=xy;Ye.definitionFor=qy;Ye.referencesFor=Ey;Ye.completionsFor=Ny;Ye.hoverFor=Gy;var ye=oa(),Ee=ma();function Oy(){return{capabilities:{textDocumentSync:ye.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Ry(e){switch(e){case"keyword":return ye.CompletionItemKind.Keyword;case"datatype":return ye.CompletionItemKind.TypeParameter;case"variable":return ye.CompletionItemKind.Variable;case"call-target":return ye.CompletionItemKind.Method;default:return ye.CompletionItemKind.Function}}function ky(e,t){return(0,Ee.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?ye.DiagnosticSeverity.Error:ye.DiagnosticSeverity.Warning,source:"intouch-language"}))}function My(e,t){let n=(0,Ee.formatQuickScript)(e.getText(),t);return n.changed?[ye.TextEdit.replace(ye.Range.create(ye.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function xy(e){let t=n=>ye.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ye.SymbolKind.Variable:ye.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Ee.documentSymbols)((0,Ee.analyzeQuickScript)(e.getText())).map(t)}function qy(e,t){let n=(0,Ee.definitionAt)((0,Ee.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ye.Location.create(e.uri,n)}function Ey(e,t,n){return(0,Ee.referencesAt)((0,Ee.analyzeQuickScript)(e.getText()),t,n).map(r=>ye.Location.create(e.uri,r))}function Ny(e){return(0,Ee.completions)((0,Ee.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Ry(t.kind),detail:t.detail}))}function Gy(e,t){let n=(0,Ee.hoverAt)((0,Ee.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** -${n.detail}`},range:n.range}}});var mm=S(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.readSettings=qy;function Et(e){return typeof e=="object"&&e!==null?e:{}}function fm(e){return typeof e=="number"?e:void 0}function aa(e){return typeof e=="boolean"?e:void 0}function mn(e){return typeof e=="string"?e:void 0}function qy(e){let t=Et(e),n=t.VBI===void 0?t:Et(t.VBI),r=Et(n.formatter),o=Et(r.EmptyLine),i=Et(r.BC),s=Et(r.Region),a=Et(r.Misc);return{allowedNumberOfEmptyLines:fm(o.allowedNumberOfEmptyLines),removeEmptyLines:aa(o.RemoveEmptyLines),removeEmptyLinesInComments:aa(o.EmptyLinesAlsoInComment),blockCodeBegin:mn(i.BlockCodeBegin),blockCodeEnd:mn(i.BlockCodeEnd),blockCodeExclude:mn(i.BlockCodeExclude),regionBlockCodeBegin:mn(s.BlockCodeBegin),regionBlockCodeEnd:mn(s.BlockCodeEnd),regionBlockCodeExclude:mn(s.BlockCodeExclude),insertSpaces:aa(a.ReplaceTabToSpaces),indentSize:fm(a.IndentSize)}}});var gm=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.WorkspaceFunctionIndex=void 0;var hm=ca(),la=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,hm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,hm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};Co.WorkspaceFunctionIndex=la});var Ey=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ny=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gy=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(da=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,Ly.fileURLToPath)(n)),bm(da),(0,bt.serverCapabilities)()));pe.onInitialized(async()=>{let e=await pe.workspace.getConfiguration({section:"VBI"});fa=(0,Tm.readSettings)({VBI:e}),Io()});pe.onDidChangeConfiguration(e=>{fa=(0,Tm.readSettings)(e.settings),Io()});pe.onDidChangeWatchedFiles(()=>{bm(da)});je.onDidOpen(e=>{Vn.updateDocument(e.document),ma(e.document)});je.onDidChangeContent(e=>{Vn.updateDocument(e.document),ma(e.document)});je.onDidClose(e=>{Vn.removeDocument(e.document.uri),pe.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Io()});pe.onDocumentFormatting(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.formattingEdits)(t,{...fa,insertSpaces:e.options.insertSpaces,indentSize:e.options.tabSize})});pe.onDocumentSymbol(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.symbolsFor)(t)});pe.onDefinition(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,bt.definitionFor)(t,e.position)});pe.onReferences(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.referencesFor)(t,e.position,e.context.includeDeclaration)});pe.onCompletion(e=>{let t=je.get(e.textDocument.uri);return t===void 0?[]:(0,bt.completionsFor)(t)});pe.onHover(e=>{let t=je.get(e.textDocument.uri);return t===void 0?void 0:(0,bt.hoverFor)(t,e.position)});pe.onShutdown(()=>{});je.listen(pe);pe.listen(); +${n.detail}`},range:n.range}}});var _m=I(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.readSettings=Ay;Oo.formattingSettings=jy;function Lt(e){return typeof e=="object"&&e!==null?e:{}}function Tm(e){return typeof e=="number"?e:void 0}function ha(e){return typeof e=="boolean"?e:void 0}function yn(e){return typeof e=="string"?e:void 0}function Ay(e){let t=Lt(e),n=t.VBI===void 0?t:Lt(t.VBI),r=Lt(n.formatter),o=Lt(r.EmptyLine),i=Lt(r.BC),s=Lt(r.Region),a=Lt(r.Misc);return{allowedNumberOfEmptyLines:Tm(o.allowedNumberOfEmptyLines),removeEmptyLines:ha(o.RemoveEmptyLines),removeEmptyLinesInComments:ha(o.EmptyLinesAlsoInComment),blockCodeBegin:yn(i.BlockCodeBegin),blockCodeEnd:yn(i.BlockCodeEnd),blockCodeExclude:yn(i.BlockCodeExclude),regionBlockCodeBegin:yn(s.BlockCodeBegin),regionBlockCodeEnd:yn(s.BlockCodeEnd),regionBlockCodeExclude:yn(s.BlockCodeExclude),insertSpaces:ha(a.ReplaceTabToSpaces),indentSize:Tm(a.IndentSize)}}function jy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var vm=I(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.WorkspaceFunctionIndex=void 0;var bm=ma(),ga=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,bm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,bm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};Ro.WorkspaceFunctionIndex=ga});var Fy=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ly=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hy=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(pa=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,zy.fileURLToPath)(n)),Dm(pa),(0,Dt.serverCapabilities)()));Te.onInitialized(async()=>{let e=await Te.workspace.getConfiguration({section:"VBI"});Ta=(0,ya.readSettings)({VBI:e}),ko()});Te.onDidChangeConfiguration(e=>{Ta=(0,ya.readSettings)(e.settings),ko()});Te.onDidChangeWatchedFiles(()=>{Dm(pa)});Ue.onDidOpen(e=>{er.updateDocument(e.document),_a(e.document)});Ue.onDidChangeContent(e=>{er.updateDocument(e.document),_a(e.document)});Ue.onDidClose(e=>{er.removeDocument(e.document.uri),Te.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),ko()});Te.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.formattingEdits)(t,(0,ya.formattingSettings)(Ta,e.options))});Te.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.symbolsFor)(t)});Te.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Dt.definitionFor)(t,e.position)});Te.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.referencesFor)(t,e.position,e.context.includeDeclaration)});Te.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.completionsFor)(t)});Te.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Dt.hoverFor)(t,e.position)});Te.onShutdown(()=>{});Ue.listen(Te);Te.listen(); //# sourceMappingURL=server.js.map diff --git a/package-lock.json b/package-lock.json index f1219c2..9f5e93e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.1", + "version": "1.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.1", + "version": "1.5.2", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index d6b60ed..5325763 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.1", + "version": "1.5.2", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { diff --git a/packages/core/src/formatter.ts b/packages/core/src/formatter.ts index 2d5c23b..eda8932 100644 --- a/packages/core/src/formatter.ts +++ b/packages/core/src/formatter.ts @@ -98,7 +98,10 @@ export function formatQuickScriptLexically(source: string, options: FormatOption break; } const standaloneDirective = token.kind === TokenKind.Comment ? token.lexeme.trim() : undefined; - if (standaloneDirective === '{<' || standaloneDirective === '{<}') { + const closesStandaloneDirective = standaloneDirective !== undefined + && (matchesDirective(standaloneDirective, options.blockCodeEnd ?? '{<') + || matchesDirective(standaloneDirective, options.regionBlockCodeEnd ?? '{endregion')); + if (closesStandaloneDirective) { preserveStandaloneDirectiveContent = false; } if (preserveStandaloneDirectiveContent) { @@ -178,7 +181,11 @@ export function formatQuickScriptLexically(source: string, options: FormatOption appendSingleSpace(output); } output.push(token.lexeme); - if (standaloneDirective === '{>') { + const opensStandaloneDirective = standaloneDirective !== undefined + && !standaloneDirective.endsWith('}') + && (matchesDirective(standaloneDirective, options.blockCodeBegin ?? '{>') + || matchesDirective(standaloneDirective, options.regionBlockCodeBegin ?? '{region')); + if (opensStandaloneDirective) { preserveStandaloneDirectiveContent = true; } if (next !== undefined && (next.kind === TokenKind.Identifier || next.kind === TokenKind.Keyword || next.kind === TokenKind.Datatype)) { diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts index f000bb1..36ab6e8 100644 --- a/packages/core/src/parser.ts +++ b/packages/core/src/parser.ts @@ -62,6 +62,8 @@ interface OpenBlock { hasElse: boolean; } +const STATEMENT_KEYWORDS = ['DIM', 'CALL', 'IF', 'ELSE', 'ENDIF', 'FOR', 'NEXT', 'WHILE'] as const; + function isTrivia(token: Token): boolean { return token.kind === TokenKind.Whitespace || token.kind === TokenKind.Newline || token.kind === TokenKind.Comment || token.kind === TokenKind.EOF; } @@ -96,6 +98,19 @@ function lineTokens(tokens: readonly Token[], line: number): Token[] { return tokens.filter(token => token.range.start.line === line && !isTrivia(token)); } +function hasKeyword(tokens: readonly Token[], value: string): boolean { + return tokens.some(token => keyword(token) === value); +} + +function hasLexeme(tokens: readonly Token[], value: string): boolean { + return tokens.some(token => token.lexeme === value); +} + +function statementEndRange(source: string, tokens: readonly Token[]): Range { + const last = tokens[tokens.length - 1]; + return sourceRange(source, { start: last.span.end, end: last.span.end }).range; +} + /** Parse recoverable QuickScript structure from the canonical token stream. */ export function parseQuickScript(source: string): QuickScriptDocument { const tokens = tokenize(source); @@ -105,6 +120,7 @@ export function parseQuickScript(source: string): QuickScriptDocument { const diagnostics: CoreDiagnostic[] = []; const lines: LineStructure[] = []; const stack: OpenBlock[] = []; + const recoveredForStackDepths: number[] = []; let continuation: { baseDepth: number } | undefined; for (let line = 0; line < lineCount; line += 1) { @@ -112,7 +128,7 @@ export function parseQuickScript(source: string): QuickScriptDocument { const spanningComment = tokens.some(token => token.kind === TokenKind.Comment && token.range.end.line > token.range.start.line && token.range.start.line <= line && token.range.end.line >= line); - let visualDepth = stack.length; + let visualDepth = stack.length + recoveredForStackDepths.length; let closesAtStart = false; const firstKeyword = significant.map(keyword).find(value => value !== undefined); if (firstKeyword === 'ELSE' || firstKeyword === 'ENDIF' || firstKeyword === 'NEXT') { @@ -124,6 +140,24 @@ export function parseQuickScript(source: string): QuickScriptDocument { } lines.push({ line, indentDepth: visualDepth, preserveIndent: spanningComment }); + const first = significant[0]; + const invalidDeclarationStart = first?.kind === TokenKind.Identifier + && hasKeyword(significant, 'AS') + && significant.some(token => token.kind === TokenKind.Datatype); + const invalidForStart = first?.kind === TokenKind.Identifier + && hasLexeme(significant, '=') + && hasKeyword(significant, 'TO'); + if (invalidDeclarationStart || invalidForStart) { + diagnostics.push(diagnostic( + 'invalid-statement', + `Unknown or invalid QuickScript statement '${first.lexeme}'.`, + first, + )); + if (invalidForStart) { + recoveredForStackDepths.push(stack.length); + } + } + for (let index = 0; index < significant.length; index += 1) { const token = significant[index]; const value = keyword(token); @@ -131,7 +165,7 @@ export function parseQuickScript(source: string): QuickScriptDocument { continue; } - if (['DIM', 'CALL', 'IF', 'ELSE', 'ENDIF', 'FOR', 'NEXT', 'WHILE'].includes(value)) { + if ((STATEMENT_KEYWORDS as readonly string[]).includes(value)) { const startIndex = index; let last = token; for (let endIndex = startIndex + 1; endIndex < significant.length && significant[endIndex].lexeme !== ';'; endIndex += 1) { @@ -149,6 +183,17 @@ export function parseQuickScript(source: string): QuickScriptDocument { }; let pushed = false; if (value === 'DIM') { + const nextStatementIndex = significant.findIndex((candidate, candidateIndex) => candidateIndex > startIndex + && (STATEMENT_KEYWORDS as readonly string[]).includes(keyword(candidate) ?? '')); + const statementTokens = significant.slice(startIndex, nextStatementIndex < 0 ? undefined : nextStatementIndex); + if (!hasLexeme(statementTokens, ';')) { + diagnostics.push({ + code: 'missing-semicolon', + message: 'DIM statement is missing the required semicolon.', + severity: 'error', + range: statementEndRange(source, statementTokens), + }); + } const asIndex = significant.findIndex((candidate, candidateIndex) => candidateIndex > startIndex && keyword(candidate) === 'AS'); const datatype = asIndex >= 0 ? significant[asIndex + 1] : undefined; for (const name of significant.slice(startIndex + 1, asIndex >= 0 ? asIndex : undefined)) { @@ -210,6 +255,11 @@ export function parseQuickScript(source: string): QuickScriptDocument { continue; } if (value === 'ENDIF' || value === 'NEXT') { + const recoveredForStackDepth = recoveredForStackDepths[recoveredForStackDepths.length - 1]; + if (value === 'NEXT' && recoveredForStackDepth === stack.length) { + recoveredForStackDepths.pop(); + continue; + } const expected = value === 'ENDIF' ? ['if'] : ['for', 'while']; const open = stack[stack.length - 1]; if (open === undefined || !expected.includes(open.block.kind)) { diff --git a/packages/core/test/formatter.test.ts b/packages/core/test/formatter.test.ts index 05c38fd..2df289e 100644 --- a/packages/core/test/formatter.test.ts +++ b/packages/core/test/formatter.test.ts @@ -64,4 +64,41 @@ suite('QuickScript lexical formatter', () => { assert.ok(compacted.text.includes('first\r\n\r\nsecond')); assert.ok(!compacted.text.includes('first\r\n\r\n\r\nsecond')); }); + + test('restores normal formatting after the reported multiline brace comment', () => { + const source = [ + 'CALL HideAllPLS();', + '', + '{Debug-Status Zwischenspeichern}', + '', + '{ DIM altDebug AS DISCRETE;', + '', + 'altDebug = Sys_Debug_info;', + '', + 'Sys_Debug_info = 1; }', + '', + 'CALL xHerDebug(Funkt + " ", 0);', + ].join('\n'); + const once = formatQuickScript(source).text; + const twice = formatQuickScript(once).text; + + assert.strictEqual(once, source.replace(/\n/g, '\r\n')); + assert.strictEqual(twice, once); + }); + + test('ends lexical preservation at a decorated block marker before later code', () => { + const source = [ + '{>', + 'protected payload', + '{<-------------------------------------------}', + '{ DIM altDebug AS DISCRETE;', + 'altDebug = Sys_Debug_info;', + 'Sys_Debug_info = 1; }', + 'call xHerDebug(Funkt+" ",0);', + ].join('\n'); + + const formatted = formatQuickScript(source).text; + + assert.ok(formatted.endsWith('CALL xHerDebug(Funkt + " ", 0);')); + }); }); diff --git a/packages/core/test/parser.test.ts b/packages/core/test/parser.test.ts index 14dc6e0..8665500 100644 --- a/packages/core/test/parser.test.ts +++ b/packages/core/test/parser.test.ts @@ -54,4 +54,46 @@ suite('QuickScript structure parser', () => { assert.deepStrictEqual(document.lines.map(line => line.indentDepth), [0, 0, 1, 0]); assert.deepStrictEqual(document.diagnostics, []); }); + + test('diagnoses a missing DIM terminator without flagging a terminated DIM', () => { + const missing = parseQuickScript('DIM TEXT6 AS MESSAGE'); + const terminated = parseQuickScript('DIM TEXT6 AS MESSAGE;'); + const diagnostic = missing.diagnostics.find(item => item.code === 'missing-semicolon'); + + assert.ok(diagnostic); + assert.deepStrictEqual(diagnostic.range, { + start: { line: 0, character: 20 }, + end: { line: 0, character: 20 }, + }); + assert.ok(!terminated.diagnostics.some(item => item.code === 'missing-semicolon')); + }); + + test('diagnoses declaration- and FOR-shaped unknown statements locally without a NEXT cascade', () => { + const document = parseQuickScript([ + 'DI TEXT9 AS MESSAGE;', + 'FR TABINDEX = 1 TO StringLen(TEXT9)', + 'CALL LogMessage(TEXT9);', + 'NEXT;', + ].join('\n')); + const invalidStatements = document.diagnostics.filter(item => item.code === 'invalid-statement'); + + assert.deepStrictEqual(invalidStatements.map(item => item.range), [ + { start: { line: 0, character: 0 }, end: { line: 0, character: 2 } }, + { start: { line: 1, character: 0 }, end: { line: 1, character: 2 } }, + ]); + assert.ok(!document.diagnostics.some(item => item.code === 'invalid-nesting')); + }); + + test('does not require semicolons on block, control, or comment lines', () => { + const document = parseQuickScript([ + 'IF Ready THEN', + 'ELSE', + 'ENDIF;', + 'FOR Index = 1 TO 2', + 'NEXT;', + '{Comment}', + ].join('\n')); + + assert.ok(!document.diagnostics.some(item => item.code === 'missing-semicolon')); + }); }); diff --git a/packages/core/test/tokenizer.test.ts b/packages/core/test/tokenizer.test.ts index 1cc6419..20c3794 100644 --- a/packages/core/test/tokenizer.test.ts +++ b/packages/core/test/tokenizer.test.ts @@ -69,6 +69,27 @@ suite('QuickScript tokenizer', () => { ); }); + test('ends a multiline brace comment at its closing brace and resumes code tokens', () => { + const source = [ + '{ DIM altDebug AS DISCRETE;', + '', + 'altDebug = Sys_Debug_info;', + '', + 'Sys_Debug_info = 1; }', + '', + 'CALL xHerDebug(Funkt + " ", 0);', + ].join('\n'); + const tokens = tokenize(source); + const comment = tokens.find(token => token.kind === TokenKind.Comment); + const call = tokens.find(token => token.kind === TokenKind.Keyword && token.lexeme === 'CALL'); + + assert.deepStrictEqual(comment?.range, { + start: { line: 0, character: 0 }, + end: { line: 4, character: 21 }, + }); + assert.deepStrictEqual(call?.range.start, { line: 6, character: 0 }); + }); + test('keeps standalone comment nesting markers on their own line', () => { const tokens = tokenize('{>\nScript:\n{<}'); const comments = tokens.filter(token => token.kind === TokenKind.Comment); diff --git a/packages/language-server/src/server.ts b/packages/language-server/src/server.ts index 00b6878..75cb231 100644 --- a/packages/language-server/src/server.ts +++ b/packages/language-server/src/server.ts @@ -19,7 +19,7 @@ import { serverCapabilities, symbolsFor, } from './features'; -import { readSettings } from './settings'; +import { formattingSettings, readSettings } from './settings'; import { WorkspaceFunctionIndex } from './workspaceFunctions'; const connection = createConnection(ProposedFeatures.all); @@ -105,11 +105,7 @@ documents.onDidClose(change => { connection.onDocumentFormatting(params => { const document = documents.get(params.textDocument.uri); - return document === undefined ? [] : formattingEdits(document, { - ...settings, - insertSpaces: params.options.insertSpaces, - indentSize: params.options.tabSize, - }); + return document === undefined ? [] : formattingEdits(document, formattingSettings(settings, params.options)); }); connection.onDocumentSymbol(params => { const document = documents.get(params.textDocument.uri); diff --git a/packages/language-server/src/settings.ts b/packages/language-server/src/settings.ts index 996eed1..3b545ef 100644 --- a/packages/language-server/src/settings.ts +++ b/packages/language-server/src/settings.ts @@ -1,4 +1,5 @@ import { ServerSettings } from './features'; +import { FormattingOptions } from 'vscode-languageserver/node'; function asRecord(candidate: unknown): Record { return typeof candidate === 'object' && candidate !== null ? candidate as Record : {}; @@ -38,3 +39,12 @@ export function readSettings(value: unknown): ServerSettings { indentSize: numberValue(misc.IndentSize), }; } + +/** Keep explicit extension formatter settings authoritative over generic editor tab settings. */ +export function formattingSettings(settings: ServerSettings, options: FormattingOptions): ServerSettings { + return { + ...settings, + insertSpaces: settings.insertSpaces ?? options.insertSpaces, + indentSize: settings.indentSize ?? options.tabSize, + }; +} diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index 1af5a3b..9d3f666 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -15,7 +15,7 @@ import { serverCapabilities, symbolsFor, } from '../src/features'; -import { readSettings } from '../src/settings'; +import { formattingSettings, readSettings } from '../src/settings'; import { WorkspaceFunctionIndex } from '../src/workspaceFunctions'; function formattedText(document: TextDocument, settings = {}): string { @@ -82,6 +82,7 @@ suite('QuickScript language server features', () => { insertSpaces: false, indentSize: 3, }); + assert.deepStrictEqual(formattingSettings(settings, { insertSpaces: true, tabSize: 8 }), settings); }); test('formats the established comment nesting fixture through the language-server formatter entrypoint', () => { @@ -178,4 +179,45 @@ suite('QuickScript language server features', () => { const diagnostics = diagnosticsFor(caller, workspace.knownFunctionNames()).filter(diagnostic => diagnostic.code === 'unknown-function'); assert.deepStrictEqual(diagnostics.map(diagnostic => diagnostic.range.start), [{ line: 1, character: 5 }]); }); + + test('keeps the positive HIL datatype and function diagnostics', () => { + const document = TextDocument.create('file:///hil-positive.vbi', 'intouch', 1, [ + 'DIM ENDE AS DISCRET;', + 'Value = StringLang(Source);', + 'Value = StraingMid(Source, 1, 2);', + ].join('\n')); + const diagnostics = diagnosticsFor(document); + + assert.deepStrictEqual( + diagnostics.filter(item => item.code === 'unknown-datatype').map(item => item.range.start), + [{ line: 0, character: 12 }], + ); + assert.deepStrictEqual( + diagnostics.filter(item => item.code === 'unknown-function').map(item => item.range.start), + [{ line: 1, character: 8 }, { line: 2, character: 8 }], + ); + const unmatchedNext = TextDocument.create('file:///hil-next.vbi', 'intouch', 1, 'NEXT;'); + assert.ok(diagnosticsFor(unmatchedNext).some(item => item.code === 'invalid-nesting')); + }); + + test('reports focused statement diagnostics without cascading from FR to NEXT', () => { + const document = TextDocument.create('file:///hil-statements.vbi', 'intouch', 1, [ + 'DIM TEXT6 AS MESSAGE', + 'DIM TEXT6 AS MESSAGE;', + 'DI TEXT9 AS MESSAGE;', + 'FR TABINDEX = 1 TO StringLen(TEXT9)', + 'NEXT;', + ].join('\n')); + const diagnostics = diagnosticsFor(document); + + assert.deepStrictEqual( + diagnostics.filter(item => item.code === 'missing-semicolon').map(item => item.range.start), + [{ line: 0, character: 20 }], + ); + assert.deepStrictEqual( + diagnostics.filter(item => item.code === 'invalid-statement').map(item => item.range.start), + [{ line: 2, character: 0 }, { line: 3, character: 0 }], + ); + assert.ok(!diagnostics.some(item => item.code === 'invalid-nesting' && item.range.start.line === 4)); + }); }); diff --git a/packages/language-server/test/protocol.test.ts b/packages/language-server/test/protocol.test.ts index 564d909..e027084 100644 --- a/packages/language-server/test/protocol.test.ts +++ b/packages/language-server/test/protocol.test.ts @@ -1,9 +1,19 @@ import * as assert from 'assert'; import { ChildProcessWithoutNullStreams, spawn } from 'child_process'; +import * as fs from 'fs'; import * as path from 'path'; import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from 'vscode-jsonrpc/node'; -import { CompletionItem, InitializeResult } from 'vscode-languageserver/node'; +import { CompletionItem, InitializeResult, TextEdit } from 'vscode-languageserver/node'; + +function applyFormattingEdits(source: string, edits: readonly TextEdit[]): string { + if (edits.length === 0) { + return source; + } + assert.strictEqual(edits.length, 1); + assert.deepStrictEqual(edits[0].range.start, { line: 0, character: 0 }); + return edits[0].newText; +} suite('QuickScript language server protocol', () => { test('handles lifecycle, synchronization, and representative requests without VS Code', async function () { @@ -18,17 +28,30 @@ suite('QuickScript language server protocol', () => { let stderr = ''; child.stderr.on('data', chunk => { stderr += chunk.toString(); }); const connection = createMessageConnection(new StreamMessageReader(child.stdout), new StreamMessageWriter(child.stdin)); + let configurationRequested: (() => void) | undefined; + const configurationRequest = new Promise(resolve => { configurationRequested = resolve; }); + connection.onRequest('workspace/configuration', () => { + configurationRequested?.(); + return [{ + formatter: { + BC: { BlockCodeBegin: '{>', BlockCodeEnd: '{<', BlockCodeExclude: '{#' }, + Region: { BlockCodeBegin: '{region', BlockCodeEnd: '{endregion', BlockCodeExclude: '{#' }, + Misc: { ReplaceTabToSpaces: true, IndentSize: 4 }, + }, + }]; + }); connection.listen(); try { const initialize = await connection.sendRequest('initialize', { processId: null, rootUri: null, - capabilities: {}, + capabilities: { workspace: { configuration: true } }, workspaceFolders: null, }); assert.strictEqual((initialize as InitializeResult).capabilities.documentFormattingProvider, true); connection.sendNotification('initialized', {}); + await configurationRequest; const uri = 'file:///protocol-smoke.vbi'; connection.sendNotification('textDocument/didOpen', { @@ -52,6 +75,35 @@ suite('QuickScript language server protocol', () => { }); assert.ok(Array.isArray(edits) && edits.length === 1); + const fixtureDirectory = path.resolve(__dirname, '../../../src/test/suite/testfiles'); + const nestingSource = fs.readFileSync(path.join(fixtureDirectory, '05.comment_rules.nesting.test.vbi'), 'utf8'); + const nestingExpected = fs.readFileSync(path.join(fixtureDirectory, '05.comment_rules.nesting.tobe.vbi'), 'utf8'); + const nestingUri = 'file:///protocol-nesting.vbi'; + connection.sendNotification('textDocument/didOpen', { + textDocument: { + uri: nestingUri, + languageId: 'intouch', + version: 1, + text: nestingSource, + }, + }); + const nestingEdits = await connection.sendRequest('textDocument/formatting', { + textDocument: { uri: nestingUri }, + options: { tabSize: 8, insertSpaces: true }, + }); + const nestingOnce = applyFormattingEdits(nestingSource, nestingEdits); + assert.strictEqual(nestingOnce, nestingExpected); + + connection.sendNotification('textDocument/didChange', { + textDocument: { uri: nestingUri, version: 2 }, + contentChanges: [{ text: nestingOnce }], + }); + const nestingSecondEdits = await connection.sendRequest('textDocument/formatting', { + textDocument: { uri: nestingUri }, + options: { tabSize: 8, insertSpaces: true }, + }); + assert.strictEqual(applyFormattingEdits(nestingOnce, nestingSecondEdits), nestingOnce); + const completion = await connection.sendRequest('textDocument/completion', { textDocument: { uri }, position: { line: 3, character: 6 }, diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts index 5537735..a5dba3b 100644 --- a/src/test/suite/extension.test.ts +++ b/src/test/suite/extension.test.ts @@ -1,4 +1,6 @@ import * as assert from 'assert'; +import * as fs from 'fs'; +import * as path from 'path'; import * as vscode from 'vscode'; @@ -35,4 +37,31 @@ suite('Extension Test Suite', () => { assert.strictEqual(await vscode.workspace.applyEdit(workspaceEdit), true); assert.match(document.getText(), /^IF Ready > 0 THEN\r?\n {4}CALL LogMessage\("ok"\);\r?\nENDIF;$/); }); + + test('formats the comment nesting fixture exactly and idempotently through the production provider', async () => { + const fixtureDirectory = path.resolve(__dirname, '../../../src/test/suite/testfiles'); + const source = fs.readFileSync(path.join(fixtureDirectory, '05.comment_rules.nesting.test.vbi'), 'utf8'); + const expected = fs.readFileSync(path.join(fixtureDirectory, '05.comment_rules.nesting.tobe.vbi'), 'utf8'); + const document = await vscode.workspace.openTextDocument({ language: 'intouch', content: source }); + const options = { insertSpaces: true, tabSize: 8 }; + + const firstEdits = await vscode.commands.executeCommand( + 'vscode.executeFormatDocumentProvider', + document.uri, + options, + ); + assert.ok(firstEdits); + const firstWorkspaceEdit = new vscode.WorkspaceEdit(); + firstWorkspaceEdit.set(document.uri, firstEdits); + assert.strictEqual(await vscode.workspace.applyEdit(firstWorkspaceEdit), true); + assert.strictEqual(document.getText(), expected); + + const secondEdits = await vscode.commands.executeCommand( + 'vscode.executeFormatDocumentProvider', + document.uri, + options, + ); + assert.ok(secondEdits === undefined || secondEdits.length === 0); + assert.strictEqual(document.getText(), expected); + }); }); From e06c9b9a4e58692622aabce58732bd0af1fdfe34 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:32:04 +0200 Subject: [PATCH 16/40] docs(language): define QuickScript grammar --- docs/language/quickscript-grammar.md | 136 +++++++++++++++++++++++++++ docs/language/quickscript.md | 4 + 2 files changed, 140 insertions(+) create mode 100644 docs/language/quickscript-grammar.md diff --git a/docs/language/quickscript-grammar.md b/docs/language/quickscript-grammar.md new file mode 100644 index 0000000..c96b13b --- /dev/null +++ b/docs/language/quickscript-grammar.md @@ -0,0 +1,136 @@ +# QuickScript Grammar + +This document is the canonical syntax contract for the QuickScript subset +implemented by the extension. It describes InTouch QuickScript, not Visual +Basic, VBA, VBScript, Pascal, PowerShell, or JavaScript. + +## Evidence and dialect boundary + +The grammar is based, in descending order of authority, on: + +1. AVEVA InTouch and System Platform documentation for QuickScript statement + termination, brace comments, control structures, and operator families; +2. repository QuickScript in `LanguageDefinition/test.vbi` and the `.vbi` / `.vi` + formatter fixtures; +3. `packages/core/src/languageData.ts`, `syntaxes/intouch.tmLanguage.json`, and + `snippets/vbi.json`; +4. parser, formatter, language-server, and behavior-baseline tests. + +The AVEVA QuickScript .NET manuals also describe `FOR EACH`, `ELSEIF`, +`TRY`/`CATCH`, and a `WHILE` form. Those constructs are not assumed to be valid +classic InTouch QuickScript merely because the related dialect supports them. +`FOR EACH`, `ELSEIF`, and `TRY`/`CATCH` remain outside the implemented grammar. +The repository-evidenced `WHILE expression` / `NEXT;` form remains supported. + +## Lexical elements + +The tokenizer is the lexical authority. The grammar consumes its identifiers, +keywords, datatypes, number and string literals, operators, punctuation, +comments, newlines, and EOF token. Comments are trivia for syntax. Newlines are +statement recovery boundaries but do not replace required semicolons. + +Identifiers include normal, system, and instance-qualified names supported by +the tokenizer. Member and instance access use `.`, `->`, and `:`. Bracketed +index access is accepted after an assignable or expression primary. + +## Expressions + +The expression parser uses the following precedence, from lowest to highest: + +```ebnf +expression = logicalOr ; +logicalOr = logicalAnd, { ("OR" | "XOR" | "|"), logicalAnd } ; +logicalAnd = comparison, { "AND", comparison } ; +comparison = shift, { ("==" | "<>" | "<" | "<=" | ">" | ">=" | "IS"), shift } ; +shift = additive, { ("SHL" | "SHR"), additive } ; +additive = multiplicative, { ("+" | "-"), multiplicative } ; +multiplicative = unary, { ("*" | "/" | "%" | "MOD"), unary } ; +unary = { "+" | "-" | "NOT" | "!" | "~" }, postfix ; +postfix = primary, { callSuffix | memberSuffix | indexSuffix } ; +primary = identifier | number | string | "TRUE" | "FALSE" | + "NULL" | "EOF" | "(", expression, ")" ; +callSuffix = "(", [ expression, { ",", expression } ], ")" ; +memberSuffix = ("." | "->" | ":"), identifier ; +indexSuffix = "[", expression, "]" ; +``` + +Function names are syntactic identifiers. Whether a callable is a known +InTouch, Hermes, or workspace QuickFunction is a separate semantic diagnostic. + +## Statements + +```ebnf +document = { statement | comment } ; + +statement = dimStatement | assignment | callStatement | + directCallStatement | ifHeader | elseHeader | endifStatement | + forHeader | nextStatement | whileHeader | exitForStatement | + returnStatement ; + +dimStatement = "DIM", identifier, { ",", identifier }, "AS", datatype, ";" ; +assignment = assignable, "=", expression, ";" ; +callStatement = "CALL", callable, "(", [ arguments ], ")", ";" ; +directCallStatement = callable, "(", [ arguments ], ")", ";" ; +arguments = expression, { ",", expression } ; +assignable = identifier, { memberSuffix | indexSuffix } ; +callable = identifier, { memberSuffix } ; + +ifHeader = "IF", expression, "THEN" ; +elseHeader = "ELSE" ; +endifStatement = "ENDIF", ";" ; + +forHeader = "FOR", identifier, "=", expression, "TO", expression, + [ "STEP", expression ] ; +nextStatement = "NEXT", ";" ; +whileHeader = "WHILE", expression ; + +exitForStatement = "EXIT", "FOR", ";" ; +returnStatement = "RETURN", [ expression ], ";" ; +``` + +`IF` bodies may start on the same physical line. Inline forms such as +`IF condition THEN EXIT FOR; ENDIF;` are therefore valid. A multiline `IF` +condition may continue across newlines when the preceding physical line ends +in `AND`, `OR`, or `NOT`. + +`FOR` and the repository-evidenced `WHILE` form are closed by `NEXT;`. +`EXIT FOR;` never opens or closes a loop. + +A function call may be used as a statement with or without `CALL`, as shown by +the repository corpus. Other bare expressions are not statements. In +particular, `X + X + 1;` is invalid while `X = X + 1;` is an assignment. + +## Terminators + +| Production | Required terminator | +| --- | --- | +| `DIM`, assignment, `CALL`, direct call, `EXIT FOR`, `RETURN` | `;` | +| `ENDIF`, `NEXT` | `;` | +| `IF ... THEN`, `ELSE`, `FOR ... TO ... [STEP ...]`, `WHILE ...` | none | + +Consequently, `THEN;` and `ELSE;` contain an unexpected terminator. A newline +does not satisfy a missing terminator on an assignment or other terminated +statement. + +## Recovery contract + +The parser reports the nearest violated expectation and then synchronizes at a +semicolon, a physical newline, `ELSE`, `ENDIF`, `NEXT`, another recognized +statement start, or EOF. A malformed loop-shaped header is recovered as an +open loop only for nesting, so its later `NEXT;` does not become a second +primary error. + +Missing delimiters, `THEN`, `TO`, `=`, and required semicolons are reported at +the missing position or conflicting token. Unexpected semicolons are reported +on the semicolon itself. Function-name and datatype validation remains semantic +and does not change expression syntax. + +## Known open areas + +- Classic InTouch evidence is still required before enabling `FOR EACH`, + `ELSEIF`, `TRY`/`CATCH`, or a different `WHILE` terminator. +- The tokenizer recognizes a small compatibility set of symbolic operators; + only the precedence groups documented above are parsed. +- The grammar validates syntax and nesting but does not perform type checking, + overload resolution, constant folding, or runtime tag validation. + diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index 43841f0..aa54b53 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -28,6 +28,10 @@ Runtime vendor documentation remains authoritative when it conflicts with repository evidence. Semantic uncertainty is an escalation point; do not guess from a similar language. +The implemented statement, expression, terminator, and recovery contract is +defined in [QuickScript Grammar](quickscript-grammar.md). This scope document +describes ownership and architecture; it does not define a second grammar. + ## Tooling boundary Serena excludes QuickScript because it does not natively support this language. From e7655abecd53386daab605808bc2c3ec468b8460 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:44:48 +0200 Subject: [PATCH 17/40] feat(core): validate QuickScript statement grammar --- docs/language/quickscript-grammar.md | 12 +- packages/core/src/parser.ts | 797 +++++++++++++++++++++------ 2 files changed, 645 insertions(+), 164 deletions(-) diff --git a/docs/language/quickscript-grammar.md b/docs/language/quickscript-grammar.md index c96b13b..abaaae2 100644 --- a/docs/language/quickscript-grammar.md +++ b/docs/language/quickscript-grammar.md @@ -63,7 +63,8 @@ InTouch, Hermes, or workspace QuickFunction is a separate semantic diagnostic. document = { statement | comment } ; statement = dimStatement | assignment | callStatement | - directCallStatement | ifHeader | elseHeader | endifStatement | + directCallStatement | commandStatement | + ifHeader | elseHeader | endifStatement | forHeader | nextStatement | whileHeader | exitForStatement | returnStatement ; @@ -71,9 +72,12 @@ dimStatement = "DIM", identifier, { ",", identifier }, "AS", datatype, ";" assignment = assignable, "=", expression, ";" ; callStatement = "CALL", callable, "(", [ arguments ], ")", ";" ; directCallStatement = callable, "(", [ arguments ], ")", ";" ; +commandStatement = commandName, expression, ";" ; arguments = expression, { ",", expression } ; assignable = identifier, { memberSuffix | indexSuffix } ; callable = identifier, { memberSuffix } ; +commandName = "ACTIVATEAPP" | "HIDE" | "PLAYSOUND" | "SENDKEYS" | + "SHOW" | "STARTAPP" ; ifHeader = "IF", expression, "THEN" ; elseHeader = "ELSE" ; @@ -99,12 +103,15 @@ in `AND`, `OR`, or `NOT`. A function call may be used as a statement with or without `CALL`, as shown by the repository corpus. Other bare expressions are not statements. In particular, `X + X + 1;` is invalid while `X = X + 1;` is an assignment. +The listed classic command statements use the repository-evidenced +parenthesis-free form; the same names may still use normal call syntax when +followed by `(`. ## Terminators | Production | Required terminator | | --- | --- | -| `DIM`, assignment, `CALL`, direct call, `EXIT FOR`, `RETURN` | `;` | +| `DIM`, assignment, `CALL`, direct call, command, `EXIT FOR`, `RETURN` | `;` | | `ENDIF`, `NEXT` | `;` | | `IF ... THEN`, `ELSE`, `FOR ... TO ... [STEP ...]`, `WHILE ...` | none | @@ -133,4 +140,3 @@ and does not change expression syntax. only the precedence groups documented above are parsed. - The grammar validates syntax and nesting but does not perform type checking, overload resolution, constant folding, or runtime tag validation. - diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts index 36ab6e8..f809da1 100644 --- a/packages/core/src/parser.ts +++ b/packages/core/src/parser.ts @@ -4,7 +4,21 @@ import { Token, TokenKind } from './token'; import { tokenize } from './tokenizer'; export type BlockKind = 'if' | 'for' | 'while'; -export type StatementKind = 'dim' | 'call' | 'if' | 'else' | 'endif' | 'for' | 'next' | 'while' | 'unknown'; +export type StatementKind = + | 'dim' + | 'assignment' + | 'call' + | 'direct-call' + | 'command' + | 'if' + | 'else' + | 'endif' + | 'for' + | 'next' + | 'while' + | 'exit-for' + | 'return' + | 'unknown'; export type DiagnosticSeverity = 'error' | 'warning'; export interface CoreDiagnostic { @@ -62,226 +76,694 @@ interface OpenBlock { hasElse: boolean; } -const STATEMENT_KEYWORDS = ['DIM', 'CALL', 'IF', 'ELSE', 'ENDIF', 'FOR', 'NEXT', 'WHILE'] as const; +interface ParsedStatement { + kind: StatementKind; + first: Token; + last: Token; + names?: Token[]; + datatype?: Token; + name?: Token; + open?: BlockKind; + middle?: boolean; + close?: 'endif' | 'next'; + recoveredLoop?: boolean; +} + +interface ExpressionIssue { + code: 'missing-expression' | 'unexpected-token' | 'unclosed-delimiter'; + message: string; + token?: Token; +} + +const BINARY_PRECEDENCE = new Map([ + ['OR', 1], + ['XOR', 1], + ['|', 1], + ['AND', 2], + ['==', 3], + ['<>', 3], + ['<', 3], + ['<=', 3], + ['>', 3], + ['>=', 3], + ['IS', 3], + ['SHL', 4], + ['SHR', 4], + ['+', 5], + ['-', 5], + ['*', 6], + ['/', 6], + ['%', 6], + ['MOD', 6], +]); + +const UNARY_OPERATORS = new Set(['+', '-', 'NOT', '!', '~']); +const LITERAL_KEYWORDS = new Set(['TRUE', 'FALSE', 'NULL', 'EOF']); +const CONTROL_KEYWORDS = new Set([ + 'DIM', 'AS', 'CALL', 'IF', 'THEN', 'ELSE', 'ENDIF', 'FOR', 'TO', 'STEP', 'NEXT', 'WHILE', 'EXIT', 'RETURN', +]); +const COMMAND_STATEMENTS = new Set(['ACTIVATEAPP', 'HIDE', 'PLAYSOUND', 'SENDKEYS', 'SHOW', 'STARTAPP']); function isTrivia(token: Token): boolean { - return token.kind === TokenKind.Whitespace || token.kind === TokenKind.Newline || token.kind === TokenKind.Comment || token.kind === TokenKind.EOF; + return token.kind === TokenKind.Whitespace + || token.kind === TokenKind.Newline + || token.kind === TokenKind.Comment + || token.kind === TokenKind.EOF; +} + +function word(token: Token | undefined): string | undefined { + return token === undefined ? undefined : token.lexeme.toUpperCase(); } function keyword(token: Token | undefined): string | undefined { - return token?.kind === TokenKind.Keyword ? token.lexeme.toUpperCase() : undefined; + return token?.kind === TokenKind.Keyword ? word(token) : undefined; } function tokenNodeRange(source: string, first: Token, last: Token = first): { span: SourceSpan; range: Range } { return sourceRange(source, { start: first.span.start, end: last.span.end }); } +function zeroWidthRange(source: string, tokens: readonly Token[]): Range { + const offset = tokens.length === 0 ? 0 : tokens[tokens.length - 1].span.end; + return sourceRange(source, { start: offset, end: offset }).range; +} + function diagnostic(code: string, message: string, token: Token): CoreDiagnostic { return { code, message, severity: 'error', range: token.range }; } -function statementKind(value: string): StatementKind { - switch (value) { - case 'DIM': return 'dim'; - case 'CALL': return 'call'; - case 'IF': return 'if'; - case 'ELSE': return 'else'; - case 'ENDIF': return 'endif'; - case 'FOR': return 'for'; - case 'NEXT': return 'next'; - case 'WHILE': return 'while'; - default: return 'unknown'; - } +function endDiagnostic(source: string, code: string, message: string, tokens: readonly Token[]): CoreDiagnostic { + return { code, message, severity: 'error', range: zeroWidthRange(source, tokens) }; } function lineTokens(tokens: readonly Token[], line: number): Token[] { return tokens.filter(token => token.range.start.line === line && !isTrivia(token)); } -function hasKeyword(tokens: readonly Token[], value: string): boolean { - return tokens.some(token => keyword(token) === value); +function spanningCommentAt(tokens: readonly Token[], line: number): boolean { + return tokens.some(token => token.kind === TokenKind.Comment + && token.range.end.line > token.range.start.line + && token.range.start.line <= line + && token.range.end.line >= line); +} + +function tokenValue(token: Token | undefined): string | undefined { + return token === undefined ? undefined : token.kind === TokenKind.Keyword ? word(token) : token.lexeme; +} + +class ExpressionParser { + private position = 0; + private issue: ExpressionIssue | undefined; + + public constructor(private readonly tokens: readonly Token[]) {} + + public parse(): ExpressionIssue | undefined { + if (this.tokens.length === 0) { + return { code: 'missing-expression', message: 'Expected a QuickScript expression.' }; + } + this.parseBinary(1); + if (this.issue !== undefined) return this.issue; + if (this.position < this.tokens.length) { + return { + code: 'unexpected-token', + message: `Unexpected token '${this.tokens[this.position].lexeme}' in expression.`, + token: this.tokens[this.position], + }; + } + return undefined; + } + + private parseBinary(minimumPrecedence: number): void { + this.parseUnary(); + while (this.issue === undefined) { + const precedence = BINARY_PRECEDENCE.get(tokenValue(this.tokens[this.position]) ?? ''); + if (precedence === undefined || precedence < minimumPrecedence) return; + this.position += 1; + if (this.position >= this.tokens.length) { + this.issue = { code: 'missing-expression', message: 'Expected an expression after the operator.' }; + return; + } + this.parseBinary(precedence + 1); + } + } + + private parseUnary(): void { + while (UNARY_OPERATORS.has(tokenValue(this.tokens[this.position]) ?? '')) this.position += 1; + this.parsePostfix(); + } + + private parsePostfix(): void { + this.parsePrimary(); + while (this.issue === undefined && this.position < this.tokens.length) { + const value = this.tokens[this.position].lexeme; + if (value === '(') { + const opening = this.tokens[this.position]; + this.position += 1; + if (this.tokens[this.position]?.lexeme !== ')') { + while (this.issue === undefined) { + this.parseBinary(1); + if (this.tokens[this.position]?.lexeme !== ',') break; + this.position += 1; + } + } + this.expectClosing(')', opening); + continue; + } + if (value === '[') { + const opening = this.tokens[this.position]; + this.position += 1; + this.parseBinary(1); + this.expectClosing(']', opening); + continue; + } + if (value === '.' || value === '->' || value === ':') { + this.position += 1; + if (!this.isName(this.tokens[this.position])) { + this.issue = { code: 'missing-expression', message: `Expected an identifier after '${value}'.`, token: this.tokens[this.position] }; + return; + } + this.position += 1; + continue; + } + return; + } + } + + private parsePrimary(): void { + const token = this.tokens[this.position]; + if (token === undefined) { + this.issue = { code: 'missing-expression', message: 'Expected a QuickScript expression.' }; + return; + } + if (token.lexeme === '(') { + this.position += 1; + this.parseBinary(1); + this.expectClosing(')', token); + return; + } + if (token.kind === TokenKind.Identifier || token.kind === TokenKind.Number || token.kind === TokenKind.String + || this.isCallableKeyword(token) || LITERAL_KEYWORDS.has(word(token) ?? '')) { + this.position += 1; + return; + } + this.issue = { code: 'unexpected-token', message: `Unexpected token '${token.lexeme}' in expression.`, token }; + } + + private expectClosing(value: ')' | ']', opening: Token): void { + if (this.issue !== undefined) return; + if (this.tokens[this.position]?.lexeme !== value) { + this.issue = { + code: 'unclosed-delimiter', + message: `Expected '${value}' to close '${opening.lexeme}'.`, + token: this.tokens[this.position], + }; + return; + } + this.position += 1; + } + + private isName(token: Token | undefined): boolean { + return token?.kind === TokenKind.Identifier || this.isCallableKeyword(token); + } + + private isCallableKeyword(token: Token | undefined): boolean { + return token?.kind === TokenKind.Keyword + && !CONTROL_KEYWORDS.has(word(token) ?? '') + && !BINARY_PRECEDENCE.has(word(token) ?? '') + && !UNARY_OPERATORS.has(word(token) ?? ''); + } +} + +function expressionIssue(source: string, tokens: readonly Token[], issue: ExpressionIssue): CoreDiagnostic { + return issue.token === undefined + ? endDiagnostic(source, issue.code, issue.message, tokens) + : diagnostic(issue.code, issue.message, issue.token); +} + +function validateExpression(source: string, tokens: readonly Token[], diagnostics: CoreDiagnostic[]): boolean { + const issue = new ExpressionParser(tokens).parse(); + if (issue === undefined) return true; + diagnostics.push(expressionIssue(source, tokens, issue)); + return false; } -function hasLexeme(tokens: readonly Token[], value: string): boolean { - return tokens.some(token => token.lexeme === value); +class StatementParser { + private position = 0; + private readonly statements: ParsedStatement[] = []; + + public constructor( + private readonly source: string, + private readonly tokens: readonly Token[], + private readonly diagnostics: CoreDiagnostic[], + ) {} + + public parse(): ParsedStatement[] { + while (this.position < this.tokens.length) { + const start = this.position; + this.parseStatement(); + if (this.position <= start) this.position += 1; + } + return this.statements; + } + + private parseStatement(): void { + switch (keyword(this.current())) { + case 'DIM': this.parseDim(); return; + case 'CALL': this.parseCall(); return; + case 'IF': this.parseIf(); return; + case 'ELSE': this.parseElse(); return; + case 'ENDIF': this.parseCloser('endif'); return; + case 'FOR': this.parseFor(); return; + case 'NEXT': this.parseCloser('next'); return; + case 'WHILE': this.parseWhile(); return; + case 'EXIT': this.parseExit(); return; + case 'RETURN': this.parseReturn(); return; + default: this.parseIdentifierStatement(); + } + } + + private parseDim(): void { + const first = this.consume(); + const names: Token[] = []; + let expectName = true; + while (this.position < this.tokens.length && keyword(this.current()) !== 'AS' && this.current()?.lexeme !== ';') { + const token = this.consume(); + if (expectName && token.kind === TokenKind.Identifier) { + names.push(token); + expectName = false; + } else if (!expectName && token.lexeme === ',') { + expectName = true; + } else { + this.diagnostics.push(diagnostic('unexpected-token', `Unexpected token '${token.lexeme}' in DIM declaration.`, token)); + } + } + if (names.length === 0 || expectName) { + this.diagnostics.push(endDiagnostic(this.source, 'missing-identifier', 'DIM requires a variable name.', this.tokens.slice(0, this.position))); + } + let datatype: Token | undefined; + if (keyword(this.current()) !== 'AS') { + this.diagnostics.push(endDiagnostic(this.source, 'missing-as', "DIM requires 'AS' before the datatype.", this.tokens.slice(0, this.position))); + } else { + this.consume(); + datatype = this.current(); + if (datatype === undefined || datatype.lexeme === ';') { + this.diagnostics.push(endDiagnostic(this.source, 'missing-datatype', 'DIM requires a datatype after AS.', this.tokens.slice(0, this.position))); + } else { + this.consume(); + } + } + const last = this.consumeTerminator('DIM statement', datatype ?? names[names.length - 1] ?? first); + this.statements.push({ kind: 'dim', first, last, names, datatype }); + } + + private parseCall(): void { + const first = this.consume(); + const name = this.current(); + const end = this.statementBoundary(this.position); + const expression = this.tokens.slice(this.position, end); + const valid = validateExpression(this.source, expression, this.diagnostics); + if (name === undefined || (name.kind !== TokenKind.Identifier && name.kind !== TokenKind.Keyword)) { + this.diagnostics.push(endDiagnostic(this.source, 'missing-call-target', 'CALL requires a callable name.', [first])); + } else if (valid && !expression.some(token => token.lexeme === '(')) { + this.diagnostics.push(diagnostic('missing-call-arguments', "CALL requires '(' after the callable name.", name)); + } + this.position = end; + const last = this.consumeTerminator('CALL statement', expression[expression.length - 1] ?? first); + this.statements.push({ kind: 'call', first, last, name }); + } + + private parseIf(): void { + const first = this.consume(); + const thenIndex = this.findTopLevelKeyword(this.position, new Set(['THEN'])); + let last = first; + if (thenIndex < 0) { + const expression = this.tokens.slice(this.position); + this.diagnostics.push(endDiagnostic(this.source, 'missing-then', "IF requires 'THEN' after its condition.", expression.length > 0 ? expression : [first])); + this.position = this.tokens.length; + last = expression[expression.length - 1] ?? first; + } else { + validateExpression(this.source, this.tokens.slice(this.position, thenIndex), this.diagnostics); + this.position = thenIndex; + last = this.consume(); + if (this.current()?.lexeme === ';') { + this.diagnostics.push(diagnostic('unexpected-semicolon', 'IF header must not be terminated after THEN.', this.current()!)); + this.consume(); + } + } + this.statements.push({ kind: 'if', first, last, open: 'if' }); + } + + private parseElse(): void { + const first = this.consume(); + if (this.current()?.lexeme === ';') { + this.diagnostics.push(diagnostic('unexpected-semicolon', 'ELSE must not be terminated with a semicolon.', this.current()!)); + this.consume(); + } + this.statements.push({ kind: 'else', first, last: first, middle: true }); + } + + private parseFor(): void { + const first = this.consume(); + const target = this.current(); + if (target?.kind !== TokenKind.Identifier) { + this.diagnostics.push(target === undefined + ? endDiagnostic(this.source, 'missing-loop-variable', 'FOR requires a loop variable.', [first]) + : diagnostic('missing-loop-variable', 'FOR requires a loop variable.', target)); + } else { + this.consume(); + } + if (this.current()?.lexeme !== '=') { + const conflicting = this.current(); + this.diagnostics.push(conflicting === undefined + ? endDiagnostic(this.source, 'expected-equals', "Expected '=' after FOR loop variable.", target === undefined ? [first] : [first, target]) + : diagnostic('expected-equals', "Expected '=' after FOR loop variable.", conflicting)); + if (conflicting?.lexeme === '==') this.consume(); + } else { + this.consume(); + } + + const toIndex = this.findTopLevelKeyword(this.position, new Set(['TO'])); + let last = target ?? first; + if (toIndex < 0) { + const end = this.headerEnd(this.position); + const expression = this.tokens.slice(this.position, end); + this.diagnostics.push(endDiagnostic(this.source, 'missing-to', "FOR requires 'TO' after the initial expression.", expression.length > 0 ? expression : [first])); + this.position = end; + last = expression[expression.length - 1] ?? last; + } else { + validateExpression(this.source, this.tokens.slice(this.position, toIndex), this.diagnostics); + this.position = toIndex + 1; + const stepIndex = this.findTopLevelKeyword(this.position, new Set(['STEP'])); + const end = this.headerEnd(this.position); + const limitEnd = stepIndex >= 0 && stepIndex < end ? stepIndex : end; + const limit = this.tokens.slice(this.position, limitEnd); + validateExpression(this.source, limit, this.diagnostics); + last = limit[limit.length - 1] ?? this.tokens[toIndex]; + if (stepIndex >= 0 && stepIndex < end) { + const step = this.tokens.slice(stepIndex + 1, end); + validateExpression(this.source, step, this.diagnostics); + last = step[step.length - 1] ?? this.tokens[stepIndex]; + } + this.position = end; + } + if (this.current()?.lexeme === ';') { + this.diagnostics.push(diagnostic('unexpected-semicolon', 'FOR header must not be terminated with a semicolon.', this.current()!)); + this.consume(); + } + this.statements.push({ kind: 'for', first, last, open: 'for' }); + } + + private parseWhile(): void { + const first = this.consume(); + const end = this.headerEnd(this.position); + const expression = this.tokens.slice(this.position, end); + validateExpression(this.source, expression, this.diagnostics); + this.position = end; + const last = expression[expression.length - 1] ?? first; + if (this.current()?.lexeme === ';') { + this.diagnostics.push(diagnostic('unexpected-semicolon', 'WHILE header must not be terminated with a semicolon.', this.current()!)); + this.consume(); + } + this.statements.push({ kind: 'while', first, last, open: 'while' }); + } + + private parseCloser(close: 'endif' | 'next'): void { + const first = this.consume(); + const label = close === 'endif' ? 'ENDIF' : 'NEXT'; + const last = this.consumeTerminator(`${label} statement`, first); + this.statements.push({ kind: close, first, last, close }); + } + + private parseExit(): void { + const first = this.consume(); + let last = first; + if (keyword(this.current()) !== 'FOR') { + this.diagnostics.push(this.current() === undefined + ? endDiagnostic(this.source, 'missing-exit-target', "EXIT requires 'FOR'.", [first]) + : diagnostic('missing-exit-target', "EXIT requires 'FOR'.", this.current()!)); + } else { + last = this.consume(); + } + last = this.consumeTerminator('EXIT FOR statement', last); + this.statements.push({ kind: 'exit-for', first, last }); + } + + private parseReturn(): void { + const first = this.consume(); + const end = this.statementBoundary(this.position); + const expression = this.tokens.slice(this.position, end); + if (expression.length > 0) validateExpression(this.source, expression, this.diagnostics); + this.position = end; + const last = this.consumeTerminator('RETURN statement', expression[expression.length - 1] ?? first); + this.statements.push({ kind: 'return', first, last }); + } + + private parseIdentifierStatement(): void { + const first = this.current()!; + const end = this.statementBoundary(this.position); + const body = this.tokens.slice(this.position, end); + const assignmentIndex = this.findTopLevelLexeme(this.position, '='); + const assignmentInBody = assignmentIndex >= this.position && assignmentIndex < end; + const isDirectCall = this.looksLikeDirectCall(body); + let kind: StatementKind = 'unknown'; + + if (COMMAND_STATEMENTS.has(word(first) ?? '') && body[1]?.lexeme !== '(') { + validateExpression(this.source, body.slice(1), this.diagnostics); + kind = 'command'; + } else if (assignmentInBody) { + const target = this.tokens.slice(this.position, assignmentIndex); + if (!this.isAssignable(target)) { + this.diagnostics.push(diagnostic('invalid-statement', `Unknown or invalid QuickScript statement '${first.lexeme}'.`, first)); + } else { + kind = 'assignment'; + } + validateExpression(this.source, this.tokens.slice(assignmentIndex + 1, end), this.diagnostics); + } else if (isDirectCall) { + validateExpression(this.source, body, this.diagnostics); + kind = 'direct-call'; + } else { + const validExpression = validateExpression(this.source, body, []); + this.diagnostics.push(diagnostic( + validExpression ? 'expected-assignment' : 'invalid-statement', + validExpression ? 'Expected assignment or valid QuickScript statement.' : `Unknown or invalid QuickScript statement '${first.lexeme}'.`, + first, + )); + } + + this.position = end; + const requiresTerminator = kind !== 'unknown' || this.current()?.lexeme === ';'; + const last = requiresTerminator + ? this.consumeTerminator( + kind === 'assignment' ? 'Assignment' : kind === 'direct-call' ? 'Function call' : kind === 'command' ? 'Command statement' : 'Statement', + body[body.length - 1] ?? first, + ) + : body[body.length - 1] ?? first; + const recoveredLoop = kind === 'unknown' + && body.some(token => token.lexeme === '=') + && body.some(token => keyword(token) === 'TO'); + this.statements.push({ kind, first, last, name: kind === 'direct-call' ? first : undefined, recoveredLoop }); + } + + private statementBoundary(start: number): number { + let depth = 0; + for (let index = start; index < this.tokens.length; index += 1) { + const token = this.tokens[index]; + if (token.lexeme === '(' || token.lexeme === '[') depth += 1; + if (token.lexeme === ')' || token.lexeme === ']') depth = Math.max(0, depth - 1); + if (token.lexeme === ';' || (depth === 0 && ['ELSE', 'ENDIF', 'NEXT'].includes(keyword(token) ?? ''))) return index; + } + return this.tokens.length; + } + + private headerEnd(start: number): number { + let depth = 0; + for (let index = start; index < this.tokens.length; index += 1) { + const token = this.tokens[index]; + if (token.lexeme === '(' || token.lexeme === '[') depth += 1; + if (token.lexeme === ')' || token.lexeme === ']') depth = Math.max(0, depth - 1); + if (depth === 0 && token.lexeme === ';') return index; + } + return this.tokens.length; + } + + private findTopLevelKeyword(start: number, values: ReadonlySet): number { + let depth = 0; + for (let index = start; index < this.tokens.length; index += 1) { + const token = this.tokens[index]; + if (token.lexeme === '(' || token.lexeme === '[') depth += 1; + if (token.lexeme === ')' || token.lexeme === ']') depth = Math.max(0, depth - 1); + if (depth === 0 && values.has(keyword(token) ?? '')) return index; + } + return -1; + } + + private findTopLevelLexeme(start: number, value: string): number { + let depth = 0; + for (let index = start; index < this.tokens.length; index += 1) { + const token = this.tokens[index]; + if (token.lexeme === '(' || token.lexeme === '[') depth += 1; + if (token.lexeme === ')' || token.lexeme === ']') depth = Math.max(0, depth - 1); + if (depth === 0 && token.lexeme === value) return index; + } + return -1; + } + + private isAssignable(tokens: readonly Token[]): boolean { + if (tokens.length === 0 || tokens[0].kind !== TokenKind.Identifier) return false; + let index = 1; + while (index < tokens.length) { + if (['.', '->', ':'].includes(tokens[index].lexeme) && tokens[index + 1]?.kind === TokenKind.Identifier) { + index += 2; + continue; + } + if (tokens[index].lexeme === '[') { + const closing = tokens.findIndex((token, candidate) => candidate > index && token.lexeme === ']'); + if (closing < 0 || !validateExpression(this.source, tokens.slice(index + 1, closing), [])) return false; + index = closing + 1; + continue; + } + return false; + } + return true; + } + + private looksLikeDirectCall(tokens: readonly Token[]): boolean { + if (tokens.length < 3 || (tokens[0].kind !== TokenKind.Identifier && tokens[0].kind !== TokenKind.Keyword)) return false; + return tokens.some(token => token.lexeme === '('); + } + + private consumeTerminator(label: string, fallback: Token): Token { + if (this.current()?.lexeme === ';') return this.consume(); + this.diagnostics.push(endDiagnostic(this.source, 'missing-semicolon', `${label} is missing the required semicolon.`, [fallback])); + return fallback; + } + + private current(): Token | undefined { + return this.tokens[this.position]; + } + + private consume(): Token { + const token = this.tokens[this.position]; + this.position += 1; + return token; + } } -function statementEndRange(source: string, tokens: readonly Token[]): Range { - const last = tokens[tokens.length - 1]; - return sourceRange(source, { start: last.span.end, end: last.span.end }).range; +function continuationEnd(tokensByLine: readonly Token[][], startLine: number): number { + const first = tokensByLine[startLine]; + if (keyword(first[0]) !== 'IF' || first.some(token => keyword(token) === 'THEN')) return startLine; + if (!['AND', 'OR', 'NOT'].includes(keyword(first[first.length - 1]) ?? '')) return startLine; + for (let line = startLine + 1; line < tokensByLine.length; line += 1) { + if (tokensByLine[line].some(token => keyword(token) === 'THEN')) return line; + } + return startLine; } -/** Parse recoverable QuickScript structure from the canonical token stream. */ +/** Parse recoverable QuickScript grammar and structure from the canonical token stream. */ export function parseQuickScript(source: string): QuickScriptDocument { const tokens = tokenize(source); const lineCount = source.length === 0 ? 1 : source.split(/\r\n|\r|\n/).length; + const tokensByLine = Array.from({ length: lineCount }, (_, line) => lineTokens(tokens, line)); const statements: StatementNode[] = []; const blocks: BlockNode[] = []; const diagnostics: CoreDiagnostic[] = []; - const lines: LineStructure[] = []; + const lines: LineStructure[] = new Array(lineCount); const stack: OpenBlock[] = []; const recoveredForStackDepths: number[] = []; - let continuation: { baseDepth: number } | undefined; for (let line = 0; line < lineCount; line += 1) { - const significant = lineTokens(tokens, line); - const spanningComment = tokens.some(token => token.kind === TokenKind.Comment - && token.range.end.line > token.range.start.line - && token.range.start.line <= line && token.range.end.line >= line); + const physicalTokens = tokensByLine[line]; + const endLine = continuationEnd(tokensByLine, line); + const significant = endLine === line ? physicalTokens : tokensByLine.slice(line, endLine + 1).flat(); let visualDepth = stack.length + recoveredForStackDepths.length; - let closesAtStart = false; - const firstKeyword = significant.map(keyword).find(value => value !== undefined); - if (firstKeyword === 'ELSE' || firstKeyword === 'ENDIF' || firstKeyword === 'NEXT') { - visualDepth = Math.max(0, visualDepth - 1); - closesAtStart = true; - } - if (continuation !== undefined) { - visualDepth = continuation.baseDepth + 2; - } - lines.push({ line, indentDepth: visualDepth, preserveIndent: spanningComment }); - - const first = significant[0]; - const invalidDeclarationStart = first?.kind === TokenKind.Identifier - && hasKeyword(significant, 'AS') - && significant.some(token => token.kind === TokenKind.Datatype); - const invalidForStart = first?.kind === TokenKind.Identifier - && hasLexeme(significant, '=') - && hasKeyword(significant, 'TO'); - if (invalidDeclarationStart || invalidForStart) { - diagnostics.push(diagnostic( - 'invalid-statement', - `Unknown or invalid QuickScript statement '${first.lexeme}'.`, - first, - )); - if (invalidForStart) { - recoveredForStackDepths.push(stack.length); - } + const firstValue = keyword(significant[0]); + if (firstValue === 'ELSE' || firstValue === 'ENDIF' || firstValue === 'NEXT') visualDepth = Math.max(0, visualDepth - 1); + lines[line] = { line, indentDepth: visualDepth, preserveIndent: spanningCommentAt(tokens, line) }; + for (let continuationLine = line + 1; continuationLine <= endLine; continuationLine += 1) { + lines[continuationLine] = { + line: continuationLine, + indentDepth: visualDepth + 2, + preserveIndent: spanningCommentAt(tokens, continuationLine), + }; } - for (let index = 0; index < significant.length; index += 1) { - const token = significant[index]; - const value = keyword(token); - if (value === undefined) { - continue; - } - - if ((STATEMENT_KEYWORDS as readonly string[]).includes(value)) { - const startIndex = index; - let last = token; - for (let endIndex = startIndex + 1; endIndex < significant.length && significant[endIndex].lexeme !== ';'; endIndex += 1) { - last = significant[endIndex]; - if (keyword(last) !== undefined && ['IF', 'ELSE', 'ENDIF', 'FOR', 'NEXT', 'WHILE', 'CALL', 'DIM'].includes(keyword(last)!)) { - last = token; - break; - } + const parsed = significant.length === 0 ? [] : new StatementParser(source, significant, diagnostics).parse(); + for (const statement of parsed) { + const parentBlockId = stack[stack.length - 1]?.block.id; + const located = tokenNodeRange(source, statement.first, statement.last); + if (statement.kind === 'dim' && statement.names !== undefined) { + for (const name of statement.names) { + statements.push({ + kind: 'dim', + ...located, + name: name.lexeme, + nameRange: name.range, + datatype: statement.datatype?.lexeme, + datatypeRange: statement.datatype?.range, + parentBlockId, + }); } - const located = tokenNodeRange(source, token, last); - const node: StatementNode = { - kind: statementKind(value), + } else { + statements.push({ + kind: statement.kind, ...located, - parentBlockId: stack[stack.length - 1]?.block.id, - }; - let pushed = false; - if (value === 'DIM') { - const nextStatementIndex = significant.findIndex((candidate, candidateIndex) => candidateIndex > startIndex - && (STATEMENT_KEYWORDS as readonly string[]).includes(keyword(candidate) ?? '')); - const statementTokens = significant.slice(startIndex, nextStatementIndex < 0 ? undefined : nextStatementIndex); - if (!hasLexeme(statementTokens, ';')) { - diagnostics.push({ - code: 'missing-semicolon', - message: 'DIM statement is missing the required semicolon.', - severity: 'error', - range: statementEndRange(source, statementTokens), - }); - } - const asIndex = significant.findIndex((candidate, candidateIndex) => candidateIndex > startIndex && keyword(candidate) === 'AS'); - const datatype = asIndex >= 0 ? significant[asIndex + 1] : undefined; - for (const name of significant.slice(startIndex + 1, asIndex >= 0 ? asIndex : undefined)) { - if (name.kind === TokenKind.Identifier) { - statements.push({ - ...node, - name: name.lexeme, - nameRange: name.range, - datatype: datatype?.lexeme, - datatypeRange: datatype?.range, - }); - pushed = true; - } - } - } else if (value === 'CALL') { - const target = significant[startIndex + 1]; - if (target?.kind === TokenKind.Identifier) { - node.name = target.lexeme; - node.nameRange = target.range; - } - } - if (!pushed) { - statements.push(node); - } + name: statement.name?.lexeme, + nameRange: statement.name?.range, + parentBlockId, + }); } - const previousValue = keyword(significant[index - 1]); - if ((value === 'FOR' || value === 'WHILE') && previousValue === 'EXIT') { - continue; - } - if (value === 'IF' || value === 'FOR' || value === 'WHILE') { + if (statement.recoveredLoop) recoveredForStackDepths.push(stack.length); + if (statement.open !== undefined) { const parent = stack[stack.length - 1]?.block; - const located = tokenNodeRange(source, token); + const blockLocated = tokenNodeRange(source, statement.first, statement.last); const block: BlockNode = { id: blocks.length, - kind: value.toLowerCase() as BlockKind, + kind: statement.open, parentId: parent?.id, childIds: [], - ...located, - bodyRange: { start: token.range.end, end: token.range.end }, - bodySpan: { start: token.span.end, end: token.span.end }, - opener: token.range, + ...blockLocated, + bodyRange: { start: statement.last.range.end, end: statement.last.range.end }, + bodySpan: { start: statement.last.span.end, end: statement.last.span.end }, + opener: statement.first.range, }; blocks.push(block); parent?.childIds.push(block.id); - stack.push({ block, opener: token, hasElse: false }); + stack.push({ block, opener: statement.first, hasElse: false }); continue; } - if (value === 'ELSE') { + if (statement.middle) { const open = stack[stack.length - 1]; - if (open?.block.kind !== 'if') { - diagnostics.push(diagnostic('invalid-nesting', 'ELSE has no matching IF.', token)); - } else if (open.hasElse) { - diagnostics.push(diagnostic('duplicate-else', 'IF block has more than one ELSE.', token)); - } else { + if (open?.block.kind !== 'if') diagnostics.push(diagnostic('invalid-nesting', 'ELSE has no matching IF.', statement.first)); + else if (open.hasElse) diagnostics.push(diagnostic('duplicate-else', 'IF block has more than one ELSE.', statement.first)); + else { open.hasElse = true; - open.block.middle = token.range; + open.block.middle = statement.first.range; } continue; } - if (value === 'ENDIF' || value === 'NEXT') { - const recoveredForStackDepth = recoveredForStackDepths[recoveredForStackDepths.length - 1]; - if (value === 'NEXT' && recoveredForStackDepth === stack.length) { + if (statement.close !== undefined) { + const recoveredDepth = recoveredForStackDepths[recoveredForStackDepths.length - 1]; + if (statement.close === 'next' && recoveredDepth === stack.length) { recoveredForStackDepths.pop(); continue; } - const expected = value === 'ENDIF' ? ['if'] : ['for', 'while']; + const expected = statement.close === 'endif' ? ['if'] : ['for', 'while']; const open = stack[stack.length - 1]; if (open === undefined || !expected.includes(open.block.kind)) { - diagnostics.push(diagnostic('invalid-nesting', `${value} has no matching ${value === 'ENDIF' ? 'IF' : 'FOR or WHILE'}.`, token)); + const label = statement.close === 'endif' ? 'ENDIF' : 'NEXT'; + diagnostics.push(diagnostic('invalid-nesting', `${label} has no matching ${statement.close === 'endif' ? 'IF' : 'FOR or WHILE'}.`, statement.first)); } else { stack.pop(); - open.block.closer = token.range; - open.block.span.end = token.span.end; - open.block.range.end = token.range.end; - open.block.bodySpan.end = token.span.start; - open.block.bodyRange.end = token.range.start; + open.block.closer = statement.first.range; + open.block.span.end = statement.last.span.end; + open.block.range.end = statement.last.range.end; + open.block.bodySpan.end = statement.first.span.start; + open.block.bodyRange.end = statement.first.range.start; } } } - - const values = significant.map(keyword); - if (continuation !== undefined && values.includes('THEN')) { - continuation = undefined; - } else if (!closesAtStart && values.includes('IF') && !values.includes('THEN') - && ['AND', 'OR', 'NOT'].includes(values[values.length - 1] ?? '')) { - continuation = { baseDepth: Math.max(0, stack.length - 1) }; - } + line = endLine; } for (const open of stack) { @@ -298,16 +780,9 @@ export function parseQuickScript(source: string): QuickScriptDocument { if (!DATATYPE_SET.has(statement.datatype!.toUpperCase())) { const range = statement.datatypeRange ?? statement.range; const key = `${range.start.line}:${range.start.character}`; - if (diagnosedDatatypes.has(key)) { - continue; - } + if (diagnosedDatatypes.has(key)) continue; diagnosedDatatypes.add(key); - diagnostics.push({ - code: 'unknown-datatype', - message: `Unknown datatype '${statement.datatype}'.`, - severity: 'error', - range, - }); + diagnostics.push({ code: 'unknown-datatype', message: `Unknown datatype '${statement.datatype}'.`, severity: 'error', range }); } } From f6fee06f9ee28bc77ef27edbc79b148f951266b5 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:44:52 +0200 Subject: [PATCH 18/40] test(language): add grammar-derived negative coverage --- packages/core/test/parser.test.ts | 88 +++++++++++++++++++ .../language-server/test/features.test.ts | 22 +++++ 2 files changed, 110 insertions(+) diff --git a/packages/core/test/parser.test.ts b/packages/core/test/parser.test.ts index 8665500..41ad166 100644 --- a/packages/core/test/parser.test.ts +++ b/packages/core/test/parser.test.ts @@ -1,4 +1,6 @@ import * as assert from 'assert'; +import * as fs from 'fs'; +import * as path from 'path'; import { parseQuickScript } from '../src/parser'; @@ -96,4 +98,90 @@ suite('QuickScript structure parser', () => { assert.ok(!document.diagnostics.some(item => item.code === 'missing-semicolon')); }); + + test('accepts the documented statement and expression productions', () => { + const sources = [ + 'DIM First, Second AS REAL;', + 'TABINDEX = (TABINDEX + 1) * 2;', + 'STATION2:S09BNOnline = NOT (Value == 0 OR Ready == FALSE);', + 'CALL Run(StringMid(TextValue, 1, 2));', + 'LogMessage("ready");', + 'StartApp SYS_ToolsPath + "\\Scheduler.exe";', + 'Show "Overview";', + 'IF INDEX == cpuen THEN EXIT FOR; ENDIF;', + 'FOR I = 1 TO StringLen(TextValue) STEP 2\nNEXT;', + 'WHILE First < Second\nFirst = First + 1;\nNEXT;', + 'RETURN Temp_Return;', + ]; + + for (const source of sources) { + assert.deepStrictEqual(parseQuickScript(source).diagnostics, [], source); + } + }); + + test('keeps representative repository corpora diagnostic-clean', () => { + const fixtures = [ + path.resolve(__dirname, '../../../packages/core/test/fixtures/representative.vbi'), + path.resolve(__dirname, '../../../src/test/suite/testfiles/04.indentation.basic.nesting.tobe.vbi'), + path.resolve(__dirname, '../../../src/test/suite/testfiles/05.comment_rules.nesting.tobe.vbi'), + path.resolve(__dirname, '../../../src/test/suite/testfiles/06.region.nesting.tobe.vbi'), + path.resolve(__dirname, '../../../src/test/suite/testfiles/07.instance.highlight.tobe.vbi'), + ]; + + for (const fixture of fixtures) { + const diagnostics = parseQuickScript(fs.readFileSync(fixture, 'utf8')).diagnostics; + assert.deepStrictEqual(diagnostics, [], fixture); + } + }); + + test('derives focused negative diagnostics from grammar expectations', () => { + const cases: Array<{ + production: string; + source: string; + code: string; + start: { line: number; character: number }; + }> = [ + { production: 'DIM terminator', source: 'DIM X AS INTEGER', code: 'missing-semicolon', start: { line: 0, character: 16 } }, + { production: 'DIM identifier', source: 'DIM AS INTEGER;', code: 'missing-identifier', start: { line: 0, character: 3 } }, + { production: 'DIM AS', source: 'DIM X INTEGER;', code: 'missing-as', start: { line: 0, character: 13 } }, + { production: 'assignment terminator', source: 'X = X + 1', code: 'missing-semicolon', start: { line: 0, character: 9 } }, + { production: 'statement kind', source: 'X + X + 1;', code: 'expected-assignment', start: { line: 0, character: 0 } }, + { production: 'IF terminator', source: 'IF X == 1 THEN;\nENDIF;', code: 'unexpected-semicolon', start: { line: 0, character: 14 } }, + { production: 'IF THEN', source: 'IF X == 1\nENDIF;', code: 'missing-then', start: { line: 0, character: 9 } }, + { production: 'FOR assignment operator', source: 'FOR I == 1 TO 10\nNEXT;', code: 'expected-equals', start: { line: 0, character: 6 } }, + { production: 'FOR TO', source: 'FOR I = 1 10\nNEXT;', code: 'missing-to', start: { line: 0, character: 12 } }, + { production: 'FOR variable', source: 'FOR = 1 TO 10\nNEXT;', code: 'missing-loop-variable', start: { line: 0, character: 4 } }, + { production: 'CALL delimiter', source: 'CALL Foo(1; ', code: 'unclosed-delimiter', start: { line: 0, character: 10 } }, + { production: 'block end', source: 'NEXT;', code: 'invalid-nesting', start: { line: 0, character: 0 } }, + { production: 'block closer', source: 'IF Ready THEN', code: 'missing-endif', start: { line: 0, character: 0 } }, + { production: 'unknown declaration', source: 'DI X AS INTEGER;', code: 'invalid-statement', start: { line: 0, character: 0 } }, + ]; + + for (const item of cases) { + const found = parseQuickScript(item.source).diagnostics.find(candidate => candidate.code === item.code); + assert.ok(found, `${item.production}: expected ${item.code}`); + assert.deepStrictEqual(found.range.start, item.start, item.production); + } + }); + + test('recovers malformed loop-shaped statements without a NEXT cascade', () => { + const document = parseQuickScript('FR I = 1 TO 10\nCALL Run(I);\nNEXT;'); + + assert.ok(document.diagnostics.some(item => item.code === 'invalid-statement' && item.range.start.line === 0)); + assert.ok(!document.diagnostics.some(item => item.code === 'invalid-nesting')); + }); + + test('applies deterministic grammar mutations to valid statements', () => { + const mutations = [ + { source: 'X = X + 1;', mutate: (value: string) => value.replace(/;$/, ''), code: 'missing-semicolon' }, + { source: 'FOR I = 1 TO 10\nNEXT;', mutate: (value: string) => value.replace('I =', 'I =='), code: 'expected-equals' }, + { source: 'IF Ready THEN\nENDIF;', mutate: (value: string) => value.replace(' THEN', ''), code: 'missing-then' }, + { source: 'CALL Run(I);', mutate: (value: string) => value.replace(')', ''), code: 'unclosed-delimiter' }, + ]; + + for (const mutation of mutations) { + assert.deepStrictEqual(parseQuickScript(mutation.source).diagnostics, [], mutation.source); + assert.ok(parseQuickScript(mutation.mutate(mutation.source)).diagnostics.some(item => item.code === mutation.code)); + } + }); }); diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index 9d3f666..b95dcf2 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -220,4 +220,26 @@ suite('QuickScript language server features', () => { ); assert.ok(!diagnostics.some(item => item.code === 'invalid-nesting' && item.range.start.line === 4)); }); + + test('publishes the grammar-derived HIL round 3 diagnostics at primary tokens', () => { + const document = TextDocument.create('file:///hil-round-3.vbi', 'intouch', 1, [ + 'TABINDEX = TABINDEX + 1', + 'IF Ready THEN;', + 'ENDIF;', + 'FOR TABINDEX == TABINDEX TO StringLen(TEXT9)', + 'NEXT;', + 'TABINDEX + TABINDEX + 1;', + ].join('\n')); + const diagnostics = diagnosticsFor(document); + + assert.deepStrictEqual( + diagnostics.map(item => [item.code, item.range.start]), + [ + ['missing-semicolon', { line: 0, character: 23 }], + ['unexpected-semicolon', { line: 1, character: 13 }], + ['expected-equals', { line: 3, character: 13 }], + ['expected-assignment', { line: 5, character: 0 }], + ], + ); + }); }); From e7cfd2a1f11cd7d7924125083b11b6e9d557cec2 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:44:59 +0200 Subject: [PATCH 19/40] fix(formatter): reindent multiline brace comments as blocks --- docs/language/quickscript.md | 11 +++++ packages/core/src/formatter.ts | 70 ++++++++++++++++++++++++++-- packages/core/test/formatter.test.ts | 50 ++++++++++++++++++++ 3 files changed, 128 insertions(+), 3 deletions(-) diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index aa54b53..2529780 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -60,3 +60,14 @@ The formatter directly consumes core tokens and parser structure. The language server exposes the same engine through LSP formatting, and the VS Code client uses that standard request. TextMate grammar, snippets, and themes remain secondary presentation assets rather than semantic parsers. + +## Multiline brace-comment formatting + +A normal multiline `{ ... }` comment is reindented as one text block. The +formatter calculates the opening line's original and structural target indent, +then applies that same delta to every physical line through the closing brace. +Relative indentation and comment text are otherwise preserved. + +The configured `{>` / `{<}`, `{#`, `{region`, and `{endregion}` forms remain +formatter directives with their existing nesting behavior. They are not +reclassified as normal multiline comments. diff --git a/packages/core/src/formatter.ts b/packages/core/src/formatter.ts index eda8932..4ddcf58 100644 --- a/packages/core/src/formatter.ts +++ b/packages/core/src/formatter.ts @@ -231,16 +231,58 @@ function matchesDirective(line: string, marker: string | undefined): boolean { return marker !== undefined && marker.length > 0 && line.toLowerCase().startsWith(marker.toLowerCase()); } +interface MultilineCommentShift { + endLine: number; + originalIndent: string; + targetIndent: string; +} + +function isFormatterDirective(line: string, options: FormatOptions): boolean { + return matchesDirective(line, options.blockCodeBegin ?? '{>') + || matchesDirective(line, options.blockCodeEnd ?? '{<') + || matchesDirective(line, options.blockCodeExclude ?? '{#') + || matchesDirective(line, options.regionBlockCodeBegin ?? '{region') + || matchesDirective(line, options.regionBlockCodeEnd ?? '{endregion') + || matchesDirective(line, options.regionBlockCodeExclude ?? '{#'); +} + +function multilineCommentStarts(source: string, options: FormatOptions): Map { + const starts = new Map(); + for (const token of tokenize(source)) { + if (token.kind !== TokenKind.Comment || token.range.end.line <= token.range.start.line) continue; + const lineStart = source.lastIndexOf('\n', token.span.start - 1) + 1; + const beforeComment = source.slice(lineStart, token.span.start); + const trimmed = token.lexeme.trimStart(); + if (/^[ \t]*$/.test(beforeComment) && trimmed.startsWith('{') && !isFormatterDirective(trimmed, options)) { + starts.set(token.range.start.line, token); + } + } + return starts; +} + +function shiftCommentLine(line: string, shift: MultilineCommentShift): string { + if (line.startsWith(shift.originalIndent)) { + return shift.targetIndent + line.slice(shift.originalIndent.length); + } + const leading = line.match(/^[ \t]*/)?.[0] ?? ''; + const delta = shift.targetIndent.length - shift.originalIndent.length; + if (delta < 0) return line.slice(Math.min(-delta, leading.length)); + if (delta > 0) return shift.targetIndent.slice(0, delta) + line; + return line; +} + /** Apply parser-driven indentation to lexically normalized QuickScript. */ export function formatQuickScriptStructure(source: string, options: FormatOptions = {}): FormatResult { const lineEnding = options.lineEnding ?? '\r\n'; const normalizedSource = source.replace(/\r\n|\r|\n/g, lineEnding); const document = parseQuickScript(normalizedSource); const sourceLines = normalizedSource.split(lineEnding); + const commentStarts = multilineCommentStarts(normalizedSource, options); const output: string[] = []; const indent = normalizedIndent(options); let directiveDepth = 0; let blankCount = 0; + let commentShift: MultilineCommentShift | undefined; const maximumBlankLines = options.removeEmptyLines === false ? Number.POSITIVE_INFINITY : Math.max(0, options.allowedNumberOfEmptyLines ?? 1); @@ -248,6 +290,22 @@ export function formatQuickScriptStructure(source: string, options: FormatOption for (let lineNumber = 0; lineNumber < sourceLines.length; lineNumber += 1) { const original = sourceLines[lineNumber].replace(/[ \t]+$/g, ''); const structure = document.lines[lineNumber]; + if (commentShift !== undefined && lineNumber <= commentShift.endLine) { + if (original.trim().length === 0) { + if (options.removeEmptyLinesInComments !== true) { + blankCount = 0; + output.push(shiftCommentLine(original, commentShift)); + } else { + blankCount += 1; + if (blankCount <= maximumBlankLines) output.push(''); + } + } else { + blankCount = 0; + output.push(shiftCommentLine(original, commentShift)); + } + if (lineNumber === commentShift.endLine) commentShift = undefined; + continue; + } if (original.trim().length === 0) { if (structure?.preserveIndent && options.removeEmptyLinesInComments !== true) { blankCount = 0; @@ -271,11 +329,17 @@ export function formatQuickScriptStructure(source: string, options: FormatOption directiveDepth = Math.max(0, directiveDepth - 1); } - if (structure?.preserveIndent) { + const back = excludesDirective ? 1 : 0; + const depth = Math.max(0, (structure?.indentDepth ?? 0) + directiveDepth - back); + const multilineComment = commentStarts.get(lineNumber); + if (multilineComment !== undefined) { + const originalIndent = original.match(/^[ \t]*/)?.[0] ?? ''; + const targetIndent = indent.repeat(depth); + output.push(targetIndent + original.slice(originalIndent.length)); + commentShift = { endLine: multilineComment.range.end.line, originalIndent, targetIndent }; + } else if (structure?.preserveIndent) { output.push(original); } else { - const back = excludesDirective ? 1 : 0; - const depth = Math.max(0, (structure?.indentDepth ?? 0) + directiveDepth - back); output.push(indent.repeat(depth) + normalizeStructuredLine(trimmed)); } diff --git a/packages/core/test/formatter.test.ts b/packages/core/test/formatter.test.ts index 2df289e..09b63bf 100644 --- a/packages/core/test/formatter.test.ts +++ b/packages/core/test/formatter.test.ts @@ -86,6 +86,56 @@ suite('QuickScript lexical formatter', () => { assert.strictEqual(twice, once); }); + test('moves a multiline brace comment as one relative-indentation block', () => { + const source = [ + '{------------------------------------------------------------------------------}', + '', + ' { Button:', + ' CALL HideAllPLS( );', + ' TAB_AAF.Name = AT01_B0008B0020B0.Name;', + ' TAB_Sollwert.Reference = "";', + ' TAB_Einheit = "";', + ' PLSActive=sys_true;', + ' CALL TABHER012EA( );', + ' }', + ].join('\n'); + const expected = [ + '{------------------------------------------------------------------------------}', + '', + '{ Button:', + ' CALL HideAllPLS( );', + ' TAB_AAF.Name = AT01_B0008B0020B0.Name;', + ' TAB_Sollwert.Reference = "";', + ' TAB_Einheit = "";', + ' PLSActive=sys_true;', + ' CALL TABHER012EA( );', + '}', + ].join('\r\n'); + + const once = formatQuickScript(source).text; + const twice = formatQuickScript(once).text; + + assert.strictEqual(once, expected); + assert.strictEqual(twice, once); + }); + + test('keeps configured comment directives separate from normal comment blocks', () => { + const source = [ + '{>', + ' { nested comment', + ' relative text', + ' }', + '{<-------------------------------------------}', + '{region sample}', + '{endregion}', + ].join('\n'); + const once = formatQuickScript(source).text; + + assert.ok(once.includes('{>\r\n { nested comment\r\n relative text\r\n }')); + assert.ok(once.endsWith('{<-------------------------------------------}\r\n{region sample}\r\n{endregion}')); + assert.strictEqual(formatQuickScript(once).text, once); + }); + test('ends lexical preservation at a decorated block marker before later code', () => { const source = [ '{>', From b3506548d35fecd4897dc06437ba5e817a30737e Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:48:05 +0200 Subject: [PATCH 20/40] chore(release): prepare HIL version 1.5.3 --- dist/server.js | 45 +++++++++++++++++++++++---------------------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/dist/server.js b/dist/server.js index 089c1f0..00dfe2c 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,27 +1,28 @@ -"use strict";var No=Object.defineProperty;var Hm=Object.getOwnPropertyDescriptor;var Wm=Object.getOwnPropertyNames;var Um=Object.prototype.hasOwnProperty;var wa=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Pa=(e,t)=>{for(var n in t)No(e,n,{get:t[n],enumerable:!0})},Bm=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wm(t))!Um.call(e,o)&&o!==n&&No(e,o,{get:()=>t[o],enumerable:!(r=Hm(t,o))||r.enumerable});return e};var tr=e=>Bm(No({},"__esModule",{value:!0}),e);var nr=I(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.boolean=zm;Ae.string=Oa;Ae.number=$m;Ae.error=Qm;Ae.func=Ra;Ae.array=ka;Ae.stringArray=Vm;Ae.typedArray=Xm;Ae.thenable=Km;function zm(e){return e===!0||e===!1}function Oa(e){return typeof e=="string"||e instanceof String}function $m(e){return typeof e=="number"||e instanceof Number}function Qm(e){return e instanceof Error}function Ra(e){return typeof e=="function"}function ka(e){return Array.isArray(e)}function Vm(e){return ka(e)&&e.every(t=>Oa(t))}function Xm(e,t){return Array.isArray(e)&&e.every(t)}function Km(e){return e&&Ra(e.then)}});var Wt=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.boolean=Ym;et.string=Ma;et.number=Jm;et.error=Zm;et.func=eh;et.array=xa;et.stringArray=th;function Ym(e){return e===!0||e===!1}function Ma(e){return typeof e=="string"||e instanceof String}function Jm(e){return typeof e=="number"||e instanceof Number}function Zm(e){return e instanceof Error}function eh(e){return typeof e=="function"}function xa(e){return Array.isArray(e)}function th(e){return xa(e)&&e.every(t=>Ma(t))}});var si=I(w=>{"use strict";var nh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),oh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.LRUCache=ft.LinkedMap=ft.Touch=void 0;var le;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(le||(ft.Touch=le={}));var rr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=le.None){let r=this._map.get(t);if(r)return n!==le.None&&this.touch(r,n),r.value}set(t,n,r=le.None){let o=this._map.get(t);if(o)o.value=n,r!==le.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case le.None:this.addItemLast(o);break;case le.First:this.addItemFirst(o);break;case le.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==le.First&&n!==le.Last)){if(n===le.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===le.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};ft.LinkedMap=rr;var ci=class extends rr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=le.AsNew){return super.get(t,n)}peek(t){return super.get(t,le.None)}set(t,n){return super.set(t,n,le.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ft.LRUCache=ci});var Na=I(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.Disposable=void 0;var Ea;(function(e){function t(n){return{dispose:n}}e.create=t})(Ea||(or.Disposable=Ea={}))});var mt=I(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});var ui;function li(){if(ui===void 0)throw new Error("No runtime abstraction layer installed");return ui}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ui=n}e.install=t})(li||(li={}));di.default=li});var Ut=I(ht=>{"use strict";var ih=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.Emitter=ht.Event=void 0;var sh=ih(mt()),Ga;(function(e){let t={dispose(){}};e.None=function(){return t}})(Ga||(ht.Event=Ga={}));var fi=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new fi),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ht.Emitter=mi});var cr=I(Ce=>{"use strict";var ch=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ah=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),uh=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.SharedArrayReceiverStrategy=Bt.SharedArraySenderStrategy=void 0;var hh=cr(),Sn;(function(e){e.Continue=0,e.Cancelled=1})(Sn||(Sn={}));var pi=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Sn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Sn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Bt.SharedArraySenderStrategy=pi;var yi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Sn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ti=class{token;constructor(t){this.token=new yi(t)}cancel(){}dispose(){}},_i=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new hh.CancellationTokenSource:new Ti(n)}};Bt.SharedArrayReceiverStrategy=_i});var vi=I(zt=>{"use strict";var gh=zt&&zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zt,"__esModule",{value:!0});zt.Semaphore=void 0;var ph=gh(mt()),bi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ph.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};zt.Semaphore=bi});var Fa=I(de=>{"use strict";var yh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Th=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_h=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Ii.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};de.ReadableStreamMessageReader=Di});var Ba=I(fe=>{"use strict";var Ch=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ih=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(Ph,r.byteLength.toString(),Wa),o.push(Wa),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};fe.WriteableStreamMessageWriter=Pi});var za=I(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.AbstractMessageBuffer=void 0;var Oh=13,Rh=10,kh=`\r -`,Oi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};lr.AbstractMessageBuffer=Oi});var Xa=I(O=>{"use strict";var Mh=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xh=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qh=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(O.Trace=F={}));var qi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(qi||(O.TraceValue=qi={}));O.TraceValues=qi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(O.Trace=F={}));var we;(function(e){e.Text="text",e.JSON="json"})(we||(O.TraceFormat=we={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(we||(O.TraceFormat=we={}));var Ei;(function(e){e.type=new k.NotificationType("$/setTrace")})(Ei||(O.SetTraceNotification=Ei={}));var dr;(function(e){e.type=new k.NotificationType("$/logTrace")})(dr||(O.LogTraceNotification=dr={}));var On;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(On||(O.ConnectionErrors=On={}));var Qt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=Qt;var Ni;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ni||(O.ConnectionStrategy=Ni={}));var fr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(fr||(O.IdCancellationReceiverStrategy=fr={}));var Gi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(Gi||(O.RequestCancellationReceiverStrategy=Gi={}));var mr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ri.CancellationTokenSource}});function t(n){return fr.is(n)||Gi.is(n)}e.is=t})(mr||(O.CancellationReceiverStrategy=mr={}));var hr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Rn.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(hr||(O.CancellationSenderStrategy=hr={}));var gr;(function(e){e.Message=Object.freeze({receiver:mr.Message,sender:hr.Message});function t(n){let r=n;return r&&mr.is(r.receiver)&&hr.is(r.sender)}e.is=t})(gr||(O.CancellationStrategy=gr={}));var pr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(pr||(O.MessageStrategy=pr={}));var Va;(function(e){function t(n){let r=n;return r&&(gr.is(r.cancellationStrategy)||Ni.is(r.connectionStrategy)||pr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Va||(O.ConnectionOptions=Va={}));var je;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(je||(je={}));function Nh(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,a=0,_="2.0",f=r?.maxParallelism??-1,d=0,v,h=new Map,b,R=new Map,E=new Map,z,N=new Qa.LinkedMap,m=new Map,p=new Set,S=new Map,x=F.Off,A=we.Text,q,B=je.New,Tn=new wn.Emitter,ne=new wn.Emitter,ke=new wn.Emitter,ae=new wn.Emitter,wt=new wn.Emitter,Ne=r&&r.cancellationStrategy?r.cancellationStrategy:gr.Message;function De(u){}function _n(){return B===je.Listening}function Pt(){return B===je.Closed}function Je(){return B===je.Disposed}function Be(){(B===je.New||B===je.Listening)&&(B=je.Closed,ne.fire(void 0))}function bn(u){Tn.fire([u,void 0,void 0])}function wm(u){Tn.fire(u)}e.onClose(Be),e.onError(bn),t.onClose(Be),t.onError(wm);function ba(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function Pm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Om(){return"not-"+(++s).toString()}function Rm(u,T){k.Message.isRequest(T)?u.set(ba(T.id),T):k.Message.isResponse(T)?f===-1?u.set(Pm(T.id),T):Ca(T):u.set(Om(),T)}function Mo(){z||N.size===0||f!==-1&&d>=f||(z=(0,$a.default)().timer.setImmediate(async()=>{if(z=void 0,N.size===0||f!==-1&&d>=f)return;let u=N.shift(),T;try{d++;let C=r?.messageStrategy;pr.is(C)?T=C.handleMessage(u,va):T=va(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{T instanceof Promise?T.then(()=>{d--,Mo()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):d--,Mo()}}))}async function va(u){return k.Message.isRequest(u)?Mm(u):k.Message.isNotification(u)?xm(u):k.Message.isResponse(u)?Ca(u):qm(u)}let km=u=>{try{if(k.Message.isNotification(u)&&u.method===Rn.type.method){let T=u.params.id,C=ba(T),P=N.get(C);if(k.Message.isRequest(P)){let X=r?.connectionStrategy,H=X&&X.cancelUndispatched?X.cancelUndispatched(P,De):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){N.delete(C),S.delete(T),H.id=P.id,xo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=S.get(T);if(j!==void 0){j.cancel(),qo(u);return}else p.add(T)}Rm(N,u)}finally{Mo()}};async function Mm(u){if(Je())return Promise.resolve();function T(re,ue,J){let Z={jsonrpc:_,id:u.id};return re instanceof k.ResponseError?Z.error=re.toJson():Z.result=re===void 0?null:re,xo(Z,ue,J),t.write(Z)}function C(re,ue,J){let Z={jsonrpc:_,id:u.id,error:re.toJson()};return xo(Z,ue,J),t.write(Z)}Gm(u);let P=h.get(u.method),j,X;P&&(j=P.type,X=P.handler);let H=Date.now();if(X||v){let re=u.id??String(Date.now()),ue=fr.is(Ne.receiver)?Ne.receiver.createCancellationTokenSource(re):Ne.receiver.createCancellationTokenSource(u);u.id!==null&&p.has(u.id)&&ue.cancel(),u.id!==null&&S.set(re,ue);try{let J;if(X)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new k.ResponseError(k.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);J=X(ue.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===k.ParameterStructures.byName)return C(new k.ResponseError(k.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=X(...u.params,ue.token)}else{if(j!==void 0&&j.parameterStructures===k.ParameterStructures.byPosition)return C(new k.ResponseError(k.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=X(u.params,ue.token)}else v&&(J=v(u.method,u.params,ue.token));let Z=await J;await T(Z,u.method,H)}catch(J){J instanceof k.ResponseError?await T(J,u.method,H):J&&K.string(J.message)?await C(new k.ResponseError(k.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new k.ResponseError(k.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{S.delete(re)}}else await C(new k.ResponseError(k.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function Ca(u){if(!Je())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let T=u.id,C=m.get(T);if(Am(u,C),C!==void 0){m.delete(T);try{if(u.error){let P=u.error;C.reject(new k.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function xm(u){if(Je())return;let T,C;if(u.method===Rn.type.method){let P=u.params.id;p.delete(P),qo(u);return}else{let P=R.get(u.method);P&&(C=P.handler,T=P.type)}if(C||b)try{if(qo(u),C)if(u.params===void 0)T!==void 0&&T.numberOfParams!==0&&T.parameterStructures!==k.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Pn.type.method&&P.length===2&&ki.is(P[0])?await C({token:P[0],value:P[1]}):(T!==void 0&&(T.parameterStructures===k.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),T.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${T.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else T!==void 0&&T.parameterStructures===k.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else b&&await b(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else ke.fire(u)}function qm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let T=u;if(K.string(T.id)||K.number(T.id)){let C=T.id,P=m.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function lt(u){if(u!=null)switch(x){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Em(u){if(!(x===F.Off||!q))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${lt(u.params)}`),q.log(`Sending request '${u.method} - (${u.id})'.`,T)}else Ht("send-request",u)}function Nm(u){if(!(x===F.Off||!q))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${lt(u.params)}`:T="No parameters provided."),q.log(`Sending notification '${u.method}'.`,T)}else Ht("send-notification",u)}function xo(u,T,C){if(!(x===F.Off||!q))if(A===we.Text){let P;(x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${lt(u.error.data)}`:u.result?P=`Result: ${lt(u.result)}`:u.error===void 0&&(P="No result returned.")),q.log(`Sending response '${T} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Ht("send-response",u)}function Gm(u){if(!(x===F.Off||!q))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&u.params&&(T=`Params: ${lt(u.params)}`),q.log(`Received request '${u.method} - (${u.id})'.`,T)}else Ht("receive-request",u)}function qo(u){if(!(x===F.Off||!q||u.method===dr.type.method))if(A===we.Text){let T;(x===F.Verbose||x===F.Compact)&&(u.params?T=`Params: ${lt(u.params)}`:T="No parameters provided."),q.log(`Received notification '${u.method}'.`,T)}else Ht("receive-notification",u)}function Am(u,T){if(!(x===F.Off||!q))if(A===we.Text){let C;if((x===F.Verbose||x===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${lt(u.error.data)}`:u.result?C=`Result: ${lt(u.result)}`:u.error===void 0&&(C="No result returned.")),T){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";q.log(`Received response '${T.method} - (${u.id})' in ${Date.now()-T.timerStart}ms.${P}`,C)}else q.log(`Received response ${u.id} without active response promise.`,C)}else Ht("receive-response",u)}function Ht(u,T){if(!q||x===F.Off)return;let C={isLSPMessage:!0,type:u,message:T,timestamp:Date.now()};q.log(C)}function vn(){if(Pt())throw new Qt(On.Closed,"Connection is closed.");if(Je())throw new Qt(On.Disposed,"Connection is disposed.")}function jm(){if(_n())throw new Qt(On.AlreadyListening,"Connection is already listening")}function Fm(){if(!_n())throw new Error("Call listen() first.")}function Cn(u){return u===void 0?null:u}function Ia(u){if(u!==null)return u}function Sa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Eo(u,T){switch(u){case k.ParameterStructures.auto:return Sa(T)?Ia(T):[Cn(T)];case k.ParameterStructures.byName:if(!Sa(T))throw new Error("Received parameters by name but param is not an object literal.");return Ia(T);case k.ParameterStructures.byPosition:return[Cn(T)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Da(u,T){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Eo(u.parameterStructures,T[0]);break;default:C=[];for(let j=0;j{vn();let C,P;if(K.string(u)){C=u;let X=T[0],H=0,re=k.ParameterStructures.auto;k.ParameterStructures.is(X)&&(H=1,re=X);let ue=T.length,J=ue-H;switch(J){case 0:P=void 0;break;case 1:P=Eo(re,T[H]);break;default:if(re===k.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=T.slice(H,ue).map(Z=>Cn(Z));break}}else{let X=T;C=u.method,P=Da(u,X)}let j={jsonrpc:_,method:C,params:P};return Nm(j),t.write(j).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,T)=>{vn();let C;return K.func(u)?b=u:T&&(K.string(u)?(C=u,R.set(u,{type:void 0,handler:T})):(C=u.method,R.set(u.method,{type:u,handler:T}))),{dispose:()=>{C!==void 0?R.get(C)?.handler===T&&R.delete(C):b===u&&(b=void 0)}}},onProgress:(u,T,C)=>{if(E.has(T))throw new Error(`Progress handler for token ${T} already registered`);return E.set(T,C),{dispose:()=>{E.get(T)===C&&E.delete(T)}}},sendProgress:(u,T,C)=>Ot.sendNotification(Pn.type,{token:T,value:C}),onUnhandledProgress:ae.event,sendRequest:(u,...T)=>{vn(),Fm();function C(Z,Ge){let Ze=Ne.sender.sendCancellation(Z,Ge);Ze===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ge}`):Ze.catch(()=>{o.log(`Sending cancellation messages for id ${Ge} failed.`)})}let P,j,X;if(K.string(u)){P=u;let Z=T[0],Ge=T[T.length-1],Ze=0,In=k.ParameterStructures.auto;k.ParameterStructures.is(Z)&&(Ze=1,In=Z);let Rt=T.length;Ri.CancellationToken.is(Ge)&&(Rt=Rt-1,X=Ge);let ze=Rt-Ze;switch(ze){case 0:j=void 0;break;case 1:j=Eo(In,T[Ze]);break;default:if(In===k.ParameterStructures.byName)throw new Error(`Received ${ze} parameters for 'by Name' request parameter structure.`);j=T.slice(Ze,Rt).map(Lm=>Cn(Lm));break}}else{let Z=T;P=u.method,j=Da(u,Z);let Ge=u.numberOfParams;X=Ri.CancellationToken.is(Z[Ge])?Z[Ge]:void 0}let H=i++,re,ue=!1;X!==void 0&&(X.isCancellationRequested?ue=!0:re=X.onCancellationRequested(()=>{C(Ot,H)}));let J={jsonrpc:_,id:H,method:P,params:j};return Em(J),typeof Ne.sender.enableCancellation=="function"&&Ne.sender.enableCancellation(J),new Promise(async(Z,Ge)=>{let Ze=ze=>{Z(ze),Ne.sender.cleanup(H),re?.dispose()},In=ze=>{Ge(ze),Ne.sender.cleanup(H),re?.dispose()},Rt={method:P,timerStart:Date.now(),resolve:Ze,reject:In};try{m.set(H,Rt),await t.write(J),ue&&C(Ot,H)}catch(ze){throw m.delete(H),Rt.reject(new k.ResponseError(k.ErrorCodes.MessageWriteError,ze.message?ze.message:"Unknown reason")),o.error("Sending request failed."),ze}})},onRequest:(u,T)=>{vn();let C=null;return xi.is(u)?(C=void 0,v=u):K.string(u)?(C=null,T!==void 0&&(C=u,h.set(u,{handler:T,type:void 0}))):T!==void 0&&(C=u.method,h.set(u.method,{type:u,handler:T})),{dispose:()=>{C!==null&&(C!==void 0?h.get(C)?.handler===T&&h.delete(C):v===u&&(v=void 0))}}},hasPendingResponse:()=>m.size>0,trace:async(u,T,C)=>{let P=!1,j=we.Text;C!==void 0&&(K.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||we.Text)),x=u,A=j,x===F.Off?q=void 0:q=T,P&&!Pt()&&!Je()&&await Ot.sendNotification(Ei.type,{value:F.toString(u)})},onError:Tn.event,onClose:ne.event,onUnhandledNotification:ke.event,onDispose:wt.event,end:()=>{t.end()},dispose:()=>{if(Je())return;B=je.Disposed,wt.fire(void 0);let u=new k.ResponseError(k.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let T of m.values())T.reject(u);m=new Map,S=new Map,p=new Set,N=new Qa.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{vn(),jm(),B=je.Listening,e.listen(km)},inspect:()=>{(0,$a.default)().console.log("inspect")}};return Ot.onNotification(dr.type,u=>{if(x===F.Off||!q)return;let T=x===F.Verbose||x===F.Compact;q.log(u.message,T?u.verbose:void 0)}),Ot.onNotification(Pn.type,async u=>{let T=E.get(u.token);T?await T(u.value):ae.fire(u)}),Ot}});var tt=I(g=>{"use strict";var Gh=g&&g.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g,"__esModule",{value:!0});g.ProgressType=g.ProgressToken=g.createMessageConnection=g.NullLogger=g.ConnectionOptions=g.ConnectionStrategy=g.AbstractMessageBuffer=g.WriteableStreamMessageWriter=g.AbstractMessageWriter=g.MessageWriter=g.ReadableStreamMessageReader=g.AbstractMessageReader=g.MessageReader=g.SharedArrayReceiverStrategy=g.SharedArraySenderStrategy=g.CancellationToken=g.CancellationTokenSource=g.Emitter=g.Event=g.Disposable=g.LRUCache=g.Touch=g.LinkedMap=g.ParameterStructures=g.NotificationType9=g.NotificationType8=g.NotificationType7=g.NotificationType6=g.NotificationType5=g.NotificationType4=g.NotificationType3=g.NotificationType2=g.NotificationType1=g.NotificationType0=g.NotificationType=g.ErrorCodes=g.ResponseError=g.RequestType9=g.RequestType8=g.RequestType7=g.RequestType6=g.RequestType5=g.RequestType4=g.RequestType3=g.RequestType2=g.RequestType1=g.RequestType0=g.RequestType=g.Message=g.RAL=void 0;g.MessageStrategy=g.CancellationStrategy=g.CancellationSenderStrategy=g.RequestCancellationReceiverStrategy=g.IdCancellationReceiverStrategy=g.CancellationReceiverStrategy=g.ConnectionError=g.ConnectionErrors=g.LogTraceNotification=g.SetTraceNotification=g.TraceFormat=g.TraceValues=g.TraceValue=g.Trace=void 0;var $=si();Object.defineProperty(g,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(g,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(g,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(g,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(g,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(g,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(g,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(g,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(g,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(g,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(g,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(g,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(g,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(g,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(g,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(g,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(g,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(g,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(g,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(g,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(g,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(g,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(g,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(g,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(g,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(g,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var Ai=ai();Object.defineProperty(g,"LinkedMap",{enumerable:!0,get:function(){return Ai.LinkedMap}});Object.defineProperty(g,"LRUCache",{enumerable:!0,get:function(){return Ai.LRUCache}});Object.defineProperty(g,"Touch",{enumerable:!0,get:function(){return Ai.Touch}});var Ah=Na();Object.defineProperty(g,"Disposable",{enumerable:!0,get:function(){return Ah.Disposable}});var Ka=Ut();Object.defineProperty(g,"Event",{enumerable:!0,get:function(){return Ka.Event}});Object.defineProperty(g,"Emitter",{enumerable:!0,get:function(){return Ka.Emitter}});var Ya=cr();Object.defineProperty(g,"CancellationTokenSource",{enumerable:!0,get:function(){return Ya.CancellationTokenSource}});Object.defineProperty(g,"CancellationToken",{enumerable:!0,get:function(){return Ya.CancellationToken}});var Ja=Aa();Object.defineProperty(g,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Ja.SharedArraySenderStrategy}});Object.defineProperty(g,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Ja.SharedArrayReceiverStrategy}});var ji=Fa();Object.defineProperty(g,"MessageReader",{enumerable:!0,get:function(){return ji.MessageReader}});Object.defineProperty(g,"AbstractMessageReader",{enumerable:!0,get:function(){return ji.AbstractMessageReader}});Object.defineProperty(g,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return ji.ReadableStreamMessageReader}});var Fi=Ba();Object.defineProperty(g,"MessageWriter",{enumerable:!0,get:function(){return Fi.MessageWriter}});Object.defineProperty(g,"AbstractMessageWriter",{enumerable:!0,get:function(){return Fi.AbstractMessageWriter}});Object.defineProperty(g,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Fi.WriteableStreamMessageWriter}});var jh=za();Object.defineProperty(g,"AbstractMessageBuffer",{enumerable:!0,get:function(){return jh.AbstractMessageBuffer}});var te=Xa();Object.defineProperty(g,"ConnectionStrategy",{enumerable:!0,get:function(){return te.ConnectionStrategy}});Object.defineProperty(g,"ConnectionOptions",{enumerable:!0,get:function(){return te.ConnectionOptions}});Object.defineProperty(g,"NullLogger",{enumerable:!0,get:function(){return te.NullLogger}});Object.defineProperty(g,"createMessageConnection",{enumerable:!0,get:function(){return te.createMessageConnection}});Object.defineProperty(g,"ProgressToken",{enumerable:!0,get:function(){return te.ProgressToken}});Object.defineProperty(g,"ProgressType",{enumerable:!0,get:function(){return te.ProgressType}});Object.defineProperty(g,"Trace",{enumerable:!0,get:function(){return te.Trace}});Object.defineProperty(g,"TraceValue",{enumerable:!0,get:function(){return te.TraceValue}});Object.defineProperty(g,"TraceFormat",{enumerable:!0,get:function(){return te.TraceFormat}});Object.defineProperty(g,"SetTraceNotification",{enumerable:!0,get:function(){return te.SetTraceNotification}});Object.defineProperty(g,"LogTraceNotification",{enumerable:!0,get:function(){return te.LogTraceNotification}});Object.defineProperty(g,"ConnectionErrors",{enumerable:!0,get:function(){return te.ConnectionErrors}});Object.defineProperty(g,"ConnectionError",{enumerable:!0,get:function(){return te.ConnectionError}});Object.defineProperty(g,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return te.CancellationReceiverStrategy}});Object.defineProperty(g,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.IdCancellationReceiverStrategy}});Object.defineProperty(g,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.RequestCancellationReceiverStrategy}});Object.defineProperty(g,"CancellationSenderStrategy",{enumerable:!0,get:function(){return te.CancellationSenderStrategy}});Object.defineProperty(g,"CancellationStrategy",{enumerable:!0,get:function(){return te.CancellationStrategy}});Object.defineProperty(g,"MessageStrategy",{enumerable:!0,get:function(){return te.MessageStrategy}});Object.defineProperty(g,"TraceValues",{enumerable:!0,get:function(){return te.TraceValues}});var Fh=Gh(mt());g.RAL=Fh.default});var Pr={};Pa(Pr,{AnnotatedTextEdit:()=>nt,ApplyKind:()=>cs,ChangeAnnotation:()=>gt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>Is,CodeActionContext:()=>Cs,CodeActionKind:()=>vs,CodeActionTag:()=>Ir,CodeActionTriggerKind:()=>Gn,CodeDescription:()=>Xi,CodeLens:()=>Ss,Color:()=>Tr,ColorInformation:()=>Ui,ColorPresentation:()=>Bi,Command:()=>Mt,CompletionItem:()=>us,CompletionItemKind:()=>ns,CompletionItemLabelDetails:()=>as,CompletionItemTag:()=>os,CompletionList:()=>ls,CreateFile:()=>Xt,DeleteFile:()=>Yt,Diagnostic:()=>xn,DiagnosticRelatedInformation:()=>_r,DiagnosticSeverity:()=>Qi,DiagnosticTag:()=>Vi,DocumentHighlight:()=>gs,DocumentHighlightKind:()=>hs,DocumentLink:()=>ws,DocumentSymbol:()=>bs,DocumentUri:()=>Li,EOL:()=>Lh,FoldingRange:()=>$i,FoldingRangeKind:()=>zi,FormattingOptions:()=>Ds,Hover:()=>ds,InlayHint:()=>Ns,InlayHintKind:()=>Sr,InlayHintLabelPart:()=>Dr,InlineCompletionContext:()=>Ls,InlineCompletionItem:()=>Gs,InlineCompletionList:()=>As,InlineCompletionTriggerKind:()=>js,InlineValueContext:()=>Es,InlineValueEvaluatableExpression:()=>qs,InlineValueText:()=>Ms,InlineValueVariableLookup:()=>xs,InsertReplaceEdit:()=>is,InsertTextFormat:()=>rs,InsertTextMode:()=>ss,LanguageKind:()=>es,Location:()=>Mn,LocationLink:()=>Wi,MarkedString:()=>Nn,MarkupContent:()=>pt,MarkupKind:()=>Cr,OptionalVersionedTextDocumentIdentifier:()=>En,ParameterInformation:()=>fs,Position:()=>Me,Range:()=>Y,RenameFile:()=>Kt,SelectedCompletionInfo:()=>Fs,SelectionRange:()=>Ps,SemanticTokenModifiers:()=>Rs,SemanticTokenTypes:()=>Os,SemanticTokens:()=>ks,SignatureInformation:()=>ms,SnippetTextEdit:()=>Ki,StringValue:()=>wr,SymbolInformation:()=>Ts,SymbolKind:()=>ps,SymbolTag:()=>ys,TextDocument:()=>Ws,TextDocumentEdit:()=>qn,TextDocumentIdentifier:()=>Ji,TextDocumentItem:()=>ts,TextEdit:()=>$e,URI:()=>yr,VersionedTextDocumentIdentifier:()=>Zi,WorkspaceChange:()=>Yi,WorkspaceEdit:()=>br,WorkspaceFolder:()=>Hs,WorkspaceSymbol:()=>_s,integer:()=>Hi,uinteger:()=>kn});var Li,yr,Hi,kn,Me,Y,Mn,Wi,Tr,Ui,Bi,zi,$i,_r,Qi,Vi,Xi,xn,Mt,$e,gt,oe,nt,qn,Xt,Kt,Yt,br,Vt,Ki,vr,Yi,Ji,Zi,En,es,ts,Cr,pt,ns,rs,os,is,ss,cs,as,us,ls,Nn,ds,fs,ms,hs,gs,ps,ys,Ts,_s,bs,vs,Gn,Cs,Ir,Is,Ss,Ds,ws,Ps,Os,Rs,ks,Ms,xs,qs,Es,Sr,Dr,Ns,wr,Gs,As,js,Fs,Ls,Hs,Lh,Ws,Us,l,Or=wa(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Li||(Li={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(yr||(yr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Hi||(Hi={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(kn||(kn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=kn.MAX_VALUE),o===Number.MAX_VALUE&&(o=kn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.line)&&l.uinteger(o.character)}e.is=n})(Me||(Me={}));(function(e){function t(r,o,i,s){if(l.uinteger(r)&&l.uinteger(o)&&l.uinteger(i)&&l.uinteger(s))return{start:Me.create(r,o),end:Me.create(i,s)};if(Me.is(r)&&Me.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Me.is(o.start)&&Me.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.range)&&(l.string(o.uri)||l.undefined(o.uri))}e.is=n})(Mn||(Mn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.targetRange)&&l.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||l.undefined(o.originSelectionRange))}e.is=n})(Wi||(Wi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.numberRange(o.red,0,1)&&l.numberRange(o.green,0,1)&&l.numberRange(o.blue,0,1)&&l.numberRange(o.alpha,0,1)}e.is=n})(Tr||(Tr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.range)&&Tr.is(o.color)}e.is=n})(Ui||(Ui={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.undefined(o.textEdit)||$e.is(o))&&(l.undefined(o.additionalTextEdits)||l.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(Bi||(Bi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(zi||(zi={}));(function(e){function t(r,o,i,s,a,_){let f={startLine:r,endLine:o};return l.defined(i)&&(f.startCharacter=i),l.defined(s)&&(f.endCharacter=s),l.defined(a)&&(f.kind=a),l.defined(_)&&(f.collapsedText=_),f}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.uinteger(o.startLine)&&l.uinteger(o.startLine)&&(l.undefined(o.startCharacter)||l.uinteger(o.startCharacter))&&(l.undefined(o.endCharacter)||l.uinteger(o.endCharacter))&&(l.undefined(o.kind)||l.string(o.kind))}e.is=n})($i||($i={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&Mn.is(o.location)&&l.string(o.message)}e.is=n})(_r||(_r={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Qi||(Qi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Vi||(Vi={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&l.string(r.href)}e.is=t})(Xi||(Xi={}));(function(e){function t(i,s,a,_,f,d){let v={range:i,message:s};return l.defined(a)&&(v.severity=a),l.defined(_)&&(v.code=_),l.defined(f)&&(v.source=f),l.defined(d)&&(v.relatedInformation=d),v}e.create=t;function n(i){var s;let a=i;return l.defined(a)&&Y.is(a.range)&&(l.string(a.message)||pt.is(a.message))&&(l.number(a.severity)||l.undefined(a.severity))&&(l.integer(a.code)||l.string(a.code)||l.undefined(a.code))&&(l.undefined(a.codeDescription)||l.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(l.string(a.source)||l.undefined(a.source))&&(l.undefined(a.relatedInformation)||l.typedArray(a.relatedInformation,_r.is))}e.is=n;function r(i){return l.string(i.message)}e.is3_17=r;function o(i){if(l.string(i.message))return i.message;if(pt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(xn||(xn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return l.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.title)&&(o.tooltip===void 0||l.string(o.tooltip))&&l.string(o.command)}e.is=n})(Mt||(Mt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return l.objectLiteral(s)&&l.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&l.string(o.label)&&(l.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(l.string(o.description)||o.description===void 0)}e.is=n})(gt||(gt={}));(function(e){function t(n){let r=n;return l.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(gt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(nt||(nt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&En.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(qn||(qn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&l.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&l.string(o.oldUri)&&l.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||l.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||l.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Kt||(Kt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&l.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||l.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||l.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Yt||(Yt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>l.string(o.kind)?Xt.is(o)||Kt.is(o)||Yt.is(o):qn.is(o)))}e.is=t})(br||(br={}));Vt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):oe.is(r)?(i=r,o=nt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):oe.is(r)?(i=r,o=nt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):oe.is(n)?(o=n,r=nt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=nt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return l.objectLiteral(r)&&Y.is(r.range)&&wr.isSnippet(r.snippet)&&(r.annotationId===void 0||gt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Ki||(Ki={}));vr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Yi=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new vr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(qn.is(n)){let r=new Vt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Vt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(En.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Vt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Vt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new vr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;gt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;gt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Kt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Kt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;gt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Yt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Yt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)}e.is=n})(Ji||(Ji={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.integer(o.version)}e.is=n})(Zi||(Zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&(o.version===null||l.integer(o.version))}e.is=n})(En||(En={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(es||(es={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.string(o.uri)&&l.string(o.languageId)&&l.integer(o.version)&&l.string(o.text)}e.is=n})(ts||(ts={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Cr||(Cr={}));(function(e){function t(n){let r=n;return l.objectLiteral(n)&&Cr.is(r.kind)&&l.string(r.value)}e.is=t})(pt||(pt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ns||(ns={}));(function(e){e.PlainText=1,e.Snippet=2})(rs||(rs={}));(function(e){e.Deprecated=1})(os||(os={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&l.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(is||(is={}));(function(e){e.asIs=1,e.adjustIndentation=2})(ss||(ss={}));(function(e){e.Replace=1,e.Merge=2})(cs||(cs={}));(function(e){function t(n){let r=n;return r&&(l.string(r.detail)||r.detail===void 0)&&(l.string(r.description)||r.description===void 0)}e.is=t})(as||(as={}));(function(e){function t(n){return{label:n}}e.create=t})(us||(us={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ls||(ls={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return l.string(o)||l.objectLiteral(o)&&l.string(o.language)&&l.string(o.value)}e.is=n})(Nn||(Nn={}));(function(e){function t(n){let r=n;return!!r&&l.objectLiteral(r)&&(pt.is(r.contents)||Nn.is(r.contents)||l.typedArray(r.contents,Nn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(ds||(ds={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(fs||(fs={}));(function(e){function t(n,r,...o){let i={label:n};return l.defined(r)&&(i.documentation=r),l.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ms||(ms={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(hs||(hs={}));(function(e){function t(n,r){let o={range:n};return l.number(r)&&(o.kind=r),o}e.create=t})(gs||(gs={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ps||(ps={}));(function(e){e.Deprecated=1})(ys||(ys={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(Ts||(Ts={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(_s||(_s={}));(function(e){function t(r,o,i,s,a,_){let f={name:r,detail:o,kind:i,range:s,selectionRange:a};return _!==void 0&&(f.children=_),f}e.create=t;function n(r){let o=r;return o&&l.string(o.name)&&l.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||l.string(o.detail))&&(o.deprecated===void 0||l.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(bs||(bs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(vs||(vs={}));(function(e){e.Invoked=1,e.Automatic=2})(Gn||(Gn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return l.defined(o)&&l.typedArray(o.diagnostics,xn.is)&&(o.only===void 0||l.typedArray(o.only,l.string))&&(o.triggerKind===void 0||o.triggerKind===Gn.Invoked||o.triggerKind===Gn.Automatic)}e.is=n})(Cs||(Cs={}));(function(e){e.LLMGenerated=1;function t(n){return l.defined(n)&&n===e.LLMGenerated}e.is=t})(Ir||(Ir={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Mt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&l.string(o.title)&&(o.diagnostics===void 0||l.typedArray(o.diagnostics,xn.is))&&(o.kind===void 0||l.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Mt.is(o.command))&&(o.isPreferred===void 0||l.boolean(o.isPreferred))&&(o.edit===void 0||br.is(o.edit))&&(o.tags===void 0||l.typedArray(o.tags,Ir.is))}e.is=n})(Is||(Is={}));(function(e){function t(r,o){let i={range:r};return l.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return l.defined(o)&&Y.is(o.range)&&(l.undefined(o.command)||Mt.is(o.command))}e.is=n})(Ss||(Ss={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&l.uinteger(o.tabSize)&&l.boolean(o.insertSpaces)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return l.defined(o)&&Y.is(o.range)&&(l.undefined(o.target)||l.string(o.target))}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(Ps||(Ps={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Os||(Os={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Rs||(Rs={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(ks||(ks={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&l.string(o.text)}e.is=n})(Ms||(Ms={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&l.boolean(o.caseSensitiveLookup)&&(l.string(o.variableName)||o.variableName===void 0)}e.is=n})(xs||(xs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(l.string(o.expression)||o.expression===void 0)}e.is=n})(qs||(qs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return l.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Es||(Es={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Sr||(Sr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&(o.tooltip===void 0||l.string(o.tooltip)||pt.is(o.tooltip))&&(o.location===void 0||Mn.is(o.location))&&(o.command===void 0||Mt.is(o.command))}e.is=n})(Dr||(Dr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return l.objectLiteral(o)&&Me.is(o.position)&&(l.string(o.label)||l.typedArray(o.label,Dr.is))&&(o.kind===void 0||Sr.is(o.kind))&&o.textEdits===void 0||l.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||l.string(o.tooltip)||pt.is(o.tooltip))&&(o.paddingLeft===void 0||l.boolean(o.paddingLeft))&&(o.paddingRight===void 0||l.boolean(o.paddingRight))}e.is=n})(Ns||(Ns={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return l.objectLiteral(o)&&o.kind==="snippet"&&l.string(o.value)}e.isSnippet=n})(wr||(wr={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Gs||(Gs={}));(function(e){function t(n){return{items:n}}e.create=t})(As||(As={}));(function(e){e.Invoked=1,e.Automatic=2})(js||(js={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Fs||(Fs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Ls||(Ls={}));(function(e){function t(n){let r=n;return l.objectLiteral(r)&&yr.is(r.uri)&&l.string(r.name)}e.is=t})(Hs||(Hs={}));Lh=[` +"use strict";var Ro=Object.defineProperty;var Vm=Object.getOwnPropertyDescriptor;var Xm=Object.getOwnPropertyNames;var Km=Object.prototype.hasOwnProperty;var ka=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},xa=(e,t)=>{for(var n in t)Ro(e,n,{get:t[n],enumerable:!0})},Ym=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xm(t))!Km.call(e,o)&&o!==n&&Ro(e,o,{get:()=>t[o],enumerable:!(r=Vm(t,o))||r.enumerable});return e};var Xn=e=>Ym(Ro({},"__esModule",{value:!0}),e);var Kn=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Jm;Ge.string=Ma;Ge.number=Zm;Ge.error=eh;Ge.func=Ea;Ge.array=qa;Ge.stringArray=th;Ge.typedArray=nh;Ge.thenable=rh;function Jm(e){return e===!0||e===!1}function Ma(e){return typeof e=="string"||e instanceof String}function Zm(e){return typeof e=="number"||e instanceof Number}function eh(e){return e instanceof Error}function Ea(e){return typeof e=="function"}function qa(e){return Array.isArray(e)}function th(e){return qa(e)&&e.every(t=>Ma(t))}function nh(e,t){return Array.isArray(e)&&e.every(t)}function rh(e){return e&&Ea(e.then)}});var Lt=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.boolean=oh;Ye.string=Na;Ye.number=ih;Ye.error=sh;Ye.func=ch;Ye.array=Aa;Ye.stringArray=ah;function oh(e){return e===!0||e===!1}function Na(e){return typeof e=="string"||e instanceof String}function ih(e){return typeof e=="number"||e instanceof Number}function sh(e){return e instanceof Error}function ch(e){return typeof e=="function"}function Aa(e){return Array.isArray(e)}function ah(e){return Aa(e)&&e.every(t=>Na(t))}});var ei=S(w=>{"use strict";var uh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.LRUCache=lt.LinkedMap=lt.Touch=void 0;var ue;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ue||(lt.Touch=ue={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ue.None){let r=this._map.get(t);if(r)return n!==ue.None&&this.touch(r,n),r.value}set(t,n,r=ue.None){let o=this._map.get(t);if(o)o.value=n,r!==ue.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ue.None:this.addItemLast(o);break;case ue.First:this.addItemFirst(o);break;case ue.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ue.First&&n!==ue.Last)){if(n===ue.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ue.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};lt.LinkedMap=Yn;var ti=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ue.AsNew){return super.get(t,n)}peek(t){return super.get(t,ue.None)}set(t,n){return super.set(t,n,ue.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};lt.LRUCache=ti});var Fa=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var ja;(function(e){function t(n){return{dispose:n}}e.create=t})(ja||(Jn.Disposable=ja={}))});var dt=S(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});var ri;function oi(){if(ri===void 0)throw new Error("No runtime abstraction layer installed");return ri}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ri=n}e.install=t})(oi||(oi={}));ii.default=oi});var Ht=S(ft=>{"use strict";var fh=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ft,"__esModule",{value:!0});ft.Emitter=ft.Event=void 0;var mh=fh(dt()),La;(function(e){let t={dispose(){}};e.None=function(){return t}})(La||(ft.Event=La={}));var si=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new si),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ft.Emitter=ci});var tr=S(Se=>{"use strict";var hh=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gh=Se&&Se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ph=Se&&Se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SharedArrayReceiverStrategy=Wt.SharedArraySenderStrategy=void 0;var vh=tr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var li=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Wt.SharedArraySenderStrategy=li;var di=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fi=class{token;constructor(t){this.token=new di(t)}cancel(){}dispose(){}},mi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new vh.CancellationTokenSource:new fi(n)}};Wt.SharedArrayReceiverStrategy=mi});var gi=S(Ut=>{"use strict";var Ch=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Semaphore=void 0;var Sh=Ch(dt()),hi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Sh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Ut.Semaphore=hi});var Ua=S(le=>{"use strict";var Ih=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Dh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,yi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};le.ReadableStreamMessageReader=_i});var Va=S(de=>{"use strict";var Rh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),kh=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xh=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(qh,r.byteLength.toString(),za),o.push(za),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};de.WriteableStreamMessageWriter=vi});var Xa=S(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AbstractMessageBuffer=void 0;var Nh=13,Ah=10,Gh=`\r +`,Ci=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};or.AbstractMessageBuffer=Ci});var Za=S(R=>{"use strict";var jh=R&&R.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fh=R&&R.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lh=R&&R.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},log:()=>{}});var j;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(j||(R.Trace=j={}));var Pi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Pi||(R.TraceValue=Pi={}));R.TraceValues=Pi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(j||(R.Trace=j={}));var we;(function(e){e.Text="text",e.JSON="json"})(we||(R.TraceFormat=we={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(we||(R.TraceFormat=we={}));var Oi;(function(e){e.type=new x.NotificationType("$/setTrace")})(Oi||(R.SetTraceNotification=Oi={}));var ir;(function(e){e.type=new x.NotificationType("$/logTrace")})(ir||(R.LogTraceNotification=ir={}));var Sn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Sn||(R.ConnectionErrors=Sn={}));var $t=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};R.ConnectionError=$t;var Ri;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ri||(R.ConnectionStrategy=Ri={}));var sr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(sr||(R.IdCancellationReceiverStrategy=sr={}));var ki;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(ki||(R.RequestCancellationReceiverStrategy=ki={}));var cr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Si.CancellationTokenSource}});function t(n){return sr.is(n)||ki.is(n)}e.is=t})(cr||(R.CancellationReceiverStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(ar||(R.CancellationSenderStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({receiver:cr.Message,sender:ar.Message});function t(n){let r=n;return r&&cr.is(r.receiver)&&ar.is(r.sender)}e.is=t})(ur||(R.CancellationStrategy=ur={}));var lr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(lr||(R.MessageStrategy=lr={}));var Ja;(function(e){function t(n){let r=n;return r&&(ur.is(r.cancellationStrategy)||Ri.is(r.connectionStrategy)||lr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Ja||(R.ConnectionOptions=Ja={}));var je;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(je||(je={}));function Wh(e,t,n,r){let o=n!==void 0?n:R.NullLogger,i=0,s=0,a=0,y="2.0",m=r?.maxParallelism??-1,f=0,_,g=new Map,v,O=new Map,q=new Map,L,k=new Ya.LinkedMap,h=new Map,l=new Set,I=new Map,E=j.Off,A=we.Text,B,V=je.New,st=new vn.Emitter,ya=new vn.Emitter,Ta=new vn.Emitter,_a=new vn.Emitter,ba=new vn.Emitter,ct=r&&r.cancellationStrategy?r.cancellationStrategy:ur.Message;function xm(u){}function va(){return V===je.Listening}function Ca(){return V===je.Closed}function jt(){return V===je.Disposed}function Sa(){(V===je.New||V===je.Listening)&&(V=je.Closed,ya.fire(void 0))}function Mm(u){st.fire([u,void 0,void 0])}function Em(u){st.fire(u)}e.onClose(Sa),e.onError(Mm),t.onClose(Sa),t.onError(Em);function Ia(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function qm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Nm(){return"not-"+(++s).toString()}function Am(u,b){x.Message.isRequest(b)?u.set(Ia(b.id),b):x.Message.isResponse(b)?m===-1?u.set(qm(b.id),b):wa(b):u.set(Nm(),b)}function Do(){L||k.size===0||m!==-1&&f>=m||(L=(0,Ka.default)().timer.setImmediate(async()=>{if(L=void 0,k.size===0||m!==-1&&f>=m)return;let u=k.shift(),b;try{f++;let C=r?.messageStrategy;lr.is(C)?b=C.handleMessage(u,Da):b=Da(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{b instanceof Promise?b.then(()=>{f--,Do()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):f--,Do()}}))}async function Da(u){return x.Message.isRequest(u)?jm(u):x.Message.isNotification(u)?Fm(u):x.Message.isResponse(u)?wa(u):Lm(u)}let Gm=u=>{try{if(x.Message.isNotification(u)&&u.method===In.type.method){let b=u.params.id,C=Ia(b),P=k.get(C);if(x.Message.isRequest(P)){let X=r?.connectionStrategy,H=X&&X.cancelUndispatched?X.cancelUndispatched(P,xm):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){k.delete(C),I.delete(b),H.id=P.id,wo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let G=I.get(b);if(G!==void 0){G.cancel(),Po(u);return}else l.add(b)}Am(k,u)}finally{Do()}};async function jm(u){if(jt())return Promise.resolve();function b(re,ae,J){let Z={jsonrpc:y,id:u.id};return re instanceof x.ResponseError?Z.error=re.toJson():Z.result=re===void 0?null:re,wo(Z,ae,J),t.write(Z)}function C(re,ae,J){let Z={jsonrpc:y,id:u.id,error:re.toJson()};return wo(Z,ae,J),t.write(Z)}Um(u);let P=g.get(u.method),G,X;P&&(G=P.type,X=P.handler);let H=Date.now();if(X||_){let re=u.id??String(Date.now()),ae=sr.is(ct.receiver)?ct.receiver.createCancellationTokenSource(re):ct.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&ae.cancel(),u.id!==null&&I.set(re,ae);try{let J;if(X)if(u.params===void 0){if(G!==void 0&&G.numberOfParams!==0)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${G.numberOfParams} params but received none.`),u.method,H);J=X(ae.token)}else if(Array.isArray(u.params)){if(G!==void 0&&G.parameterStructures===x.ParameterStructures.byName)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=X(...u.params,ae.token)}else{if(G!==void 0&&G.parameterStructures===x.ParameterStructures.byPosition)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=X(u.params,ae.token)}else _&&(J=_(u.method,u.params,ae.token));let Z=await J;await b(Z,u.method,H)}catch(J){J instanceof x.ResponseError?await b(J,u.method,H):J&&K.string(J.message)?await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{I.delete(re)}}else await C(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function wa(u){if(!jt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let b=u.id,C=h.get(b);if(Bm(u,C),C!==void 0){h.delete(b);try{if(u.error){let P=u.error;C.reject(new x.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function Fm(u){if(jt())return;let b,C;if(u.method===In.type.method){let P=u.params.id;l.delete(P),Po(u);return}else{let P=O.get(u.method);P&&(C=P.handler,b=P.type)}if(C||v)try{if(Po(u),C)if(u.params===void 0)b!==void 0&&b.numberOfParams!==0&&b.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Cn.type.method&&P.length===2&&Ii.is(P[0])?await C({token:P[0],value:P[1]}):(b!==void 0&&(b.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),b.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else b!==void 0&&b.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else v&&await v(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Ta.fire(u)}function Lm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let b=u;if(K.string(b.id)||K.number(b.id)){let C=b.id,P=h.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function at(u){if(u!=null)switch(E){case j.Verbose:return JSON.stringify(u,null,4);case j.Compact:return JSON.stringify(u);default:return}}function Hm(u){if(!(E===j.Off||!B))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,b)}else Ft("send-request",u)}function Wm(u){if(!(E===j.Off||!B))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Sending notification '${u.method}'.`,b)}else Ft("send-notification",u)}function wo(u,b,C){if(!(E===j.Off||!B))if(A===we.Text){let P;(E===j.Verbose||E===j.Compact)&&(u.error&&u.error.data?P=`Error data: ${at(u.error.data)}`:u.result?P=`Result: ${at(u.result)}`:u.error===void 0&&(P="No result returned.")),B.log(`Sending response '${b} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Ft("send-response",u)}function Um(u){if(!(E===j.Off||!B))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,b)}else Ft("receive-request",u)}function Po(u){if(!(E===j.Off||!B||u.method===ir.type.method))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Received notification '${u.method}'.`,b)}else Ft("receive-notification",u)}function Bm(u,b){if(!(E===j.Off||!B))if(A===we.Text){let C;if((E===j.Verbose||E===j.Compact)&&(u.error&&u.error.data?C=`Error data: ${at(u.error.data)}`:u.result?C=`Result: ${at(u.result)}`:u.error===void 0&&(C="No result returned.")),b){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${b.method} - (${u.id})' in ${Date.now()-b.timerStart}ms.${P}`,C)}else B.log(`Received response ${u.id} without active response promise.`,C)}else Ft("receive-response",u)}function Ft(u,b){if(!B||E===j.Off)return;let C={isLSPMessage:!0,type:u,message:b,timestamp:Date.now()};B.log(C)}function pn(){if(Ca())throw new $t(Sn.Closed,"Connection is closed.");if(jt())throw new $t(Sn.Disposed,"Connection is disposed.")}function $m(){if(va())throw new $t(Sn.AlreadyListening,"Connection is already listening")}function zm(){if(!va())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function Pa(u){if(u!==null)return u}function Oa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Oo(u,b){switch(u){case x.ParameterStructures.auto:return Oa(b)?Pa(b):[yn(b)];case x.ParameterStructures.byName:if(!Oa(b))throw new Error("Received parameters by name but param is not an object literal.");return Pa(b);case x.ParameterStructures.byPosition:return[yn(b)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ra(u,b){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Oo(u.parameterStructures,b[0]);break;default:C=[];for(let G=0;G{pn();let C,P;if(K.string(u)){C=u;let X=b[0],H=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(X)&&(H=1,re=X);let ae=b.length,J=ae-H;switch(J){case 0:P=void 0;break;case 1:P=Oo(re,b[H]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=b.slice(H,ae).map(Z=>yn(Z));break}}else{let X=b;C=u.method,P=Ra(u,X)}let G={jsonrpc:y,method:C,params:P};return Wm(G),t.write(G).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,b)=>{pn();let C;return K.func(u)?v=u:b&&(K.string(u)?(C=u,O.set(u,{type:void 0,handler:b})):(C=u.method,O.set(u.method,{type:u,handler:b}))),{dispose:()=>{C!==void 0?O.get(C)?.handler===b&&O.delete(C):v===u&&(v=void 0)}}},onProgress:(u,b,C)=>{if(q.has(b))throw new Error(`Progress handler for token ${b} already registered`);return q.set(b,C),{dispose:()=>{q.get(b)===C&&q.delete(b)}}},sendProgress:(u,b,C)=>It.sendNotification(Cn.type,{token:b,value:C}),onUnhandledProgress:_a.event,sendRequest:(u,...b)=>{pn(),zm();function C(Z,Ae){let Ke=ct.sender.sendCancellation(Z,Ae);Ke===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ae}`):Ke.catch(()=>{o.log(`Sending cancellation messages for id ${Ae} failed.`)})}let P,G,X;if(K.string(u)){P=u;let Z=b[0],Ae=b[b.length-1],Ke=0,Tn=x.ParameterStructures.auto;x.ParameterStructures.is(Z)&&(Ke=1,Tn=Z);let Dt=b.length;Si.CancellationToken.is(Ae)&&(Dt=Dt-1,X=Ae);let Be=Dt-Ke;switch(Be){case 0:G=void 0;break;case 1:G=Oo(Tn,b[Ke]);break;default:if(Tn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);G=b.slice(Ke,Dt).map(Qm=>yn(Qm));break}}else{let Z=b;P=u.method,G=Ra(u,Z);let Ae=u.numberOfParams;X=Si.CancellationToken.is(Z[Ae])?Z[Ae]:void 0}let H=i++,re,ae=!1;X!==void 0&&(X.isCancellationRequested?ae=!0:re=X.onCancellationRequested(()=>{C(It,H)}));let J={jsonrpc:y,id:H,method:P,params:G};return Hm(J),typeof ct.sender.enableCancellation=="function"&&ct.sender.enableCancellation(J),new Promise(async(Z,Ae)=>{let Ke=Be=>{Z(Be),ct.sender.cleanup(H),re?.dispose()},Tn=Be=>{Ae(Be),ct.sender.cleanup(H),re?.dispose()},Dt={method:P,timerStart:Date.now(),resolve:Ke,reject:Tn};try{h.set(H,Dt),await t.write(J),ae&&C(It,H)}catch(Be){throw h.delete(H),Dt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,b)=>{pn();let C=null;return wi.is(u)?(C=void 0,_=u):K.string(u)?(C=null,b!==void 0&&(C=u,g.set(u,{handler:b,type:void 0}))):b!==void 0&&(C=u.method,g.set(u.method,{type:u,handler:b})),{dispose:()=>{C!==null&&(C!==void 0?g.get(C)?.handler===b&&g.delete(C):_===u&&(_=void 0))}}},hasPendingResponse:()=>h.size>0,trace:async(u,b,C)=>{let P=!1,G=we.Text;C!==void 0&&(K.boolean(C)?P=C:(P=C.sendNotification||!1,G=C.traceFormat||we.Text)),E=u,A=G,E===j.Off?B=void 0:B=b,P&&!Ca()&&!jt()&&await It.sendNotification(Oi.type,{value:j.toString(u)})},onError:st.event,onClose:ya.event,onUnhandledNotification:Ta.event,onDispose:ba.event,end:()=>{t.end()},dispose:()=>{if(jt())return;V=je.Disposed,ba.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let b of h.values())b.reject(u);h=new Map,I=new Map,l=new Set,k=new Ya.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{pn(),$m(),V=je.Listening,e.listen(Gm)},inspect:()=>{(0,Ka.default)().console.log("inspect")}};return It.onNotification(ir.type,u=>{if(E===j.Off||!B)return;let b=E===j.Verbose||E===j.Compact;B.log(u.message,b?u.verbose:void 0)}),It.onNotification(Cn.type,async u=>{let b=q.get(u.token);b?await b(u.value):_a.fire(u)}),It}});var Je=S(p=>{"use strict";var Uh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var $=ei();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var xi=ni();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return xi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return xi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return xi.Touch}});var Bh=Fa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Bh.Disposable}});var eu=Ht();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return eu.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return eu.Emitter}});var tu=tr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return tu.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return tu.CancellationToken}});var nu=Ha();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return nu.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return nu.SharedArrayReceiverStrategy}});var Mi=Ua();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Mi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Mi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Mi.ReadableStreamMessageReader}});var Ei=Va();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ei.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ei.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ei.WriteableStreamMessageWriter}});var $h=Xa();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return $h.AbstractMessageBuffer}});var te=Za();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return te.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return te.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return te.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return te.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return te.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return te.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return te.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return te.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return te.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return te.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return te.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return te.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return te.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return te.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return te.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return te.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return te.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return te.TraceValues}});var zh=Uh(dt());p.RAL=zh.default});var vr={};xa(vr,{AnnotatedTextEdit:()=>Ze,ApplyKind:()=>ts,ChangeAnnotation:()=>mt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>ys,CodeActionContext:()=>ps,CodeActionKind:()=>gs,CodeActionTag:()=>yr,CodeActionTriggerKind:()=>xn,CodeDescription:()=>Ui,CodeLens:()=>Ts,Color:()=>fr,ColorInformation:()=>Gi,ColorPresentation:()=>ji,Command:()=>Pt,CompletionItem:()=>rs,CompletionItemKind:()=>Ki,CompletionItemLabelDetails:()=>ns,CompletionItemTag:()=>Ji,CompletionList:()=>os,CreateFile:()=>Qt,DeleteFile:()=>Xt,Diagnostic:()=>Pn,DiagnosticRelatedInformation:()=>mr,DiagnosticSeverity:()=>Hi,DiagnosticTag:()=>Wi,DocumentHighlight:()=>us,DocumentHighlightKind:()=>as,DocumentLink:()=>bs,DocumentSymbol:()=>hs,DocumentUri:()=>qi,EOL:()=>Qh,FoldingRange:()=>Li,FoldingRangeKind:()=>Fi,FormattingOptions:()=>_s,Hover:()=>is,InlayHint:()=>Rs,InlayHintKind:()=>Tr,InlayHintLabelPart:()=>_r,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>ks,InlineCompletionList:()=>xs,InlineCompletionTriggerKind:()=>Ms,InlineValueContext:()=>Os,InlineValueEvaluatableExpression:()=>Ps,InlineValueText:()=>Ds,InlineValueVariableLookup:()=>ws,InsertReplaceEdit:()=>Zi,InsertTextFormat:()=>Yi,InsertTextMode:()=>es,LanguageKind:()=>Vi,Location:()=>wn,LocationLink:()=>Ai,MarkedString:()=>kn,MarkupContent:()=>ht,MarkupKind:()=>pr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>ss,Position:()=>ke,Range:()=>Y,RenameFile:()=>Vt,SelectedCompletionInfo:()=>Es,SelectionRange:()=>vs,SemanticTokenModifiers:()=>Ss,SemanticTokenTypes:()=>Cs,SemanticTokens:()=>Is,SignatureInformation:()=>cs,SnippetTextEdit:()=>Bi,StringValue:()=>br,SymbolInformation:()=>fs,SymbolKind:()=>ls,SymbolTag:()=>ds,TextDocument:()=>As,TextDocumentEdit:()=>On,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Xi,TextEdit:()=>$e,URI:()=>dr,VersionedTextDocumentIdentifier:()=>Qi,WorkspaceChange:()=>$i,WorkspaceEdit:()=>hr,WorkspaceFolder:()=>Ns,WorkspaceSymbol:()=>ms,integer:()=>Ni,uinteger:()=>Dn});var qi,dr,Ni,Dn,ke,Y,wn,Ai,fr,Gi,ji,Fi,Li,mr,Hi,Wi,Ui,Pn,Pt,$e,mt,oe,Ze,On,Qt,Vt,Xt,hr,zt,Bi,gr,$i,zi,Qi,Rn,Vi,Xi,pr,ht,Ki,Yi,Ji,Zi,es,ts,ns,rs,os,kn,is,ss,cs,as,us,ls,ds,fs,ms,hs,gs,xn,ps,yr,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,ws,Ps,Os,Tr,_r,Rs,br,ks,xs,Ms,Es,qs,Ns,Qh,As,Gs,d,Cr=ka(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(dr||(dr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ni||(Ni={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.line)&&d.uinteger(o.character)}e.is=n})(ke||(ke={}));(function(e){function t(r,o,i,s){if(d.uinteger(r)&&d.uinteger(o)&&d.uinteger(i)&&d.uinteger(s))return{start:ke.create(r,o),end:ke.create(i,s)};if(ke.is(r)&&ke.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.start)&&ke.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(d.string(o.uri)||d.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.targetRange)&&d.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||d.undefined(o.originSelectionRange))}e.is=n})(Ai||(Ai={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.numberRange(o.red,0,1)&&d.numberRange(o.green,0,1)&&d.numberRange(o.blue,0,1)&&d.numberRange(o.alpha,0,1)}e.is=n})(fr||(fr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&fr.is(o.color)}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.undefined(o.textEdit)||$e.is(o))&&(d.undefined(o.additionalTextEdits)||d.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(ji||(ji={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Fi||(Fi={}));(function(e){function t(r,o,i,s,a,y){let m={startLine:r,endLine:o};return d.defined(i)&&(m.startCharacter=i),d.defined(s)&&(m.endCharacter=s),d.defined(a)&&(m.kind=a),d.defined(y)&&(m.collapsedText=y),m}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.startLine)&&d.uinteger(o.startLine)&&(d.undefined(o.startCharacter)||d.uinteger(o.startCharacter))&&(d.undefined(o.endCharacter)||d.uinteger(o.endCharacter))&&(d.undefined(o.kind)||d.string(o.kind))}e.is=n})(Li||(Li={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&wn.is(o.location)&&d.string(o.message)}e.is=n})(mr||(mr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Hi||(Hi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Wi||(Wi={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&d.string(r.href)}e.is=t})(Ui||(Ui={}));(function(e){function t(i,s,a,y,m,f){let _={range:i,message:s};return d.defined(a)&&(_.severity=a),d.defined(y)&&(_.code=y),d.defined(m)&&(_.source=m),d.defined(f)&&(_.relatedInformation=f),_}e.create=t;function n(i){var s;let a=i;return d.defined(a)&&Y.is(a.range)&&(d.string(a.message)||ht.is(a.message))&&(d.number(a.severity)||d.undefined(a.severity))&&(d.integer(a.code)||d.string(a.code)||d.undefined(a.code))&&(d.undefined(a.codeDescription)||d.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(d.string(a.source)||d.undefined(a.source))&&(d.undefined(a.relatedInformation)||d.typedArray(a.relatedInformation,mr.is))}e.is=n;function r(i){return d.string(i.message)}e.is3_17=r;function o(i){if(d.string(i.message))return i.message;if(ht.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Pn||(Pn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return d.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.title)&&(o.tooltip===void 0||d.string(o.tooltip))&&d.string(o.command)}e.is=n})(Pt||(Pt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return d.objectLiteral(s)&&d.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(d.string(o.description)||o.description===void 0)}e.is=n})(mt||(mt={}));(function(e){function t(n){let r=n;return d.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(mt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(Ze||(Ze={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(On||(On={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&d.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Qt||(Qt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&d.string(o.oldUri)&&d.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Vt||(Vt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&d.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||d.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||d.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>d.string(o.kind)?Qt.is(o)||Vt.is(o)||Xt.is(o):On.is(o)))}e.is=t})(hr||(hr={}));zt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):oe.is(r)?(i=r,o=Ze.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):oe.is(r)?(i=r,o=Ze.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):oe.is(n)?(o=n,r=Ze.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Ze.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return d.objectLiteral(r)&&Y.is(r.range)&&br.isSnippet(r.snippet)&&(r.annotationId===void 0||mt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Bi||(Bi={}));gr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},$i=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new gr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(On.is(n)){let r=new zt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new zt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new zt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new zt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new gr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Qt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Qt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Vt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Vt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.integer(o.version)}e.is=n})(Qi||(Qi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&(o.version===null||d.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Vi||(Vi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.string(o.languageId)&&d.integer(o.version)&&d.string(o.text)}e.is=n})(Xi||(Xi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(pr||(pr={}));(function(e){function t(n){let r=n;return d.objectLiteral(n)&&pr.is(r.kind)&&d.string(r.value)}e.is=t})(ht||(ht={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Ki||(Ki={}));(function(e){e.PlainText=1,e.Snippet=2})(Yi||(Yi={}));(function(e){e.Deprecated=1})(Ji||(Ji={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&d.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(Zi||(Zi={}));(function(e){e.asIs=1,e.adjustIndentation=2})(es||(es={}));(function(e){e.Replace=1,e.Merge=2})(ts||(ts={}));(function(e){function t(n){let r=n;return r&&(d.string(r.detail)||r.detail===void 0)&&(d.string(r.description)||r.description===void 0)}e.is=t})(ns||(ns={}));(function(e){function t(n){return{label:n}}e.create=t})(rs||(rs={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(os||(os={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return d.string(o)||d.objectLiteral(o)&&d.string(o.language)&&d.string(o.value)}e.is=n})(kn||(kn={}));(function(e){function t(n){let r=n;return!!r&&d.objectLiteral(r)&&(ht.is(r.contents)||kn.is(r.contents)||d.typedArray(r.contents,kn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(is||(is={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ss||(ss={}));(function(e){function t(n,r,...o){let i={label:n};return d.defined(r)&&(i.documentation=r),d.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(cs||(cs={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(as||(as={}));(function(e){function t(n,r){let o={range:n};return d.number(r)&&(o.kind=r),o}e.create=t})(us||(us={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ls||(ls={}));(function(e){e.Deprecated=1})(ds||(ds={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(fs||(fs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(ms||(ms={}));(function(e){function t(r,o,i,s,a,y){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return y!==void 0&&(m.children=y),m}e.create=t;function n(r){let o=r;return o&&d.string(o.name)&&d.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||d.string(o.detail))&&(o.deprecated===void 0||d.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(hs||(hs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(gs||(gs={}));(function(e){e.Invoked=1,e.Automatic=2})(xn||(xn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.typedArray(o.diagnostics,Pn.is)&&(o.only===void 0||d.typedArray(o.only,d.string))&&(o.triggerKind===void 0||o.triggerKind===xn.Invoked||o.triggerKind===xn.Automatic)}e.is=n})(ps||(ps={}));(function(e){e.LLMGenerated=1;function t(n){return d.defined(n)&&n===e.LLMGenerated}e.is=t})(yr||(yr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Pt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&d.string(o.title)&&(o.diagnostics===void 0||d.typedArray(o.diagnostics,Pn.is))&&(o.kind===void 0||d.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Pt.is(o.command))&&(o.isPreferred===void 0||d.boolean(o.isPreferred))&&(o.edit===void 0||hr.is(o.edit))&&(o.tags===void 0||d.typedArray(o.tags,yr.is))}e.is=n})(ys||(ys={}));(function(e){function t(r,o){let i={range:r};return d.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.command)||Pt.is(o.command))}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.uinteger(o.tabSize)&&d.boolean(o.insertSpaces)}e.is=n})(_s||(_s={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.target)||d.string(o.target))}e.is=n})(bs||(bs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(vs||(vs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Cs||(Cs={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ss||(Ss={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Is||(Is={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.string(o.text)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.boolean(o.caseSensitiveLookup)&&(d.string(o.variableName)||o.variableName===void 0)}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(d.string(o.expression)||o.expression===void 0)}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Os||(Os={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Tr||(Tr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||Pt.is(o.command))}e.is=n})(_r||(_r={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.position)&&(d.string(o.label)||d.typedArray(o.label,_r.is))&&(o.kind===void 0||Tr.is(o.kind))&&o.textEdits===void 0||d.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.paddingLeft===void 0||d.boolean(o.paddingLeft))&&(o.paddingRight===void 0||d.boolean(o.paddingRight))}e.is=n})(Rs||(Rs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return d.objectLiteral(o)&&o.kind==="snippet"&&d.string(o.value)}e.isSnippet=n})(br||(br={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(ks||(ks={}));(function(e){function t(n){return{items:n}}e.create=t})(xs||(xs={}));(function(e){e.Invoked=1,e.Automatic=2})(Ms||(Ms={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Es||(Es={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&dr.is(r.uri)&&d.string(r.name)}e.is=t})(Ns||(Ns={}));Qh=[` `,`\r -`,"\r"];(function(e){function t(i,s,a,_){return new Us(i,s,a,_)}e.create=t;function n(i){let s=i;return!!(l.defined(s)&&l.string(s.uri)&&(l.undefined(s.languageId)||l.string(s.languageId))&&l.uinteger(s.lineCount)&&l.func(s.getText)&&l.func(s.positionAt)&&l.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),_=o(s,(d,v)=>{let h=d.range.start.line-v.range.start.line;return h===0?d.range.start.character-v.range.start.character:h}),f=a.length;for(let d=_.length-1;d>=0;d--){let v=_[d],h=i.offsetAt(v.range.start),b=i.offsetAt(v.range.end);if(b<=f)a=a.substring(0,h)+v.newText+a.substring(b,a.length);else throw new Error("Overlapping edit");f=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,_=i.slice(0,a),f=i.slice(a);o(_,s),o(f,s);let d=0,v=0,h=0;for(;d<_.length&&v{let g=f.range.start.line-_.range.start.line;return g===0?f.range.start.character-_.range.start.character:g}),m=a.length;for(let f=y.length-1;f>=0;f--){let _=y[f],g=i.offsetAt(_.range.start),v=i.offsetAt(_.range.end);if(v<=m)a=a.substring(0,g)+_.newText+a.substring(v,a.length);else throw new Error("Overlapping edit");m=g}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,y=i.slice(0,a),m=i.slice(a);o(y,s),o(m,s);let f=0,_=0,g=0;for(;f0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Me.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Me.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(b){return b===!0||b===!1}e.boolean=o;function i(b){return t.call(b)==="[object String]"}e.string=i;function s(b){return t.call(b)==="[object Number]"}e.number=s;function a(b,R,E){return t.call(b)==="[object Number]"&&R<=b&&b<=E}e.numberRange=a;function _(b){return t.call(b)==="[object Number]"&&-2147483648<=b&&b<=2147483647}e.integer=_;function f(b){return t.call(b)==="[object Number]"&&0<=b&&b<=2147483647}e.uinteger=f;function d(b){return t.call(b)==="[object Function]"}e.func=d;function v(b){return b!==null&&typeof b=="object"}e.objectLiteral=v;function h(b,R){return Array.isArray(b)&&b.every(R)}e.typedArray=h})(l||(l={}))});var V=I(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CM=me.ProtocolNotificationType=me.ProtocolNotificationType0=me.ProtocolRequestType=me.ProtocolRequestType0=me.RegistrationType=me.MessageDirection=void 0;var Jt=tt(),Za;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Za||(me.MessageDirection=Za={}));var Bs=class{____;method;constructor(t){this.method=t}};me.RegistrationType=Bs;var zs=class extends Jt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};me.ProtocolRequestType0=zs;var $s=class extends Jt.RequestType{__;___;____;_pr;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolRequestType=$s;var Qs=class extends Jt.NotificationType0{___;____;constructor(t){super(t)}};me.ProtocolNotificationType0=Qs;var Vs=class extends Jt.NotificationType{___;____;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolNotificationType=Vs;var eu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(eu||(me.CM=eu={}))});var Rr=I(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Hh;Fe.string=tu;Fe.number=Wh;Fe.error=Uh;Fe.func=Bh;Fe.array=nu;Fe.stringArray=zh;Fe.typedArray=$h;Fe.objectLiteral=Qh;function Hh(e){return e===!0||e===!1}function tu(e){return typeof e=="string"||e instanceof String}function Wh(e){return typeof e=="number"||e instanceof Number}function Uh(e){return e instanceof Error}function Bh(e){return typeof e=="function"}function nu(e){return Array.isArray(e)}function zh(e){return nu(e)&&e.every(t=>tu(t))}function $h(e,t){return Array.isArray(e)&&e.every(t)}function Qh(e){return e!==null&&typeof e=="object"}});var ou=I(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.ImplementationRequest=void 0;var Xs=V(),ru;(function(e){e.method="textDocument/implementation",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.implementation","implementationProvider")})(ru||(kr.ImplementationRequest=ru={}))});var su=I(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.TypeDefinitionRequest=void 0;var Ks=V(),iu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(iu||(Mr.TypeDefinitionRequest=iu={}))});var uu=I(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.DidChangeWorkspaceFoldersNotification=en.WorkspaceFoldersRequest=void 0;var Zt=V(),cu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Zt.MessageDirection.serverToClient,e.type=new Zt.ProtocolRequestType0(e.method),e.capabilities=Zt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(cu||(en.WorkspaceFoldersRequest=cu={}));var au;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolNotificationType(e.method),e.capabilities=Zt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(au||(en.DidChangeWorkspaceFoldersNotification=au={}))});var du=I(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.ConfigurationRequest=void 0;var Ys=V(),lu;(function(e){e.method="workspace/configuration",e.messageDirection=Ys.MessageDirection.serverToClient,e.type=new Ys.ProtocolRequestType(e.method),e.capabilities=Ys.CM.create("workspace.configuration",void 0)})(lu||(xr.ConfigurationRequest=lu={}))});var hu=I(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.ColorPresentationRequest=nn.DocumentColorRequest=void 0;var tn=V(),fu;(function(e){e.method="textDocument/documentColor",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.colorProvider","colorProvider")})(fu||(nn.DocumentColorRequest=fu={}));var mu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.colorProvider","colorProvider")})(mu||(nn.ColorPresentationRequest=mu={}))});var yu=I(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.FoldingRangeRefreshRequest=on.FoldingRangeRequest=void 0;var rn=V(),gu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(gu||(on.FoldingRangeRequest=gu={}));var pu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(pu||(on.FoldingRangeRefreshRequest=pu={}))});var _u=I(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.DeclarationRequest=void 0;var Js=V(),Tu;(function(e){e.method="textDocument/declaration",e.messageDirection=Js.MessageDirection.clientToServer,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("textDocument.declaration","declarationProvider")})(Tu||(qr.DeclarationRequest=Tu={}))});var vu=I(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.SelectionRangeRequest=void 0;var Zs=V(),bu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(bu||(Er.SelectionRangeRequest=bu={}))});var Du=I(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.WorkDoneProgressCancelNotification=yt.WorkDoneProgressCreateRequest=yt.WorkDoneProgress=void 0;var Vh=tt(),An=V(),Cu;(function(e){e.type=new Vh.ProgressType;function t(n){return n===e.type}e.is=t})(Cu||(yt.WorkDoneProgress=Cu={}));var Iu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=An.MessageDirection.serverToClient,e.type=new An.ProtocolRequestType(e.method),e.capabilities=An.CM.create("window.workDoneProgress",void 0)})(Iu||(yt.WorkDoneProgressCreateRequest=Iu={}));var Su;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=An.MessageDirection.clientToServer,e.type=new An.ProtocolNotificationType(e.method)})(Su||(yt.WorkDoneProgressCancelNotification=Su={}))});var Ru=I(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.CallHierarchyOutgoingCallsRequest=Tt.CallHierarchyIncomingCallsRequest=Tt.CallHierarchyPrepareRequest=void 0;var rt=V(),wu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(wu||(Tt.CallHierarchyPrepareRequest=wu={}));var Pu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Pu||(Tt.CallHierarchyIncomingCallsRequest=Pu={}));var Ou;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ou||(Tt.CallHierarchyOutgoingCallsRequest=Ou={}))});var Nu=I(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SemanticTokensRefreshRequest=Ie.SemanticTokensRangeRequest=Ie.SemanticTokensDeltaRequest=Ie.SemanticTokensRequest=Ie.SemanticTokensRegistrationType=Ie.TokenFormat=void 0;var Pe=V(),ku;(function(e){e.Relative="relative"})(ku||(Ie.TokenFormat=ku={}));var jn;(function(e){e.method="textDocument/semanticTokens",e.type=new Pe.RegistrationType(e.method)})(jn||(Ie.SemanticTokensRegistrationType=jn={}));var Mu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=jn.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Mu||(Ie.SemanticTokensRequest=Mu={}));var xu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=jn.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(xu||(Ie.SemanticTokensDeltaRequest=xu={}));var qu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=jn.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(qu||(Ie.SemanticTokensRangeRequest=qu={}));var Eu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Pe.MessageDirection.serverToClient,e.type=new Pe.ProtocolRequestType0(e.method),e.capabilities=Pe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Eu||(Ie.SemanticTokensRefreshRequest=Eu={}))});var Au=I(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ShowDocumentRequest=void 0;var ec=V(),Gu;(function(e){e.method="window/showDocument",e.messageDirection=ec.MessageDirection.serverToClient,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("window.showDocument.support",void 0)})(Gu||(Nr.ShowDocumentRequest=Gu={}))});var Fu=I(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.LinkedEditingRangeRequest=void 0;var tc=V(),ju;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(ju||(Gr.LinkedEditingRangeRequest=ju={}))});var Qu=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.WillDeleteFilesRequest=he.DidDeleteFilesNotification=he.DidRenameFilesNotification=he.WillRenameFilesRequest=he.DidCreateFilesNotification=he.WillCreateFilesRequest=he.FileOperationPatternKind=void 0;var ie=V(),Lu;(function(e){e.file="file",e.folder="folder"})(Lu||(he.FileOperationPatternKind=Lu={}));var Hu;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Hu||(he.WillCreateFilesRequest=Hu={}));var Wu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Wu||(he.DidCreateFilesNotification=Wu={}));var Uu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Uu||(he.WillRenameFilesRequest=Uu={}));var Bu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Bu||(he.DidRenameFilesNotification=Bu={}));var zu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(zu||(he.DidDeleteFilesNotification=zu={}));var $u;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})($u||(he.WillDeleteFilesRequest=$u={}))});var Yu=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.MonikerRequest=_t.MonikerKind=_t.UniquenessLevel=void 0;var nc=V(),Vu;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Vu||(_t.UniquenessLevel=Vu={}));var Xu;(function(e){e.$import="import",e.$export="export",e.local="local"})(Xu||(_t.MonikerKind=Xu={}));var Ku;(function(e){e.method="textDocument/moniker",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.moniker","monikerProvider")})(Ku||(_t.MonikerRequest=Ku={}))});var tl=I(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.TypeHierarchySubtypesRequest=bt.TypeHierarchySupertypesRequest=bt.TypeHierarchyPrepareRequest=void 0;var xt=V(),Ju;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=xt.MessageDirection.clientToServer,e.type=new xt.ProtocolRequestType(e.method),e.capabilities=xt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Ju||(bt.TypeHierarchyPrepareRequest=Ju={}));var Zu;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=xt.MessageDirection.clientToServer,e.type=new xt.ProtocolRequestType(e.method)})(Zu||(bt.TypeHierarchySupertypesRequest=Zu={}));var el;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=xt.MessageDirection.clientToServer,e.type=new xt.ProtocolRequestType(e.method)})(el||(bt.TypeHierarchySubtypesRequest=el={}))});var ol=I(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.InlineValueRefreshRequest=cn.InlineValueRequest=void 0;var sn=V(),nl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=sn.MessageDirection.clientToServer,e.type=new sn.ProtocolRequestType(e.method),e.capabilities=sn.CM.create("textDocument.inlineValue","inlineValueProvider")})(nl||(cn.InlineValueRequest=nl={}));var rl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=sn.MessageDirection.serverToClient,e.type=new sn.ProtocolRequestType0(e.method),e.capabilities=sn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(rl||(cn.InlineValueRefreshRequest=rl={}))});var al=I(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.InlayHintRefreshRequest=vt.InlayHintResolveRequest=vt.InlayHintRequest=void 0;var ot=V(),il;(function(e){e.method="textDocument/inlayHint",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint","inlayHintProvider")})(il||(vt.InlayHintRequest=il={}));var sl;(function(e){e.method="inlayHint/resolve",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(sl||(vt.InlayHintResolveRequest=sl={}));var cl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=ot.MessageDirection.serverToClient,e.type=new ot.ProtocolRequestType0(e.method),e.capabilities=ot.CM.create("workspace.inlayHint.refreshSupport",void 0)})(cl||(vt.InlayHintRefreshRequest=cl={}))});var gl=I(se=>{"use strict";var Xh=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Kh=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yh=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Zh=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tg=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.InlineCompletionRequest=void 0;var ic=V(),Il;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Il||(jr.InlineCompletionRequest=Il={}))});var Pl=I(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.TextDocumentContentRefreshRequest=un.TextDocumentContentRequest=void 0;var Ln=V(),Dl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Ln.MessageDirection.clientToServer,e.type=new Ln.ProtocolRequestType(e.method),e.capabilities=Ln.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Dl||(un.TextDocumentContentRequest=Dl={}));var wl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Ln.MessageDirection.serverToClient,e.type=new Ln.ProtocolRequestType(e.method)})(wl||(un.TextDocumentContentRefreshRequest=wl={}))});var Hd=I(c=>{"use strict";var ng=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),og=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Nl||(c.StaticRegistrationOptions=Nl={}));var Gl;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||uc.is(r.documentSelector))}e.is=t})(Gl||(c.TextDocumentRegistrationOptions=Gl={}));var Al;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Al||(c.WorkDoneProgressOptions=Al={}));var jl;(function(e){e.method="initialize",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method)})(jl||(c.InitializeRequest=jl={}));var Fl;(function(e){e.unknownProtocolVersion=1})(Fl||(c.InitializeErrorCodes=Fl={}));var Ll;(function(e){e.method="initialized",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method)})(Ll||(c.InitializedNotification=Ll={}));var Hl;(function(e){e.method="shutdown",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType0(e.method)})(Hl||(c.ShutdownRequest=Hl={}));var Wl;(function(e){e.method="exit",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType0(e.method)})(Wl||(c.ExitNotification=Wl={}));var Ul;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeConfiguration",void 0)})(Ul||(c.DidChangeConfigurationNotification=Ul={}));var Bl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Bl||(c.MessageType=Bl={}));var zl;(function(e){e.method="window/showMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})(zl||(c.ShowMessageNotification=zl={}));var $l;(function(e){e.method="window/showMessageRequest",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("window.showMessage",void 0)})($l||(c.ShowMessageRequest=$l={}));var Ql;(function(e){e.method="window/logMessage",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Ql||(c.LogMessageNotification=Ql={}));var Vl;(function(e){e.method="telemetry/event",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method)})(Vl||(c.TelemetryEventNotification=Vl={}));var Xl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Xl||(c.TextDocumentSyncKind=Xl={}));var Kl;(function(e){e.method="textDocument/didOpen",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Kl||(c.DidOpenTextDocumentNotification=Kl={}));var Yl;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Yl||(c.TextDocumentContentChangeEvent=Yl={}));var Jl;(function(e){e.method="textDocument/didChange",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync")})(Jl||(c.DidChangeTextDocumentNotification=Jl={}));var Zl;(function(e){e.method="textDocument/didClose",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Zl||(c.DidCloseTextDocumentNotification=Zl={}));var ed;(function(e){e.method="textDocument/didSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(ed||(c.DidSaveTextDocumentNotification=ed={}));var td;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(td||(c.TextDocumentSaveReason=td={}));var nd;(function(e){e.method="textDocument/willSave",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(nd||(c.WillSaveTextDocumentNotification=nd={}));var rd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(rd||(c.WillSaveTextDocumentWaitUntilRequest=rd={}));var od;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("workspace.didChangeWatchedFiles",void 0)})(od||(c.DidChangeWatchedFilesNotification=od={}));var id;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(id||(c.FileChangeType=id={}));var lc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Ol.URI.is(r.baseUri)||Ol.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(lc||(c.RelativePattern=lc={}));var dc;(function(e){function t(n){let r=n;return ce.string(r)||lc.is(r)}e.is=t})(dc||(c.GlobPattern=dc={}));var sd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(sd||(c.WatchKind=sd={}));var cd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolNotificationType(e.method),e.capabilities=y.CM.create("textDocument.publishDiagnostics",void 0)})(cd||(c.PublishDiagnosticsNotification=cd={}));var ad;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(ad||(c.CompletionTriggerKind=ad={}));var ud;(function(e){e.method="textDocument/completion",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion","completionProvider")})(ud||(c.CompletionRequest=ud={}));var ld;(function(e){e.method="completionItem/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(ld||(c.CompletionResolveRequest=ld={}));var dd;(function(e){e.method="textDocument/hover",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.hover","hoverProvider")})(dd||(c.HoverRequest=dd={}));var fd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(fd||(c.SignatureHelpTriggerKind=fd={}));var md;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(md||(c.SignatureHelpRequest=md={}));var hd;(function(e){e.method="textDocument/definition",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.definition","definitionProvider")})(hd||(c.DefinitionRequest=hd={}));var gd;(function(e){e.method="textDocument/references",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.references","referencesProvider")})(gd||(c.ReferencesRequest=gd={}));var pd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(pd||(c.DocumentHighlightRequest=pd={}));var yd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(yd||(c.DocumentSymbolRequest=yd={}));var Td;(function(e){e.method="textDocument/codeAction",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction","codeActionProvider")})(Td||(c.CodeActionRequest=Td={}));var _d;(function(e){e.method="codeAction/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(_d||(c.CodeActionResolveRequest=_d={}));var bd;(function(e){e.method="workspace/symbol",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol","workspaceSymbolProvider")})(bd||(c.WorkspaceSymbolRequest=bd={}));var vd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(vd||(c.WorkspaceSymbolResolveRequest=vd={}));var Cd;(function(e){e.method="textDocument/codeLens",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens","codeLensProvider")})(Cd||(c.CodeLensRequest=Cd={}));var Id;(function(e){e.method="codeLens/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Id||(c.CodeLensResolveRequest=Id={}));var Sd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType0(e.method),e.capabilities=y.CM.create("workspace.codeLens",void 0)})(Sd||(c.CodeLensRefreshRequest=Sd={}));var Dd;(function(e){e.method="textDocument/documentLink",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider")})(Dd||(c.DocumentLinkRequest=Dd={}));var wd;(function(e){e.method="documentLink/resolve",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(wd||(c.DocumentLinkResolveRequest=wd={}));var Pd;(function(e){e.method="textDocument/formatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.formatting","documentFormattingProvider")})(Pd||(c.DocumentFormattingRequest=Pd={}));var Od;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Od||(c.DocumentRangeFormattingRequest=Od={}));var Rd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Rd||(c.DocumentRangesFormattingRequest=Rd={}));var kd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(kd||(c.DocumentOnTypeFormattingRequest=kd={}));var Md;(function(e){e.Identifier=1})(Md||(c.PrepareSupportDefaultBehavior=Md={}));var xd;(function(e){e.method="textDocument/rename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename","renameProvider")})(xd||(c.RenameRequest=xd={}));var qd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(qd||(c.PrepareRenameRequest=qd={}));var Ed;(function(e){e.method="workspace/executeCommand",e.messageDirection=y.MessageDirection.clientToServer,e.type=new y.ProtocolRequestType(e.method),e.capabilities=y.CM.create("workspace.executeCommand","executeCommandProvider")})(Ed||(c.ExecuteCommandRequest=Ed={}));var Nd;(function(e){e.method="workspace/applyEdit",e.messageDirection=y.MessageDirection.serverToClient,e.type=new y.ProtocolRequestType("workspace/applyEdit"),e.capabilities=y.CM.create("workspace.applyEdit",void 0)})(Nd||(c.ApplyWorkspaceEditRequest=Nd={}))});var Ud=I(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.createProtocolConnection=mg;var Wd=tt();function mg(e,t,n,r){return Wd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Wd.createMessageConnection)(e,t,n,r)}});var ee=I(Se=>{"use strict";var hg=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fr=Se&&Se.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&hg(t,e,n)};Object.defineProperty(Se,"__esModule",{value:!0});Se.LSPErrorCodes=Se.createProtocolConnection=void 0;Fr(tt(),Se);Fr((Or(),tr(Pr)),Se);Fr(V(),Se);Fr(Hd(),Se);var gg=Ud();Object.defineProperty(Se,"createProtocolConnection",{enumerable:!0,get:function(){return gg.createProtocolConnection}});var Bd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Bd||(Se.LSPErrorCodes=Bd={}))});var _c=I(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.empty=void 0;Ct.v4=zd;Ct.isUUID=$d;Ct.parse=yg;Ct.generateUuid=Tg;var Wn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Tc=class e extends Wn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};Ct.empty=new Wn("00000000-0000-0000-0000-000000000000");function zd(){return new Tc}var pg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function $d(e){return pg.test(e)}function yg(e){if(!$d(e))throw new Error("invalid uuid");return new Wn(e)}function Tg(){return zd().asHex()}});var Qd=I(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.ProgressFeature=void 0;fn.attachWorkDone=bg;fn.attachPartialResult=Cg;var It=ee(),_g=_c(),dn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(It.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,{kind:"end"})}},Lr=class extends dn{_source;constructor(t,n){super(t,n),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Un=class{constructor(){}begin(){}report(){}done(){}},Hr=class extends Un{_source;constructor(){super(),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function bg(e,t){if(t===void 0||t.workDoneToken===void 0)return new Un;let n=t.workDoneToken;return delete t.workDoneToken,new dn(e,n)}var vg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(It.WorkDoneProgressCancelNotification.type,n=>{let r=dn.Instances.get(n.token);(r instanceof Lr||r instanceof Hr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Un:new dn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,_g.generateUuid)();return this.connection.sendRequest(It.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new Lr(this.connection,t))}else return Promise.resolve(new Hr)}};fn.ProgressFeature=vg;var bc;(function(e){e.type=new It.ProgressType})(bc||(bc={}));var vc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(bc.type,this._token,t)}};function Cg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new vc(e,n)}});var Vd=I(Xe=>{"use strict";var Ig=Xe&&Xe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sg=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dg=Xe&&Xe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?Pg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(wg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Xe.ConfigurationFeature=Og});var Xd=I(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.WorkspaceFoldersFeature=void 0;var Wr=ee(),Rg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Wr.Emitter,this.connection.onNotification(Wr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Wr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Wr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Ur.WorkspaceFoldersFeature=Rg});var Kd=I(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.CallHierarchyFeature=void 0;var Cc=ee(),kg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Cc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Cc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Cc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.CallHierarchyFeature=kg});var Sc=I(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.SemanticTokensBuilder=St.SemanticTokensDiff=St.SemanticTokensFeature=void 0;var zr=ee(),Mg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(zr.SemanticTokensRefreshRequest.type),on:t=>{let n=zr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=zr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=zr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};St.SemanticTokensFeature=Mg;var $r=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let _=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;_[this._dataLen++]=s,_[this._dataLen++]=a,_[this._dataLen++]=r,_[this._dataLen++]=o,_[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let f=t[5*a],d=t[5*_];if(f===d){let v=t[5*a+1],h=t[5*_+1];return v-h}return f-d});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.ShowDocumentFeature=void 0;var xg=ee(),qg=e=>class extends e{showDocument(t){return this.connection.sendRequest(xg.ShowDocumentRequest.type,t)}};Qr.ShowDocumentFeature=qg});var Jd=I(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.FileOperationsFeature=void 0;var mn=ee(),Eg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(mn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(mn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(mn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(mn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(mn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(mn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Vr.FileOperationsFeature=Eg});var Zd=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.LinkedEditingRangeFeature=void 0;var Ng=ee(),Gg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Ng.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Xr.LinkedEditingRangeFeature=Gg});var ef=I(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.TypeHierarchyFeature=void 0;var Dc=ee(),Ag=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Dc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Dc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Dc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.TypeHierarchyFeature=Ag});var nf=I(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineValueFeature=void 0;var tf=ee(),jg=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(tf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(tf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineValueFeature=jg});var of=I(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.FoldingRangeFeature=void 0;var rf=ee(),Fg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(rf.FoldingRangeRefreshRequest.type),on:t=>{let n=rf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Jr.FoldingRangeFeature=Fg});var sf=I(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.InlayHintFeature=void 0;var wc=ee(),Lg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(wc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(wc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(wc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Zr.InlayHintFeature=Lg});var cf=I(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.DiagnosticFeature=void 0;var Bn=ee(),Hg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Bn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Bn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Bn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Bn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Bn.WorkspaceDiagnosticRequest.partialResult,n)))}}};eo.DiagnosticFeature=Hg});var Oc=I(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.TextDocuments=void 0;var Et=ee(),Pc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Et.Emitter,this._onDidOpen=new Et.Emitter,this._onDidClose=new Et.Emitter,this._onDidSave=new Et.Emitter,this._onWillSave=new Et.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Et.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Et.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};to.TextDocuments=Pc});var Mc=I(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.NotebookDocuments=hn.NotebookSyncFeature=void 0;var xe=ee(),af=Oc(),Wg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(xe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(xe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(xe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(xe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};hn.NotebookSyncFeature=Wg;var Rc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,xe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,xe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,xe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},kc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof af.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new af.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new xe.Emitter,this._onDidChange=new xe.Emitter,this._onDidSave=new xe.Emitter,this._onDidClose=new xe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Rc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,_=o.change;_.metadata!==void 0&&(a=!0,i.metadata=_.metadata);let f=[],d=[],v=[],h=[];if(_.cells!==void 0){let N=_.cells;if(N.structure!==void 0){let m=N.structure.array;if(i.cells.splice(m.start,m.deleteCount,...m.cells!==void 0?m.cells:[]),N.structure.didOpen!==void 0)for(let p of N.structure.didOpen)await n.openTextDocument({textDocument:p}),f.push(p.uri);if(N.structure.didClose)for(let p of N.structure.didClose)await n.closeTextDocument({textDocument:p}),d.push(p.uri)}if(N.data!==void 0){let m=new Map(N.data.map(p=>[p.document,p]));for(let p=0;p<=i.cells.length;p++){let S=m.get(i.cells[p].document);if(S!==void 0){let x=i.cells.splice(p,1,S);if(v.push({old:x[0],new:S}),m.delete(S.document),m.size===0)break}}}if(N.textContent!==void 0)for(let m of N.textContent)await n.changeTextDocument({textDocument:m.document,contentChanges:m.changes}),h.push(m.document.uri)}this.updateCellMap(i);let b={notebookDocument:i};a&&(b.metadata={old:s,new:i.metadata});let R=[];for(let N of f)R.push(this.getNotebookCell(N));let E=[];for(let N of d)E.push(this.getNotebookCell(N));let z=[];for(let N of h)z.push(this.getNotebookCell(N));(R.length>0||E.length>0||v.length>0||z.length>0)&&(b.cells={added:R,removed:E,changed:{data:v,textContent:z}}),(b.metadata!==void 0||b.cells!==void 0)&&this._onDidChange.fire(b)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),xe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};hn.NotebookDocuments=kc});var uf=I(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.MonikerFeature=void 0;var Ug=ee(),Bg=e=>class extends e{get moniker(){return{on:t=>{let n=Ug.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};no.MonikerFeature=Bg});var lf=I(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.InlineCompletionFeature=void 0;var zg=ee(),$g=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(zg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};ro.InlineCompletionFeature=$g});var ff=I(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.TextDocumentContentFeature=void 0;var df=ee(),Qg=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(df.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(df.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};oo.TextDocumentContentFeature=Qg});var Ac=I(U=>{"use strict";var Vg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Xg=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_f=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Ec;var io=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Nc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}},mf=(0,ep.ShowDocumentFeature)((0,M.ProgressFeature)(Nc)),hf;(function(e){function t(){return new so}e.create=t})(hf||(U.BulkRegistration=hf={}));var so=class{_registrations=[];_registered=new Set;add(t,n){let r=qe.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=qc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},gf;(function(e){function t(){return new zn(void 0,[])}e.create=t})(gf||(U.BulkUnregistration=gf={}));var zn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=qe.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},co=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof so?this.registerMany(t):t instanceof zn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=qe.string(n)?n:n.method,i=qc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=qe.string(t)?t:t.method,o=qc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new zn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Gc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},pf=(0,dp.TextDocumentContentFeature)((0,tp.FileOperationsFeature)((0,Yg.WorkspaceFoldersFeature)((0,Kg.ConfigurationFeature)(Gc)))),ao=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},uo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},lo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=lo;var yf=(0,lp.InlineCompletionFeature)((0,ip.FoldingRangeFeature)((0,up.MonikerFeature)((0,cp.DiagnosticFeature)((0,sp.InlayHintFeature)((0,op.InlineValueFeature)((0,rp.TypeHierarchyFeature)((0,np.LinkedEditingRangeFeature)((0,Zg.SemanticTokensFeature)((0,Jg.CallHierarchyFeature)(lo)))))))))),fo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=fo;var Tf=(0,ap.NotebookSyncFeature)(fo);function bf(e,t){return function(n){return t(e(n))}}function vf(e,t){return function(n){return t(e(n))}}function Cf(e,t){return function(n){return t(e(n))}}function If(e,t){return function(n){return t(e(n))}}function Sf(e,t){return function(n){return t(e(n))}}function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function fp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,bf),tracer:n(e.tracer,t.tracer,Cf),telemetry:n(e.telemetry,t.telemetry,vf),client:n(e.client,t.client,If),window:n(e.window,t.window,Sf),workspace:n(e.workspace,t.workspace,Df),languages:n(e.languages,t.languages,wf),notebooks:n(e.notebooks,t.notebooks,Pf)}}function mp(e,t,n){let r=n&&n.console?new(n.console(io)):new io,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(ao)):new ao,s=n&&n.telemetry?new(n.telemetry(uo)):new uo,a=n&&n.client?new(n.client(co)):new co,_=n&&n.window?new(n.window(mf)):new mf,f=n&&n.workspace?new(n.workspace(pf)):new pf,d=n&&n.languages?new(n.languages(yf)):new yf,v=n&&n.notebooks?new(n.notebooks(Tf)):new Tf,h=[r,i,s,a,_,f,d,v];function b(m){return m instanceof Promise?m:qe.thenable(m)?new Promise((p,S)=>{m.then(x=>p(x),x=>S(x))}):Promise.resolve(m)}let R,E,z,N={listen:()=>o.listen(),sendRequest:(m,...p)=>o.sendRequest(qe.string(m)?m:m.method,...p),onRequest:(m,p)=>o.onRequest(m,p),sendNotification:(m,p)=>{let S=qe.string(m)?m:m.method;return o.sendNotification(S,p)},onNotification:(m,p)=>o.onNotification(m,p),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:m=>(E=m,{dispose:()=>{E=void 0}}),onInitialized:m=>o.onNotification(D.InitializedNotification.type,m),onShutdown:m=>(R=m,{dispose:()=>{R=void 0}}),onExit:m=>(z=m,{dispose:()=>{z=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return _},get workspace(){return f},get languages(){return d},get notebooks(){return v},onDidChangeConfiguration:m=>o.onNotification(D.DidChangeConfigurationNotification.type,m),onDidChangeWatchedFiles:m=>o.onNotification(D.DidChangeWatchedFilesNotification.type,m),__textDocumentSync:void 0,onDidOpenTextDocument:m=>o.onNotification(D.DidOpenTextDocumentNotification.type,m),onDidChangeTextDocument:m=>o.onNotification(D.DidChangeTextDocumentNotification.type,m),onDidCloseTextDocument:m=>o.onNotification(D.DidCloseTextDocumentNotification.type,m),onWillSaveTextDocument:m=>o.onNotification(D.WillSaveTextDocumentNotification.type,m),onWillSaveTextDocumentWaitUntil:m=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,m),onDidSaveTextDocument:m=>o.onNotification(D.DidSaveTextDocumentNotification.type,m),sendDiagnostics:m=>o.sendNotification(D.PublishDiagnosticsNotification.type,m),onHover:m=>o.onRequest(D.HoverRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onCompletion:m=>o.onRequest(D.CompletionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onCompletionResolve:m=>o.onRequest(D.CompletionResolveRequest.type,m),onSignatureHelp:m=>o.onRequest(D.SignatureHelpRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onDeclaration:m=>o.onRequest(D.DeclarationRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDefinition:m=>o.onRequest(D.DefinitionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onTypeDefinition:m=>o.onRequest(D.TypeDefinitionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onImplementation:m=>o.onRequest(D.ImplementationRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onReferences:m=>o.onRequest(D.ReferencesRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDocumentHighlight:m=>o.onRequest(D.DocumentHighlightRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDocumentSymbol:m=>o.onRequest(D.DocumentSymbolRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onWorkspaceSymbol:m=>o.onRequest(D.WorkspaceSymbolRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onWorkspaceSymbolResolve:m=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,m),onCodeAction:m=>o.onRequest(D.CodeActionRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onCodeActionResolve:m=>o.onRequest(D.CodeActionResolveRequest.type,(p,S)=>m(p,S)),onCodeLens:m=>o.onRequest(D.CodeLensRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onCodeLensResolve:m=>o.onRequest(D.CodeLensResolveRequest.type,(p,S)=>m(p,S)),onDocumentFormatting:m=>o.onRequest(D.DocumentFormattingRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onDocumentRangeFormatting:m=>o.onRequest(D.DocumentRangeFormattingRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onDocumentOnTypeFormatting:m=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(p,S)=>m(p,S)),onRenameRequest:m=>o.onRequest(D.RenameRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),onPrepareRename:m=>o.onRequest(D.PrepareRenameRequest.type,(p,S)=>m(p,S)),onDocumentLinks:m=>o.onRequest(D.DocumentLinkRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onDocumentLinkResolve:m=>o.onRequest(D.DocumentLinkResolveRequest.type,(p,S)=>m(p,S)),onDocumentColor:m=>o.onRequest(D.DocumentColorRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onColorPresentation:m=>o.onRequest(D.ColorPresentationRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onFoldingRanges:m=>o.onRequest(D.FoldingRangeRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onSelectionRanges:m=>o.onRequest(D.SelectionRangeRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),(0,M.attachPartialResult)(o,p))),onExecuteCommand:m=>o.onRequest(D.ExecuteCommandRequest.type,(p,S)=>m(p,S,(0,M.attachWorkDone)(o,p),void 0)),dispose:()=>o.dispose()};for(let m of h)m.attach(N);return o.onRequest(D.InitializeRequest.type,m=>{t.initialize(m),qe.string(m.trace)&&(i.trace=D.Trace.fromString(m.trace));for(let p of h)p.initialize(m.capabilities);if(E){let p=E(m,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,m),void 0);return b(p).then(S=>{if(S instanceof D.ResponseError)return S;let x=S;x||(x={capabilities:{}});let A=x.capabilities;A||(A={},x.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=qe.number(N.__textDocumentSync)?N.__textDocumentSync:D.TextDocumentSyncKind.None:!qe.number(A.textDocumentSync)&&!qe.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=qe.number(N.__textDocumentSync)?N.__textDocumentSync:D.TextDocumentSyncKind.None);for(let q of h)q.fillServerCapabilities(A);return x})}else{let p={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let S of h)S.fillServerCapabilities(p.capabilities);return p}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,R)return R(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(z)return z()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,m=>{i.trace=D.Trace.fromString(m.value)}),N}});var Of=I(_e=>{"use strict";var hp=_e&&_e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gp=_e&&_e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wc=_e&&_e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return He.normalize(n.join("/"))}function Fc(){return process.platform==="win32"}function mo(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let _=process.env,f=Object.create(null);Object.keys(_).forEach(d=>f[d]=_[d]),t&&jc.existsSync(t)&&(f[o]?f[o]=t+He.delimiter+f[o]:f[o]=t,r&&r(`NODE_PATH value is: ${f[o]}`)),f.ELECTRON_RUN_AS_NODE="1";try{let d=(0,Uc.fork)("",[],{cwd:n,env:f,execArgv:["-e",i]});if(d.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}d.on("error",h=>{a(h)}),d.on("message",h=>{h.c==="r"&&(d.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let v={c:"rs",a:e};d.send(v)}catch(d){a(d)}})}function Lc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Fc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Uc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Fc()?He.join(s,"node_modules"):He.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Tp(e){let t="yarn",n={encoding:"utf8"};Fc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Uc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let _=JSON.parse(a);if(_.type==="log")return He.join(_.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Hc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!jc.existsSync(__filename.toUpperCase())||!jc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?He.normalize(i).indexOf(He.normalize(o))===0:He.normalize(i).toLowerCase().indexOf(He.normalize(o).toLowerCase())===0}e.isParent=r})(Hc||(_e.FileSystem=Hc={}));function _p(e,t,n,r){return n?(He.isAbsolute(n)||(n=He.join(e,n)),mo(t,n,n,r).then(o=>Hc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>mo(t,Lc(r),e,r))):mo(t,Lc(r),e,r)}});var Mf=I(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var Rf=require("util"),st=tt(),Bc=class e extends st.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Rf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},zc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),st.Disposable.create(()=>this.stream.off("data",t))}},$c=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},kf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Bc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Rf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new zc(e),asWritableStream:e=>new $c(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Qc(){return kf}(function(e){function t(){st.RAL.install(kf)}e.install=t})(Qc||(Qc={}));Vc.default=Qc});var ea=I(G=>{"use strict";var qf=G&&G.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),bp=G&&G.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Zc=G&&G.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};G.IPCMessageReader=Xc;var Kc=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.IPCMessageWriter=Kc;var Yc=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};G.PortMessageReader=Yc;var Jc=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.PortMessageWriter=Jc;var Nt=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,$n.default)().stream.asReadableStream(t),n)}};G.SocketMessageReader=Nt;var Gt=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,$n.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};G.SocketMessageWriter=Gt;var ho=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,$n.default)().stream.asReadableStream(t),n)}};G.StreamMessageReader=ho;var go=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,$n.default)().stream.asWritableStream(t),n)}};G.StreamMessageWriter=go;var wp=process.env.XDG_RUNTIME_DIR,Pp=new Map([["linux",107],["darwin",102]]);function Op(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,xf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Dp.realpathSync(wp??Sp.tmpdir()),r=Pp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,xf.randomBytes)(Math.floor(e/2)).toString("hex");return Ip.join(n,`lsp-${o}.sock`)}function Rp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,po.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function kp(e,t="utf-8"){let n=(0,po.createConnection)(e);return[new Nt(n,t),new Gt(n,t)]}function Mp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,po.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function xp(e,t="utf-8"){let n=(0,po.createConnection)(e,"127.0.0.1");return[new Nt(n,t),new Gt(n,t)]}function qp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Ep(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Np(e,t,n,r){n||(n=Oe.NullLogger);let o=qp(e)?new ho(e):e,i=Ep(t)?new go(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var ta=I(ct=>{"use strict";var Gp=ct&&ct.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ef=ct&&ct.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Gp(t,e,n)};Object.defineProperty(ct,"__esModule",{value:!0});ct.createProtocolConnection=jp;var Ap=ea();Ef(ea(),ct);Ef(ee(),ct);function jp(e,t,n,r){return(0,Ap.createMessageConnection)(e,t,n,r)}});var na=I(ge=>{"use strict";var Fp=ge&&ge.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gf=ge&&ge.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Fp(t,e,n)};Object.defineProperty(ge,"__esModule",{value:!0});ge.ProposedFeatures=ge.NotebookDocuments=ge.TextDocuments=ge.SemanticTokensBuilder=void 0;var Lp=Sc();Object.defineProperty(ge,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Lp.SemanticTokensBuilder}});Gf(ee(),ge);var Hp=Oc();Object.defineProperty(ge,"TextDocuments",{enumerable:!0,get:function(){return Hp.TextDocuments}});var Wp=Mc();Object.defineProperty(ge,"NotebookDocuments",{enumerable:!0,get:function(){return Wp.NotebookDocuments}});Gf(Ac(),ge);var Nf;(function(e){e.all={__brand:"features"}})(Nf||(ge.ProposedFeatures=Nf={}))});var oa=I(be=>{"use strict";var Lf=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Up=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hf=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{yo(),process.exit(gn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;ra.number(t)&&Uf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(gn?0:1)}},3e3)},get shutdownReceived(){return gn},set shutdownReceived(e){gn=e},exit:e=>{yo(),process.exit(e)}};function Qp(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),At.ConnectionStrategy.is(e)||At.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),Vp(i,s,a,o)}function Vp(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,_,f=process.argv.slice(2);for(let d=0;d{yo(),process.exit(gn?0:1)}),a.on("close",()=>{yo(),process.exit(gn?0:1)})}let s=a=>{let _=(0,At.createProtocolConnection)(e,t,a,n);return o&&Xp(a),_};return(0,Bp.createConnection)(s,$p,r)}function Xp(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Af.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Af.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Qf={};Pa(Qf,{TextDocument:()=>ia});function sa(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);sa(r,t),sa(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Kp(e){let t=$f(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var To,ia,Vf=wa(()=>{"use strict";To=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=$f(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),_=Math.max(o.end.line,0),f=this._lineOffsets,d=Bf(r.text,!1,i);if(_-a===d.length)for(let h=0,b=d.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&zf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new To(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof To)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=sa(i.map(Kp),(d,v)=>{let h=d.range.start.line-v.range.start.line;return h===0?d.range.start.character-v.range.start.character:h}),_=0,f=[];for(let d of a){let v=o.offsetAt(d.range.start);if(v<_)throw new Error("Overlapping edit");v>_&&f.push(s.substring(_,v)),d.newText.length&&f.push(d.newText),_=o.offsetAt(d.range.end)}return f.push(s.substr(_)),f.join("")}e.applyEdits=r})(ia||(ia={}))});var Vn=I(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.DATATYPE_SET=pe.KEYWORD_SET=pe.PUNCTUATION=pe.OPERATORS=pe.DATATYPES=pe.KEYWORDS=void 0;pe.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];pe.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];pe.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];pe.PUNCTUATION=["(",")","[","]",";",",",":","."];pe.KEYWORD_SET=new Set(pe.KEYWORDS);pe.DATATYPE_SET=new Set(pe.DATATYPES)});var jt=I(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.TokenKind=void 0;var Xf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Xf||(_o.TokenKind=Xf={}))});var Co=I(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.tokenize=Zp;var vo=Vn(),Re=jt();function Yp(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function Kf(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function bo(e){return e!==void 0&&/[0-9]/.test(e)}function Jp(e){let t=e.toUpperCase();return vo.DATATYPE_SET.has(t)?Re.TokenKind.Datatype:vo.KEYWORD_SET.has(t)?Re.TokenKind.Keyword:Re.TokenKind.Identifier}function Zp(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=f=>{for(;n{let v=n,h=i();s(d),t.push({kind:f,lexeme:e.slice(v,d),span:{start:v,end:d},range:{start:h,end:i()}})};for(;n",n)||e.startsWith("{<",n))&&(R===-1||R>b);a(Re.TokenKind.Comment,E?b:R===-1?e.length:R+1);continue}if(f==="'"){let h=n+1;for(;he.startsWith(h,n));if(d!==void 0){a(Re.TokenKind.Operator,n+d.length);continue}if(vo.PUNCTUATION.includes(f)){a(Re.TokenKind.Punctuation,n+1);continue}let v=e.codePointAt(n);a(Re.TokenKind.Unknown,n+(v!==void 0&&v>65535?2:1))}let _=i();return t.push({kind:Re.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:_,end:{..._}}}),t}});var Io=I(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.positionAt=ua;Xn.offsetAt=ty;Xn.sourceRange=ny;function aa(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Yf(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function Jf(e){let t=[0];for(let n=0;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return ke.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return ke.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(v){return v===!0||v===!1}e.boolean=o;function i(v){return t.call(v)==="[object String]"}e.string=i;function s(v){return t.call(v)==="[object Number]"}e.number=s;function a(v,O,q){return t.call(v)==="[object Number]"&&O<=v&&v<=q}e.numberRange=a;function y(v){return t.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}e.integer=y;function m(v){return t.call(v)==="[object Number]"&&0<=v&&v<=2147483647}e.uinteger=m;function f(v){return t.call(v)==="[object Function]"}e.func=f;function _(v){return v!==null&&typeof v=="object"}e.objectLiteral=_;function g(v,O){return Array.isArray(v)&&v.every(O)}e.typedArray=g})(d||(d={}))});var Q=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.CM=fe.ProtocolNotificationType=fe.ProtocolNotificationType0=fe.ProtocolRequestType=fe.ProtocolRequestType0=fe.RegistrationType=fe.MessageDirection=void 0;var Kt=Je(),ru;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(ru||(fe.MessageDirection=ru={}));var js=class{____;method;constructor(t){this.method=t}};fe.RegistrationType=js;var Fs=class extends Kt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};fe.ProtocolRequestType0=Fs;var Ls=class extends Kt.RequestType{__;___;____;_pr;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolRequestType=Ls;var Hs=class extends Kt.NotificationType0{___;____;constructor(t){super(t)}};fe.ProtocolNotificationType0=Hs;var Ws=class extends Kt.NotificationType{___;____;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolNotificationType=Ws;var ou;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(ou||(fe.CM=ou={}))});var Sr=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Vh;Fe.string=iu;Fe.number=Xh;Fe.error=Kh;Fe.func=Yh;Fe.array=su;Fe.stringArray=Jh;Fe.typedArray=Zh;Fe.objectLiteral=eg;function Vh(e){return e===!0||e===!1}function iu(e){return typeof e=="string"||e instanceof String}function Xh(e){return typeof e=="number"||e instanceof Number}function Kh(e){return e instanceof Error}function Yh(e){return typeof e=="function"}function su(e){return Array.isArray(e)}function Jh(e){return su(e)&&e.every(t=>iu(t))}function Zh(e,t){return Array.isArray(e)&&e.every(t)}function eg(e){return e!==null&&typeof e=="object"}});var au=S(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.ImplementationRequest=void 0;var Us=Q(),cu;(function(e){e.method="textDocument/implementation",e.messageDirection=Us.MessageDirection.clientToServer,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("textDocument.implementation","implementationProvider")})(cu||(Ir.ImplementationRequest=cu={}))});var lu=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeDefinitionRequest=void 0;var Bs=Q(),uu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(uu||(Dr.TypeDefinitionRequest=uu={}))});var mu=S(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DidChangeWorkspaceFoldersNotification=Jt.WorkspaceFoldersRequest=void 0;var Yt=Q(),du;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Yt.MessageDirection.serverToClient,e.type=new Yt.ProtocolRequestType0(e.method),e.capabilities=Yt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(du||(Jt.WorkspaceFoldersRequest=du={}));var fu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolNotificationType(e.method),e.capabilities=Yt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(fu||(Jt.DidChangeWorkspaceFoldersNotification=fu={}))});var gu=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var $s=Q(),hu;(function(e){e.method="workspace/configuration",e.messageDirection=$s.MessageDirection.serverToClient,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("workspace.configuration",void 0)})(hu||(wr.ConfigurationRequest=hu={}))});var Tu=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ColorPresentationRequest=en.DocumentColorRequest=void 0;var Zt=Q(),pu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(pu||(en.DocumentColorRequest=pu={}));var yu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(yu||(en.ColorPresentationRequest=yu={}))});var vu=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.FoldingRangeRefreshRequest=nn.FoldingRangeRequest=void 0;var tn=Q(),_u;(function(e){e.method="textDocument/foldingRange",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(_u||(nn.FoldingRangeRequest=_u={}));var bu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=tn.MessageDirection.serverToClient,e.type=new tn.ProtocolRequestType0(e.method),e.capabilities=tn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(bu||(nn.FoldingRangeRefreshRequest=bu={}))});var Su=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=Q(),Cu;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(Cu||(Pr.DeclarationRequest=Cu={}))});var Du=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var Qs=Q(),Iu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Qs.MessageDirection.clientToServer,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Iu||(Or.SelectionRangeRequest=Iu={}))});var Ru=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.WorkDoneProgressCancelNotification=gt.WorkDoneProgressCreateRequest=gt.WorkDoneProgress=void 0;var tg=Je(),Mn=Q(),wu;(function(e){e.type=new tg.ProgressType;function t(n){return n===e.type}e.is=t})(wu||(gt.WorkDoneProgress=wu={}));var Pu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(Pu||(gt.WorkDoneProgressCreateRequest=Pu={}));var Ou;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(Ou||(gt.WorkDoneProgressCancelNotification=Ou={}))});var Eu=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CallHierarchyOutgoingCallsRequest=pt.CallHierarchyIncomingCallsRequest=pt.CallHierarchyPrepareRequest=void 0;var et=Q(),ku;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(ku||(pt.CallHierarchyPrepareRequest=ku={}));var xu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(xu||(pt.CallHierarchyIncomingCallsRequest=xu={}));var Mu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Mu||(pt.CallHierarchyOutgoingCallsRequest=Mu={}))});var Fu=S(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SemanticTokensRefreshRequest=Ie.SemanticTokensRangeRequest=Ie.SemanticTokensDeltaRequest=Ie.SemanticTokensRequest=Ie.SemanticTokensRegistrationType=Ie.TokenFormat=void 0;var Pe=Q(),qu;(function(e){e.Relative="relative"})(qu||(Ie.TokenFormat=qu={}));var En;(function(e){e.method="textDocument/semanticTokens",e.type=new Pe.RegistrationType(e.method)})(En||(Ie.SemanticTokensRegistrationType=En={}));var Nu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Nu||(Ie.SemanticTokensRequest=Nu={}));var Au;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Au||(Ie.SemanticTokensDeltaRequest=Au={}));var Gu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Gu||(Ie.SemanticTokensRangeRequest=Gu={}));var ju;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Pe.MessageDirection.serverToClient,e.type=new Pe.ProtocolRequestType0(e.method),e.capabilities=Pe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(ju||(Ie.SemanticTokensRefreshRequest=ju={}))});var Hu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Vs=Q(),Lu;(function(e){e.method="window/showDocument",e.messageDirection=Vs.MessageDirection.serverToClient,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("window.showDocument.support",void 0)})(Lu||(Rr.ShowDocumentRequest=Lu={}))});var Uu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.LinkedEditingRangeRequest=void 0;var Xs=Q(),Wu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Wu||(kr.LinkedEditingRangeRequest=Wu={}))});var Yu=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.WillDeleteFilesRequest=me.DidDeleteFilesNotification=me.DidRenameFilesNotification=me.WillRenameFilesRequest=me.DidCreateFilesNotification=me.WillCreateFilesRequest=me.FileOperationPatternKind=void 0;var ie=Q(),Bu;(function(e){e.file="file",e.folder="folder"})(Bu||(me.FileOperationPatternKind=Bu={}));var $u;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})($u||(me.WillCreateFilesRequest=$u={}));var zu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(zu||(me.DidCreateFilesNotification=zu={}));var Qu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Qu||(me.WillRenameFilesRequest=Qu={}));var Vu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Vu||(me.DidRenameFilesNotification=Vu={}));var Xu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Xu||(me.DidDeleteFilesNotification=Xu={}));var Ku;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Ku||(me.WillDeleteFilesRequest=Ku={}))});var tl=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.MonikerRequest=yt.MonikerKind=yt.UniquenessLevel=void 0;var Ks=Q(),Ju;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Ju||(yt.UniquenessLevel=Ju={}));var Zu;(function(e){e.$import="import",e.$export="export",e.local="local"})(Zu||(yt.MonikerKind=Zu={}));var el;(function(e){e.method="textDocument/moniker",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.moniker","monikerProvider")})(el||(yt.MonikerRequest=el={}))});var il=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TypeHierarchySubtypesRequest=Tt.TypeHierarchySupertypesRequest=Tt.TypeHierarchyPrepareRequest=void 0;var Ot=Q(),nl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method),e.capabilities=Ot.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(nl||(Tt.TypeHierarchyPrepareRequest=nl={}));var rl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(rl||(Tt.TypeHierarchySupertypesRequest=rl={}));var ol;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(ol||(Tt.TypeHierarchySubtypesRequest=ol={}))});var al=S(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.InlineValueRefreshRequest=on.InlineValueRequest=void 0;var rn=Q(),sl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.inlineValue","inlineValueProvider")})(sl||(on.InlineValueRequest=sl={}));var cl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(cl||(on.InlineValueRefreshRequest=cl={}))});var fl=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var tt=Q(),ul;(function(e){e.method="textDocument/inlayHint",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint","inlayHintProvider")})(ul||(_t.InlayHintRequest=ul={}));var ll;(function(e){e.method="inlayHint/resolve",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(ll||(_t.InlayHintResolveRequest=ll={}));var dl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=tt.MessageDirection.serverToClient,e.type=new tt.ProtocolRequestType0(e.method),e.capabilities=tt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(dl||(_t.InlayHintRefreshRequest=dl={}))});var _l=S(se=>{"use strict";var ng=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rg=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),og=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var sg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),cg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ag=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.InlineCompletionRequest=void 0;var Zs=Q(),Pl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Pl||(Mr.InlineCompletionRequest=Pl={}))});var xl=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.TextDocumentContentRefreshRequest=cn.TextDocumentContentRequest=void 0;var Nn=Q(),Rl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Nn.MessageDirection.clientToServer,e.type=new Nn.ProtocolRequestType(e.method),e.capabilities=Nn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Rl||(cn.TextDocumentContentRequest=Rl={}));var kl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Nn.MessageDirection.serverToClient,e.type=new Nn.ProtocolRequestType(e.method)})(kl||(cn.TextDocumentContentRefreshRequest=kl={}))});var $d=S(c=>{"use strict";var ug=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Fl||(c.StaticRegistrationOptions=Fl={}));var Ll;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||rc.is(r.documentSelector))}e.is=t})(Ll||(c.TextDocumentRegistrationOptions=Ll={}));var Hl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Hl||(c.WorkDoneProgressOptions=Hl={}));var Wl;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Wl||(c.InitializeRequest=Wl={}));var Ul;(function(e){e.unknownProtocolVersion=1})(Ul||(c.InitializeErrorCodes=Ul={}));var Bl;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Bl||(c.InitializedNotification=Bl={}));var $l;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})($l||(c.ShutdownRequest=$l={}));var zl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(zl||(c.ExitNotification=zl={}));var Ql;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Ql||(c.DidChangeConfigurationNotification=Ql={}));var Vl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Vl||(c.MessageType=Vl={}));var Xl;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Xl||(c.ShowMessageNotification=Xl={}));var Kl;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Kl||(c.ShowMessageRequest=Kl={}));var Yl;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Yl||(c.LogMessageNotification=Yl={}));var Jl;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Jl||(c.TelemetryEventNotification=Jl={}));var Zl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Zl||(c.TextDocumentSyncKind=Zl={}));var ed;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ed||(c.DidOpenTextDocumentNotification=ed={}));var td;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(td||(c.TextDocumentContentChangeEvent=td={}));var nd;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(nd||(c.DidChangeTextDocumentNotification=nd={}));var rd;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(rd||(c.DidCloseTextDocumentNotification=rd={}));var od;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(od||(c.DidSaveTextDocumentNotification=od={}));var id;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(id||(c.TextDocumentSaveReason=id={}));var sd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(sd||(c.WillSaveTextDocumentNotification=sd={}));var cd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(cd||(c.WillSaveTextDocumentWaitUntilRequest=cd={}));var ad;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(ad||(c.DidChangeWatchedFilesNotification=ad={}));var ud;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ud||(c.FileChangeType=ud={}));var oc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Ml.URI.is(r.baseUri)||Ml.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(oc||(c.RelativePattern=oc={}));var ic;(function(e){function t(n){let r=n;return ce.string(r)||oc.is(r)}e.is=t})(ic||(c.GlobPattern=ic={}));var ld;(function(e){e.Create=1,e.Change=2,e.Delete=4})(ld||(c.WatchKind=ld={}));var dd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(dd||(c.PublishDiagnosticsNotification=dd={}));var fd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(fd||(c.CompletionTriggerKind=fd={}));var md;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(md||(c.CompletionRequest=md={}));var hd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(hd||(c.CompletionResolveRequest=hd={}));var gd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(gd||(c.HoverRequest=gd={}));var pd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(pd||(c.SignatureHelpTriggerKind=pd={}));var yd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(yd||(c.SignatureHelpRequest=yd={}));var Td;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(Td||(c.DefinitionRequest=Td={}));var _d;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(_d||(c.ReferencesRequest=_d={}));var bd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(bd||(c.DocumentHighlightRequest=bd={}));var vd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(vd||(c.DocumentSymbolRequest=vd={}));var Cd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Cd||(c.CodeActionRequest=Cd={}));var Sd;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Sd||(c.CodeActionResolveRequest=Sd={}));var Id;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Id||(c.WorkspaceSymbolRequest=Id={}));var Dd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Dd||(c.WorkspaceSymbolResolveRequest=Dd={}));var wd;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(wd||(c.CodeLensRequest=wd={}));var Pd;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Pd||(c.CodeLensResolveRequest=Pd={}));var Od;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Od||(c.CodeLensRefreshRequest=Od={}));var Rd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(Rd||(c.DocumentLinkRequest=Rd={}));var kd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(kd||(c.DocumentLinkResolveRequest=kd={}));var xd;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(xd||(c.DocumentFormattingRequest=xd={}));var Md;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Md||(c.DocumentRangeFormattingRequest=Md={}));var Ed;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Ed||(c.DocumentRangesFormattingRequest=Ed={}));var qd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(qd||(c.DocumentOnTypeFormattingRequest=qd={}));var Nd;(function(e){e.Identifier=1})(Nd||(c.PrepareSupportDefaultBehavior=Nd={}));var Ad;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Ad||(c.RenameRequest=Ad={}));var Gd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Gd||(c.PrepareRenameRequest=Gd={}));var jd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(jd||(c.ExecuteCommandRequest=jd={}));var Fd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(Fd||(c.ApplyWorkspaceEditRequest=Fd={}))});var Qd=S(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.createProtocolConnection=bg;var zd=Je();function bg(e,t,n,r){return zd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,zd.createMessageConnection)(e,t,n,r)}});var ee=S(De=>{"use strict";var vg=De&&De.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Er=De&&De.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&vg(t,e,n)};Object.defineProperty(De,"__esModule",{value:!0});De.LSPErrorCodes=De.createProtocolConnection=void 0;Er(Je(),De);Er((Cr(),Xn(vr)),De);Er(Q(),De);Er($d(),De);var Cg=Qd();Object.defineProperty(De,"createProtocolConnection",{enumerable:!0,get:function(){return Cg.createProtocolConnection}});var Vd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Vd||(De.LSPErrorCodes=Vd={}))});var mc=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.empty=void 0;bt.v4=Xd;bt.isUUID=Kd;bt.parse=Ig;bt.generateUuid=Dg;var Gn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},fc=class e extends Gn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};bt.empty=new Gn("00000000-0000-0000-0000-000000000000");function Xd(){return new fc}var Sg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Kd(e){return Sg.test(e)}function Ig(e){if(!Kd(e))throw new Error("invalid uuid");return new Gn(e)}function Dg(){return Xd().asHex()}});var Yd=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ProgressFeature=void 0;ln.attachWorkDone=Pg;ln.attachPartialResult=Rg;var vt=ee(),wg=mc(),un=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends un{_source;constructor(t,n){super(t,n),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends jn{_source;constructor(){super(),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Pg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new un(e,n)}var Og=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(vt.WorkDoneProgressCancelNotification.type,n=>{let r=un.Instances.get(n.token);(r instanceof qr||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new un(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,wg.generateUuid)();return this.connection.sendRequest(vt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Nr)}};ln.ProgressFeature=Og;var hc;(function(e){e.type=new vt.ProgressType})(hc||(hc={}));var gc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(hc.type,this._token,t)}};function Rg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new gc(e,n)}});var Jd=S(Ve=>{"use strict";var kg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?qg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Eg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ng});var Zd=S(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.WorkspaceFoldersFeature=void 0;var Ar=ee(),Ag=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ar.Emitter,this.connection.onNotification(Ar.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ar.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ar.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Gr.WorkspaceFoldersFeature=Ag});var ef=S(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.CallHierarchyFeature=void 0;var pc=ee(),Gg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(pc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=pc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=pc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};jr.CallHierarchyFeature=Gg});var Tc=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.SemanticTokensBuilder=Ct.SemanticTokensDiff=Ct.SemanticTokensFeature=void 0;var Fr=ee(),jg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Fr.SemanticTokensRefreshRequest.type),on:t=>{let n=Fr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Fr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Fr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ct.SemanticTokensFeature=jg;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let y=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;y[this._dataLen++]=s,y[this._dataLen++]=a,y[this._dataLen++]=r,y[this._dataLen++]=o,y[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],f=t[5*y];if(m===f){let _=t[5*a+1],g=t[5*y+1];return _-g}return m-f});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ShowDocumentFeature=void 0;var Fg=ee(),Lg=e=>class extends e{showDocument(t){return this.connection.sendRequest(Fg.ShowDocumentRequest.type,t)}};Hr.ShowDocumentFeature=Lg});var nf=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.FileOperationsFeature=void 0;var dn=ee(),Hg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(dn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(dn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(dn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(dn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(dn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(dn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Wr.FileOperationsFeature=Hg});var rf=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeFeature=void 0;var Wg=ee(),Ug=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Wg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Ur.LinkedEditingRangeFeature=Ug});var of=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.TypeHierarchyFeature=void 0;var _c=ee(),Bg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(_c.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=_c.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=_c.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.TypeHierarchyFeature=Bg});var cf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlineValueFeature=void 0;var sf=ee(),$g=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(sf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(sf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};$r.InlineValueFeature=$g});var uf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var af=ee(),zg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(af.FoldingRangeRefreshRequest.type),on:t=>{let n=af.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=zg});var lf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlayHintFeature=void 0;var bc=ee(),Qg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(bc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(bc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(bc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Qr.InlayHintFeature=Qg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DiagnosticFeature=void 0;var Fn=ee(),Vg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Vr.DiagnosticFeature=Vg});var Cc=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.TextDocuments=void 0;var kt=ee(),vc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new kt.Emitter,this._onDidOpen=new kt.Emitter,this._onDidClose=new kt.Emitter,this._onDidSave=new kt.Emitter,this._onWillSave=new kt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=kt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),kt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Xr.TextDocuments=vc});var Dc=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.NotebookDocuments=fn.NotebookSyncFeature=void 0;var xe=ee(),ff=Cc(),Xg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(xe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(xe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(xe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(xe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};fn.NotebookSyncFeature=Xg;var Sc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,xe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,xe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,xe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ic=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof ff.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new ff.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new xe.Emitter,this._onDidChange=new xe.Emitter,this._onDidSave=new xe.Emitter,this._onDidClose=new xe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Sc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,y=o.change;y.metadata!==void 0&&(a=!0,i.metadata=y.metadata);let m=[],f=[],_=[],g=[];if(y.cells!==void 0){let k=y.cells;if(k.structure!==void 0){let h=k.structure.array;if(i.cells.splice(h.start,h.deleteCount,...h.cells!==void 0?h.cells:[]),k.structure.didOpen!==void 0)for(let l of k.structure.didOpen)await n.openTextDocument({textDocument:l}),m.push(l.uri);if(k.structure.didClose)for(let l of k.structure.didClose)await n.closeTextDocument({textDocument:l}),f.push(l.uri)}if(k.data!==void 0){let h=new Map(k.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let I=h.get(i.cells[l].document);if(I!==void 0){let E=i.cells.splice(l,1,I);if(_.push({old:E[0],new:I}),h.delete(I.document),h.size===0)break}}}if(k.textContent!==void 0)for(let h of k.textContent)await n.changeTextDocument({textDocument:h.document,contentChanges:h.changes}),g.push(h.document.uri)}this.updateCellMap(i);let v={notebookDocument:i};a&&(v.metadata={old:s,new:i.metadata});let O=[];for(let k of m)O.push(this.getNotebookCell(k));let q=[];for(let k of f)q.push(this.getNotebookCell(k));let L=[];for(let k of g)L.push(this.getNotebookCell(k));(O.length>0||q.length>0||_.length>0||L.length>0)&&(v.cells={added:O,removed:q,changed:{data:_,textContent:L}}),(v.metadata!==void 0||v.cells!==void 0)&&this._onDidChange.fire(v)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),xe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};fn.NotebookDocuments=Ic});var mf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.MonikerFeature=void 0;var Kg=ee(),Yg=e=>class extends e{get moniker(){return{on:t=>{let n=Kg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.MonikerFeature=Yg});var hf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Jg=ee(),Zg=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Jg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=Zg});var pf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var gf=ee(),ep=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(gf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(gf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=ep});var xc=S(U=>{"use strict";var tp=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),np=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sf=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Oc;var Zr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}},yf=(0,cp.ShowDocumentFeature)((0,M.ProgressFeature)(Rc)),Tf;(function(e){function t(){return new eo}e.create=t})(Tf||(U.BulkRegistration=Tf={}));var eo=class{_registrations=[];_registered=new Set;add(t,n){let r=Me.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Pc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},_f;(function(e){function t(){return new Ln(void 0,[])}e.create=t})(_f||(U.BulkUnregistration=_f={}));var Ln=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Me.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},to=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof eo?this.registerMany(t):t instanceof Ln?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Me.string(n)?n:n.method,i=Pc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Me.string(t)?t:t.method,o=Pc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Ln(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},kc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},bf=(0,Tp.TextDocumentContentFeature)((0,ap.FileOperationsFeature)((0,op.WorkspaceFoldersFeature)((0,rp.ConfigurationFeature)(kc)))),no=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=oo;var vf=(0,yp.InlineCompletionFeature)((0,fp.FoldingRangeFeature)((0,pp.MonikerFeature)((0,hp.DiagnosticFeature)((0,mp.InlayHintFeature)((0,dp.InlineValueFeature)((0,lp.TypeHierarchyFeature)((0,up.LinkedEditingRangeFeature)((0,sp.SemanticTokensFeature)((0,ip.CallHierarchyFeature)(oo)))))))))),io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=io;var Cf=(0,gp.NotebookSyncFeature)(io);function If(e,t){return function(n){return t(e(n))}}function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function Of(e,t){return function(n){return t(e(n))}}function Rf(e,t){return function(n){return t(e(n))}}function kf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function _p(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,If),tracer:n(e.tracer,t.tracer,wf),telemetry:n(e.telemetry,t.telemetry,Df),client:n(e.client,t.client,Pf),window:n(e.window,t.window,Of),workspace:n(e.workspace,t.workspace,Rf),languages:n(e.languages,t.languages,kf),notebooks:n(e.notebooks,t.notebooks,xf)}}function bp(e,t,n){let r=n&&n.console?new(n.console(Zr)):new Zr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(no)):new no,s=n&&n.telemetry?new(n.telemetry(ro)):new ro,a=n&&n.client?new(n.client(to)):new to,y=n&&n.window?new(n.window(yf)):new yf,m=n&&n.workspace?new(n.workspace(bf)):new bf,f=n&&n.languages?new(n.languages(vf)):new vf,_=n&&n.notebooks?new(n.notebooks(Cf)):new Cf,g=[r,i,s,a,y,m,f,_];function v(h){return h instanceof Promise?h:Me.thenable(h)?new Promise((l,I)=>{h.then(E=>l(E),E=>I(E))}):Promise.resolve(h)}let O,q,L,k={listen:()=>o.listen(),sendRequest:(h,...l)=>o.sendRequest(Me.string(h)?h:h.method,...l),onRequest:(h,l)=>o.onRequest(h,l),sendNotification:(h,l)=>{let I=Me.string(h)?h:h.method;return o.sendNotification(I,l)},onNotification:(h,l)=>o.onNotification(h,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:h=>(q=h,{dispose:()=>{q=void 0}}),onInitialized:h=>o.onNotification(D.InitializedNotification.type,h),onShutdown:h=>(O=h,{dispose:()=>{O=void 0}}),onExit:h=>(L=h,{dispose:()=>{L=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return y},get workspace(){return m},get languages(){return f},get notebooks(){return _},onDidChangeConfiguration:h=>o.onNotification(D.DidChangeConfigurationNotification.type,h),onDidChangeWatchedFiles:h=>o.onNotification(D.DidChangeWatchedFilesNotification.type,h),__textDocumentSync:void 0,onDidOpenTextDocument:h=>o.onNotification(D.DidOpenTextDocumentNotification.type,h),onDidChangeTextDocument:h=>o.onNotification(D.DidChangeTextDocumentNotification.type,h),onDidCloseTextDocument:h=>o.onNotification(D.DidCloseTextDocumentNotification.type,h),onWillSaveTextDocument:h=>o.onNotification(D.WillSaveTextDocumentNotification.type,h),onWillSaveTextDocumentWaitUntil:h=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,h),onDidSaveTextDocument:h=>o.onNotification(D.DidSaveTextDocumentNotification.type,h),sendDiagnostics:h=>o.sendNotification(D.PublishDiagnosticsNotification.type,h),onHover:h=>o.onRequest(D.HoverRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onCompletion:h=>o.onRequest(D.CompletionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCompletionResolve:h=>o.onRequest(D.CompletionResolveRequest.type,h),onSignatureHelp:h=>o.onRequest(D.SignatureHelpRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDeclaration:h=>o.onRequest(D.DeclarationRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDefinition:h=>o.onRequest(D.DefinitionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onTypeDefinition:h=>o.onRequest(D.TypeDefinitionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onImplementation:h=>o.onRequest(D.ImplementationRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onReferences:h=>o.onRequest(D.ReferencesRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentHighlight:h=>o.onRequest(D.DocumentHighlightRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentSymbol:h=>o.onRequest(D.DocumentSymbolRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbol:h=>o.onRequest(D.WorkspaceSymbolRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:h=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,h),onCodeAction:h=>o.onRequest(D.CodeActionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeActionResolve:h=>o.onRequest(D.CodeActionResolveRequest.type,(l,I)=>h(l,I)),onCodeLens:h=>o.onRequest(D.CodeLensRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeLensResolve:h=>o.onRequest(D.CodeLensResolveRequest.type,(l,I)=>h(l,I)),onDocumentFormatting:h=>o.onRequest(D.DocumentFormattingRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:h=>o.onRequest(D.DocumentRangeFormattingRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:h=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(l,I)=>h(l,I)),onRenameRequest:h=>o.onRequest(D.RenameRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onPrepareRename:h=>o.onRequest(D.PrepareRenameRequest.type,(l,I)=>h(l,I)),onDocumentLinks:h=>o.onRequest(D.DocumentLinkRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentLinkResolve:h=>o.onRequest(D.DocumentLinkResolveRequest.type,(l,I)=>h(l,I)),onDocumentColor:h=>o.onRequest(D.DocumentColorRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onColorPresentation:h=>o.onRequest(D.ColorPresentationRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onFoldingRanges:h=>o.onRequest(D.FoldingRangeRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onSelectionRanges:h=>o.onRequest(D.SelectionRangeRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onExecuteCommand:h=>o.onRequest(D.ExecuteCommandRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let h of g)h.attach(k);return o.onRequest(D.InitializeRequest.type,h=>{t.initialize(h),Me.string(h.trace)&&(i.trace=D.Trace.fromString(h.trace));for(let l of g)l.initialize(h.capabilities);if(q){let l=q(h,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,h),void 0);return v(l).then(I=>{if(I instanceof D.ResponseError)return I;let E=I;E||(E={capabilities:{}});let A=E.capabilities;A||(A={},E.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None:!Me.number(A.textDocumentSync)&&!Me.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of g)B.fillServerCapabilities(A);return E})}else{let l={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of g)I.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,O)return O(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(L)return L()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,h=>{i.trace=D.Trace.fromString(h.value)}),k}});var Mf=S(be=>{"use strict";var vp=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Cp=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ac=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return He.normalize(n.join("/"))}function Ec(){return process.platform==="win32"}function so(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let y=process.env,m=Object.create(null);Object.keys(y).forEach(f=>m[f]=y[f]),t&&Mc.existsSync(t)&&(m[o]?m[o]=t+He.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let f=(0,Gc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(f.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}f.on("error",g=>{a(g)}),f.on("message",g=>{g.c==="r"&&(f.send({c:"e"}),g.s?s(g.r):a(new Error(`Failed to resolve module: ${e}`)))});let _={c:"rs",a:e};f.send(_)}catch(f){a(f)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Ec()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Gc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Ec()?He.join(s,"node_modules"):He.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Dp(e){let t="yarn",n={encoding:"utf8"};Ec()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Gc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let y=JSON.parse(a);if(y.type==="log")return He.join(y.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Nc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Mc.existsSync(__filename.toUpperCase())||!Mc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?He.normalize(i).indexOf(He.normalize(o))===0:He.normalize(i).toLowerCase().indexOf(He.normalize(o).toLowerCase())===0}e.isParent=r})(Nc||(be.FileSystem=Nc={}));function wp(e,t,n,r){return n?(He.isAbsolute(n)||(n=He.join(e,n)),so(t,n,n,r).then(o=>Nc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>so(t,qc(r),e,r))):so(t,qc(r),e,r)}});var Nf=S(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var Ef=require("util"),rt=Je(),jc=class e extends rt.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Ef.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Fc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),rt.Disposable.create(()=>this.stream.off("data",t))}},Lc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},qf=Object.freeze({messageBuffer:Object.freeze({create:e=>new jc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Ef.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Fc(e),asWritableStream:e=>new Lc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Hc(){return qf}(function(e){function t(){rt.RAL.install(qf)}e.install=t})(Hc||(Hc={}));Wc.default=Hc});var Vc=S(N=>{"use strict";var Gf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Uc;var Bc=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Bc;var $c=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=$c;var zc=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=zc;var xt=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=xt;var Mt=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Mt;var co=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=co;var ao=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=ao;var Ep=process.env.XDG_RUNTIME_DIR,qp=new Map([["linux",107],["darwin",102]]);function Np(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Af.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Mp.realpathSync(Ep??xp.tmpdir()),r=qp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Af.randomBytes)(Math.floor(e/2)).toString("hex");return kp.join(n,`lsp-${o}.sock`)}function Ap(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new xt(a,t),new Mt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Gp(e,t="utf-8"){let n=(0,uo.createConnection)(e);return[new xt(n,t),new Mt(n,t)]}function jp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new xt(a,t),new Mt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Fp(e,t="utf-8"){let n=(0,uo.createConnection)(e,"127.0.0.1");return[new xt(n,t),new Mt(n,t)]}function Lp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Hp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Wp(e,t,n,r){n||(n=Oe.NullLogger);let o=Lp(e)?new co(e):e,i=Hp(t)?new ao(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var Xc=S(ot=>{"use strict";var Up=ot&&ot.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jf=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Up(t,e,n)};Object.defineProperty(ot,"__esModule",{value:!0});ot.createProtocolConnection=$p;var Bp=Vc();jf(Vc(),ot);jf(ee(),ot);function $p(e,t,n,r){return(0,Bp.createMessageConnection)(e,t,n,r)}});var Kc=S(he=>{"use strict";var zp=he&&he.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lf=he&&he.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&zp(t,e,n)};Object.defineProperty(he,"__esModule",{value:!0});he.ProposedFeatures=he.NotebookDocuments=he.TextDocuments=he.SemanticTokensBuilder=void 0;var Qp=Tc();Object.defineProperty(he,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Qp.SemanticTokensBuilder}});Lf(ee(),he);var Vp=Cc();Object.defineProperty(he,"TextDocuments",{enumerable:!0,get:function(){return Vp.TextDocuments}});var Xp=Dc();Object.defineProperty(he,"NotebookDocuments",{enumerable:!0,get:function(){return Xp.NotebookDocuments}});Lf(xc(),he);var Ff;(function(e){e.all={__brand:"features"}})(Ff||(he.ProposedFeatures=Ff={}))});var Jc=S(ve=>{"use strict";var Bf=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Kp=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$f=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{lo(),process.exit(mn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Yc.number(t)&&Qf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(mn?0:1)}},3e3)},get shutdownReceived(){return mn},set shutdownReceived(e){mn=e},exit:e=>{lo(),process.exit(e)}};function ey(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),Et.ConnectionStrategy.is(e)||Et.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),ty(i,s,a,o)}function ty(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,y,m=process.argv.slice(2);for(let f=0;f{lo(),process.exit(mn?0:1)}),a.on("close",()=>{lo(),process.exit(mn?0:1)})}let s=a=>{let y=(0,Et.createProtocolConnection)(e,t,a,n);return o&&ny(a),y};return(0,Yp.createConnection)(s,Zp,r)}function ny(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Hf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Hf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Yf={};xa(Yf,{TextDocument:()=>Zc});function ea(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ea(r,t),ea(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function ry(e){let t=Kf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var fo,Zc,Jf=ka(()=>{"use strict";fo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Kf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),y=Math.max(o.end.line,0),m=this._lineOffsets,f=Vf(r.text,!1,i);if(y-a===f.length)for(let g=0,v=f.length;gt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Xf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new fo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof fo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ea(i.map(ry),(f,_)=>{let g=f.range.start.line-_.range.start.line;return g===0?f.range.start.character-_.range.start.character:g}),y=0,m=[];for(let f of a){let _=o.offsetAt(f.range.start);if(_y&&m.push(s.substring(y,_)),f.newText.length&&m.push(f.newText),y=o.offsetAt(f.range.end)}return m.push(s.substr(y)),m.join("")}e.applyEdits=r})(Zc||(Zc={}))});var Un=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.DATATYPE_SET=ge.KEYWORD_SET=ge.PUNCTUATION=ge.OPERATORS=ge.DATATYPES=ge.KEYWORDS=void 0;ge.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ge.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ge.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ge.PUNCTUATION=["(",")","[","]",";",",",":","."];ge.KEYWORD_SET=new Set(ge.KEYWORDS);ge.DATATYPE_SET=new Set(ge.DATATYPES)});var qt=S(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.TokenKind=void 0;var Zf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Zf||(mo.TokenKind=Zf={}))});var po=S(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.tokenize=sy;var go=Un(),Re=qt();function oy(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function em(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function ho(e){return e!==void 0&&/[0-9]/.test(e)}function iy(e){let t=e.toUpperCase();return go.DATATYPE_SET.has(t)?Re.TokenKind.Datatype:go.KEYWORD_SET.has(t)?Re.TokenKind.Keyword:Re.TokenKind.Identifier}function sy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n{let _=n,g=i();s(f),t.push({kind:m,lexeme:e.slice(_,f),span:{start:_,end:f},range:{start:g,end:i()}})};for(;n",n)||e.startsWith("{<",n))&&(O===-1||O>v);a(Re.TokenKind.Comment,q?v:O===-1?e.length:O+1);continue}if(m==="'"){let g=n+1;for(;ge.startsWith(g,n));if(f!==void 0){a(Re.TokenKind.Operator,n+f.length);continue}if(go.PUNCTUATION.includes(m)){a(Re.TokenKind.Punctuation,n+1);continue}let _=e.codePointAt(n);a(Re.TokenKind.Unknown,n+(_!==void 0&&_>65535?2:1))}let y=i();return t.push({kind:Re.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:y,end:{...y}}}),t}});var yo=S(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.positionAt=ra;Bn.offsetAt=ay;Bn.sourceRange=uy;function na(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function tm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function nm(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ua(e,t){aa(e,t);let n=Jf(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=ey(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function ny(e,t){if(aa(e,t.start),aa(e,t.end),t.end{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.parseQuickScript=uy;var ry=Vn(),So=Io(),We=jt(),oy=Co(),Zf=["DIM","CALL","IF","ELSE","ENDIF","FOR","NEXT","WHILE"];function iy(e){return e.kind===We.TokenKind.Whitespace||e.kind===We.TokenKind.Newline||e.kind===We.TokenKind.Comment||e.kind===We.TokenKind.EOF}function at(e){return e?.kind===We.TokenKind.Keyword?e.lexeme.toUpperCase():void 0}function em(e,t,n=t){return(0,So.sourceRange)(e,{start:t.span.start,end:n.span.end})}function Kn(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function sy(e){switch(e){case"DIM":return"dim";case"CALL":return"call";case"IF":return"if";case"ELSE":return"else";case"ENDIF":return"endif";case"FOR":return"for";case"NEXT":return"next";case"WHILE":return"while";default:return"unknown"}}function cy(e,t){return e.filter(n=>n.range.start.line===t&&!iy(n))}function tm(e,t){return e.some(n=>at(n)===t)}function nm(e,t){return e.some(n=>n.lexeme===t)}function ay(e,t){let n=t[t.length-1];return(0,So.sourceRange)(e,{start:n.span.end,end:n.span.end}).range}function uy(e){let t=(0,oy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=[],o=[],i=[],s=[],a=[],_=[],f;for(let h=0;hA.kind===We.TokenKind.Comment&&A.range.end.line>A.range.start.line&&A.range.start.line<=h&&A.range.end.line>=h),E=a.length+_.length,z=!1,N=b.map(at).find(A=>A!==void 0);(N==="ELSE"||N==="ENDIF"||N==="NEXT")&&(E=Math.max(0,E-1),z=!0),f!==void 0&&(E=f.baseDepth+2),s.push({line:h,indentDepth:E,preserveIndent:R});let m=b[0],p=m?.kind===We.TokenKind.Identifier&&tm(b,"AS")&&b.some(A=>A.kind===We.TokenKind.Datatype),S=m?.kind===We.TokenKind.Identifier&&nm(b,"=")&&tm(b,"TO");(p||S)&&(i.push(Kn("invalid-statement",`Unknown or invalid QuickScript statement '${m.lexeme}'.`,m)),S&&_.push(a.length));for(let A=0;Abn>ne&&Zf.includes(at(Be)??"")),_n=b.slice(ne,De<0?void 0:De);nm(_n,";")||i.push({code:"missing-semicolon",message:"DIM statement is missing the required semicolon.",severity:"error",range:ay(e,_n)});let Pt=b.findIndex((Be,bn)=>bn>ne&&at(Be)==="AS"),Je=Pt>=0?b[Pt+1]:void 0;for(let Be of b.slice(ne+1,Pt>=0?Pt:void 0))Be.kind===We.TokenKind.Identifier&&(r.push({...wt,name:Be.lexeme,nameRange:Be.range,datatype:Je?.lexeme,datatypeRange:Je?.range}),Ne=!0)}else if(B==="CALL"){let De=b[ne+1];De?.kind===We.TokenKind.Identifier&&(wt.name=De.lexeme,wt.nameRange=De.range)}Ne||r.push(wt)}let Tn=at(b[A-1]);if(!((B==="FOR"||B==="WHILE")&&Tn==="EXIT")){if(B==="IF"||B==="FOR"||B==="WHILE"){let ne=a[a.length-1]?.block,ke=em(e,q),ae={id:o.length,kind:B.toLowerCase(),parentId:ne?.id,childIds:[],...ke,bodyRange:{start:q.range.end,end:q.range.end},bodySpan:{start:q.span.end,end:q.span.end},opener:q.range};o.push(ae),ne?.childIds.push(ae.id),a.push({block:ae,opener:q,hasElse:!1});continue}if(B==="ELSE"){let ne=a[a.length-1];ne?.block.kind!=="if"?i.push(Kn("invalid-nesting","ELSE has no matching IF.",q)):ne.hasElse?i.push(Kn("duplicate-else","IF block has more than one ELSE.",q)):(ne.hasElse=!0,ne.block.middle=q.range);continue}if(B==="ENDIF"||B==="NEXT"){let ne=_[_.length-1];if(B==="NEXT"&&ne===a.length){_.pop();continue}let ke=B==="ENDIF"?["if"]:["for","while"],ae=a[a.length-1];ae===void 0||!ke.includes(ae.block.kind)?i.push(Kn("invalid-nesting",`${B} has no matching ${B==="ENDIF"?"IF":"FOR or WHILE"}.`,q)):(a.pop(),ae.block.closer=q.range,ae.block.span.end=q.span.end,ae.block.range.end=q.range.end,ae.block.bodySpan.end=q.span.start,ae.block.bodyRange.end=q.range.start)}}}let x=b.map(at);f!==void 0&&x.includes("THEN")?f=void 0:!z&&x.includes("IF")&&!x.includes("THEN")&&["AND","OR","NOT"].includes(x[x.length-1]??"")&&(f={baseDepth:Math.max(0,a.length-1)})}for(let h of a){let b=h.block.kind==="if"?"ENDIF":"NEXT";i.push(Kn(`missing-${b.toLowerCase()}`,`${h.block.kind.toUpperCase()} block is missing ${b}.`,h.opener)),h.block.span.end=e.length,h.block.range.end=(0,So.sourceRange)(e,{start:e.length,end:e.length}).range.end,h.block.bodySpan.end=e.length,h.block.bodyRange.end=h.block.range.end}let d=new Set;for(let h of r.filter(b=>b.kind==="dim"&&b.datatype!==void 0))if(!ry.DATATYPE_SET.has(h.datatype.toUpperCase())){let b=h.datatypeRange??h.range,R=`${b.start.line}:${b.start.character}`;if(d.has(R))continue;d.add(R),i.push({code:"unknown-datatype",message:`Unknown datatype '${h.datatype}'.`,severity:"error",range:b})}let v=(0,So.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:r,blocks:o,diagnostics:i,lines:s,...v}}});var am=I(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.formatQuickScriptLexically=sm;Jn.formatQuickScriptStructure=cm;Jn.formatQuickScript=gy;var L=jt(),om=Co(),ly=Do();function rm(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function fa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function im(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function da(e){Yn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function dy(e,t){if(e[t].lexeme!=="-"||im(e,t)?.kind!==L.TokenKind.Number)return!1;let n=fa(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function fy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function sm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,om.tokenize)(r);if(o.some(f=>f.kind===L.TokenKind.String&&!f.lexeme.endsWith('"'))||o.some(f=>f.kind===L.TokenKind.Unknown&&f.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let f=0;f")||Ke(v,t.regionBlockCodeBegin??"{region"))&&(a=!0),b!==void 0&&(b.kind===L.TokenKind.Identifier||b.kind===L.TokenKind.Keyword||b.kind===L.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(d.lexeme)}let _=fy(i.join(""),n);return{text:_,changed:_!==e}}function my(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function hy(e){let t=(0,om.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function Ke(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function cm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ly.parseQuickScript)(r),i=r.split(n),s=[],a=my(t),_=0,f=0,d=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let h=0;h")||Ke(E,t.regionBlockCodeBegin??"{region"))&&(_+=1)}let v=s.join(n);return{text:v,changed:v!==e,diagnostics:o.diagnostics}}function gy(e,t={}){let n=sm(e,t);return cm(n.text,t)}});var Po=I(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.KNOWN_FUNCTIONS=void 0;wo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var fm=I(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.completions=yy;Zn.hoverAt=Ty;Zn.documentSymbols=_y;var dm=Po(),um=Vn(),lm=jt();function py(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of um.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of um.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of dm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function Ty(e,t){let n=e.document.tokens.find(i=>py(i.range,t));if(n===void 0)return;if(n.kind===lm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===lm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=dm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function _y(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var pm=I(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.quickFunctionNames=gm;pn.analyzeQuickScript=Sy;pn.definitionAt=Dy;pn.referencesAt=wy;var by=Do(),vy=Po(),mm=Io(),Ft=jt();function hm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Ft.TokenKind.Whitespace,Ft.TokenKind.Newline,Ft.TokenKind.Comment].includes(e[n].kind))return e[n]}function Iy(e,t){for(let n=t+1;nd.name.toUpperCase()));for(let d of gm(e))s.add(d.toUpperCase());for(let d of t.knownFunctionNames??[])s.add(d.toUpperCase());for(let d of n.statements.filter(v=>v.kind==="dim"&&v.name!==void 0&&v.nameRange!==void 0)){let v=d.name.toUpperCase();if(i.get(v)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${d.name}' is already declared.`,severity:"error",range:d.nameRange});continue}let b={id:o.length,name:d.name,kind:"variable",range:d.range,selectionRange:d.nameRange,datatype:d.datatype,scopeId:0};o.push(b),i.set(v,b)}let a=new Map;for(let d of o)a.set((0,mm.offsetAt)(e,d.selectionRange.start),d);let _=new Map;for(let d of n.statements.filter(v=>v.kind==="call"&&v.name!==void 0&&v.nameRange!==void 0))_.set((0,mm.offsetAt)(e,d.nameRange.start),d.name);let f=[];for(let d=0;d")continue;let R=i.get(v.lexeme.toUpperCase()),E=_.get(v.span.start),z=Iy(n.tokens,d);if((E!==void 0||z?.lexeme==="(")&&!s.has(v.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${v.lexeme}'.`,severity:"warning",range:v.range}),R!==void 0||E!==void 0){let m=E!==void 0?"call":z?.lexeme==="="?"write":"read";f.push({name:v.lexeme,kind:m,range:v.range,declarationId:R?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(d=>d.id)}],symbols:o,references:f,diagnostics:r}}function Dy(e,t){let n=e.references.find(r=>hm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function wy(e,t,n=!0){let r=e.references.find(o=>hm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var ma=I(ve=>{"use strict";var Py=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ut=ve&&ve.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Py(t,e,n)};Object.defineProperty(ve,"__esModule",{value:!0});ut(Vn(),ve);ut(am(),ve);ut(Po(),ve);ut(fm(),ve);ut(Do(),ve);ut(pm(),ve);ut(Io(),ve);ut(jt(),ve);ut(Co(),ve)});var ym=I(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.serverCapabilities=Oy;Ye.diagnosticsFor=ky;Ye.formattingEdits=My;Ye.symbolsFor=xy;Ye.definitionFor=qy;Ye.referencesFor=Ey;Ye.completionsFor=Ny;Ye.hoverFor=Gy;var ye=oa(),Ee=ma();function Oy(){return{capabilities:{textDocumentSync:ye.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Ry(e){switch(e){case"keyword":return ye.CompletionItemKind.Keyword;case"datatype":return ye.CompletionItemKind.TypeParameter;case"variable":return ye.CompletionItemKind.Variable;case"call-target":return ye.CompletionItemKind.Method;default:return ye.CompletionItemKind.Function}}function ky(e,t){return(0,Ee.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?ye.DiagnosticSeverity.Error:ye.DiagnosticSeverity.Warning,source:"intouch-language"}))}function My(e,t){let n=(0,Ee.formatQuickScript)(e.getText(),t);return n.changed?[ye.TextEdit.replace(ye.Range.create(ye.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function xy(e){let t=n=>ye.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ye.SymbolKind.Variable:ye.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Ee.documentSymbols)((0,Ee.analyzeQuickScript)(e.getText())).map(t)}function qy(e,t){let n=(0,Ee.definitionAt)((0,Ee.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ye.Location.create(e.uri,n)}function Ey(e,t,n){return(0,Ee.referencesAt)((0,Ee.analyzeQuickScript)(e.getText()),t,n).map(r=>ye.Location.create(e.uri,r))}function Ny(e){return(0,Ee.completions)((0,Ee.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Ry(t.kind),detail:t.detail}))}function Gy(e,t){let n=(0,Ee.hoverAt)((0,Ee.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** +`)&&t.push(n+1);return t}function cy(e,t,n){if(n+1>=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ra(e,t){na(e,t);let n=nm(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=cy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function uy(e,t){if(na(e,t.start),na(e,t.end),t.end{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.parseQuickScript=by;var ly=Un(),To=yo(),ne=qt(),dy=po(),rm=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),om=new Set(["+","-","NOT","!","~"]),fy=new Set(["TRUE","FALSE","NULL","EOF"]),my=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),hy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function gy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function Nt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function qe(e){return e?.kind===ne.TokenKind.Keyword?Nt(e):void 0}function im(e,t,n=t){return(0,To.sourceRange)(e,{start:t.span.start,end:n.span.end})}function py(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,To.sourceRange)(e,{start:n,end:n}).range}function pe(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:py(e,r)}}function yy(e,t){return e.filter(n=>n.range.start.line===t&&!gy(n))}function sm(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function cm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?Nt(e):e.lexeme}var oa=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;om.has(cm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||fy.has(Nt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!my.has(Nt(t)??"")&&!rm.has(Nt(t)??"")&&!om.has(Nt(t)??"")}};function Ty(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):pe(n.code,n.message,n.token)}function Ee(e,t,n){let r=new oa(t).parse();return r===void 0?!0:(n.push(Ty(e,t,r)),!1)}var ia=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(pe("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ee(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):pe("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):pe("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ee(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&Ee(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&o_.lexeme==="=")&&r.some(_=>qe(_)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:f})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&t[n+1]?.kind===ne.TokenKind.Identifier){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ee(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function _y(e,t){let n=e[t];if(qe(n[0])!=="IF"||n.some(r=>qe(r)==="THEN")||!["AND","OR","NOT"].includes(qe(n[n.length-1])??""))return t;for(let r=t+1;rqe(o)==="THEN"))return r;return t}function by(e){let t=(0,dy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(g,v)=>yy(t,v)),o=[],i=[],s=[],a=new Array(n),y=[],m=[];for(let g=0;gv.kind==="dim"&&v.datatype!==void 0))if(!ly.DATATYPE_SET.has(g.datatype.toUpperCase())){let v=g.datatypeRange??g.range,O=`${v.start.line}:${v.start.character}`;if(f.has(O))continue;f.add(O),s.push({code:"unknown-datatype",message:`Unknown datatype '${g.datatype}'.`,severity:"error",range:v})}let _=(0,To.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,..._}}});var mm=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=dm;zn.formatQuickScriptStructure=fm;zn.formatQuickScript=Oy;var F=qt(),ua=po(),vy=_o();function am(e){return e===void 0||e.kind===F.TokenKind.Newline||e.kind===F.TokenKind.EOF}function aa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==F.TokenKind.Whitespace&&e[n].kind!==F.TokenKind.Newline)return e[n]}function lm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ca(e){$n(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function Cy(e,t){if(e[t].lexeme!=="-"||lm(e,t)?.kind!==F.TokenKind.Number)return!1;let n=aa(e,t);return n===void 0||n.kind===F.TokenKind.Operator||n.kind===F.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Sy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function dm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ua.tokenize)(r);if(o.some(m=>m.kind===F.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===F.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||ye(_,t.regionBlockCodeBegin??"{region"))&&(a=!0),v!==void 0&&(v.kind===F.TokenKind.Identifier||v.kind===F.TokenKind.Keyword||v.kind===F.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(f.lexeme)}let y=Sy(i.join(""),n);return{text:y,changed:y!==e}}function Iy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function Dy(e){let t=(0,ua.tokenize)(e),n=[];for(let r of t)r.kind===F.TokenKind.EOF||r.kind===F.TokenKind.Newline||(r.kind===F.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function ye(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function wy(e,t){return ye(e,t.blockCodeBegin??"{>")||ye(e,t.blockCodeEnd??"{<")||ye(e,t.blockCodeExclude??"{#")||ye(e,t.regionBlockCodeBegin??"{region")||ye(e,t.regionBlockCodeEnd??"{endregion")||ye(e,t.regionBlockCodeExclude??"{#")}function Py(e,t){let n=new Map;for(let r of(0,ua.tokenize)(e)){if(r.kind!==F.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` +`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&!wy(s,t)&&n.set(r.range.start.line,r)}return n}function um(e,t){if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let n=e.match(/^[ \t]*/)?.[0]??"",r=t.targetIndent.length-t.originalIndent.length;return r<0?e.slice(Math.min(-r,n.length)):r>0?t.targetIndent.slice(0,r)+e:e}function fm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,vy.parseQuickScript)(r),i=r.split(n),s=Py(r,t),a=[],y=Iy(t),m=0,f=0,_,g=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let O=0;O")||ye(k,t.regionBlockCodeBegin??"{region"))&&(m+=1)}let v=a.join(n);return{text:v,changed:v!==e,diagnostics:o.diagnostics}}function Oy(e,t={}){let n=dm(e,t);return fm(n.text,t)}});var vo=S(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.KNOWN_FUNCTIONS=void 0;bo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var ym=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.completions=ky;Qn.hoverAt=xy;Qn.documentSymbols=My;var pm=vo(),hm=Un(),gm=qt();function Ry(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of hm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of hm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of pm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function xy(e,t){let n=e.document.tokens.find(i=>Ry(i.range,t));if(n===void 0)return;if(n.kind===gm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===gm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=pm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function My(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var vm=S(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.quickFunctionNames=bm;hn.analyzeQuickScript=Gy;hn.definitionAt=jy;hn.referencesAt=Fy;var Ey=_o(),qy=vo(),Tm=yo(),At=qt();function _m(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![At.TokenKind.Whitespace,At.TokenKind.Newline,At.TokenKind.Comment].includes(e[n].kind))return e[n]}function Ay(e,t){for(let n=t+1;nf.name.toUpperCase()));for(let f of bm(e))s.add(f.toUpperCase());for(let f of t.knownFunctionNames??[])s.add(f.toUpperCase());for(let f of n.statements.filter(_=>_.kind==="dim"&&_.name!==void 0&&_.nameRange!==void 0)){let _=f.name.toUpperCase();if(i.get(_)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${f.name}' is already declared.`,severity:"error",range:f.nameRange});continue}let v={id:o.length,name:f.name,kind:"variable",range:f.range,selectionRange:f.nameRange,datatype:f.datatype,scopeId:0};o.push(v),i.set(_,v)}let a=new Map;for(let f of o)a.set((0,Tm.offsetAt)(e,f.selectionRange.start),f);let y=new Map;for(let f of n.statements.filter(_=>_.kind==="call"&&_.name!==void 0&&_.nameRange!==void 0))y.set((0,Tm.offsetAt)(e,f.nameRange.start),f.name);let m=[];for(let f=0;f")continue;let O=i.get(_.lexeme.toUpperCase()),q=y.get(_.span.start),L=Ay(n.tokens,f);if((q!==void 0||L?.lexeme==="(")&&!s.has(_.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${_.lexeme}'.`,severity:"warning",range:_.range}),O!==void 0||q!==void 0){let h=q!==void 0?"call":L?.lexeme==="="?"write":"read";m.push({name:_.lexeme,kind:h,range:_.range,declarationId:O?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(f=>f.id)}],symbols:o,references:m,diagnostics:r}}function jy(e,t){let n=e.references.find(r=>_m(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Fy(e,t,n=!0){let r=e.references.find(o=>_m(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var la=S(Ce=>{"use strict";var Ly=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),it=Ce&&Ce.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ly(t,e,n)};Object.defineProperty(Ce,"__esModule",{value:!0});it(Un(),Ce);it(mm(),Ce);it(vo(),Ce);it(ym(),Ce);it(_o(),Ce);it(vm(),Ce);it(yo(),Ce);it(qt(),Ce);it(po(),Ce)});var Cm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=Hy;Xe.diagnosticsFor=Uy;Xe.formattingEdits=By;Xe.symbolsFor=$y;Xe.definitionFor=zy;Xe.referencesFor=Qy;Xe.completionsFor=Vy;Xe.hoverFor=Xy;var Te=Jc(),Ne=la();function Hy(){return{capabilities:{textDocumentSync:Te.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Wy(e){switch(e){case"keyword":return Te.CompletionItemKind.Keyword;case"datatype":return Te.CompletionItemKind.TypeParameter;case"variable":return Te.CompletionItemKind.Variable;case"call-target":return Te.CompletionItemKind.Method;default:return Te.CompletionItemKind.Function}}function Uy(e,t){return(0,Ne.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?Te.DiagnosticSeverity.Error:Te.DiagnosticSeverity.Warning,source:"intouch-language"}))}function By(e,t){let n=(0,Ne.formatQuickScript)(e.getText(),t);return n.changed?[Te.TextEdit.replace(Te.Range.create(Te.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function $y(e){let t=n=>Te.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?Te.SymbolKind.Variable:Te.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Ne.documentSymbols)((0,Ne.analyzeQuickScript)(e.getText())).map(t)}function zy(e,t){let n=(0,Ne.definitionAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:Te.Location.create(e.uri,n)}function Qy(e,t,n){return(0,Ne.referencesAt)((0,Ne.analyzeQuickScript)(e.getText()),t,n).map(r=>Te.Location.create(e.uri,r))}function Vy(e){return(0,Ne.completions)((0,Ne.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Wy(t.kind),detail:t.detail}))}function Xy(e,t){let n=(0,Ne.hoverAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** -${n.detail}`},range:n.range}}});var _m=I(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.readSettings=Ay;Oo.formattingSettings=jy;function Lt(e){return typeof e=="object"&&e!==null?e:{}}function Tm(e){return typeof e=="number"?e:void 0}function ha(e){return typeof e=="boolean"?e:void 0}function yn(e){return typeof e=="string"?e:void 0}function Ay(e){let t=Lt(e),n=t.VBI===void 0?t:Lt(t.VBI),r=Lt(n.formatter),o=Lt(r.EmptyLine),i=Lt(r.BC),s=Lt(r.Region),a=Lt(r.Misc);return{allowedNumberOfEmptyLines:Tm(o.allowedNumberOfEmptyLines),removeEmptyLines:ha(o.RemoveEmptyLines),removeEmptyLinesInComments:ha(o.EmptyLinesAlsoInComment),blockCodeBegin:yn(i.BlockCodeBegin),blockCodeEnd:yn(i.BlockCodeEnd),blockCodeExclude:yn(i.BlockCodeExclude),regionBlockCodeBegin:yn(s.BlockCodeBegin),regionBlockCodeEnd:yn(s.BlockCodeEnd),regionBlockCodeExclude:yn(s.BlockCodeExclude),insertSpaces:ha(a.ReplaceTabToSpaces),indentSize:Tm(a.IndentSize)}}function jy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var vm=I(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.WorkspaceFunctionIndex=void 0;var bm=ma(),ga=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,bm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,bm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};Ro.WorkspaceFunctionIndex=ga});var Fy=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ly=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hy=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(pa=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,zy.fileURLToPath)(n)),Dm(pa),(0,Dt.serverCapabilities)()));Te.onInitialized(async()=>{let e=await Te.workspace.getConfiguration({section:"VBI"});Ta=(0,ya.readSettings)({VBI:e}),ko()});Te.onDidChangeConfiguration(e=>{Ta=(0,ya.readSettings)(e.settings),ko()});Te.onDidChangeWatchedFiles(()=>{Dm(pa)});Ue.onDidOpen(e=>{er.updateDocument(e.document),_a(e.document)});Ue.onDidChangeContent(e=>{er.updateDocument(e.document),_a(e.document)});Ue.onDidClose(e=>{er.removeDocument(e.document.uri),Te.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),ko()});Te.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.formattingEdits)(t,(0,ya.formattingSettings)(Ta,e.options))});Te.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.symbolsFor)(t)});Te.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Dt.definitionFor)(t,e.position)});Te.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.referencesFor)(t,e.position,e.context.includeDeclaration)});Te.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Dt.completionsFor)(t)});Te.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Dt.hoverFor)(t,e.position)});Te.onShutdown(()=>{});Ue.listen(Te);Te.listen(); +${n.detail}`},range:n.range}}});var Im=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.readSettings=Ky;Co.formattingSettings=Yy;function Gt(e){return typeof e=="object"&&e!==null?e:{}}function Sm(e){return typeof e=="number"?e:void 0}function da(e){return typeof e=="boolean"?e:void 0}function gn(e){return typeof e=="string"?e:void 0}function Ky(e){let t=Gt(e),n=t.VBI===void 0?t:Gt(t.VBI),r=Gt(n.formatter),o=Gt(r.EmptyLine),i=Gt(r.BC),s=Gt(r.Region),a=Gt(r.Misc);return{allowedNumberOfEmptyLines:Sm(o.allowedNumberOfEmptyLines),removeEmptyLines:da(o.RemoveEmptyLines),removeEmptyLinesInComments:da(o.EmptyLinesAlsoInComment),blockCodeBegin:gn(i.BlockCodeBegin),blockCodeEnd:gn(i.BlockCodeEnd),blockCodeExclude:gn(i.BlockCodeExclude),regionBlockCodeBegin:gn(s.BlockCodeBegin),regionBlockCodeEnd:gn(s.BlockCodeEnd),regionBlockCodeExclude:gn(s.BlockCodeExclude),insertSpaces:da(a.ReplaceTabToSpaces),indentSize:Sm(a.IndentSize)}}function Yy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var wm=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.WorkspaceFunctionIndex=void 0;var Dm=la(),fa=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,Dm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,Dm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};So.WorkspaceFunctionIndex=fa});var Jy=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zy=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ma=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,oT.fileURLToPath)(n)),km(ma),(0,St.serverCapabilities)()));_e.onInitialized(async()=>{let e=await _e.workspace.getConfiguration({section:"VBI"});ga=(0,ha.readSettings)({VBI:e}),Io()});_e.onDidChangeConfiguration(e=>{ga=(0,ha.readSettings)(e.settings),Io()});_e.onDidChangeWatchedFiles(()=>{km(ma)});Ue.onDidOpen(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidChangeContent(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidClose(e=>{Vn.removeDocument(e.document.uri),_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Io()});_e.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.formattingEdits)(t,(0,ha.formattingSettings)(ga,e.options))});_e.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.symbolsFor)(t)});_e.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,St.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.completionsFor)(t)});_e.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,St.hoverFor)(t,e.position)});_e.onShutdown(()=>{});Ue.listen(_e);_e.listen(); //# sourceMappingURL=server.js.map diff --git a/package-lock.json b/package-lock.json index 9f5e93e..3c053c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.2", + "version": "1.5.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.2", + "version": "1.5.3", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index 5325763..7b4f7f8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.2", + "version": "1.5.3", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { From f4f59015e1be180ac603207e292cbe940d64724d Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:15:40 +0200 Subject: [PATCH 21/40] feat(core): support CALL expressions --- dist/server.js | 34 +++++++-------- packages/core/src/parser.ts | 79 +++++++++++++++++++++++++++++----- packages/core/src/semantics.ts | 11 +++-- 3 files changed, 91 insertions(+), 33 deletions(-) diff --git a/dist/server.js b/dist/server.js index 00dfe2c..f00cf7f 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,28 +1,28 @@ -"use strict";var Ro=Object.defineProperty;var Vm=Object.getOwnPropertyDescriptor;var Xm=Object.getOwnPropertyNames;var Km=Object.prototype.hasOwnProperty;var ka=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},xa=(e,t)=>{for(var n in t)Ro(e,n,{get:t[n],enumerable:!0})},Ym=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xm(t))!Km.call(e,o)&&o!==n&&Ro(e,o,{get:()=>t[o],enumerable:!(r=Vm(t,o))||r.enumerable});return e};var Xn=e=>Ym(Ro({},"__esModule",{value:!0}),e);var Kn=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Jm;Ge.string=Ma;Ge.number=Zm;Ge.error=eh;Ge.func=Ea;Ge.array=qa;Ge.stringArray=th;Ge.typedArray=nh;Ge.thenable=rh;function Jm(e){return e===!0||e===!1}function Ma(e){return typeof e=="string"||e instanceof String}function Zm(e){return typeof e=="number"||e instanceof Number}function eh(e){return e instanceof Error}function Ea(e){return typeof e=="function"}function qa(e){return Array.isArray(e)}function th(e){return qa(e)&&e.every(t=>Ma(t))}function nh(e,t){return Array.isArray(e)&&e.every(t)}function rh(e){return e&&Ea(e.then)}});var Lt=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.boolean=oh;Ye.string=Na;Ye.number=ih;Ye.error=sh;Ye.func=ch;Ye.array=Aa;Ye.stringArray=ah;function oh(e){return e===!0||e===!1}function Na(e){return typeof e=="string"||e instanceof String}function ih(e){return typeof e=="number"||e instanceof Number}function sh(e){return e instanceof Error}function ch(e){return typeof e=="function"}function Aa(e){return Array.isArray(e)}function ah(e){return Aa(e)&&e.every(t=>Na(t))}});var ei=S(w=>{"use strict";var uh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.LRUCache=lt.LinkedMap=lt.Touch=void 0;var ue;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ue||(lt.Touch=ue={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ue.None){let r=this._map.get(t);if(r)return n!==ue.None&&this.touch(r,n),r.value}set(t,n,r=ue.None){let o=this._map.get(t);if(o)o.value=n,r!==ue.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ue.None:this.addItemLast(o);break;case ue.First:this.addItemFirst(o);break;case ue.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ue.First&&n!==ue.Last)){if(n===ue.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ue.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};lt.LinkedMap=Yn;var ti=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ue.AsNew){return super.get(t,n)}peek(t){return super.get(t,ue.None)}set(t,n){return super.set(t,n,ue.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};lt.LRUCache=ti});var Fa=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var ja;(function(e){function t(n){return{dispose:n}}e.create=t})(ja||(Jn.Disposable=ja={}))});var dt=S(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});var ri;function oi(){if(ri===void 0)throw new Error("No runtime abstraction layer installed");return ri}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ri=n}e.install=t})(oi||(oi={}));ii.default=oi});var Ht=S(ft=>{"use strict";var fh=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ft,"__esModule",{value:!0});ft.Emitter=ft.Event=void 0;var mh=fh(dt()),La;(function(e){let t={dispose(){}};e.None=function(){return t}})(La||(ft.Event=La={}));var si=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new si),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ft.Emitter=ci});var tr=S(Se=>{"use strict";var hh=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gh=Se&&Se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ph=Se&&Se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SharedArrayReceiverStrategy=Wt.SharedArraySenderStrategy=void 0;var vh=tr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var li=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Wt.SharedArraySenderStrategy=li;var di=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fi=class{token;constructor(t){this.token=new di(t)}cancel(){}dispose(){}},mi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new vh.CancellationTokenSource:new fi(n)}};Wt.SharedArrayReceiverStrategy=mi});var gi=S(Ut=>{"use strict";var Ch=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Semaphore=void 0;var Sh=Ch(dt()),hi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Sh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Ut.Semaphore=hi});var Ua=S(le=>{"use strict";var Ih=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Dh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +"use strict";var Ro=Object.defineProperty;var Vm=Object.getOwnPropertyDescriptor;var Xm=Object.getOwnPropertyNames;var Km=Object.prototype.hasOwnProperty;var ka=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},xa=(e,t)=>{for(var n in t)Ro(e,n,{get:t[n],enumerable:!0})},Ym=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xm(t))!Km.call(e,o)&&o!==n&&Ro(e,o,{get:()=>t[o],enumerable:!(r=Vm(t,o))||r.enumerable});return e};var Xn=e=>Ym(Ro({},"__esModule",{value:!0}),e);var Kn=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Jm;Ge.string=Ma;Ge.number=Zm;Ge.error=eh;Ge.func=Ea;Ge.array=qa;Ge.stringArray=th;Ge.typedArray=nh;Ge.thenable=rh;function Jm(e){return e===!0||e===!1}function Ma(e){return typeof e=="string"||e instanceof String}function Zm(e){return typeof e=="number"||e instanceof Number}function eh(e){return e instanceof Error}function Ea(e){return typeof e=="function"}function qa(e){return Array.isArray(e)}function th(e){return qa(e)&&e.every(t=>Ma(t))}function nh(e,t){return Array.isArray(e)&&e.every(t)}function rh(e){return e&&Ea(e.then)}});var Lt=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.boolean=oh;Ye.string=Na;Ye.number=ih;Ye.error=sh;Ye.func=ch;Ye.array=Aa;Ye.stringArray=ah;function oh(e){return e===!0||e===!1}function Na(e){return typeof e=="string"||e instanceof String}function ih(e){return typeof e=="number"||e instanceof Number}function sh(e){return e instanceof Error}function ch(e){return typeof e=="function"}function Aa(e){return Array.isArray(e)}function ah(e){return Aa(e)&&e.every(t=>Na(t))}});var ei=S(w=>{"use strict";var uh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.LRUCache=lt.LinkedMap=lt.Touch=void 0;var ue;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ue||(lt.Touch=ue={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ue.None){let r=this._map.get(t);if(r)return n!==ue.None&&this.touch(r,n),r.value}set(t,n,r=ue.None){let o=this._map.get(t);if(o)o.value=n,r!==ue.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ue.None:this.addItemLast(o);break;case ue.First:this.addItemFirst(o);break;case ue.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ue.First&&n!==ue.Last)){if(n===ue.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ue.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};lt.LinkedMap=Yn;var ti=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ue.AsNew){return super.get(t,n)}peek(t){return super.get(t,ue.None)}set(t,n){return super.set(t,n,ue.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};lt.LRUCache=ti});var Fa=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var ja;(function(e){function t(n){return{dispose:n}}e.create=t})(ja||(Jn.Disposable=ja={}))});var dt=S(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});var ri;function oi(){if(ri===void 0)throw new Error("No runtime abstraction layer installed");return ri}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ri=n}e.install=t})(oi||(oi={}));ii.default=oi});var Ht=S(ft=>{"use strict";var fh=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ft,"__esModule",{value:!0});ft.Emitter=ft.Event=void 0;var mh=fh(dt()),La;(function(e){let t={dispose(){}};e.None=function(){return t}})(La||(ft.Event=La={}));var si=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new si),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ft.Emitter=ci});var tr=S(Se=>{"use strict";var hh=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gh=Se&&Se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ph=Se&&Se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SharedArrayReceiverStrategy=Wt.SharedArraySenderStrategy=void 0;var vh=tr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var li=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Wt.SharedArraySenderStrategy=li;var di=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fi=class{token;constructor(t){this.token=new di(t)}cancel(){}dispose(){}},mi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new vh.CancellationTokenSource:new fi(n)}};Wt.SharedArrayReceiverStrategy=mi});var gi=S(Ut=>{"use strict";var Ch=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Semaphore=void 0;var Sh=Ch(dt()),hi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Sh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Ut.Semaphore=hi});var Ua=S(le=>{"use strict";var Ih=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Dh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. ${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,yi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};le.ReadableStreamMessageReader=_i});var Va=S(de=>{"use strict";var Rh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),kh=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xh=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(qh,r.byteLength.toString(),za),o.push(za),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};de.WriteableStreamMessageWriter=vi});var Xa=S(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AbstractMessageBuffer=void 0;var Nh=13,Ah=10,Gh=`\r `,Ci=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};or.AbstractMessageBuffer=Ci});var Za=S(R=>{"use strict";var jh=R&&R.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fh=R&&R.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lh=R&&R.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},log:()=>{}});var j;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(j||(R.Trace=j={}));var Pi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Pi||(R.TraceValue=Pi={}));R.TraceValues=Pi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(j||(R.Trace=j={}));var we;(function(e){e.Text="text",e.JSON="json"})(we||(R.TraceFormat=we={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(we||(R.TraceFormat=we={}));var Oi;(function(e){e.type=new x.NotificationType("$/setTrace")})(Oi||(R.SetTraceNotification=Oi={}));var ir;(function(e){e.type=new x.NotificationType("$/logTrace")})(ir||(R.LogTraceNotification=ir={}));var Sn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Sn||(R.ConnectionErrors=Sn={}));var $t=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};R.ConnectionError=$t;var Ri;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ri||(R.ConnectionStrategy=Ri={}));var sr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(sr||(R.IdCancellationReceiverStrategy=sr={}));var ki;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(ki||(R.RequestCancellationReceiverStrategy=ki={}));var cr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Si.CancellationTokenSource}});function t(n){return sr.is(n)||ki.is(n)}e.is=t})(cr||(R.CancellationReceiverStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(ar||(R.CancellationSenderStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({receiver:cr.Message,sender:ar.Message});function t(n){let r=n;return r&&cr.is(r.receiver)&&ar.is(r.sender)}e.is=t})(ur||(R.CancellationStrategy=ur={}));var lr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(lr||(R.MessageStrategy=lr={}));var Ja;(function(e){function t(n){let r=n;return r&&(ur.is(r.cancellationStrategy)||Ri.is(r.connectionStrategy)||lr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Ja||(R.ConnectionOptions=Ja={}));var je;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(je||(je={}));function Wh(e,t,n,r){let o=n!==void 0?n:R.NullLogger,i=0,s=0,a=0,y="2.0",m=r?.maxParallelism??-1,f=0,_,g=new Map,v,O=new Map,q=new Map,L,k=new Ya.LinkedMap,h=new Map,l=new Set,I=new Map,E=j.Off,A=we.Text,B,V=je.New,st=new vn.Emitter,ya=new vn.Emitter,Ta=new vn.Emitter,_a=new vn.Emitter,ba=new vn.Emitter,ct=r&&r.cancellationStrategy?r.cancellationStrategy:ur.Message;function xm(u){}function va(){return V===je.Listening}function Ca(){return V===je.Closed}function jt(){return V===je.Disposed}function Sa(){(V===je.New||V===je.Listening)&&(V=je.Closed,ya.fire(void 0))}function Mm(u){st.fire([u,void 0,void 0])}function Em(u){st.fire(u)}e.onClose(Sa),e.onError(Mm),t.onClose(Sa),t.onError(Em);function Ia(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function qm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Nm(){return"not-"+(++s).toString()}function Am(u,b){x.Message.isRequest(b)?u.set(Ia(b.id),b):x.Message.isResponse(b)?m===-1?u.set(qm(b.id),b):wa(b):u.set(Nm(),b)}function Do(){L||k.size===0||m!==-1&&f>=m||(L=(0,Ka.default)().timer.setImmediate(async()=>{if(L=void 0,k.size===0||m!==-1&&f>=m)return;let u=k.shift(),b;try{f++;let C=r?.messageStrategy;lr.is(C)?b=C.handleMessage(u,Da):b=Da(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{b instanceof Promise?b.then(()=>{f--,Do()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):f--,Do()}}))}async function Da(u){return x.Message.isRequest(u)?jm(u):x.Message.isNotification(u)?Fm(u):x.Message.isResponse(u)?wa(u):Lm(u)}let Gm=u=>{try{if(x.Message.isNotification(u)&&u.method===In.type.method){let b=u.params.id,C=Ia(b),P=k.get(C);if(x.Message.isRequest(P)){let X=r?.connectionStrategy,H=X&&X.cancelUndispatched?X.cancelUndispatched(P,xm):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){k.delete(C),I.delete(b),H.id=P.id,wo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let G=I.get(b);if(G!==void 0){G.cancel(),Po(u);return}else l.add(b)}Am(k,u)}finally{Do()}};async function jm(u){if(jt())return Promise.resolve();function b(re,ae,J){let Z={jsonrpc:y,id:u.id};return re instanceof x.ResponseError?Z.error=re.toJson():Z.result=re===void 0?null:re,wo(Z,ae,J),t.write(Z)}function C(re,ae,J){let Z={jsonrpc:y,id:u.id,error:re.toJson()};return wo(Z,ae,J),t.write(Z)}Um(u);let P=g.get(u.method),G,X;P&&(G=P.type,X=P.handler);let H=Date.now();if(X||_){let re=u.id??String(Date.now()),ae=sr.is(ct.receiver)?ct.receiver.createCancellationTokenSource(re):ct.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&ae.cancel(),u.id!==null&&I.set(re,ae);try{let J;if(X)if(u.params===void 0){if(G!==void 0&&G.numberOfParams!==0)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${G.numberOfParams} params but received none.`),u.method,H);J=X(ae.token)}else if(Array.isArray(u.params)){if(G!==void 0&&G.parameterStructures===x.ParameterStructures.byName)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=X(...u.params,ae.token)}else{if(G!==void 0&&G.parameterStructures===x.ParameterStructures.byPosition)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=X(u.params,ae.token)}else _&&(J=_(u.method,u.params,ae.token));let Z=await J;await b(Z,u.method,H)}catch(J){J instanceof x.ResponseError?await b(J,u.method,H):J&&K.string(J.message)?await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{I.delete(re)}}else await C(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function wa(u){if(!jt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let b=u.id,C=h.get(b);if(Bm(u,C),C!==void 0){h.delete(b);try{if(u.error){let P=u.error;C.reject(new x.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function Fm(u){if(jt())return;let b,C;if(u.method===In.type.method){let P=u.params.id;l.delete(P),Po(u);return}else{let P=O.get(u.method);P&&(C=P.handler,b=P.type)}if(C||v)try{if(Po(u),C)if(u.params===void 0)b!==void 0&&b.numberOfParams!==0&&b.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Cn.type.method&&P.length===2&&Ii.is(P[0])?await C({token:P[0],value:P[1]}):(b!==void 0&&(b.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),b.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else b!==void 0&&b.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else v&&await v(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Ta.fire(u)}function Lm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let b=u;if(K.string(b.id)||K.number(b.id)){let C=b.id,P=h.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function at(u){if(u!=null)switch(E){case j.Verbose:return JSON.stringify(u,null,4);case j.Compact:return JSON.stringify(u);default:return}}function Hm(u){if(!(E===j.Off||!B))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,b)}else Ft("send-request",u)}function Wm(u){if(!(E===j.Off||!B))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Sending notification '${u.method}'.`,b)}else Ft("send-notification",u)}function wo(u,b,C){if(!(E===j.Off||!B))if(A===we.Text){let P;(E===j.Verbose||E===j.Compact)&&(u.error&&u.error.data?P=`Error data: ${at(u.error.data)}`:u.result?P=`Result: ${at(u.result)}`:u.error===void 0&&(P="No result returned.")),B.log(`Sending response '${b} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Ft("send-response",u)}function Um(u){if(!(E===j.Off||!B))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,b)}else Ft("receive-request",u)}function Po(u){if(!(E===j.Off||!B||u.method===ir.type.method))if(A===we.Text){let b;(E===j.Verbose||E===j.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Received notification '${u.method}'.`,b)}else Ft("receive-notification",u)}function Bm(u,b){if(!(E===j.Off||!B))if(A===we.Text){let C;if((E===j.Verbose||E===j.Compact)&&(u.error&&u.error.data?C=`Error data: ${at(u.error.data)}`:u.result?C=`Result: ${at(u.result)}`:u.error===void 0&&(C="No result returned.")),b){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${b.method} - (${u.id})' in ${Date.now()-b.timerStart}ms.${P}`,C)}else B.log(`Received response ${u.id} without active response promise.`,C)}else Ft("receive-response",u)}function Ft(u,b){if(!B||E===j.Off)return;let C={isLSPMessage:!0,type:u,message:b,timestamp:Date.now()};B.log(C)}function pn(){if(Ca())throw new $t(Sn.Closed,"Connection is closed.");if(jt())throw new $t(Sn.Disposed,"Connection is disposed.")}function $m(){if(va())throw new $t(Sn.AlreadyListening,"Connection is already listening")}function zm(){if(!va())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function Pa(u){if(u!==null)return u}function Oa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Oo(u,b){switch(u){case x.ParameterStructures.auto:return Oa(b)?Pa(b):[yn(b)];case x.ParameterStructures.byName:if(!Oa(b))throw new Error("Received parameters by name but param is not an object literal.");return Pa(b);case x.ParameterStructures.byPosition:return[yn(b)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ra(u,b){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Oo(u.parameterStructures,b[0]);break;default:C=[];for(let G=0;G{pn();let C,P;if(K.string(u)){C=u;let X=b[0],H=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(X)&&(H=1,re=X);let ae=b.length,J=ae-H;switch(J){case 0:P=void 0;break;case 1:P=Oo(re,b[H]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=b.slice(H,ae).map(Z=>yn(Z));break}}else{let X=b;C=u.method,P=Ra(u,X)}let G={jsonrpc:y,method:C,params:P};return Wm(G),t.write(G).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,b)=>{pn();let C;return K.func(u)?v=u:b&&(K.string(u)?(C=u,O.set(u,{type:void 0,handler:b})):(C=u.method,O.set(u.method,{type:u,handler:b}))),{dispose:()=>{C!==void 0?O.get(C)?.handler===b&&O.delete(C):v===u&&(v=void 0)}}},onProgress:(u,b,C)=>{if(q.has(b))throw new Error(`Progress handler for token ${b} already registered`);return q.set(b,C),{dispose:()=>{q.get(b)===C&&q.delete(b)}}},sendProgress:(u,b,C)=>It.sendNotification(Cn.type,{token:b,value:C}),onUnhandledProgress:_a.event,sendRequest:(u,...b)=>{pn(),zm();function C(Z,Ae){let Ke=ct.sender.sendCancellation(Z,Ae);Ke===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ae}`):Ke.catch(()=>{o.log(`Sending cancellation messages for id ${Ae} failed.`)})}let P,G,X;if(K.string(u)){P=u;let Z=b[0],Ae=b[b.length-1],Ke=0,Tn=x.ParameterStructures.auto;x.ParameterStructures.is(Z)&&(Ke=1,Tn=Z);let Dt=b.length;Si.CancellationToken.is(Ae)&&(Dt=Dt-1,X=Ae);let Be=Dt-Ke;switch(Be){case 0:G=void 0;break;case 1:G=Oo(Tn,b[Ke]);break;default:if(Tn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);G=b.slice(Ke,Dt).map(Qm=>yn(Qm));break}}else{let Z=b;P=u.method,G=Ra(u,Z);let Ae=u.numberOfParams;X=Si.CancellationToken.is(Z[Ae])?Z[Ae]:void 0}let H=i++,re,ae=!1;X!==void 0&&(X.isCancellationRequested?ae=!0:re=X.onCancellationRequested(()=>{C(It,H)}));let J={jsonrpc:y,id:H,method:P,params:G};return Hm(J),typeof ct.sender.enableCancellation=="function"&&ct.sender.enableCancellation(J),new Promise(async(Z,Ae)=>{let Ke=Be=>{Z(Be),ct.sender.cleanup(H),re?.dispose()},Tn=Be=>{Ae(Be),ct.sender.cleanup(H),re?.dispose()},Dt={method:P,timerStart:Date.now(),resolve:Ke,reject:Tn};try{h.set(H,Dt),await t.write(J),ae&&C(It,H)}catch(Be){throw h.delete(H),Dt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,b)=>{pn();let C=null;return wi.is(u)?(C=void 0,_=u):K.string(u)?(C=null,b!==void 0&&(C=u,g.set(u,{handler:b,type:void 0}))):b!==void 0&&(C=u.method,g.set(u.method,{type:u,handler:b})),{dispose:()=>{C!==null&&(C!==void 0?g.get(C)?.handler===b&&g.delete(C):_===u&&(_=void 0))}}},hasPendingResponse:()=>h.size>0,trace:async(u,b,C)=>{let P=!1,G=we.Text;C!==void 0&&(K.boolean(C)?P=C:(P=C.sendNotification||!1,G=C.traceFormat||we.Text)),E=u,A=G,E===j.Off?B=void 0:B=b,P&&!Ca()&&!jt()&&await It.sendNotification(Oi.type,{value:j.toString(u)})},onError:st.event,onClose:ya.event,onUnhandledNotification:Ta.event,onDispose:ba.event,end:()=>{t.end()},dispose:()=>{if(jt())return;V=je.Disposed,ba.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let b of h.values())b.reject(u);h=new Map,I=new Map,l=new Set,k=new Ya.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{pn(),$m(),V=je.Listening,e.listen(Gm)},inspect:()=>{(0,Ka.default)().console.log("inspect")}};return It.onNotification(ir.type,u=>{if(E===j.Off||!B)return;let b=E===j.Verbose||E===j.Compact;B.log(u.message,b?u.verbose:void 0)}),It.onNotification(Cn.type,async u=>{let b=q.get(u.token);b?await b(u.value):_a.fire(u)}),It}});var Je=S(p=>{"use strict";var Uh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var $=ei();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var xi=ni();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return xi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return xi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return xi.Touch}});var Bh=Fa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Bh.Disposable}});var eu=Ht();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return eu.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return eu.Emitter}});var tu=tr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return tu.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return tu.CancellationToken}});var nu=Ha();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return nu.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return nu.SharedArrayReceiverStrategy}});var Mi=Ua();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Mi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Mi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Mi.ReadableStreamMessageReader}});var Ei=Va();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ei.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ei.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ei.WriteableStreamMessageWriter}});var $h=Xa();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return $h.AbstractMessageBuffer}});var te=Za();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return te.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return te.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return te.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return te.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return te.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return te.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return te.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return te.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return te.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return te.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return te.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return te.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return te.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return te.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return te.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return te.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return te.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return te.TraceValues}});var zh=Uh(dt());p.RAL=zh.default});var vr={};xa(vr,{AnnotatedTextEdit:()=>Ze,ApplyKind:()=>ts,ChangeAnnotation:()=>mt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>ys,CodeActionContext:()=>ps,CodeActionKind:()=>gs,CodeActionTag:()=>yr,CodeActionTriggerKind:()=>xn,CodeDescription:()=>Ui,CodeLens:()=>Ts,Color:()=>fr,ColorInformation:()=>Gi,ColorPresentation:()=>ji,Command:()=>Pt,CompletionItem:()=>rs,CompletionItemKind:()=>Ki,CompletionItemLabelDetails:()=>ns,CompletionItemTag:()=>Ji,CompletionList:()=>os,CreateFile:()=>Qt,DeleteFile:()=>Xt,Diagnostic:()=>Pn,DiagnosticRelatedInformation:()=>mr,DiagnosticSeverity:()=>Hi,DiagnosticTag:()=>Wi,DocumentHighlight:()=>us,DocumentHighlightKind:()=>as,DocumentLink:()=>bs,DocumentSymbol:()=>hs,DocumentUri:()=>qi,EOL:()=>Qh,FoldingRange:()=>Li,FoldingRangeKind:()=>Fi,FormattingOptions:()=>_s,Hover:()=>is,InlayHint:()=>Rs,InlayHintKind:()=>Tr,InlayHintLabelPart:()=>_r,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>ks,InlineCompletionList:()=>xs,InlineCompletionTriggerKind:()=>Ms,InlineValueContext:()=>Os,InlineValueEvaluatableExpression:()=>Ps,InlineValueText:()=>Ds,InlineValueVariableLookup:()=>ws,InsertReplaceEdit:()=>Zi,InsertTextFormat:()=>Yi,InsertTextMode:()=>es,LanguageKind:()=>Vi,Location:()=>wn,LocationLink:()=>Ai,MarkedString:()=>kn,MarkupContent:()=>ht,MarkupKind:()=>pr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>ss,Position:()=>ke,Range:()=>Y,RenameFile:()=>Vt,SelectedCompletionInfo:()=>Es,SelectionRange:()=>vs,SemanticTokenModifiers:()=>Ss,SemanticTokenTypes:()=>Cs,SemanticTokens:()=>Is,SignatureInformation:()=>cs,SnippetTextEdit:()=>Bi,StringValue:()=>br,SymbolInformation:()=>fs,SymbolKind:()=>ls,SymbolTag:()=>ds,TextDocument:()=>As,TextDocumentEdit:()=>On,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Xi,TextEdit:()=>$e,URI:()=>dr,VersionedTextDocumentIdentifier:()=>Qi,WorkspaceChange:()=>$i,WorkspaceEdit:()=>hr,WorkspaceFolder:()=>Ns,WorkspaceSymbol:()=>ms,integer:()=>Ni,uinteger:()=>Dn});var qi,dr,Ni,Dn,ke,Y,wn,Ai,fr,Gi,ji,Fi,Li,mr,Hi,Wi,Ui,Pn,Pt,$e,mt,oe,Ze,On,Qt,Vt,Xt,hr,zt,Bi,gr,$i,zi,Qi,Rn,Vi,Xi,pr,ht,Ki,Yi,Ji,Zi,es,ts,ns,rs,os,kn,is,ss,cs,as,us,ls,ds,fs,ms,hs,gs,xn,ps,yr,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,ws,Ps,Os,Tr,_r,Rs,br,ks,xs,Ms,Es,qs,Ns,Qh,As,Gs,d,Cr=ka(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(dr||(dr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ni||(Ni={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.line)&&d.uinteger(o.character)}e.is=n})(ke||(ke={}));(function(e){function t(r,o,i,s){if(d.uinteger(r)&&d.uinteger(o)&&d.uinteger(i)&&d.uinteger(s))return{start:ke.create(r,o),end:ke.create(i,s)};if(ke.is(r)&&ke.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.start)&&ke.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(d.string(o.uri)||d.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.targetRange)&&d.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||d.undefined(o.originSelectionRange))}e.is=n})(Ai||(Ai={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.numberRange(o.red,0,1)&&d.numberRange(o.green,0,1)&&d.numberRange(o.blue,0,1)&&d.numberRange(o.alpha,0,1)}e.is=n})(fr||(fr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&fr.is(o.color)}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.undefined(o.textEdit)||$e.is(o))&&(d.undefined(o.additionalTextEdits)||d.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(ji||(ji={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Fi||(Fi={}));(function(e){function t(r,o,i,s,a,y){let m={startLine:r,endLine:o};return d.defined(i)&&(m.startCharacter=i),d.defined(s)&&(m.endCharacter=s),d.defined(a)&&(m.kind=a),d.defined(y)&&(m.collapsedText=y),m}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.startLine)&&d.uinteger(o.startLine)&&(d.undefined(o.startCharacter)||d.uinteger(o.startCharacter))&&(d.undefined(o.endCharacter)||d.uinteger(o.endCharacter))&&(d.undefined(o.kind)||d.string(o.kind))}e.is=n})(Li||(Li={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&wn.is(o.location)&&d.string(o.message)}e.is=n})(mr||(mr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Hi||(Hi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Wi||(Wi={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&d.string(r.href)}e.is=t})(Ui||(Ui={}));(function(e){function t(i,s,a,y,m,f){let _={range:i,message:s};return d.defined(a)&&(_.severity=a),d.defined(y)&&(_.code=y),d.defined(m)&&(_.source=m),d.defined(f)&&(_.relatedInformation=f),_}e.create=t;function n(i){var s;let a=i;return d.defined(a)&&Y.is(a.range)&&(d.string(a.message)||ht.is(a.message))&&(d.number(a.severity)||d.undefined(a.severity))&&(d.integer(a.code)||d.string(a.code)||d.undefined(a.code))&&(d.undefined(a.codeDescription)||d.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(d.string(a.source)||d.undefined(a.source))&&(d.undefined(a.relatedInformation)||d.typedArray(a.relatedInformation,mr.is))}e.is=n;function r(i){return d.string(i.message)}e.is3_17=r;function o(i){if(d.string(i.message))return i.message;if(ht.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Pn||(Pn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return d.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.title)&&(o.tooltip===void 0||d.string(o.tooltip))&&d.string(o.command)}e.is=n})(Pt||(Pt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return d.objectLiteral(s)&&d.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(d.string(o.description)||o.description===void 0)}e.is=n})(mt||(mt={}));(function(e){function t(n){let r=n;return d.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(mt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(Ze||(Ze={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(On||(On={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&d.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Qt||(Qt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&d.string(o.oldUri)&&d.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Vt||(Vt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&d.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||d.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||d.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>d.string(o.kind)?Qt.is(o)||Vt.is(o)||Xt.is(o):On.is(o)))}e.is=t})(hr||(hr={}));zt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):oe.is(r)?(i=r,o=Ze.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):oe.is(r)?(i=r,o=Ze.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):oe.is(n)?(o=n,r=Ze.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Ze.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return d.objectLiteral(r)&&Y.is(r.range)&&br.isSnippet(r.snippet)&&(r.annotationId===void 0||mt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Bi||(Bi={}));gr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},$i=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new gr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(On.is(n)){let r=new zt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new zt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new zt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new zt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new gr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Qt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Qt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Vt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Vt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.integer(o.version)}e.is=n})(Qi||(Qi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&(o.version===null||d.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Vi||(Vi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.string(o.languageId)&&d.integer(o.version)&&d.string(o.text)}e.is=n})(Xi||(Xi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(pr||(pr={}));(function(e){function t(n){let r=n;return d.objectLiteral(n)&&pr.is(r.kind)&&d.string(r.value)}e.is=t})(ht||(ht={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Ki||(Ki={}));(function(e){e.PlainText=1,e.Snippet=2})(Yi||(Yi={}));(function(e){e.Deprecated=1})(Ji||(Ji={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&d.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(Zi||(Zi={}));(function(e){e.asIs=1,e.adjustIndentation=2})(es||(es={}));(function(e){e.Replace=1,e.Merge=2})(ts||(ts={}));(function(e){function t(n){let r=n;return r&&(d.string(r.detail)||r.detail===void 0)&&(d.string(r.description)||r.description===void 0)}e.is=t})(ns||(ns={}));(function(e){function t(n){return{label:n}}e.create=t})(rs||(rs={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(os||(os={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return d.string(o)||d.objectLiteral(o)&&d.string(o.language)&&d.string(o.value)}e.is=n})(kn||(kn={}));(function(e){function t(n){let r=n;return!!r&&d.objectLiteral(r)&&(ht.is(r.contents)||kn.is(r.contents)||d.typedArray(r.contents,kn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(is||(is={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ss||(ss={}));(function(e){function t(n,r,...o){let i={label:n};return d.defined(r)&&(i.documentation=r),d.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(cs||(cs={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(as||(as={}));(function(e){function t(n,r){let o={range:n};return d.number(r)&&(o.kind=r),o}e.create=t})(us||(us={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ls||(ls={}));(function(e){e.Deprecated=1})(ds||(ds={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(fs||(fs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(ms||(ms={}));(function(e){function t(r,o,i,s,a,y){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return y!==void 0&&(m.children=y),m}e.create=t;function n(r){let o=r;return o&&d.string(o.name)&&d.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||d.string(o.detail))&&(o.deprecated===void 0||d.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(hs||(hs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(gs||(gs={}));(function(e){e.Invoked=1,e.Automatic=2})(xn||(xn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.typedArray(o.diagnostics,Pn.is)&&(o.only===void 0||d.typedArray(o.only,d.string))&&(o.triggerKind===void 0||o.triggerKind===xn.Invoked||o.triggerKind===xn.Automatic)}e.is=n})(ps||(ps={}));(function(e){e.LLMGenerated=1;function t(n){return d.defined(n)&&n===e.LLMGenerated}e.is=t})(yr||(yr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Pt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&d.string(o.title)&&(o.diagnostics===void 0||d.typedArray(o.diagnostics,Pn.is))&&(o.kind===void 0||d.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Pt.is(o.command))&&(o.isPreferred===void 0||d.boolean(o.isPreferred))&&(o.edit===void 0||hr.is(o.edit))&&(o.tags===void 0||d.typedArray(o.tags,yr.is))}e.is=n})(ys||(ys={}));(function(e){function t(r,o){let i={range:r};return d.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.command)||Pt.is(o.command))}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.uinteger(o.tabSize)&&d.boolean(o.insertSpaces)}e.is=n})(_s||(_s={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.target)||d.string(o.target))}e.is=n})(bs||(bs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(vs||(vs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Cs||(Cs={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ss||(Ss={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Is||(Is={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.string(o.text)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.boolean(o.caseSensitiveLookup)&&(d.string(o.variableName)||o.variableName===void 0)}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(d.string(o.expression)||o.expression===void 0)}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Os||(Os={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Tr||(Tr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||Pt.is(o.command))}e.is=n})(_r||(_r={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.position)&&(d.string(o.label)||d.typedArray(o.label,_r.is))&&(o.kind===void 0||Tr.is(o.kind))&&o.textEdits===void 0||d.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.paddingLeft===void 0||d.boolean(o.paddingLeft))&&(o.paddingRight===void 0||d.boolean(o.paddingRight))}e.is=n})(Rs||(Rs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return d.objectLiteral(o)&&o.kind==="snippet"&&d.string(o.value)}e.isSnippet=n})(br||(br={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(ks||(ks={}));(function(e){function t(n){return{items:n}}e.create=t})(xs||(xs={}));(function(e){e.Invoked=1,e.Automatic=2})(Ms||(Ms={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Es||(Es={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&dr.is(r.uri)&&d.string(r.name)}e.is=t})(Ns||(Ns={}));Qh=[` +${f}`);let h=f.substr(0,_),v=f.substr(_+1).trim();a.set(t?h.toLowerCase():h,v)}return a}tryReadBody(t){if(!(this._totalLengththis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};or.AbstractMessageBuffer=Ci});var Za=S(R=>{"use strict";var jh=R&&R.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fh=R&&R.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lh=R&&R.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(R.Trace=F={}));var Pi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Pi||(R.TraceValue=Pi={}));R.TraceValues=Pi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(R.Trace=F={}));var we;(function(e){e.Text="text",e.JSON="json"})(we||(R.TraceFormat=we={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(we||(R.TraceFormat=we={}));var Oi;(function(e){e.type=new x.NotificationType("$/setTrace")})(Oi||(R.SetTraceNotification=Oi={}));var ir;(function(e){e.type=new x.NotificationType("$/logTrace")})(ir||(R.LogTraceNotification=ir={}));var Sn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Sn||(R.ConnectionErrors=Sn={}));var $t=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};R.ConnectionError=$t;var Ri;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ri||(R.ConnectionStrategy=Ri={}));var sr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(sr||(R.IdCancellationReceiverStrategy=sr={}));var ki;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(ki||(R.RequestCancellationReceiverStrategy=ki={}));var cr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Si.CancellationTokenSource}});function t(n){return sr.is(n)||ki.is(n)}e.is=t})(cr||(R.CancellationReceiverStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(ar||(R.CancellationSenderStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({receiver:cr.Message,sender:ar.Message});function t(n){let r=n;return r&&cr.is(r.receiver)&&ar.is(r.sender)}e.is=t})(ur||(R.CancellationStrategy=ur={}));var lr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(lr||(R.MessageStrategy=lr={}));var Ja;(function(e){function t(n){let r=n;return r&&(ur.is(r.cancellationStrategy)||Ri.is(r.connectionStrategy)||lr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Ja||(R.ConnectionOptions=Ja={}));var je;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(je||(je={}));function Wh(e,t,n,r){let o=n!==void 0?n:R.NullLogger,i=0,s=0,a=0,y="2.0",m=r?.maxParallelism??-1,f=0,_,h=new Map,v,O=new Map,q=new Map,G,k=new Ya.LinkedMap,g=new Map,l=new Set,I=new Map,E=F.Off,A=we.Text,B,V=je.New,st=new vn.Emitter,ya=new vn.Emitter,Ta=new vn.Emitter,_a=new vn.Emitter,ba=new vn.Emitter,ct=r&&r.cancellationStrategy?r.cancellationStrategy:ur.Message;function xm(u){}function va(){return V===je.Listening}function Ca(){return V===je.Closed}function jt(){return V===je.Disposed}function Sa(){(V===je.New||V===je.Listening)&&(V=je.Closed,ya.fire(void 0))}function Mm(u){st.fire([u,void 0,void 0])}function Em(u){st.fire(u)}e.onClose(Sa),e.onError(Mm),t.onClose(Sa),t.onError(Em);function Ia(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function qm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Nm(){return"not-"+(++s).toString()}function Am(u,b){x.Message.isRequest(b)?u.set(Ia(b.id),b):x.Message.isResponse(b)?m===-1?u.set(qm(b.id),b):wa(b):u.set(Nm(),b)}function Do(){G||k.size===0||m!==-1&&f>=m||(G=(0,Ka.default)().timer.setImmediate(async()=>{if(G=void 0,k.size===0||m!==-1&&f>=m)return;let u=k.shift(),b;try{f++;let C=r?.messageStrategy;lr.is(C)?b=C.handleMessage(u,Da):b=Da(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{b instanceof Promise?b.then(()=>{f--,Do()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):f--,Do()}}))}async function Da(u){return x.Message.isRequest(u)?jm(u):x.Message.isNotification(u)?Fm(u):x.Message.isResponse(u)?wa(u):Lm(u)}let Gm=u=>{try{if(x.Message.isNotification(u)&&u.method===In.type.method){let b=u.params.id,C=Ia(b),P=k.get(C);if(x.Message.isRequest(P)){let X=r?.connectionStrategy,H=X&&X.cancelUndispatched?X.cancelUndispatched(P,xm):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){k.delete(C),I.delete(b),H.id=P.id,wo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=I.get(b);if(j!==void 0){j.cancel(),Po(u);return}else l.add(b)}Am(k,u)}finally{Do()}};async function jm(u){if(jt())return Promise.resolve();function b(re,ae,J){let Z={jsonrpc:y,id:u.id};return re instanceof x.ResponseError?Z.error=re.toJson():Z.result=re===void 0?null:re,wo(Z,ae,J),t.write(Z)}function C(re,ae,J){let Z={jsonrpc:y,id:u.id,error:re.toJson()};return wo(Z,ae,J),t.write(Z)}Um(u);let P=h.get(u.method),j,X;P&&(j=P.type,X=P.handler);let H=Date.now();if(X||_){let re=u.id??String(Date.now()),ae=sr.is(ct.receiver)?ct.receiver.createCancellationTokenSource(re):ct.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&ae.cancel(),u.id!==null&&I.set(re,ae);try{let J;if(X)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);J=X(ae.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===x.ParameterStructures.byName)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=X(...u.params,ae.token)}else{if(j!==void 0&&j.parameterStructures===x.ParameterStructures.byPosition)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=X(u.params,ae.token)}else _&&(J=_(u.method,u.params,ae.token));let Z=await J;await b(Z,u.method,H)}catch(J){J instanceof x.ResponseError?await b(J,u.method,H):J&&K.string(J.message)?await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{I.delete(re)}}else await C(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function wa(u){if(!jt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let b=u.id,C=g.get(b);if(Bm(u,C),C!==void 0){g.delete(b);try{if(u.error){let P=u.error;C.reject(new x.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function Fm(u){if(jt())return;let b,C;if(u.method===In.type.method){let P=u.params.id;l.delete(P),Po(u);return}else{let P=O.get(u.method);P&&(C=P.handler,b=P.type)}if(C||v)try{if(Po(u),C)if(u.params===void 0)b!==void 0&&b.numberOfParams!==0&&b.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Cn.type.method&&P.length===2&&Ii.is(P[0])?await C({token:P[0],value:P[1]}):(b!==void 0&&(b.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),b.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else b!==void 0&&b.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else v&&await v(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Ta.fire(u)}function Lm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let b=u;if(K.string(b.id)||K.number(b.id)){let C=b.id,P=g.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function at(u){if(u!=null)switch(E){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Hm(u){if(!(E===F.Off||!B))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,b)}else Ft("send-request",u)}function Wm(u){if(!(E===F.Off||!B))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Sending notification '${u.method}'.`,b)}else Ft("send-notification",u)}function wo(u,b,C){if(!(E===F.Off||!B))if(A===we.Text){let P;(E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${at(u.error.data)}`:u.result?P=`Result: ${at(u.result)}`:u.error===void 0&&(P="No result returned.")),B.log(`Sending response '${b} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Ft("send-response",u)}function Um(u){if(!(E===F.Off||!B))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,b)}else Ft("receive-request",u)}function Po(u){if(!(E===F.Off||!B||u.method===ir.type.method))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Received notification '${u.method}'.`,b)}else Ft("receive-notification",u)}function Bm(u,b){if(!(E===F.Off||!B))if(A===we.Text){let C;if((E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${at(u.error.data)}`:u.result?C=`Result: ${at(u.result)}`:u.error===void 0&&(C="No result returned.")),b){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${b.method} - (${u.id})' in ${Date.now()-b.timerStart}ms.${P}`,C)}else B.log(`Received response ${u.id} without active response promise.`,C)}else Ft("receive-response",u)}function Ft(u,b){if(!B||E===F.Off)return;let C={isLSPMessage:!0,type:u,message:b,timestamp:Date.now()};B.log(C)}function pn(){if(Ca())throw new $t(Sn.Closed,"Connection is closed.");if(jt())throw new $t(Sn.Disposed,"Connection is disposed.")}function $m(){if(va())throw new $t(Sn.AlreadyListening,"Connection is already listening")}function zm(){if(!va())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function Pa(u){if(u!==null)return u}function Oa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Oo(u,b){switch(u){case x.ParameterStructures.auto:return Oa(b)?Pa(b):[yn(b)];case x.ParameterStructures.byName:if(!Oa(b))throw new Error("Received parameters by name but param is not an object literal.");return Pa(b);case x.ParameterStructures.byPosition:return[yn(b)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ra(u,b){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Oo(u.parameterStructures,b[0]);break;default:C=[];for(let j=0;j{pn();let C,P;if(K.string(u)){C=u;let X=b[0],H=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(X)&&(H=1,re=X);let ae=b.length,J=ae-H;switch(J){case 0:P=void 0;break;case 1:P=Oo(re,b[H]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=b.slice(H,ae).map(Z=>yn(Z));break}}else{let X=b;C=u.method,P=Ra(u,X)}let j={jsonrpc:y,method:C,params:P};return Wm(j),t.write(j).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,b)=>{pn();let C;return K.func(u)?v=u:b&&(K.string(u)?(C=u,O.set(u,{type:void 0,handler:b})):(C=u.method,O.set(u.method,{type:u,handler:b}))),{dispose:()=>{C!==void 0?O.get(C)?.handler===b&&O.delete(C):v===u&&(v=void 0)}}},onProgress:(u,b,C)=>{if(q.has(b))throw new Error(`Progress handler for token ${b} already registered`);return q.set(b,C),{dispose:()=>{q.get(b)===C&&q.delete(b)}}},sendProgress:(u,b,C)=>Dt.sendNotification(Cn.type,{token:b,value:C}),onUnhandledProgress:_a.event,sendRequest:(u,...b)=>{pn(),zm();function C(Z,Ae){let Ke=ct.sender.sendCancellation(Z,Ae);Ke===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ae}`):Ke.catch(()=>{o.log(`Sending cancellation messages for id ${Ae} failed.`)})}let P,j,X;if(K.string(u)){P=u;let Z=b[0],Ae=b[b.length-1],Ke=0,Tn=x.ParameterStructures.auto;x.ParameterStructures.is(Z)&&(Ke=1,Tn=Z);let wt=b.length;Si.CancellationToken.is(Ae)&&(wt=wt-1,X=Ae);let Be=wt-Ke;switch(Be){case 0:j=void 0;break;case 1:j=Oo(Tn,b[Ke]);break;default:if(Tn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);j=b.slice(Ke,wt).map(Qm=>yn(Qm));break}}else{let Z=b;P=u.method,j=Ra(u,Z);let Ae=u.numberOfParams;X=Si.CancellationToken.is(Z[Ae])?Z[Ae]:void 0}let H=i++,re,ae=!1;X!==void 0&&(X.isCancellationRequested?ae=!0:re=X.onCancellationRequested(()=>{C(Dt,H)}));let J={jsonrpc:y,id:H,method:P,params:j};return Hm(J),typeof ct.sender.enableCancellation=="function"&&ct.sender.enableCancellation(J),new Promise(async(Z,Ae)=>{let Ke=Be=>{Z(Be),ct.sender.cleanup(H),re?.dispose()},Tn=Be=>{Ae(Be),ct.sender.cleanup(H),re?.dispose()},wt={method:P,timerStart:Date.now(),resolve:Ke,reject:Tn};try{g.set(H,wt),await t.write(J),ae&&C(Dt,H)}catch(Be){throw g.delete(H),wt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,b)=>{pn();let C=null;return wi.is(u)?(C=void 0,_=u):K.string(u)?(C=null,b!==void 0&&(C=u,h.set(u,{handler:b,type:void 0}))):b!==void 0&&(C=u.method,h.set(u.method,{type:u,handler:b})),{dispose:()=>{C!==null&&(C!==void 0?h.get(C)?.handler===b&&h.delete(C):_===u&&(_=void 0))}}},hasPendingResponse:()=>g.size>0,trace:async(u,b,C)=>{let P=!1,j=we.Text;C!==void 0&&(K.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||we.Text)),E=u,A=j,E===F.Off?B=void 0:B=b,P&&!Ca()&&!jt()&&await Dt.sendNotification(Oi.type,{value:F.toString(u)})},onError:st.event,onClose:ya.event,onUnhandledNotification:Ta.event,onDispose:ba.event,end:()=>{t.end()},dispose:()=>{if(jt())return;V=je.Disposed,ba.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let b of g.values())b.reject(u);g=new Map,I=new Map,l=new Set,k=new Ya.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{pn(),$m(),V=je.Listening,e.listen(Gm)},inspect:()=>{(0,Ka.default)().console.log("inspect")}};return Dt.onNotification(ir.type,u=>{if(E===F.Off||!B)return;let b=E===F.Verbose||E===F.Compact;B.log(u.message,b?u.verbose:void 0)}),Dt.onNotification(Cn.type,async u=>{let b=q.get(u.token);b?await b(u.value):_a.fire(u)}),Dt}});var Je=S(p=>{"use strict";var Uh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var $=ei();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var xi=ni();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return xi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return xi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return xi.Touch}});var Bh=Fa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Bh.Disposable}});var eu=Ht();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return eu.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return eu.Emitter}});var tu=tr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return tu.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return tu.CancellationToken}});var nu=Ha();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return nu.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return nu.SharedArrayReceiverStrategy}});var Mi=Ua();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Mi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Mi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Mi.ReadableStreamMessageReader}});var Ei=Va();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ei.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ei.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ei.WriteableStreamMessageWriter}});var $h=Xa();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return $h.AbstractMessageBuffer}});var te=Za();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return te.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return te.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return te.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return te.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return te.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return te.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return te.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return te.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return te.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return te.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return te.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return te.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return te.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return te.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return te.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return te.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return te.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return te.TraceValues}});var zh=Uh(dt());p.RAL=zh.default});var vr={};xa(vr,{AnnotatedTextEdit:()=>Ze,ApplyKind:()=>ts,ChangeAnnotation:()=>mt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>ys,CodeActionContext:()=>ps,CodeActionKind:()=>gs,CodeActionTag:()=>yr,CodeActionTriggerKind:()=>xn,CodeDescription:()=>Ui,CodeLens:()=>Ts,Color:()=>fr,ColorInformation:()=>Gi,ColorPresentation:()=>ji,Command:()=>Ot,CompletionItem:()=>rs,CompletionItemKind:()=>Ki,CompletionItemLabelDetails:()=>ns,CompletionItemTag:()=>Ji,CompletionList:()=>os,CreateFile:()=>Qt,DeleteFile:()=>Xt,Diagnostic:()=>Pn,DiagnosticRelatedInformation:()=>mr,DiagnosticSeverity:()=>Hi,DiagnosticTag:()=>Wi,DocumentHighlight:()=>us,DocumentHighlightKind:()=>as,DocumentLink:()=>bs,DocumentSymbol:()=>hs,DocumentUri:()=>qi,EOL:()=>Qh,FoldingRange:()=>Li,FoldingRangeKind:()=>Fi,FormattingOptions:()=>_s,Hover:()=>is,InlayHint:()=>Rs,InlayHintKind:()=>Tr,InlayHintLabelPart:()=>_r,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>ks,InlineCompletionList:()=>xs,InlineCompletionTriggerKind:()=>Ms,InlineValueContext:()=>Os,InlineValueEvaluatableExpression:()=>Ps,InlineValueText:()=>Ds,InlineValueVariableLookup:()=>ws,InsertReplaceEdit:()=>Zi,InsertTextFormat:()=>Yi,InsertTextMode:()=>es,LanguageKind:()=>Vi,Location:()=>wn,LocationLink:()=>Ai,MarkedString:()=>kn,MarkupContent:()=>ht,MarkupKind:()=>pr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>ss,Position:()=>ke,Range:()=>Y,RenameFile:()=>Vt,SelectedCompletionInfo:()=>Es,SelectionRange:()=>vs,SemanticTokenModifiers:()=>Ss,SemanticTokenTypes:()=>Cs,SemanticTokens:()=>Is,SignatureInformation:()=>cs,SnippetTextEdit:()=>Bi,StringValue:()=>br,SymbolInformation:()=>fs,SymbolKind:()=>ls,SymbolTag:()=>ds,TextDocument:()=>As,TextDocumentEdit:()=>On,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Xi,TextEdit:()=>$e,URI:()=>dr,VersionedTextDocumentIdentifier:()=>Qi,WorkspaceChange:()=>$i,WorkspaceEdit:()=>hr,WorkspaceFolder:()=>Ns,WorkspaceSymbol:()=>ms,integer:()=>Ni,uinteger:()=>Dn});var qi,dr,Ni,Dn,ke,Y,wn,Ai,fr,Gi,ji,Fi,Li,mr,Hi,Wi,Ui,Pn,Ot,$e,mt,oe,Ze,On,Qt,Vt,Xt,hr,zt,Bi,gr,$i,zi,Qi,Rn,Vi,Xi,pr,ht,Ki,Yi,Ji,Zi,es,ts,ns,rs,os,kn,is,ss,cs,as,us,ls,ds,fs,ms,hs,gs,xn,ps,yr,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,ws,Ps,Os,Tr,_r,Rs,br,ks,xs,Ms,Es,qs,Ns,Qh,As,Gs,d,Cr=ka(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(dr||(dr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ni||(Ni={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.line)&&d.uinteger(o.character)}e.is=n})(ke||(ke={}));(function(e){function t(r,o,i,s){if(d.uinteger(r)&&d.uinteger(o)&&d.uinteger(i)&&d.uinteger(s))return{start:ke.create(r,o),end:ke.create(i,s)};if(ke.is(r)&&ke.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.start)&&ke.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(d.string(o.uri)||d.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.targetRange)&&d.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||d.undefined(o.originSelectionRange))}e.is=n})(Ai||(Ai={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.numberRange(o.red,0,1)&&d.numberRange(o.green,0,1)&&d.numberRange(o.blue,0,1)&&d.numberRange(o.alpha,0,1)}e.is=n})(fr||(fr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&fr.is(o.color)}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.undefined(o.textEdit)||$e.is(o))&&(d.undefined(o.additionalTextEdits)||d.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(ji||(ji={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Fi||(Fi={}));(function(e){function t(r,o,i,s,a,y){let m={startLine:r,endLine:o};return d.defined(i)&&(m.startCharacter=i),d.defined(s)&&(m.endCharacter=s),d.defined(a)&&(m.kind=a),d.defined(y)&&(m.collapsedText=y),m}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.startLine)&&d.uinteger(o.startLine)&&(d.undefined(o.startCharacter)||d.uinteger(o.startCharacter))&&(d.undefined(o.endCharacter)||d.uinteger(o.endCharacter))&&(d.undefined(o.kind)||d.string(o.kind))}e.is=n})(Li||(Li={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&wn.is(o.location)&&d.string(o.message)}e.is=n})(mr||(mr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Hi||(Hi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Wi||(Wi={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&d.string(r.href)}e.is=t})(Ui||(Ui={}));(function(e){function t(i,s,a,y,m,f){let _={range:i,message:s};return d.defined(a)&&(_.severity=a),d.defined(y)&&(_.code=y),d.defined(m)&&(_.source=m),d.defined(f)&&(_.relatedInformation=f),_}e.create=t;function n(i){var s;let a=i;return d.defined(a)&&Y.is(a.range)&&(d.string(a.message)||ht.is(a.message))&&(d.number(a.severity)||d.undefined(a.severity))&&(d.integer(a.code)||d.string(a.code)||d.undefined(a.code))&&(d.undefined(a.codeDescription)||d.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(d.string(a.source)||d.undefined(a.source))&&(d.undefined(a.relatedInformation)||d.typedArray(a.relatedInformation,mr.is))}e.is=n;function r(i){return d.string(i.message)}e.is3_17=r;function o(i){if(d.string(i.message))return i.message;if(ht.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Pn||(Pn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return d.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.title)&&(o.tooltip===void 0||d.string(o.tooltip))&&d.string(o.command)}e.is=n})(Ot||(Ot={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return d.objectLiteral(s)&&d.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(d.string(o.description)||o.description===void 0)}e.is=n})(mt||(mt={}));(function(e){function t(n){let r=n;return d.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(mt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(Ze||(Ze={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(On||(On={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&d.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Qt||(Qt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&d.string(o.oldUri)&&d.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Vt||(Vt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&d.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||d.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||d.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>d.string(o.kind)?Qt.is(o)||Vt.is(o)||Xt.is(o):On.is(o)))}e.is=t})(hr||(hr={}));zt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):oe.is(r)?(i=r,o=Ze.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):oe.is(r)?(i=r,o=Ze.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):oe.is(n)?(o=n,r=Ze.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Ze.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return d.objectLiteral(r)&&Y.is(r.range)&&br.isSnippet(r.snippet)&&(r.annotationId===void 0||mt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Bi||(Bi={}));gr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},$i=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new gr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(On.is(n)){let r=new zt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new zt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new zt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new zt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new gr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Qt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Qt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Vt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Vt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.integer(o.version)}e.is=n})(Qi||(Qi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&(o.version===null||d.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Vi||(Vi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.string(o.languageId)&&d.integer(o.version)&&d.string(o.text)}e.is=n})(Xi||(Xi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(pr||(pr={}));(function(e){function t(n){let r=n;return d.objectLiteral(n)&&pr.is(r.kind)&&d.string(r.value)}e.is=t})(ht||(ht={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Ki||(Ki={}));(function(e){e.PlainText=1,e.Snippet=2})(Yi||(Yi={}));(function(e){e.Deprecated=1})(Ji||(Ji={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&d.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(Zi||(Zi={}));(function(e){e.asIs=1,e.adjustIndentation=2})(es||(es={}));(function(e){e.Replace=1,e.Merge=2})(ts||(ts={}));(function(e){function t(n){let r=n;return r&&(d.string(r.detail)||r.detail===void 0)&&(d.string(r.description)||r.description===void 0)}e.is=t})(ns||(ns={}));(function(e){function t(n){return{label:n}}e.create=t})(rs||(rs={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(os||(os={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return d.string(o)||d.objectLiteral(o)&&d.string(o.language)&&d.string(o.value)}e.is=n})(kn||(kn={}));(function(e){function t(n){let r=n;return!!r&&d.objectLiteral(r)&&(ht.is(r.contents)||kn.is(r.contents)||d.typedArray(r.contents,kn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(is||(is={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ss||(ss={}));(function(e){function t(n,r,...o){let i={label:n};return d.defined(r)&&(i.documentation=r),d.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(cs||(cs={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(as||(as={}));(function(e){function t(n,r){let o={range:n};return d.number(r)&&(o.kind=r),o}e.create=t})(us||(us={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ls||(ls={}));(function(e){e.Deprecated=1})(ds||(ds={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(fs||(fs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(ms||(ms={}));(function(e){function t(r,o,i,s,a,y){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return y!==void 0&&(m.children=y),m}e.create=t;function n(r){let o=r;return o&&d.string(o.name)&&d.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||d.string(o.detail))&&(o.deprecated===void 0||d.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(hs||(hs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(gs||(gs={}));(function(e){e.Invoked=1,e.Automatic=2})(xn||(xn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.typedArray(o.diagnostics,Pn.is)&&(o.only===void 0||d.typedArray(o.only,d.string))&&(o.triggerKind===void 0||o.triggerKind===xn.Invoked||o.triggerKind===xn.Automatic)}e.is=n})(ps||(ps={}));(function(e){e.LLMGenerated=1;function t(n){return d.defined(n)&&n===e.LLMGenerated}e.is=t})(yr||(yr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Ot.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&d.string(o.title)&&(o.diagnostics===void 0||d.typedArray(o.diagnostics,Pn.is))&&(o.kind===void 0||d.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Ot.is(o.command))&&(o.isPreferred===void 0||d.boolean(o.isPreferred))&&(o.edit===void 0||hr.is(o.edit))&&(o.tags===void 0||d.typedArray(o.tags,yr.is))}e.is=n})(ys||(ys={}));(function(e){function t(r,o){let i={range:r};return d.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.command)||Ot.is(o.command))}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.uinteger(o.tabSize)&&d.boolean(o.insertSpaces)}e.is=n})(_s||(_s={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.target)||d.string(o.target))}e.is=n})(bs||(bs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(vs||(vs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Cs||(Cs={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ss||(Ss={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Is||(Is={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.string(o.text)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.boolean(o.caseSensitiveLookup)&&(d.string(o.variableName)||o.variableName===void 0)}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(d.string(o.expression)||o.expression===void 0)}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Os||(Os={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Tr||(Tr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||Ot.is(o.command))}e.is=n})(_r||(_r={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.position)&&(d.string(o.label)||d.typedArray(o.label,_r.is))&&(o.kind===void 0||Tr.is(o.kind))&&o.textEdits===void 0||d.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.paddingLeft===void 0||d.boolean(o.paddingLeft))&&(o.paddingRight===void 0||d.boolean(o.paddingRight))}e.is=n})(Rs||(Rs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return d.objectLiteral(o)&&o.kind==="snippet"&&d.string(o.value)}e.isSnippet=n})(br||(br={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(ks||(ks={}));(function(e){function t(n){return{items:n}}e.create=t})(xs||(xs={}));(function(e){e.Invoked=1,e.Automatic=2})(Ms||(Ms={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Es||(Es={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&dr.is(r.uri)&&d.string(r.name)}e.is=t})(Ns||(Ns={}));Qh=[` `,`\r -`,"\r"];(function(e){function t(i,s,a,y){return new Gs(i,s,a,y)}e.create=t;function n(i){let s=i;return!!(d.defined(s)&&d.string(s.uri)&&(d.undefined(s.languageId)||d.string(s.languageId))&&d.uinteger(s.lineCount)&&d.func(s.getText)&&d.func(s.positionAt)&&d.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),y=o(s,(f,_)=>{let g=f.range.start.line-_.range.start.line;return g===0?f.range.start.character-_.range.start.character:g}),m=a.length;for(let f=y.length-1;f>=0;f--){let _=y[f],g=i.offsetAt(_.range.start),v=i.offsetAt(_.range.end);if(v<=m)a=a.substring(0,g)+_.newText+a.substring(v,a.length);else throw new Error("Overlapping edit");m=g}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,y=i.slice(0,a),m=i.slice(a);o(y,s),o(m,s);let f=0,_=0,g=0;for(;f{let h=f.range.start.line-_.range.start.line;return h===0?f.range.start.character-_.range.start.character:h}),m=a.length;for(let f=y.length-1;f>=0;f--){let _=y[f],h=i.offsetAt(_.range.start),v=i.offsetAt(_.range.end);if(v<=m)a=a.substring(0,h)+_.newText+a.substring(v,a.length);else throw new Error("Overlapping edit");m=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,y=i.slice(0,a),m=i.slice(a);o(y,s),o(m,s);let f=0,_=0,h=0;for(;f0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return ke.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return ke.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(v){return v===!0||v===!1}e.boolean=o;function i(v){return t.call(v)==="[object String]"}e.string=i;function s(v){return t.call(v)==="[object Number]"}e.number=s;function a(v,O,q){return t.call(v)==="[object Number]"&&O<=v&&v<=q}e.numberRange=a;function y(v){return t.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}e.integer=y;function m(v){return t.call(v)==="[object Number]"&&0<=v&&v<=2147483647}e.uinteger=m;function f(v){return t.call(v)==="[object Function]"}e.func=f;function _(v){return v!==null&&typeof v=="object"}e.objectLiteral=_;function g(v,O){return Array.isArray(v)&&v.every(O)}e.typedArray=g})(d||(d={}))});var Q=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.CM=fe.ProtocolNotificationType=fe.ProtocolNotificationType0=fe.ProtocolRequestType=fe.ProtocolRequestType0=fe.RegistrationType=fe.MessageDirection=void 0;var Kt=Je(),ru;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(ru||(fe.MessageDirection=ru={}));var js=class{____;method;constructor(t){this.method=t}};fe.RegistrationType=js;var Fs=class extends Kt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};fe.ProtocolRequestType0=Fs;var Ls=class extends Kt.RequestType{__;___;____;_pr;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolRequestType=Ls;var Hs=class extends Kt.NotificationType0{___;____;constructor(t){super(t)}};fe.ProtocolNotificationType0=Hs;var Ws=class extends Kt.NotificationType{___;____;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolNotificationType=Ws;var ou;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(ou||(fe.CM=ou={}))});var Sr=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Vh;Fe.string=iu;Fe.number=Xh;Fe.error=Kh;Fe.func=Yh;Fe.array=su;Fe.stringArray=Jh;Fe.typedArray=Zh;Fe.objectLiteral=eg;function Vh(e){return e===!0||e===!1}function iu(e){return typeof e=="string"||e instanceof String}function Xh(e){return typeof e=="number"||e instanceof Number}function Kh(e){return e instanceof Error}function Yh(e){return typeof e=="function"}function su(e){return Array.isArray(e)}function Jh(e){return su(e)&&e.every(t=>iu(t))}function Zh(e,t){return Array.isArray(e)&&e.every(t)}function eg(e){return e!==null&&typeof e=="object"}});var au=S(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.ImplementationRequest=void 0;var Us=Q(),cu;(function(e){e.method="textDocument/implementation",e.messageDirection=Us.MessageDirection.clientToServer,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("textDocument.implementation","implementationProvider")})(cu||(Ir.ImplementationRequest=cu={}))});var lu=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeDefinitionRequest=void 0;var Bs=Q(),uu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(uu||(Dr.TypeDefinitionRequest=uu={}))});var mu=S(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DidChangeWorkspaceFoldersNotification=Jt.WorkspaceFoldersRequest=void 0;var Yt=Q(),du;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Yt.MessageDirection.serverToClient,e.type=new Yt.ProtocolRequestType0(e.method),e.capabilities=Yt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(du||(Jt.WorkspaceFoldersRequest=du={}));var fu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolNotificationType(e.method),e.capabilities=Yt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(fu||(Jt.DidChangeWorkspaceFoldersNotification=fu={}))});var gu=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var $s=Q(),hu;(function(e){e.method="workspace/configuration",e.messageDirection=$s.MessageDirection.serverToClient,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("workspace.configuration",void 0)})(hu||(wr.ConfigurationRequest=hu={}))});var Tu=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ColorPresentationRequest=en.DocumentColorRequest=void 0;var Zt=Q(),pu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(pu||(en.DocumentColorRequest=pu={}));var yu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(yu||(en.ColorPresentationRequest=yu={}))});var vu=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.FoldingRangeRefreshRequest=nn.FoldingRangeRequest=void 0;var tn=Q(),_u;(function(e){e.method="textDocument/foldingRange",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(_u||(nn.FoldingRangeRequest=_u={}));var bu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=tn.MessageDirection.serverToClient,e.type=new tn.ProtocolRequestType0(e.method),e.capabilities=tn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(bu||(nn.FoldingRangeRefreshRequest=bu={}))});var Su=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=Q(),Cu;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(Cu||(Pr.DeclarationRequest=Cu={}))});var Du=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var Qs=Q(),Iu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Qs.MessageDirection.clientToServer,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Iu||(Or.SelectionRangeRequest=Iu={}))});var Ru=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.WorkDoneProgressCancelNotification=gt.WorkDoneProgressCreateRequest=gt.WorkDoneProgress=void 0;var tg=Je(),Mn=Q(),wu;(function(e){e.type=new tg.ProgressType;function t(n){return n===e.type}e.is=t})(wu||(gt.WorkDoneProgress=wu={}));var Pu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(Pu||(gt.WorkDoneProgressCreateRequest=Pu={}));var Ou;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(Ou||(gt.WorkDoneProgressCancelNotification=Ou={}))});var Eu=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CallHierarchyOutgoingCallsRequest=pt.CallHierarchyIncomingCallsRequest=pt.CallHierarchyPrepareRequest=void 0;var et=Q(),ku;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(ku||(pt.CallHierarchyPrepareRequest=ku={}));var xu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(xu||(pt.CallHierarchyIncomingCallsRequest=xu={}));var Mu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Mu||(pt.CallHierarchyOutgoingCallsRequest=Mu={}))});var Fu=S(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SemanticTokensRefreshRequest=Ie.SemanticTokensRangeRequest=Ie.SemanticTokensDeltaRequest=Ie.SemanticTokensRequest=Ie.SemanticTokensRegistrationType=Ie.TokenFormat=void 0;var Pe=Q(),qu;(function(e){e.Relative="relative"})(qu||(Ie.TokenFormat=qu={}));var En;(function(e){e.method="textDocument/semanticTokens",e.type=new Pe.RegistrationType(e.method)})(En||(Ie.SemanticTokensRegistrationType=En={}));var Nu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Nu||(Ie.SemanticTokensRequest=Nu={}));var Au;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Au||(Ie.SemanticTokensDeltaRequest=Au={}));var Gu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Gu||(Ie.SemanticTokensRangeRequest=Gu={}));var ju;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Pe.MessageDirection.serverToClient,e.type=new Pe.ProtocolRequestType0(e.method),e.capabilities=Pe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(ju||(Ie.SemanticTokensRefreshRequest=ju={}))});var Hu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Vs=Q(),Lu;(function(e){e.method="window/showDocument",e.messageDirection=Vs.MessageDirection.serverToClient,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("window.showDocument.support",void 0)})(Lu||(Rr.ShowDocumentRequest=Lu={}))});var Uu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.LinkedEditingRangeRequest=void 0;var Xs=Q(),Wu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Wu||(kr.LinkedEditingRangeRequest=Wu={}))});var Yu=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.WillDeleteFilesRequest=me.DidDeleteFilesNotification=me.DidRenameFilesNotification=me.WillRenameFilesRequest=me.DidCreateFilesNotification=me.WillCreateFilesRequest=me.FileOperationPatternKind=void 0;var ie=Q(),Bu;(function(e){e.file="file",e.folder="folder"})(Bu||(me.FileOperationPatternKind=Bu={}));var $u;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})($u||(me.WillCreateFilesRequest=$u={}));var zu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(zu||(me.DidCreateFilesNotification=zu={}));var Qu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Qu||(me.WillRenameFilesRequest=Qu={}));var Vu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Vu||(me.DidRenameFilesNotification=Vu={}));var Xu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Xu||(me.DidDeleteFilesNotification=Xu={}));var Ku;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Ku||(me.WillDeleteFilesRequest=Ku={}))});var tl=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.MonikerRequest=yt.MonikerKind=yt.UniquenessLevel=void 0;var Ks=Q(),Ju;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Ju||(yt.UniquenessLevel=Ju={}));var Zu;(function(e){e.$import="import",e.$export="export",e.local="local"})(Zu||(yt.MonikerKind=Zu={}));var el;(function(e){e.method="textDocument/moniker",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.moniker","monikerProvider")})(el||(yt.MonikerRequest=el={}))});var il=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TypeHierarchySubtypesRequest=Tt.TypeHierarchySupertypesRequest=Tt.TypeHierarchyPrepareRequest=void 0;var Ot=Q(),nl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method),e.capabilities=Ot.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(nl||(Tt.TypeHierarchyPrepareRequest=nl={}));var rl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(rl||(Tt.TypeHierarchySupertypesRequest=rl={}));var ol;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(ol||(Tt.TypeHierarchySubtypesRequest=ol={}))});var al=S(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.InlineValueRefreshRequest=on.InlineValueRequest=void 0;var rn=Q(),sl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.inlineValue","inlineValueProvider")})(sl||(on.InlineValueRequest=sl={}));var cl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(cl||(on.InlineValueRefreshRequest=cl={}))});var fl=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var tt=Q(),ul;(function(e){e.method="textDocument/inlayHint",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint","inlayHintProvider")})(ul||(_t.InlayHintRequest=ul={}));var ll;(function(e){e.method="inlayHint/resolve",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(ll||(_t.InlayHintResolveRequest=ll={}));var dl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=tt.MessageDirection.serverToClient,e.type=new tt.ProtocolRequestType0(e.method),e.capabilities=tt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(dl||(_t.InlayHintRefreshRequest=dl={}))});var _l=S(se=>{"use strict";var ng=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rg=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),og=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var sg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),cg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ag=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.InlineCompletionRequest=void 0;var Zs=Q(),Pl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Pl||(Mr.InlineCompletionRequest=Pl={}))});var xl=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.TextDocumentContentRefreshRequest=cn.TextDocumentContentRequest=void 0;var Nn=Q(),Rl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Nn.MessageDirection.clientToServer,e.type=new Nn.ProtocolRequestType(e.method),e.capabilities=Nn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Rl||(cn.TextDocumentContentRequest=Rl={}));var kl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Nn.MessageDirection.serverToClient,e.type=new Nn.ProtocolRequestType(e.method)})(kl||(cn.TextDocumentContentRefreshRequest=kl={}))});var $d=S(c=>{"use strict";var ug=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Fl||(c.StaticRegistrationOptions=Fl={}));var Ll;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||rc.is(r.documentSelector))}e.is=t})(Ll||(c.TextDocumentRegistrationOptions=Ll={}));var Hl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Hl||(c.WorkDoneProgressOptions=Hl={}));var Wl;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Wl||(c.InitializeRequest=Wl={}));var Ul;(function(e){e.unknownProtocolVersion=1})(Ul||(c.InitializeErrorCodes=Ul={}));var Bl;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Bl||(c.InitializedNotification=Bl={}));var $l;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})($l||(c.ShutdownRequest=$l={}));var zl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(zl||(c.ExitNotification=zl={}));var Ql;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Ql||(c.DidChangeConfigurationNotification=Ql={}));var Vl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Vl||(c.MessageType=Vl={}));var Xl;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Xl||(c.ShowMessageNotification=Xl={}));var Kl;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Kl||(c.ShowMessageRequest=Kl={}));var Yl;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Yl||(c.LogMessageNotification=Yl={}));var Jl;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Jl||(c.TelemetryEventNotification=Jl={}));var Zl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Zl||(c.TextDocumentSyncKind=Zl={}));var ed;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ed||(c.DidOpenTextDocumentNotification=ed={}));var td;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(td||(c.TextDocumentContentChangeEvent=td={}));var nd;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(nd||(c.DidChangeTextDocumentNotification=nd={}));var rd;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(rd||(c.DidCloseTextDocumentNotification=rd={}));var od;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(od||(c.DidSaveTextDocumentNotification=od={}));var id;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(id||(c.TextDocumentSaveReason=id={}));var sd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(sd||(c.WillSaveTextDocumentNotification=sd={}));var cd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(cd||(c.WillSaveTextDocumentWaitUntilRequest=cd={}));var ad;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(ad||(c.DidChangeWatchedFilesNotification=ad={}));var ud;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ud||(c.FileChangeType=ud={}));var oc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Ml.URI.is(r.baseUri)||Ml.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(oc||(c.RelativePattern=oc={}));var ic;(function(e){function t(n){let r=n;return ce.string(r)||oc.is(r)}e.is=t})(ic||(c.GlobPattern=ic={}));var ld;(function(e){e.Create=1,e.Change=2,e.Delete=4})(ld||(c.WatchKind=ld={}));var dd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(dd||(c.PublishDiagnosticsNotification=dd={}));var fd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(fd||(c.CompletionTriggerKind=fd={}));var md;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(md||(c.CompletionRequest=md={}));var hd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(hd||(c.CompletionResolveRequest=hd={}));var gd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(gd||(c.HoverRequest=gd={}));var pd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(pd||(c.SignatureHelpTriggerKind=pd={}));var yd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(yd||(c.SignatureHelpRequest=yd={}));var Td;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(Td||(c.DefinitionRequest=Td={}));var _d;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(_d||(c.ReferencesRequest=_d={}));var bd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(bd||(c.DocumentHighlightRequest=bd={}));var vd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(vd||(c.DocumentSymbolRequest=vd={}));var Cd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Cd||(c.CodeActionRequest=Cd={}));var Sd;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Sd||(c.CodeActionResolveRequest=Sd={}));var Id;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Id||(c.WorkspaceSymbolRequest=Id={}));var Dd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Dd||(c.WorkspaceSymbolResolveRequest=Dd={}));var wd;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(wd||(c.CodeLensRequest=wd={}));var Pd;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Pd||(c.CodeLensResolveRequest=Pd={}));var Od;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Od||(c.CodeLensRefreshRequest=Od={}));var Rd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(Rd||(c.DocumentLinkRequest=Rd={}));var kd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(kd||(c.DocumentLinkResolveRequest=kd={}));var xd;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(xd||(c.DocumentFormattingRequest=xd={}));var Md;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Md||(c.DocumentRangeFormattingRequest=Md={}));var Ed;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Ed||(c.DocumentRangesFormattingRequest=Ed={}));var qd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(qd||(c.DocumentOnTypeFormattingRequest=qd={}));var Nd;(function(e){e.Identifier=1})(Nd||(c.PrepareSupportDefaultBehavior=Nd={}));var Ad;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Ad||(c.RenameRequest=Ad={}));var Gd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Gd||(c.PrepareRenameRequest=Gd={}));var jd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(jd||(c.ExecuteCommandRequest=jd={}));var Fd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(Fd||(c.ApplyWorkspaceEditRequest=Fd={}))});var Qd=S(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.createProtocolConnection=bg;var zd=Je();function bg(e,t,n,r){return zd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,zd.createMessageConnection)(e,t,n,r)}});var ee=S(De=>{"use strict";var vg=De&&De.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Er=De&&De.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&vg(t,e,n)};Object.defineProperty(De,"__esModule",{value:!0});De.LSPErrorCodes=De.createProtocolConnection=void 0;Er(Je(),De);Er((Cr(),Xn(vr)),De);Er(Q(),De);Er($d(),De);var Cg=Qd();Object.defineProperty(De,"createProtocolConnection",{enumerable:!0,get:function(){return Cg.createProtocolConnection}});var Vd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Vd||(De.LSPErrorCodes=Vd={}))});var mc=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.empty=void 0;bt.v4=Xd;bt.isUUID=Kd;bt.parse=Ig;bt.generateUuid=Dg;var Gn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},fc=class e extends Gn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};bt.empty=new Gn("00000000-0000-0000-0000-000000000000");function Xd(){return new fc}var Sg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Kd(e){return Sg.test(e)}function Ig(e){if(!Kd(e))throw new Error("invalid uuid");return new Gn(e)}function Dg(){return Xd().asHex()}});var Yd=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ProgressFeature=void 0;ln.attachWorkDone=Pg;ln.attachPartialResult=Rg;var vt=ee(),wg=mc(),un=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends un{_source;constructor(t,n){super(t,n),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends jn{_source;constructor(){super(),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Pg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new un(e,n)}var Og=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(vt.WorkDoneProgressCancelNotification.type,n=>{let r=un.Instances.get(n.token);(r instanceof qr||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new un(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,wg.generateUuid)();return this.connection.sendRequest(vt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Nr)}};ln.ProgressFeature=Og;var hc;(function(e){e.type=new vt.ProgressType})(hc||(hc={}));var gc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(hc.type,this._token,t)}};function Rg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new gc(e,n)}});var Jd=S(Ve=>{"use strict";var kg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?qg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Eg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ng});var Zd=S(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.WorkspaceFoldersFeature=void 0;var Ar=ee(),Ag=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ar.Emitter,this.connection.onNotification(Ar.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ar.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ar.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Gr.WorkspaceFoldersFeature=Ag});var ef=S(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.CallHierarchyFeature=void 0;var pc=ee(),Gg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(pc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=pc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=pc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};jr.CallHierarchyFeature=Gg});var Tc=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.SemanticTokensBuilder=Ct.SemanticTokensDiff=Ct.SemanticTokensFeature=void 0;var Fr=ee(),jg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Fr.SemanticTokensRefreshRequest.type),on:t=>{let n=Fr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Fr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Fr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ct.SemanticTokensFeature=jg;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let y=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;y[this._dataLen++]=s,y[this._dataLen++]=a,y[this._dataLen++]=r,y[this._dataLen++]=o,y[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],f=t[5*y];if(m===f){let _=t[5*a+1],g=t[5*y+1];return _-g}return m-f});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ShowDocumentFeature=void 0;var Fg=ee(),Lg=e=>class extends e{showDocument(t){return this.connection.sendRequest(Fg.ShowDocumentRequest.type,t)}};Hr.ShowDocumentFeature=Lg});var nf=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.FileOperationsFeature=void 0;var dn=ee(),Hg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(dn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(dn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(dn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(dn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(dn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(dn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Wr.FileOperationsFeature=Hg});var rf=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeFeature=void 0;var Wg=ee(),Ug=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Wg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Ur.LinkedEditingRangeFeature=Ug});var of=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.TypeHierarchyFeature=void 0;var _c=ee(),Bg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(_c.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=_c.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=_c.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.TypeHierarchyFeature=Bg});var cf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlineValueFeature=void 0;var sf=ee(),$g=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(sf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(sf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};$r.InlineValueFeature=$g});var uf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var af=ee(),zg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(af.FoldingRangeRefreshRequest.type),on:t=>{let n=af.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=zg});var lf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlayHintFeature=void 0;var bc=ee(),Qg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(bc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(bc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(bc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Qr.InlayHintFeature=Qg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DiagnosticFeature=void 0;var Fn=ee(),Vg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Vr.DiagnosticFeature=Vg});var Cc=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.TextDocuments=void 0;var kt=ee(),vc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new kt.Emitter,this._onDidOpen=new kt.Emitter,this._onDidClose=new kt.Emitter,this._onDidSave=new kt.Emitter,this._onWillSave=new kt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=kt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),kt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Xr.TextDocuments=vc});var Dc=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.NotebookDocuments=fn.NotebookSyncFeature=void 0;var xe=ee(),ff=Cc(),Xg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(xe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(xe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(xe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(xe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};fn.NotebookSyncFeature=Xg;var Sc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,xe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,xe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,xe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ic=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof ff.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new ff.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new xe.Emitter,this._onDidChange=new xe.Emitter,this._onDidSave=new xe.Emitter,this._onDidClose=new xe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Sc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,y=o.change;y.metadata!==void 0&&(a=!0,i.metadata=y.metadata);let m=[],f=[],_=[],g=[];if(y.cells!==void 0){let k=y.cells;if(k.structure!==void 0){let h=k.structure.array;if(i.cells.splice(h.start,h.deleteCount,...h.cells!==void 0?h.cells:[]),k.structure.didOpen!==void 0)for(let l of k.structure.didOpen)await n.openTextDocument({textDocument:l}),m.push(l.uri);if(k.structure.didClose)for(let l of k.structure.didClose)await n.closeTextDocument({textDocument:l}),f.push(l.uri)}if(k.data!==void 0){let h=new Map(k.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let I=h.get(i.cells[l].document);if(I!==void 0){let E=i.cells.splice(l,1,I);if(_.push({old:E[0],new:I}),h.delete(I.document),h.size===0)break}}}if(k.textContent!==void 0)for(let h of k.textContent)await n.changeTextDocument({textDocument:h.document,contentChanges:h.changes}),g.push(h.document.uri)}this.updateCellMap(i);let v={notebookDocument:i};a&&(v.metadata={old:s,new:i.metadata});let O=[];for(let k of m)O.push(this.getNotebookCell(k));let q=[];for(let k of f)q.push(this.getNotebookCell(k));let L=[];for(let k of g)L.push(this.getNotebookCell(k));(O.length>0||q.length>0||_.length>0||L.length>0)&&(v.cells={added:O,removed:q,changed:{data:_,textContent:L}}),(v.metadata!==void 0||v.cells!==void 0)&&this._onDidChange.fire(v)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),xe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};fn.NotebookDocuments=Ic});var mf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.MonikerFeature=void 0;var Kg=ee(),Yg=e=>class extends e{get moniker(){return{on:t=>{let n=Kg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.MonikerFeature=Yg});var hf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Jg=ee(),Zg=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Jg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=Zg});var pf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var gf=ee(),ep=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(gf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(gf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=ep});var xc=S(U=>{"use strict";var tp=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),np=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sf=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Oc;var Zr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}},yf=(0,cp.ShowDocumentFeature)((0,M.ProgressFeature)(Rc)),Tf;(function(e){function t(){return new eo}e.create=t})(Tf||(U.BulkRegistration=Tf={}));var eo=class{_registrations=[];_registered=new Set;add(t,n){let r=Me.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Pc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},_f;(function(e){function t(){return new Ln(void 0,[])}e.create=t})(_f||(U.BulkUnregistration=_f={}));var Ln=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Me.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},to=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof eo?this.registerMany(t):t instanceof Ln?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Me.string(n)?n:n.method,i=Pc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Me.string(t)?t:t.method,o=Pc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Ln(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},kc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},bf=(0,Tp.TextDocumentContentFeature)((0,ap.FileOperationsFeature)((0,op.WorkspaceFoldersFeature)((0,rp.ConfigurationFeature)(kc)))),no=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=oo;var vf=(0,yp.InlineCompletionFeature)((0,fp.FoldingRangeFeature)((0,pp.MonikerFeature)((0,hp.DiagnosticFeature)((0,mp.InlayHintFeature)((0,dp.InlineValueFeature)((0,lp.TypeHierarchyFeature)((0,up.LinkedEditingRangeFeature)((0,sp.SemanticTokensFeature)((0,ip.CallHierarchyFeature)(oo)))))))))),io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=io;var Cf=(0,gp.NotebookSyncFeature)(io);function If(e,t){return function(n){return t(e(n))}}function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function Of(e,t){return function(n){return t(e(n))}}function Rf(e,t){return function(n){return t(e(n))}}function kf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function _p(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,If),tracer:n(e.tracer,t.tracer,wf),telemetry:n(e.telemetry,t.telemetry,Df),client:n(e.client,t.client,Pf),window:n(e.window,t.window,Of),workspace:n(e.workspace,t.workspace,Rf),languages:n(e.languages,t.languages,kf),notebooks:n(e.notebooks,t.notebooks,xf)}}function bp(e,t,n){let r=n&&n.console?new(n.console(Zr)):new Zr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(no)):new no,s=n&&n.telemetry?new(n.telemetry(ro)):new ro,a=n&&n.client?new(n.client(to)):new to,y=n&&n.window?new(n.window(yf)):new yf,m=n&&n.workspace?new(n.workspace(bf)):new bf,f=n&&n.languages?new(n.languages(vf)):new vf,_=n&&n.notebooks?new(n.notebooks(Cf)):new Cf,g=[r,i,s,a,y,m,f,_];function v(h){return h instanceof Promise?h:Me.thenable(h)?new Promise((l,I)=>{h.then(E=>l(E),E=>I(E))}):Promise.resolve(h)}let O,q,L,k={listen:()=>o.listen(),sendRequest:(h,...l)=>o.sendRequest(Me.string(h)?h:h.method,...l),onRequest:(h,l)=>o.onRequest(h,l),sendNotification:(h,l)=>{let I=Me.string(h)?h:h.method;return o.sendNotification(I,l)},onNotification:(h,l)=>o.onNotification(h,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:h=>(q=h,{dispose:()=>{q=void 0}}),onInitialized:h=>o.onNotification(D.InitializedNotification.type,h),onShutdown:h=>(O=h,{dispose:()=>{O=void 0}}),onExit:h=>(L=h,{dispose:()=>{L=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return y},get workspace(){return m},get languages(){return f},get notebooks(){return _},onDidChangeConfiguration:h=>o.onNotification(D.DidChangeConfigurationNotification.type,h),onDidChangeWatchedFiles:h=>o.onNotification(D.DidChangeWatchedFilesNotification.type,h),__textDocumentSync:void 0,onDidOpenTextDocument:h=>o.onNotification(D.DidOpenTextDocumentNotification.type,h),onDidChangeTextDocument:h=>o.onNotification(D.DidChangeTextDocumentNotification.type,h),onDidCloseTextDocument:h=>o.onNotification(D.DidCloseTextDocumentNotification.type,h),onWillSaveTextDocument:h=>o.onNotification(D.WillSaveTextDocumentNotification.type,h),onWillSaveTextDocumentWaitUntil:h=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,h),onDidSaveTextDocument:h=>o.onNotification(D.DidSaveTextDocumentNotification.type,h),sendDiagnostics:h=>o.sendNotification(D.PublishDiagnosticsNotification.type,h),onHover:h=>o.onRequest(D.HoverRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onCompletion:h=>o.onRequest(D.CompletionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCompletionResolve:h=>o.onRequest(D.CompletionResolveRequest.type,h),onSignatureHelp:h=>o.onRequest(D.SignatureHelpRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDeclaration:h=>o.onRequest(D.DeclarationRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDefinition:h=>o.onRequest(D.DefinitionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onTypeDefinition:h=>o.onRequest(D.TypeDefinitionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onImplementation:h=>o.onRequest(D.ImplementationRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onReferences:h=>o.onRequest(D.ReferencesRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentHighlight:h=>o.onRequest(D.DocumentHighlightRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentSymbol:h=>o.onRequest(D.DocumentSymbolRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbol:h=>o.onRequest(D.WorkspaceSymbolRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:h=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,h),onCodeAction:h=>o.onRequest(D.CodeActionRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeActionResolve:h=>o.onRequest(D.CodeActionResolveRequest.type,(l,I)=>h(l,I)),onCodeLens:h=>o.onRequest(D.CodeLensRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeLensResolve:h=>o.onRequest(D.CodeLensResolveRequest.type,(l,I)=>h(l,I)),onDocumentFormatting:h=>o.onRequest(D.DocumentFormattingRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:h=>o.onRequest(D.DocumentRangeFormattingRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:h=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(l,I)=>h(l,I)),onRenameRequest:h=>o.onRequest(D.RenameRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),onPrepareRename:h=>o.onRequest(D.PrepareRenameRequest.type,(l,I)=>h(l,I)),onDocumentLinks:h=>o.onRequest(D.DocumentLinkRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentLinkResolve:h=>o.onRequest(D.DocumentLinkResolveRequest.type,(l,I)=>h(l,I)),onDocumentColor:h=>o.onRequest(D.DocumentColorRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onColorPresentation:h=>o.onRequest(D.ColorPresentationRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onFoldingRanges:h=>o.onRequest(D.FoldingRangeRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onSelectionRanges:h=>o.onRequest(D.SelectionRangeRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onExecuteCommand:h=>o.onRequest(D.ExecuteCommandRequest.type,(l,I)=>h(l,I,(0,M.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let h of g)h.attach(k);return o.onRequest(D.InitializeRequest.type,h=>{t.initialize(h),Me.string(h.trace)&&(i.trace=D.Trace.fromString(h.trace));for(let l of g)l.initialize(h.capabilities);if(q){let l=q(h,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,h),void 0);return v(l).then(I=>{if(I instanceof D.ResponseError)return I;let E=I;E||(E={capabilities:{}});let A=E.capabilities;A||(A={},E.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None:!Me.number(A.textDocumentSync)&&!Me.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of g)B.fillServerCapabilities(A);return E})}else{let l={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of g)I.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,O)return O(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(L)return L()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,h=>{i.trace=D.Trace.fromString(h.value)}),k}});var Mf=S(be=>{"use strict";var vp=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Cp=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ac=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return He.normalize(n.join("/"))}function Ec(){return process.platform==="win32"}function so(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let y=process.env,m=Object.create(null);Object.keys(y).forEach(f=>m[f]=y[f]),t&&Mc.existsSync(t)&&(m[o]?m[o]=t+He.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let f=(0,Gc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(f.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}f.on("error",g=>{a(g)}),f.on("message",g=>{g.c==="r"&&(f.send({c:"e"}),g.s?s(g.r):a(new Error(`Failed to resolve module: ${e}`)))});let _={c:"rs",a:e};f.send(_)}catch(f){a(f)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Ec()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Gc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Ec()?He.join(s,"node_modules"):He.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Dp(e){let t="yarn",n={encoding:"utf8"};Ec()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Gc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let y=JSON.parse(a);if(y.type==="log")return He.join(y.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Nc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Mc.existsSync(__filename.toUpperCase())||!Mc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?He.normalize(i).indexOf(He.normalize(o))===0:He.normalize(i).toLowerCase().indexOf(He.normalize(o).toLowerCase())===0}e.isParent=r})(Nc||(be.FileSystem=Nc={}));function wp(e,t,n,r){return n?(He.isAbsolute(n)||(n=He.join(e,n)),so(t,n,n,r).then(o=>Nc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>so(t,qc(r),e,r))):so(t,qc(r),e,r)}});var Nf=S(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var Ef=require("util"),rt=Je(),jc=class e extends rt.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Ef.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Fc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),rt.Disposable.create(()=>this.stream.off("data",t))}},Lc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},qf=Object.freeze({messageBuffer:Object.freeze({create:e=>new jc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Ef.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Fc(e),asWritableStream:e=>new Lc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Hc(){return qf}(function(e){function t(){rt.RAL.install(qf)}e.install=t})(Hc||(Hc={}));Wc.default=Hc});var Vc=S(N=>{"use strict";var Gf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Uc;var Bc=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Bc;var $c=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=$c;var zc=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=zc;var xt=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=xt;var Mt=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Mt;var co=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=co;var ao=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=ao;var Ep=process.env.XDG_RUNTIME_DIR,qp=new Map([["linux",107],["darwin",102]]);function Np(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Af.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Mp.realpathSync(Ep??xp.tmpdir()),r=qp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Af.randomBytes)(Math.floor(e/2)).toString("hex");return kp.join(n,`lsp-${o}.sock`)}function Ap(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new xt(a,t),new Mt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Gp(e,t="utf-8"){let n=(0,uo.createConnection)(e);return[new xt(n,t),new Mt(n,t)]}function jp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new xt(a,t),new Mt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Fp(e,t="utf-8"){let n=(0,uo.createConnection)(e,"127.0.0.1");return[new xt(n,t),new Mt(n,t)]}function Lp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Hp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Wp(e,t,n,r){n||(n=Oe.NullLogger);let o=Lp(e)?new co(e):e,i=Hp(t)?new ao(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var Xc=S(ot=>{"use strict";var Up=ot&&ot.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jf=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Up(t,e,n)};Object.defineProperty(ot,"__esModule",{value:!0});ot.createProtocolConnection=$p;var Bp=Vc();jf(Vc(),ot);jf(ee(),ot);function $p(e,t,n,r){return(0,Bp.createMessageConnection)(e,t,n,r)}});var Kc=S(he=>{"use strict";var zp=he&&he.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lf=he&&he.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&zp(t,e,n)};Object.defineProperty(he,"__esModule",{value:!0});he.ProposedFeatures=he.NotebookDocuments=he.TextDocuments=he.SemanticTokensBuilder=void 0;var Qp=Tc();Object.defineProperty(he,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Qp.SemanticTokensBuilder}});Lf(ee(),he);var Vp=Cc();Object.defineProperty(he,"TextDocuments",{enumerable:!0,get:function(){return Vp.TextDocuments}});var Xp=Dc();Object.defineProperty(he,"NotebookDocuments",{enumerable:!0,get:function(){return Xp.NotebookDocuments}});Lf(xc(),he);var Ff;(function(e){e.all={__brand:"features"}})(Ff||(he.ProposedFeatures=Ff={}))});var Jc=S(ve=>{"use strict";var Bf=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Kp=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$f=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{lo(),process.exit(mn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Yc.number(t)&&Qf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(mn?0:1)}},3e3)},get shutdownReceived(){return mn},set shutdownReceived(e){mn=e},exit:e=>{lo(),process.exit(e)}};function ey(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),Et.ConnectionStrategy.is(e)||Et.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),ty(i,s,a,o)}function ty(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,y,m=process.argv.slice(2);for(let f=0;f{lo(),process.exit(mn?0:1)}),a.on("close",()=>{lo(),process.exit(mn?0:1)})}let s=a=>{let y=(0,Et.createProtocolConnection)(e,t,a,n);return o&&ny(a),y};return(0,Yp.createConnection)(s,Zp,r)}function ny(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Hf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Hf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Yf={};xa(Yf,{TextDocument:()=>Zc});function ea(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ea(r,t),ea(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function ry(e){let t=Kf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var fo,Zc,Jf=ka(()=>{"use strict";fo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Kf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),y=Math.max(o.end.line,0),m=this._lineOffsets,f=Vf(r.text,!1,i);if(y-a===f.length)for(let g=0,v=f.length;gt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Xf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new fo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof fo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ea(i.map(ry),(f,_)=>{let g=f.range.start.line-_.range.start.line;return g===0?f.range.start.character-_.range.start.character:g}),y=0,m=[];for(let f of a){let _=o.offsetAt(f.range.start);if(_y&&m.push(s.substring(y,_)),f.newText.length&&m.push(f.newText),y=o.offsetAt(f.range.end)}return m.push(s.substr(y)),m.join("")}e.applyEdits=r})(Zc||(Zc={}))});var Un=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.DATATYPE_SET=ge.KEYWORD_SET=ge.PUNCTUATION=ge.OPERATORS=ge.DATATYPES=ge.KEYWORDS=void 0;ge.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ge.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ge.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ge.PUNCTUATION=["(",")","[","]",";",",",":","."];ge.KEYWORD_SET=new Set(ge.KEYWORDS);ge.DATATYPE_SET=new Set(ge.DATATYPES)});var qt=S(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.TokenKind=void 0;var Zf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Zf||(mo.TokenKind=Zf={}))});var po=S(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.tokenize=sy;var go=Un(),Re=qt();function oy(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function em(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function ho(e){return e!==void 0&&/[0-9]/.test(e)}function iy(e){let t=e.toUpperCase();return go.DATATYPE_SET.has(t)?Re.TokenKind.Datatype:go.KEYWORD_SET.has(t)?Re.TokenKind.Keyword:Re.TokenKind.Identifier}function sy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return ke.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return ke.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(v){return v===!0||v===!1}e.boolean=o;function i(v){return t.call(v)==="[object String]"}e.string=i;function s(v){return t.call(v)==="[object Number]"}e.number=s;function a(v,O,q){return t.call(v)==="[object Number]"&&O<=v&&v<=q}e.numberRange=a;function y(v){return t.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}e.integer=y;function m(v){return t.call(v)==="[object Number]"&&0<=v&&v<=2147483647}e.uinteger=m;function f(v){return t.call(v)==="[object Function]"}e.func=f;function _(v){return v!==null&&typeof v=="object"}e.objectLiteral=_;function h(v,O){return Array.isArray(v)&&v.every(O)}e.typedArray=h})(d||(d={}))});var Q=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.CM=fe.ProtocolNotificationType=fe.ProtocolNotificationType0=fe.ProtocolRequestType=fe.ProtocolRequestType0=fe.RegistrationType=fe.MessageDirection=void 0;var Kt=Je(),ru;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(ru||(fe.MessageDirection=ru={}));var js=class{____;method;constructor(t){this.method=t}};fe.RegistrationType=js;var Fs=class extends Kt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};fe.ProtocolRequestType0=Fs;var Ls=class extends Kt.RequestType{__;___;____;_pr;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolRequestType=Ls;var Hs=class extends Kt.NotificationType0{___;____;constructor(t){super(t)}};fe.ProtocolNotificationType0=Hs;var Ws=class extends Kt.NotificationType{___;____;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolNotificationType=Ws;var ou;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(ou||(fe.CM=ou={}))});var Sr=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Vh;Fe.string=iu;Fe.number=Xh;Fe.error=Kh;Fe.func=Yh;Fe.array=su;Fe.stringArray=Jh;Fe.typedArray=Zh;Fe.objectLiteral=eg;function Vh(e){return e===!0||e===!1}function iu(e){return typeof e=="string"||e instanceof String}function Xh(e){return typeof e=="number"||e instanceof Number}function Kh(e){return e instanceof Error}function Yh(e){return typeof e=="function"}function su(e){return Array.isArray(e)}function Jh(e){return su(e)&&e.every(t=>iu(t))}function Zh(e,t){return Array.isArray(e)&&e.every(t)}function eg(e){return e!==null&&typeof e=="object"}});var au=S(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.ImplementationRequest=void 0;var Us=Q(),cu;(function(e){e.method="textDocument/implementation",e.messageDirection=Us.MessageDirection.clientToServer,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("textDocument.implementation","implementationProvider")})(cu||(Ir.ImplementationRequest=cu={}))});var lu=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeDefinitionRequest=void 0;var Bs=Q(),uu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(uu||(Dr.TypeDefinitionRequest=uu={}))});var mu=S(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DidChangeWorkspaceFoldersNotification=Jt.WorkspaceFoldersRequest=void 0;var Yt=Q(),du;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Yt.MessageDirection.serverToClient,e.type=new Yt.ProtocolRequestType0(e.method),e.capabilities=Yt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(du||(Jt.WorkspaceFoldersRequest=du={}));var fu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolNotificationType(e.method),e.capabilities=Yt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(fu||(Jt.DidChangeWorkspaceFoldersNotification=fu={}))});var gu=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var $s=Q(),hu;(function(e){e.method="workspace/configuration",e.messageDirection=$s.MessageDirection.serverToClient,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("workspace.configuration",void 0)})(hu||(wr.ConfigurationRequest=hu={}))});var Tu=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ColorPresentationRequest=en.DocumentColorRequest=void 0;var Zt=Q(),pu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(pu||(en.DocumentColorRequest=pu={}));var yu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(yu||(en.ColorPresentationRequest=yu={}))});var vu=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.FoldingRangeRefreshRequest=nn.FoldingRangeRequest=void 0;var tn=Q(),_u;(function(e){e.method="textDocument/foldingRange",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(_u||(nn.FoldingRangeRequest=_u={}));var bu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=tn.MessageDirection.serverToClient,e.type=new tn.ProtocolRequestType0(e.method),e.capabilities=tn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(bu||(nn.FoldingRangeRefreshRequest=bu={}))});var Su=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=Q(),Cu;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(Cu||(Pr.DeclarationRequest=Cu={}))});var Du=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var Qs=Q(),Iu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Qs.MessageDirection.clientToServer,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Iu||(Or.SelectionRangeRequest=Iu={}))});var Ru=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.WorkDoneProgressCancelNotification=gt.WorkDoneProgressCreateRequest=gt.WorkDoneProgress=void 0;var tg=Je(),Mn=Q(),wu;(function(e){e.type=new tg.ProgressType;function t(n){return n===e.type}e.is=t})(wu||(gt.WorkDoneProgress=wu={}));var Pu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(Pu||(gt.WorkDoneProgressCreateRequest=Pu={}));var Ou;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(Ou||(gt.WorkDoneProgressCancelNotification=Ou={}))});var Eu=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CallHierarchyOutgoingCallsRequest=pt.CallHierarchyIncomingCallsRequest=pt.CallHierarchyPrepareRequest=void 0;var et=Q(),ku;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(ku||(pt.CallHierarchyPrepareRequest=ku={}));var xu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(xu||(pt.CallHierarchyIncomingCallsRequest=xu={}));var Mu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Mu||(pt.CallHierarchyOutgoingCallsRequest=Mu={}))});var Fu=S(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SemanticTokensRefreshRequest=Ie.SemanticTokensRangeRequest=Ie.SemanticTokensDeltaRequest=Ie.SemanticTokensRequest=Ie.SemanticTokensRegistrationType=Ie.TokenFormat=void 0;var Pe=Q(),qu;(function(e){e.Relative="relative"})(qu||(Ie.TokenFormat=qu={}));var En;(function(e){e.method="textDocument/semanticTokens",e.type=new Pe.RegistrationType(e.method)})(En||(Ie.SemanticTokensRegistrationType=En={}));var Nu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Nu||(Ie.SemanticTokensRequest=Nu={}));var Au;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Au||(Ie.SemanticTokensDeltaRequest=Au={}));var Gu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Gu||(Ie.SemanticTokensRangeRequest=Gu={}));var ju;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Pe.MessageDirection.serverToClient,e.type=new Pe.ProtocolRequestType0(e.method),e.capabilities=Pe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(ju||(Ie.SemanticTokensRefreshRequest=ju={}))});var Hu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Vs=Q(),Lu;(function(e){e.method="window/showDocument",e.messageDirection=Vs.MessageDirection.serverToClient,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("window.showDocument.support",void 0)})(Lu||(Rr.ShowDocumentRequest=Lu={}))});var Uu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.LinkedEditingRangeRequest=void 0;var Xs=Q(),Wu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Wu||(kr.LinkedEditingRangeRequest=Wu={}))});var Yu=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.WillDeleteFilesRequest=me.DidDeleteFilesNotification=me.DidRenameFilesNotification=me.WillRenameFilesRequest=me.DidCreateFilesNotification=me.WillCreateFilesRequest=me.FileOperationPatternKind=void 0;var ie=Q(),Bu;(function(e){e.file="file",e.folder="folder"})(Bu||(me.FileOperationPatternKind=Bu={}));var $u;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})($u||(me.WillCreateFilesRequest=$u={}));var zu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(zu||(me.DidCreateFilesNotification=zu={}));var Qu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Qu||(me.WillRenameFilesRequest=Qu={}));var Vu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Vu||(me.DidRenameFilesNotification=Vu={}));var Xu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Xu||(me.DidDeleteFilesNotification=Xu={}));var Ku;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Ku||(me.WillDeleteFilesRequest=Ku={}))});var tl=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.MonikerRequest=yt.MonikerKind=yt.UniquenessLevel=void 0;var Ks=Q(),Ju;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Ju||(yt.UniquenessLevel=Ju={}));var Zu;(function(e){e.$import="import",e.$export="export",e.local="local"})(Zu||(yt.MonikerKind=Zu={}));var el;(function(e){e.method="textDocument/moniker",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.moniker","monikerProvider")})(el||(yt.MonikerRequest=el={}))});var il=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TypeHierarchySubtypesRequest=Tt.TypeHierarchySupertypesRequest=Tt.TypeHierarchyPrepareRequest=void 0;var Rt=Q(),nl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Rt.MessageDirection.clientToServer,e.type=new Rt.ProtocolRequestType(e.method),e.capabilities=Rt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(nl||(Tt.TypeHierarchyPrepareRequest=nl={}));var rl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Rt.MessageDirection.clientToServer,e.type=new Rt.ProtocolRequestType(e.method)})(rl||(Tt.TypeHierarchySupertypesRequest=rl={}));var ol;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Rt.MessageDirection.clientToServer,e.type=new Rt.ProtocolRequestType(e.method)})(ol||(Tt.TypeHierarchySubtypesRequest=ol={}))});var al=S(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.InlineValueRefreshRequest=on.InlineValueRequest=void 0;var rn=Q(),sl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.inlineValue","inlineValueProvider")})(sl||(on.InlineValueRequest=sl={}));var cl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(cl||(on.InlineValueRefreshRequest=cl={}))});var fl=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var tt=Q(),ul;(function(e){e.method="textDocument/inlayHint",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint","inlayHintProvider")})(ul||(_t.InlayHintRequest=ul={}));var ll;(function(e){e.method="inlayHint/resolve",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(ll||(_t.InlayHintResolveRequest=ll={}));var dl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=tt.MessageDirection.serverToClient,e.type=new tt.ProtocolRequestType0(e.method),e.capabilities=tt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(dl||(_t.InlayHintRefreshRequest=dl={}))});var _l=S(se=>{"use strict";var ng=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rg=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),og=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var sg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),cg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ag=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.InlineCompletionRequest=void 0;var Zs=Q(),Pl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Pl||(Mr.InlineCompletionRequest=Pl={}))});var xl=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.TextDocumentContentRefreshRequest=cn.TextDocumentContentRequest=void 0;var Nn=Q(),Rl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Nn.MessageDirection.clientToServer,e.type=new Nn.ProtocolRequestType(e.method),e.capabilities=Nn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Rl||(cn.TextDocumentContentRequest=Rl={}));var kl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Nn.MessageDirection.serverToClient,e.type=new Nn.ProtocolRequestType(e.method)})(kl||(cn.TextDocumentContentRefreshRequest=kl={}))});var $d=S(c=>{"use strict";var ug=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Fl||(c.StaticRegistrationOptions=Fl={}));var Ll;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||rc.is(r.documentSelector))}e.is=t})(Ll||(c.TextDocumentRegistrationOptions=Ll={}));var Hl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Hl||(c.WorkDoneProgressOptions=Hl={}));var Wl;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Wl||(c.InitializeRequest=Wl={}));var Ul;(function(e){e.unknownProtocolVersion=1})(Ul||(c.InitializeErrorCodes=Ul={}));var Bl;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Bl||(c.InitializedNotification=Bl={}));var $l;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})($l||(c.ShutdownRequest=$l={}));var zl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(zl||(c.ExitNotification=zl={}));var Ql;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Ql||(c.DidChangeConfigurationNotification=Ql={}));var Vl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Vl||(c.MessageType=Vl={}));var Xl;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Xl||(c.ShowMessageNotification=Xl={}));var Kl;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Kl||(c.ShowMessageRequest=Kl={}));var Yl;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Yl||(c.LogMessageNotification=Yl={}));var Jl;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Jl||(c.TelemetryEventNotification=Jl={}));var Zl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Zl||(c.TextDocumentSyncKind=Zl={}));var ed;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ed||(c.DidOpenTextDocumentNotification=ed={}));var td;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(td||(c.TextDocumentContentChangeEvent=td={}));var nd;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(nd||(c.DidChangeTextDocumentNotification=nd={}));var rd;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(rd||(c.DidCloseTextDocumentNotification=rd={}));var od;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(od||(c.DidSaveTextDocumentNotification=od={}));var id;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(id||(c.TextDocumentSaveReason=id={}));var sd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(sd||(c.WillSaveTextDocumentNotification=sd={}));var cd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(cd||(c.WillSaveTextDocumentWaitUntilRequest=cd={}));var ad;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(ad||(c.DidChangeWatchedFilesNotification=ad={}));var ud;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ud||(c.FileChangeType=ud={}));var oc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Ml.URI.is(r.baseUri)||Ml.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(oc||(c.RelativePattern=oc={}));var ic;(function(e){function t(n){let r=n;return ce.string(r)||oc.is(r)}e.is=t})(ic||(c.GlobPattern=ic={}));var ld;(function(e){e.Create=1,e.Change=2,e.Delete=4})(ld||(c.WatchKind=ld={}));var dd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(dd||(c.PublishDiagnosticsNotification=dd={}));var fd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(fd||(c.CompletionTriggerKind=fd={}));var md;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(md||(c.CompletionRequest=md={}));var hd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(hd||(c.CompletionResolveRequest=hd={}));var gd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(gd||(c.HoverRequest=gd={}));var pd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(pd||(c.SignatureHelpTriggerKind=pd={}));var yd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(yd||(c.SignatureHelpRequest=yd={}));var Td;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(Td||(c.DefinitionRequest=Td={}));var _d;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(_d||(c.ReferencesRequest=_d={}));var bd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(bd||(c.DocumentHighlightRequest=bd={}));var vd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(vd||(c.DocumentSymbolRequest=vd={}));var Cd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Cd||(c.CodeActionRequest=Cd={}));var Sd;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Sd||(c.CodeActionResolveRequest=Sd={}));var Id;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Id||(c.WorkspaceSymbolRequest=Id={}));var Dd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Dd||(c.WorkspaceSymbolResolveRequest=Dd={}));var wd;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(wd||(c.CodeLensRequest=wd={}));var Pd;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Pd||(c.CodeLensResolveRequest=Pd={}));var Od;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Od||(c.CodeLensRefreshRequest=Od={}));var Rd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(Rd||(c.DocumentLinkRequest=Rd={}));var kd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(kd||(c.DocumentLinkResolveRequest=kd={}));var xd;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(xd||(c.DocumentFormattingRequest=xd={}));var Md;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Md||(c.DocumentRangeFormattingRequest=Md={}));var Ed;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Ed||(c.DocumentRangesFormattingRequest=Ed={}));var qd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(qd||(c.DocumentOnTypeFormattingRequest=qd={}));var Nd;(function(e){e.Identifier=1})(Nd||(c.PrepareSupportDefaultBehavior=Nd={}));var Ad;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Ad||(c.RenameRequest=Ad={}));var Gd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Gd||(c.PrepareRenameRequest=Gd={}));var jd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(jd||(c.ExecuteCommandRequest=jd={}));var Fd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(Fd||(c.ApplyWorkspaceEditRequest=Fd={}))});var Qd=S(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.createProtocolConnection=bg;var zd=Je();function bg(e,t,n,r){return zd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,zd.createMessageConnection)(e,t,n,r)}});var ee=S(De=>{"use strict";var vg=De&&De.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Er=De&&De.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&vg(t,e,n)};Object.defineProperty(De,"__esModule",{value:!0});De.LSPErrorCodes=De.createProtocolConnection=void 0;Er(Je(),De);Er((Cr(),Xn(vr)),De);Er(Q(),De);Er($d(),De);var Cg=Qd();Object.defineProperty(De,"createProtocolConnection",{enumerable:!0,get:function(){return Cg.createProtocolConnection}});var Vd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Vd||(De.LSPErrorCodes=Vd={}))});var mc=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.empty=void 0;bt.v4=Xd;bt.isUUID=Kd;bt.parse=Ig;bt.generateUuid=Dg;var Gn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},fc=class e extends Gn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};bt.empty=new Gn("00000000-0000-0000-0000-000000000000");function Xd(){return new fc}var Sg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Kd(e){return Sg.test(e)}function Ig(e){if(!Kd(e))throw new Error("invalid uuid");return new Gn(e)}function Dg(){return Xd().asHex()}});var Yd=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ProgressFeature=void 0;ln.attachWorkDone=Pg;ln.attachPartialResult=Rg;var vt=ee(),wg=mc(),un=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends un{_source;constructor(t,n){super(t,n),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends jn{_source;constructor(){super(),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Pg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new un(e,n)}var Og=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(vt.WorkDoneProgressCancelNotification.type,n=>{let r=un.Instances.get(n.token);(r instanceof qr||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new un(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,wg.generateUuid)();return this.connection.sendRequest(vt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Nr)}};ln.ProgressFeature=Og;var hc;(function(e){e.type=new vt.ProgressType})(hc||(hc={}));var gc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(hc.type,this._token,t)}};function Rg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new gc(e,n)}});var Jd=S(Ve=>{"use strict";var kg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?qg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Eg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ng});var Zd=S(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.WorkspaceFoldersFeature=void 0;var Ar=ee(),Ag=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ar.Emitter,this.connection.onNotification(Ar.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ar.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ar.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Gr.WorkspaceFoldersFeature=Ag});var ef=S(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.CallHierarchyFeature=void 0;var pc=ee(),Gg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(pc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=pc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=pc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};jr.CallHierarchyFeature=Gg});var Tc=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.SemanticTokensBuilder=Ct.SemanticTokensDiff=Ct.SemanticTokensFeature=void 0;var Fr=ee(),jg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Fr.SemanticTokensRefreshRequest.type),on:t=>{let n=Fr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Fr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Fr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ct.SemanticTokensFeature=jg;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let y=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;y[this._dataLen++]=s,y[this._dataLen++]=a,y[this._dataLen++]=r,y[this._dataLen++]=o,y[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],f=t[5*y];if(m===f){let _=t[5*a+1],h=t[5*y+1];return _-h}return m-f});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ShowDocumentFeature=void 0;var Fg=ee(),Lg=e=>class extends e{showDocument(t){return this.connection.sendRequest(Fg.ShowDocumentRequest.type,t)}};Hr.ShowDocumentFeature=Lg});var nf=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.FileOperationsFeature=void 0;var dn=ee(),Hg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(dn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(dn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(dn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(dn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(dn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(dn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Wr.FileOperationsFeature=Hg});var rf=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeFeature=void 0;var Wg=ee(),Ug=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Wg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Ur.LinkedEditingRangeFeature=Ug});var of=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.TypeHierarchyFeature=void 0;var _c=ee(),Bg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(_c.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=_c.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=_c.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.TypeHierarchyFeature=Bg});var cf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlineValueFeature=void 0;var sf=ee(),$g=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(sf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(sf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};$r.InlineValueFeature=$g});var uf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var af=ee(),zg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(af.FoldingRangeRefreshRequest.type),on:t=>{let n=af.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=zg});var lf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlayHintFeature=void 0;var bc=ee(),Qg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(bc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(bc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(bc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Qr.InlayHintFeature=Qg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DiagnosticFeature=void 0;var Fn=ee(),Vg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Vr.DiagnosticFeature=Vg});var Cc=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.TextDocuments=void 0;var xt=ee(),vc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new xt.Emitter,this._onDidOpen=new xt.Emitter,this._onDidClose=new xt.Emitter,this._onDidSave=new xt.Emitter,this._onWillSave=new xt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=xt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),xt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Xr.TextDocuments=vc});var Dc=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.NotebookDocuments=fn.NotebookSyncFeature=void 0;var xe=ee(),ff=Cc(),Xg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(xe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(xe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(xe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(xe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};fn.NotebookSyncFeature=Xg;var Sc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,xe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,xe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,xe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ic=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof ff.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new ff.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new xe.Emitter,this._onDidChange=new xe.Emitter,this._onDidSave=new xe.Emitter,this._onDidClose=new xe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Sc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,y=o.change;y.metadata!==void 0&&(a=!0,i.metadata=y.metadata);let m=[],f=[],_=[],h=[];if(y.cells!==void 0){let k=y.cells;if(k.structure!==void 0){let g=k.structure.array;if(i.cells.splice(g.start,g.deleteCount,...g.cells!==void 0?g.cells:[]),k.structure.didOpen!==void 0)for(let l of k.structure.didOpen)await n.openTextDocument({textDocument:l}),m.push(l.uri);if(k.structure.didClose)for(let l of k.structure.didClose)await n.closeTextDocument({textDocument:l}),f.push(l.uri)}if(k.data!==void 0){let g=new Map(k.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let I=g.get(i.cells[l].document);if(I!==void 0){let E=i.cells.splice(l,1,I);if(_.push({old:E[0],new:I}),g.delete(I.document),g.size===0)break}}}if(k.textContent!==void 0)for(let g of k.textContent)await n.changeTextDocument({textDocument:g.document,contentChanges:g.changes}),h.push(g.document.uri)}this.updateCellMap(i);let v={notebookDocument:i};a&&(v.metadata={old:s,new:i.metadata});let O=[];for(let k of m)O.push(this.getNotebookCell(k));let q=[];for(let k of f)q.push(this.getNotebookCell(k));let G=[];for(let k of h)G.push(this.getNotebookCell(k));(O.length>0||q.length>0||_.length>0||G.length>0)&&(v.cells={added:O,removed:q,changed:{data:_,textContent:G}}),(v.metadata!==void 0||v.cells!==void 0)&&this._onDidChange.fire(v)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),xe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};fn.NotebookDocuments=Ic});var mf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.MonikerFeature=void 0;var Kg=ee(),Yg=e=>class extends e{get moniker(){return{on:t=>{let n=Kg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.MonikerFeature=Yg});var hf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Jg=ee(),Zg=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Jg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=Zg});var pf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var gf=ee(),ep=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(gf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(gf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=ep});var xc=S(U=>{"use strict";var tp=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),np=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sf=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Oc;var Zr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}},yf=(0,cp.ShowDocumentFeature)((0,M.ProgressFeature)(Rc)),Tf;(function(e){function t(){return new eo}e.create=t})(Tf||(U.BulkRegistration=Tf={}));var eo=class{_registrations=[];_registered=new Set;add(t,n){let r=Me.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Pc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},_f;(function(e){function t(){return new Ln(void 0,[])}e.create=t})(_f||(U.BulkUnregistration=_f={}));var Ln=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Me.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},to=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof eo?this.registerMany(t):t instanceof Ln?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Me.string(n)?n:n.method,i=Pc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Me.string(t)?t:t.method,o=Pc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Ln(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},kc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},bf=(0,Tp.TextDocumentContentFeature)((0,ap.FileOperationsFeature)((0,op.WorkspaceFoldersFeature)((0,rp.ConfigurationFeature)(kc)))),no=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=oo;var vf=(0,yp.InlineCompletionFeature)((0,fp.FoldingRangeFeature)((0,pp.MonikerFeature)((0,hp.DiagnosticFeature)((0,mp.InlayHintFeature)((0,dp.InlineValueFeature)((0,lp.TypeHierarchyFeature)((0,up.LinkedEditingRangeFeature)((0,sp.SemanticTokensFeature)((0,ip.CallHierarchyFeature)(oo)))))))))),io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=io;var Cf=(0,gp.NotebookSyncFeature)(io);function If(e,t){return function(n){return t(e(n))}}function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function Of(e,t){return function(n){return t(e(n))}}function Rf(e,t){return function(n){return t(e(n))}}function kf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function _p(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,If),tracer:n(e.tracer,t.tracer,wf),telemetry:n(e.telemetry,t.telemetry,Df),client:n(e.client,t.client,Pf),window:n(e.window,t.window,Of),workspace:n(e.workspace,t.workspace,Rf),languages:n(e.languages,t.languages,kf),notebooks:n(e.notebooks,t.notebooks,xf)}}function bp(e,t,n){let r=n&&n.console?new(n.console(Zr)):new Zr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(no)):new no,s=n&&n.telemetry?new(n.telemetry(ro)):new ro,a=n&&n.client?new(n.client(to)):new to,y=n&&n.window?new(n.window(yf)):new yf,m=n&&n.workspace?new(n.workspace(bf)):new bf,f=n&&n.languages?new(n.languages(vf)):new vf,_=n&&n.notebooks?new(n.notebooks(Cf)):new Cf,h=[r,i,s,a,y,m,f,_];function v(g){return g instanceof Promise?g:Me.thenable(g)?new Promise((l,I)=>{g.then(E=>l(E),E=>I(E))}):Promise.resolve(g)}let O,q,G,k={listen:()=>o.listen(),sendRequest:(g,...l)=>o.sendRequest(Me.string(g)?g:g.method,...l),onRequest:(g,l)=>o.onRequest(g,l),sendNotification:(g,l)=>{let I=Me.string(g)?g:g.method;return o.sendNotification(I,l)},onNotification:(g,l)=>o.onNotification(g,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:g=>(q=g,{dispose:()=>{q=void 0}}),onInitialized:g=>o.onNotification(D.InitializedNotification.type,g),onShutdown:g=>(O=g,{dispose:()=>{O=void 0}}),onExit:g=>(G=g,{dispose:()=>{G=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return y},get workspace(){return m},get languages(){return f},get notebooks(){return _},onDidChangeConfiguration:g=>o.onNotification(D.DidChangeConfigurationNotification.type,g),onDidChangeWatchedFiles:g=>o.onNotification(D.DidChangeWatchedFilesNotification.type,g),__textDocumentSync:void 0,onDidOpenTextDocument:g=>o.onNotification(D.DidOpenTextDocumentNotification.type,g),onDidChangeTextDocument:g=>o.onNotification(D.DidChangeTextDocumentNotification.type,g),onDidCloseTextDocument:g=>o.onNotification(D.DidCloseTextDocumentNotification.type,g),onWillSaveTextDocument:g=>o.onNotification(D.WillSaveTextDocumentNotification.type,g),onWillSaveTextDocumentWaitUntil:g=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,g),onDidSaveTextDocument:g=>o.onNotification(D.DidSaveTextDocumentNotification.type,g),sendDiagnostics:g=>o.sendNotification(D.PublishDiagnosticsNotification.type,g),onHover:g=>o.onRequest(D.HoverRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onCompletion:g=>o.onRequest(D.CompletionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCompletionResolve:g=>o.onRequest(D.CompletionResolveRequest.type,g),onSignatureHelp:g=>o.onRequest(D.SignatureHelpRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDeclaration:g=>o.onRequest(D.DeclarationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDefinition:g=>o.onRequest(D.DefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onTypeDefinition:g=>o.onRequest(D.TypeDefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onImplementation:g=>o.onRequest(D.ImplementationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onReferences:g=>o.onRequest(D.ReferencesRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentHighlight:g=>o.onRequest(D.DocumentHighlightRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentSymbol:g=>o.onRequest(D.DocumentSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbol:g=>o.onRequest(D.WorkspaceSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:g=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,g),onCodeAction:g=>o.onRequest(D.CodeActionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeActionResolve:g=>o.onRequest(D.CodeActionResolveRequest.type,(l,I)=>g(l,I)),onCodeLens:g=>o.onRequest(D.CodeLensRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeLensResolve:g=>o.onRequest(D.CodeLensResolveRequest.type,(l,I)=>g(l,I)),onDocumentFormatting:g=>o.onRequest(D.DocumentFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:g=>o.onRequest(D.DocumentRangeFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:g=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(l,I)=>g(l,I)),onRenameRequest:g=>o.onRequest(D.RenameRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onPrepareRename:g=>o.onRequest(D.PrepareRenameRequest.type,(l,I)=>g(l,I)),onDocumentLinks:g=>o.onRequest(D.DocumentLinkRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentLinkResolve:g=>o.onRequest(D.DocumentLinkResolveRequest.type,(l,I)=>g(l,I)),onDocumentColor:g=>o.onRequest(D.DocumentColorRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onColorPresentation:g=>o.onRequest(D.ColorPresentationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onFoldingRanges:g=>o.onRequest(D.FoldingRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onSelectionRanges:g=>o.onRequest(D.SelectionRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onExecuteCommand:g=>o.onRequest(D.ExecuteCommandRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let g of h)g.attach(k);return o.onRequest(D.InitializeRequest.type,g=>{t.initialize(g),Me.string(g.trace)&&(i.trace=D.Trace.fromString(g.trace));for(let l of h)l.initialize(g.capabilities);if(q){let l=q(g,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,g),void 0);return v(l).then(I=>{if(I instanceof D.ResponseError)return I;let E=I;E||(E={capabilities:{}});let A=E.capabilities;A||(A={},E.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None:!Me.number(A.textDocumentSync)&&!Me.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of h)B.fillServerCapabilities(A);return E})}else{let l={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of h)I.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,O)return O(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(G)return G()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,g=>{i.trace=D.Trace.fromString(g.value)}),k}});var Mf=S(be=>{"use strict";var vp=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Cp=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ac=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return He.normalize(n.join("/"))}function Ec(){return process.platform==="win32"}function so(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let y=process.env,m=Object.create(null);Object.keys(y).forEach(f=>m[f]=y[f]),t&&Mc.existsSync(t)&&(m[o]?m[o]=t+He.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let f=(0,Gc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(f.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}f.on("error",h=>{a(h)}),f.on("message",h=>{h.c==="r"&&(f.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let _={c:"rs",a:e};f.send(_)}catch(f){a(f)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Ec()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Gc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Ec()?He.join(s,"node_modules"):He.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Dp(e){let t="yarn",n={encoding:"utf8"};Ec()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Gc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let y=JSON.parse(a);if(y.type==="log")return He.join(y.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Nc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Mc.existsSync(__filename.toUpperCase())||!Mc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?He.normalize(i).indexOf(He.normalize(o))===0:He.normalize(i).toLowerCase().indexOf(He.normalize(o).toLowerCase())===0}e.isParent=r})(Nc||(be.FileSystem=Nc={}));function wp(e,t,n,r){return n?(He.isAbsolute(n)||(n=He.join(e,n)),so(t,n,n,r).then(o=>Nc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>so(t,qc(r),e,r))):so(t,qc(r),e,r)}});var Nf=S(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var Ef=require("util"),rt=Je(),jc=class e extends rt.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Ef.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Fc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),rt.Disposable.create(()=>this.stream.off("data",t))}},Lc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},qf=Object.freeze({messageBuffer:Object.freeze({create:e=>new jc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Ef.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Fc(e),asWritableStream:e=>new Lc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Hc(){return qf}(function(e){function t(){rt.RAL.install(qf)}e.install=t})(Hc||(Hc={}));Wc.default=Hc});var Vc=S(N=>{"use strict";var Gf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Uc;var Bc=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Bc;var $c=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=$c;var zc=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=zc;var Mt=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=Mt;var Et=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Et;var co=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=co;var ao=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=ao;var Ep=process.env.XDG_RUNTIME_DIR,qp=new Map([["linux",107],["darwin",102]]);function Np(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Af.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Mp.realpathSync(Ep??xp.tmpdir()),r=qp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Af.randomBytes)(Math.floor(e/2)).toString("hex");return kp.join(n,`lsp-${o}.sock`)}function Ap(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Gp(e,t="utf-8"){let n=(0,uo.createConnection)(e);return[new Mt(n,t),new Et(n,t)]}function jp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Fp(e,t="utf-8"){let n=(0,uo.createConnection)(e,"127.0.0.1");return[new Mt(n,t),new Et(n,t)]}function Lp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Hp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Wp(e,t,n,r){n||(n=Oe.NullLogger);let o=Lp(e)?new co(e):e,i=Hp(t)?new ao(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var Xc=S(ot=>{"use strict";var Up=ot&&ot.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jf=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Up(t,e,n)};Object.defineProperty(ot,"__esModule",{value:!0});ot.createProtocolConnection=$p;var Bp=Vc();jf(Vc(),ot);jf(ee(),ot);function $p(e,t,n,r){return(0,Bp.createMessageConnection)(e,t,n,r)}});var Kc=S(he=>{"use strict";var zp=he&&he.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lf=he&&he.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&zp(t,e,n)};Object.defineProperty(he,"__esModule",{value:!0});he.ProposedFeatures=he.NotebookDocuments=he.TextDocuments=he.SemanticTokensBuilder=void 0;var Qp=Tc();Object.defineProperty(he,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Qp.SemanticTokensBuilder}});Lf(ee(),he);var Vp=Cc();Object.defineProperty(he,"TextDocuments",{enumerable:!0,get:function(){return Vp.TextDocuments}});var Xp=Dc();Object.defineProperty(he,"NotebookDocuments",{enumerable:!0,get:function(){return Xp.NotebookDocuments}});Lf(xc(),he);var Ff;(function(e){e.all={__brand:"features"}})(Ff||(he.ProposedFeatures=Ff={}))});var Jc=S(ve=>{"use strict";var Bf=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Kp=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$f=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{lo(),process.exit(mn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Yc.number(t)&&Qf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(mn?0:1)}},3e3)},get shutdownReceived(){return mn},set shutdownReceived(e){mn=e},exit:e=>{lo(),process.exit(e)}};function ey(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),qt.ConnectionStrategy.is(e)||qt.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),ty(i,s,a,o)}function ty(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,y,m=process.argv.slice(2);for(let f=0;f{lo(),process.exit(mn?0:1)}),a.on("close",()=>{lo(),process.exit(mn?0:1)})}let s=a=>{let y=(0,qt.createProtocolConnection)(e,t,a,n);return o&&ny(a),y};return(0,Yp.createConnection)(s,Zp,r)}function ny(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Hf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Hf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Yf={};xa(Yf,{TextDocument:()=>Zc});function ea(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ea(r,t),ea(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function ry(e){let t=Kf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var fo,Zc,Jf=ka(()=>{"use strict";fo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Kf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),y=Math.max(o.end.line,0),m=this._lineOffsets,f=Vf(r.text,!1,i);if(y-a===f.length)for(let h=0,v=f.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Xf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new fo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof fo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ea(i.map(ry),(f,_)=>{let h=f.range.start.line-_.range.start.line;return h===0?f.range.start.character-_.range.start.character:h}),y=0,m=[];for(let f of a){let _=o.offsetAt(f.range.start);if(_y&&m.push(s.substring(y,_)),f.newText.length&&m.push(f.newText),y=o.offsetAt(f.range.end)}return m.push(s.substr(y)),m.join("")}e.applyEdits=r})(Zc||(Zc={}))});var Un=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.DATATYPE_SET=ge.KEYWORD_SET=ge.PUNCTUATION=ge.OPERATORS=ge.DATATYPES=ge.KEYWORDS=void 0;ge.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ge.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ge.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ge.PUNCTUATION=["(",")","[","]",";",",",":","."];ge.KEYWORD_SET=new Set(ge.KEYWORDS);ge.DATATYPE_SET=new Set(ge.DATATYPES)});var Nt=S(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.TokenKind=void 0;var Zf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Zf||(mo.TokenKind=Zf={}))});var po=S(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.tokenize=sy;var go=Un(),Re=Nt();function oy(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function em(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function ho(e){return e!==void 0&&/[0-9]/.test(e)}function iy(e){let t=e.toUpperCase();return go.DATATYPE_SET.has(t)?Re.TokenKind.Datatype:go.KEYWORD_SET.has(t)?Re.TokenKind.Keyword:Re.TokenKind.Identifier}function sy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n{let _=n,g=i();s(f),t.push({kind:m,lexeme:e.slice(_,f),span:{start:_,end:f},range:{start:g,end:i()}})};for(;n{let _=n,h=i();s(f),t.push({kind:m,lexeme:e.slice(_,f),span:{start:_,end:f},range:{start:h,end:i()}})};for(;n",n)||e.startsWith("{<",n))&&(O===-1||O>v);a(Re.TokenKind.Comment,q?v:O===-1?e.length:O+1);continue}if(m==="'"){let g=n+1;for(;ge.startsWith(g,n));if(f!==void 0){a(Re.TokenKind.Operator,n+f.length);continue}if(go.PUNCTUATION.includes(m)){a(Re.TokenKind.Punctuation,n+1);continue}let _=e.codePointAt(n);a(Re.TokenKind.Unknown,n+(_!==void 0&&_>65535?2:1))}let y=i();return t.push({kind:Re.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:y,end:{...y}}}),t}});var yo=S(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.positionAt=ra;Bn.offsetAt=ay;Bn.sourceRange=uy;function na(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function tm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function nm(e){let t=[0];for(let n=0;n",n)||e.startsWith("{<",n))&&(O===-1||O>v);a(Re.TokenKind.Comment,q?v:O===-1?e.length:O+1);continue}if(m==="'"){let h=n+1;for(;he.startsWith(h,n));if(f!==void 0){a(Re.TokenKind.Operator,n+f.length);continue}if(go.PUNCTUATION.includes(m)){a(Re.TokenKind.Punctuation,n+1);continue}let _=e.codePointAt(n);a(Re.TokenKind.Unknown,n+(_!==void 0&&_>65535?2:1))}let y=i();return t.push({kind:Re.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:y,end:{...y}}}),t}});var yo=S(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.positionAt=ra;Bn.offsetAt=ay;Bn.sourceRange=uy;function na(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function tm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function nm(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ra(e,t){na(e,t);let n=nm(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=cy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function uy(e,t){if(na(e,t.start),na(e,t.end),t.end{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.parseQuickScript=by;var ly=Un(),To=yo(),ne=qt(),dy=po(),rm=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),om=new Set(["+","-","NOT","!","~"]),fy=new Set(["TRUE","FALSE","NULL","EOF"]),my=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),hy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function gy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function Nt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function qe(e){return e?.kind===ne.TokenKind.Keyword?Nt(e):void 0}function im(e,t,n=t){return(0,To.sourceRange)(e,{start:t.span.start,end:n.span.end})}function py(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,To.sourceRange)(e,{start:n,end:n}).range}function pe(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:py(e,r)}}function yy(e,t){return e.filter(n=>n.range.start.line===t&&!gy(n))}function sm(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function cm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?Nt(e):e.lexeme}var oa=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;om.has(cm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||fy.has(Nt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!my.has(Nt(t)??"")&&!rm.has(Nt(t)??"")&&!om.has(Nt(t)??"")}};function Ty(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):pe(n.code,n.message,n.token)}function Ee(e,t,n){let r=new oa(t).parse();return r===void 0?!0:(n.push(Ty(e,t,r)),!1)}var ia=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(pe("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ee(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):pe("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):pe("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ee(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&Ee(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&o_.lexeme==="=")&&r.some(_=>qe(_)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:f})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&t[n+1]?.kind===ne.TokenKind.Identifier){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ee(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function _y(e,t){let n=e[t];if(qe(n[0])!=="IF"||n.some(r=>qe(r)==="THEN")||!["AND","OR","NOT"].includes(qe(n[n.length-1])??""))return t;for(let r=t+1;rqe(o)==="THEN"))return r;return t}function by(e){let t=(0,dy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(g,v)=>yy(t,v)),o=[],i=[],s=[],a=new Array(n),y=[],m=[];for(let g=0;gv.kind==="dim"&&v.datatype!==void 0))if(!ly.DATATYPE_SET.has(g.datatype.toUpperCase())){let v=g.datatypeRange??g.range,O=`${v.start.line}:${v.start.character}`;if(f.has(O))continue;f.add(O),s.push({code:"unknown-datatype",message:`Unknown datatype '${g.datatype}'.`,severity:"error",range:v})}let _=(0,To.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,..._}}});var mm=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=dm;zn.formatQuickScriptStructure=fm;zn.formatQuickScript=Oy;var F=qt(),ua=po(),vy=_o();function am(e){return e===void 0||e.kind===F.TokenKind.Newline||e.kind===F.TokenKind.EOF}function aa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==F.TokenKind.Whitespace&&e[n].kind!==F.TokenKind.Newline)return e[n]}function lm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ca(e){$n(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function Cy(e,t){if(e[t].lexeme!=="-"||lm(e,t)?.kind!==F.TokenKind.Number)return!1;let n=aa(e,t);return n===void 0||n.kind===F.TokenKind.Operator||n.kind===F.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Sy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function dm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ua.tokenize)(r);if(o.some(m=>m.kind===F.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===F.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||ye(_,t.regionBlockCodeBegin??"{region"))&&(a=!0),v!==void 0&&(v.kind===F.TokenKind.Identifier||v.kind===F.TokenKind.Keyword||v.kind===F.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(f.lexeme)}let y=Sy(i.join(""),n);return{text:y,changed:y!==e}}function Iy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function Dy(e){let t=(0,ua.tokenize)(e),n=[];for(let r of t)r.kind===F.TokenKind.EOF||r.kind===F.TokenKind.Newline||(r.kind===F.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function ye(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function wy(e,t){return ye(e,t.blockCodeBegin??"{>")||ye(e,t.blockCodeEnd??"{<")||ye(e,t.blockCodeExclude??"{#")||ye(e,t.regionBlockCodeBegin??"{region")||ye(e,t.regionBlockCodeEnd??"{endregion")||ye(e,t.regionBlockCodeExclude??"{#")}function Py(e,t){let n=new Map;for(let r of(0,ua.tokenize)(e)){if(r.kind!==F.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` -`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&!wy(s,t)&&n.set(r.range.start.line,r)}return n}function um(e,t){if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let n=e.match(/^[ \t]*/)?.[0]??"",r=t.targetIndent.length-t.originalIndent.length;return r<0?e.slice(Math.min(-r,n.length)):r>0?t.targetIndent.slice(0,r)+e:e}function fm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,vy.parseQuickScript)(r),i=r.split(n),s=Py(r,t),a=[],y=Iy(t),m=0,f=0,_,g=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let O=0;O")||ye(k,t.regionBlockCodeBegin??"{region"))&&(m+=1)}let v=a.join(n);return{text:v,changed:v!==e,diagnostics:o.diagnostics}}function Oy(e,t={}){let n=dm(e,t);return fm(n.text,t)}});var vo=S(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.KNOWN_FUNCTIONS=void 0;bo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var ym=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.completions=ky;Qn.hoverAt=xy;Qn.documentSymbols=My;var pm=vo(),hm=Un(),gm=qt();function Ry(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of hm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of hm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of pm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function xy(e,t){let n=e.document.tokens.find(i=>Ry(i.range,t));if(n===void 0)return;if(n.kind===gm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===gm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=pm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function My(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var vm=S(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.quickFunctionNames=bm;hn.analyzeQuickScript=Gy;hn.definitionAt=jy;hn.referencesAt=Fy;var Ey=_o(),qy=vo(),Tm=yo(),At=qt();function _m(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![At.TokenKind.Whitespace,At.TokenKind.Newline,At.TokenKind.Comment].includes(e[n].kind))return e[n]}function Ay(e,t){for(let n=t+1;nf.name.toUpperCase()));for(let f of bm(e))s.add(f.toUpperCase());for(let f of t.knownFunctionNames??[])s.add(f.toUpperCase());for(let f of n.statements.filter(_=>_.kind==="dim"&&_.name!==void 0&&_.nameRange!==void 0)){let _=f.name.toUpperCase();if(i.get(_)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${f.name}' is already declared.`,severity:"error",range:f.nameRange});continue}let v={id:o.length,name:f.name,kind:"variable",range:f.range,selectionRange:f.nameRange,datatype:f.datatype,scopeId:0};o.push(v),i.set(_,v)}let a=new Map;for(let f of o)a.set((0,Tm.offsetAt)(e,f.selectionRange.start),f);let y=new Map;for(let f of n.statements.filter(_=>_.kind==="call"&&_.name!==void 0&&_.nameRange!==void 0))y.set((0,Tm.offsetAt)(e,f.nameRange.start),f.name);let m=[];for(let f=0;f")continue;let O=i.get(_.lexeme.toUpperCase()),q=y.get(_.span.start),L=Ay(n.tokens,f);if((q!==void 0||L?.lexeme==="(")&&!s.has(_.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${_.lexeme}'.`,severity:"warning",range:_.range}),O!==void 0||q!==void 0){let h=q!==void 0?"call":L?.lexeme==="="?"write":"read";m.push({name:_.lexeme,kind:h,range:_.range,declarationId:O?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(f=>f.id)}],symbols:o,references:m,diagnostics:r}}function jy(e,t){let n=e.references.find(r=>_m(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Fy(e,t,n=!0){let r=e.references.find(o=>_m(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var la=S(Ce=>{"use strict";var Ly=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),it=Ce&&Ce.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ly(t,e,n)};Object.defineProperty(Ce,"__esModule",{value:!0});it(Un(),Ce);it(mm(),Ce);it(vo(),Ce);it(ym(),Ce);it(_o(),Ce);it(vm(),Ce);it(yo(),Ce);it(qt(),Ce);it(po(),Ce)});var Cm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=Hy;Xe.diagnosticsFor=Uy;Xe.formattingEdits=By;Xe.symbolsFor=$y;Xe.definitionFor=zy;Xe.referencesFor=Qy;Xe.completionsFor=Vy;Xe.hoverFor=Xy;var Te=Jc(),Ne=la();function Hy(){return{capabilities:{textDocumentSync:Te.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Wy(e){switch(e){case"keyword":return Te.CompletionItemKind.Keyword;case"datatype":return Te.CompletionItemKind.TypeParameter;case"variable":return Te.CompletionItemKind.Variable;case"call-target":return Te.CompletionItemKind.Method;default:return Te.CompletionItemKind.Function}}function Uy(e,t){return(0,Ne.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?Te.DiagnosticSeverity.Error:Te.DiagnosticSeverity.Warning,source:"intouch-language"}))}function By(e,t){let n=(0,Ne.formatQuickScript)(e.getText(),t);return n.changed?[Te.TextEdit.replace(Te.Range.create(Te.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function $y(e){let t=n=>Te.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?Te.SymbolKind.Variable:Te.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Ne.documentSymbols)((0,Ne.analyzeQuickScript)(e.getText())).map(t)}function zy(e,t){let n=(0,Ne.definitionAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:Te.Location.create(e.uri,n)}function Qy(e,t,n){return(0,Ne.referencesAt)((0,Ne.analyzeQuickScript)(e.getText()),t,n).map(r=>Te.Location.create(e.uri,r))}function Vy(e){return(0,Ne.completions)((0,Ne.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Wy(t.kind),detail:t.detail}))}function Xy(e,t){let n=(0,Ne.hoverAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ra(e,t){na(e,t);let n=nm(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=cy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function uy(e,t){if(na(e,t.start),na(e,t.end),t.end{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.parseQuickScript=vy;var ly=Un(),To=yo(),ne=Nt(),dy=po(),rm=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),om=new Set(["+","-","NOT","!","~"]),fy=new Set(["TRUE","FALSE","NULL","EOF"]),my=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),hy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function gy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function St(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function qe(e){return e?.kind===ne.TokenKind.Keyword?St(e):void 0}function im(e,t,n=t){return(0,To.sourceRange)(e,{start:t.span.start,end:n.span.end})}function py(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,To.sourceRange)(e,{start:n,end:n}).range}function pe(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:py(e,r)}}function yy(e,t){return e.filter(n=>n.range.start.line===t&&!gy(n))}function sm(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function cm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?St(e):e.lexeme}var oa=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;om.has(cm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(St(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||fy.has(St(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!my.has(St(t)??"")&&!rm.has(St(t)??"")&&!om.has(St(t)??"")}};function Ty(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):pe(n.code,n.message,n.token)}function Ee(e,t,n){let r=new oa(t).parse();return r===void 0?!0:(n.push(Ty(e,t,r)),!1)}var ia=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(pe("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ee(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):pe("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):pe("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ee(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&Ee(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&o_.lexeme==="=")&&r.some(_=>qe(_)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:f})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&t[n+1]?.kind===ne.TokenKind.Identifier){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ee(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function _y(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function by(e,t){let n=_y(e,t);if(n>t)return n;let r=e[t];if(qe(r[0])!=="IF"||r.some(o=>qe(o)==="THEN")||!["AND","OR","NOT"].includes(qe(r[r.length-1])??""))return t;for(let o=t+1;oqe(i)==="THEN"))return o;return t}function vy(e){let t=(0,dy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(h,v)=>yy(t,v)),o=[],i=[],s=[],a=new Array(n),y=[],m=[];for(let h=0;hv.kind==="dim"&&v.datatype!==void 0))if(!ly.DATATYPE_SET.has(h.datatype.toUpperCase())){let v=h.datatypeRange??h.range,O=`${v.start.line}:${v.start.character}`;if(f.has(O))continue;f.add(O),s.push({code:"unknown-datatype",message:`Unknown datatype '${h.datatype}'.`,severity:"error",range:v})}let _=(0,To.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,..._}}});var mm=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=dm;zn.formatQuickScriptStructure=fm;zn.formatQuickScript=Ry;var L=Nt(),ua=po(),Cy=_o();function am(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function aa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function lm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ca(e){$n(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function Sy(e,t){if(e[t].lexeme!=="-"||lm(e,t)?.kind!==L.TokenKind.Number)return!1;let n=aa(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Iy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function dm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ua.tokenize)(r);if(o.some(m=>m.kind===L.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===L.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||ye(_,t.regionBlockCodeBegin??"{region"))&&(a=!0),v!==void 0&&(v.kind===L.TokenKind.Identifier||v.kind===L.TokenKind.Keyword||v.kind===L.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(f.lexeme)}let y=Iy(i.join(""),n);return{text:y,changed:y!==e}}function Dy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function wy(e){let t=(0,ua.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function ye(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function Py(e,t){return ye(e,t.blockCodeBegin??"{>")||ye(e,t.blockCodeEnd??"{<")||ye(e,t.blockCodeExclude??"{#")||ye(e,t.regionBlockCodeBegin??"{region")||ye(e,t.regionBlockCodeEnd??"{endregion")||ye(e,t.regionBlockCodeExclude??"{#")}function Oy(e,t){let n=new Map;for(let r of(0,ua.tokenize)(e)){if(r.kind!==L.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` +`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&!Py(s,t)&&n.set(r.range.start.line,r)}return n}function um(e,t){if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let n=e.match(/^[ \t]*/)?.[0]??"",r=t.targetIndent.length-t.originalIndent.length;return r<0?e.slice(Math.min(-r,n.length)):r>0?t.targetIndent.slice(0,r)+e:e}function fm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Cy.parseQuickScript)(r),i=r.split(n),s=Oy(r,t),a=[],y=Dy(t),m=0,f=0,_,h=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let O=0;O")||ye(k,t.regionBlockCodeBegin??"{region"))&&(m+=1)}let v=a.join(n);return{text:v,changed:v!==e,diagnostics:o.diagnostics}}function Ry(e,t={}){let n=dm(e,t);return fm(n.text,t)}});var vo=S(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.KNOWN_FUNCTIONS=void 0;bo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var ym=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.completions=xy;Qn.hoverAt=My;Qn.documentSymbols=Ey;var pm=vo(),hm=Un(),gm=Nt();function ky(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of hm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of hm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of pm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function My(e,t){let n=e.document.tokens.find(i=>ky(i.range,t));if(n===void 0)return;if(n.kind===gm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===gm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=pm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function Ey(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var vm=S(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.quickFunctionNames=bm;hn.analyzeQuickScript=jy;hn.definitionAt=Fy;hn.referencesAt=Ly;var qy=_o(),Ny=vo(),Tm=yo(),At=Nt();function _m(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![At.TokenKind.Whitespace,At.TokenKind.Newline,At.TokenKind.Comment].includes(e[n].kind))return e[n]}function Gy(e,t){for(let n=t+1;nf.name.toUpperCase()));for(let f of bm(e))s.add(f.toUpperCase());for(let f of t.knownFunctionNames??[])s.add(f.toUpperCase());for(let f of n.statements.filter(_=>_.kind==="dim"&&_.name!==void 0&&_.nameRange!==void 0)){let _=f.name.toUpperCase();if(i.get(_)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${f.name}' is already declared.`,severity:"error",range:f.nameRange});continue}let v={id:o.length,name:f.name,kind:"variable",range:f.range,selectionRange:f.nameRange,datatype:f.datatype,scopeId:0};o.push(v),i.set(_,v)}let a=new Map;for(let f of o)a.set((0,Tm.offsetAt)(e,f.selectionRange.start),f);let y=new Set;for(let f of n.statements.filter(_=>_.kind==="call"&&_.name!==void 0&&_.nameRange!==void 0))y.add((0,Tm.offsetAt)(e,f.nameRange.start));let m=[];for(let f=0;f")continue;let O=i.get(_.lexeme.toUpperCase()),q=Gy(n.tokens,f),G=y.has(_.span.start)||q?.lexeme==="(";if(G&&!s.has(_.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${_.lexeme}'.`,severity:"warning",range:_.range}),O!==void 0||G){let k=G?"call":q?.lexeme==="="?"write":"read";m.push({name:_.lexeme,kind:k,range:_.range,declarationId:O?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(f=>f.id)}],symbols:o,references:m,diagnostics:r}}function Fy(e,t){let n=e.references.find(r=>_m(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Ly(e,t,n=!0){let r=e.references.find(o=>_m(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var la=S(Ce=>{"use strict";var Hy=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),it=Ce&&Ce.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Hy(t,e,n)};Object.defineProperty(Ce,"__esModule",{value:!0});it(Un(),Ce);it(mm(),Ce);it(vo(),Ce);it(ym(),Ce);it(_o(),Ce);it(vm(),Ce);it(yo(),Ce);it(Nt(),Ce);it(po(),Ce)});var Cm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=Wy;Xe.diagnosticsFor=By;Xe.formattingEdits=$y;Xe.symbolsFor=zy;Xe.definitionFor=Qy;Xe.referencesFor=Vy;Xe.completionsFor=Xy;Xe.hoverFor=Ky;var Te=Jc(),Ne=la();function Wy(){return{capabilities:{textDocumentSync:Te.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Uy(e){switch(e){case"keyword":return Te.CompletionItemKind.Keyword;case"datatype":return Te.CompletionItemKind.TypeParameter;case"variable":return Te.CompletionItemKind.Variable;case"call-target":return Te.CompletionItemKind.Method;default:return Te.CompletionItemKind.Function}}function By(e,t){return(0,Ne.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?Te.DiagnosticSeverity.Error:Te.DiagnosticSeverity.Warning,source:"intouch-language"}))}function $y(e,t){let n=(0,Ne.formatQuickScript)(e.getText(),t);return n.changed?[Te.TextEdit.replace(Te.Range.create(Te.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function zy(e){let t=n=>Te.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?Te.SymbolKind.Variable:Te.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Ne.documentSymbols)((0,Ne.analyzeQuickScript)(e.getText())).map(t)}function Qy(e,t){let n=(0,Ne.definitionAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:Te.Location.create(e.uri,n)}function Vy(e,t,n){return(0,Ne.referencesAt)((0,Ne.analyzeQuickScript)(e.getText()),t,n).map(r=>Te.Location.create(e.uri,r))}function Xy(e){return(0,Ne.completions)((0,Ne.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Uy(t.kind),detail:t.detail}))}function Ky(e,t){let n=(0,Ne.hoverAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** -${n.detail}`},range:n.range}}});var Im=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.readSettings=Ky;Co.formattingSettings=Yy;function Gt(e){return typeof e=="object"&&e!==null?e:{}}function Sm(e){return typeof e=="number"?e:void 0}function da(e){return typeof e=="boolean"?e:void 0}function gn(e){return typeof e=="string"?e:void 0}function Ky(e){let t=Gt(e),n=t.VBI===void 0?t:Gt(t.VBI),r=Gt(n.formatter),o=Gt(r.EmptyLine),i=Gt(r.BC),s=Gt(r.Region),a=Gt(r.Misc);return{allowedNumberOfEmptyLines:Sm(o.allowedNumberOfEmptyLines),removeEmptyLines:da(o.RemoveEmptyLines),removeEmptyLinesInComments:da(o.EmptyLinesAlsoInComment),blockCodeBegin:gn(i.BlockCodeBegin),blockCodeEnd:gn(i.BlockCodeEnd),blockCodeExclude:gn(i.BlockCodeExclude),regionBlockCodeBegin:gn(s.BlockCodeBegin),regionBlockCodeEnd:gn(s.BlockCodeEnd),regionBlockCodeExclude:gn(s.BlockCodeExclude),insertSpaces:da(a.ReplaceTabToSpaces),indentSize:Sm(a.IndentSize)}}function Yy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var wm=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.WorkspaceFunctionIndex=void 0;var Dm=la(),fa=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,Dm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,Dm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};So.WorkspaceFunctionIndex=fa});var Jy=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zy=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ma=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,oT.fileURLToPath)(n)),km(ma),(0,St.serverCapabilities)()));_e.onInitialized(async()=>{let e=await _e.workspace.getConfiguration({section:"VBI"});ga=(0,ha.readSettings)({VBI:e}),Io()});_e.onDidChangeConfiguration(e=>{ga=(0,ha.readSettings)(e.settings),Io()});_e.onDidChangeWatchedFiles(()=>{km(ma)});Ue.onDidOpen(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidChangeContent(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidClose(e=>{Vn.removeDocument(e.document.uri),_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Io()});_e.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.formattingEdits)(t,(0,ha.formattingSettings)(ga,e.options))});_e.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.symbolsFor)(t)});_e.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,St.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,St.completionsFor)(t)});_e.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,St.hoverFor)(t,e.position)});_e.onShutdown(()=>{});Ue.listen(_e);_e.listen(); +${n.detail}`},range:n.range}}});var Im=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.readSettings=Yy;Co.formattingSettings=Jy;function Gt(e){return typeof e=="object"&&e!==null?e:{}}function Sm(e){return typeof e=="number"?e:void 0}function da(e){return typeof e=="boolean"?e:void 0}function gn(e){return typeof e=="string"?e:void 0}function Yy(e){let t=Gt(e),n=t.VBI===void 0?t:Gt(t.VBI),r=Gt(n.formatter),o=Gt(r.EmptyLine),i=Gt(r.BC),s=Gt(r.Region),a=Gt(r.Misc);return{allowedNumberOfEmptyLines:Sm(o.allowedNumberOfEmptyLines),removeEmptyLines:da(o.RemoveEmptyLines),removeEmptyLinesInComments:da(o.EmptyLinesAlsoInComment),blockCodeBegin:gn(i.BlockCodeBegin),blockCodeEnd:gn(i.BlockCodeEnd),blockCodeExclude:gn(i.BlockCodeExclude),regionBlockCodeBegin:gn(s.BlockCodeBegin),regionBlockCodeEnd:gn(s.BlockCodeEnd),regionBlockCodeExclude:gn(s.BlockCodeExclude),insertSpaces:da(a.ReplaceTabToSpaces),indentSize:Sm(a.IndentSize)}}function Jy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var wm=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.WorkspaceFunctionIndex=void 0;var Dm=la(),fa=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,Dm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,Dm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};So.WorkspaceFunctionIndex=fa});var Zy=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ma=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,iT.fileURLToPath)(n)),km(ma),(0,It.serverCapabilities)()));_e.onInitialized(async()=>{let e=await _e.workspace.getConfiguration({section:"VBI"});ga=(0,ha.readSettings)({VBI:e}),Io()});_e.onDidChangeConfiguration(e=>{ga=(0,ha.readSettings)(e.settings),Io()});_e.onDidChangeWatchedFiles(()=>{km(ma)});Ue.onDidOpen(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidChangeContent(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidClose(e=>{Vn.removeDocument(e.document.uri),_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Io()});_e.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.formattingEdits)(t,(0,ha.formattingSettings)(ga,e.options))});_e.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.symbolsFor)(t)});_e.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.completionsFor)(t)});_e.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.hoverFor)(t,e.position)});_e.onShutdown(()=>{});Ue.listen(_e);_e.listen(); //# sourceMappingURL=server.js.map diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts index f809da1..daec37c 100644 --- a/packages/core/src/parser.ts +++ b/packages/core/src/parser.ts @@ -90,7 +90,7 @@ interface ParsedStatement { } interface ExpressionIssue { - code: 'missing-expression' | 'unexpected-token' | 'unclosed-delimiter'; + code: 'missing-call-arguments' | 'missing-call-target' | 'missing-expression' | 'unexpected-token' | 'unclosed-delimiter'; message: string; token?: Token; } @@ -218,15 +218,7 @@ class ExpressionParser { const value = this.tokens[this.position].lexeme; if (value === '(') { const opening = this.tokens[this.position]; - this.position += 1; - if (this.tokens[this.position]?.lexeme !== ')') { - while (this.issue === undefined) { - this.parseBinary(1); - if (this.tokens[this.position]?.lexeme !== ',') break; - this.position += 1; - } - } - this.expectClosing(')', opening); + this.parseArguments(opening); continue; } if (value === '[') { @@ -255,6 +247,10 @@ class ExpressionParser { this.issue = { code: 'missing-expression', message: 'Expected a QuickScript expression.' }; return; } + if (word(token) === 'CALL') { + this.parseCallExpression(token); + return; + } if (token.lexeme === '(') { this.position += 1; this.parseBinary(1); @@ -269,6 +265,55 @@ class ExpressionParser { this.issue = { code: 'unexpected-token', message: `Unexpected token '${token.lexeme}' in expression.`, token }; } + private parseCallExpression(call: Token): void { + this.position += 1; + const target = this.tokens[this.position]; + if (!this.isName(target)) { + this.issue = { + code: 'missing-call-target', + message: 'CALL requires a callable name.', + token: target ?? call, + }; + return; + } + this.position += 1; + while (['.', '->', ':'].includes(this.tokens[this.position]?.lexeme ?? '')) { + const separator = this.tokens[this.position]; + this.position += 1; + if (!this.isName(this.tokens[this.position])) { + this.issue = { + code: 'missing-expression', + message: `Expected an identifier after '${separator.lexeme}'.`, + token: this.tokens[this.position], + }; + return; + } + this.position += 1; + } + const opening = this.tokens[this.position]; + if (opening?.lexeme !== '(') { + this.issue = { + code: 'missing-call-arguments', + message: "CALL requires '(' after the callable name.", + token: opening, + }; + return; + } + this.parseArguments(opening); + } + + private parseArguments(opening: Token): void { + this.position += 1; + if (this.tokens[this.position]?.lexeme !== ')') { + while (this.issue === undefined) { + this.parseBinary(1); + if (this.tokens[this.position]?.lexeme !== ',') break; + this.position += 1; + } + } + this.expectClosing(')', opening); + } + private expectClosing(value: ')' | ']', opening: Token): void { if (this.issue !== undefined) return; if (this.tokens[this.position]?.lexeme !== value) { @@ -649,7 +694,21 @@ class StatementParser { } } +function delimiterContinuationEnd(tokensByLine: readonly Token[][], startLine: number): number { + let depth = 0; + for (let line = startLine; line < tokensByLine.length; line += 1) { + for (const token of tokensByLine[line]) { + if (token.lexeme === '(' || token.lexeme === '[') depth += 1; + if (token.lexeme === ')' || token.lexeme === ']') depth = Math.max(0, depth - 1); + } + if (depth === 0 || tokensByLine[line].some(token => token.lexeme === ';')) return line; + } + return tokensByLine.length - 1; +} + function continuationEnd(tokensByLine: readonly Token[][], startLine: number): number { + const delimiterEnd = delimiterContinuationEnd(tokensByLine, startLine); + if (delimiterEnd > startLine) return delimiterEnd; const first = tokensByLine[startLine]; if (keyword(first[0]) !== 'IF' || first.some(token => keyword(token) === 'THEN')) return startLine; if (!['AND', 'OR', 'NOT'].includes(keyword(first[first.length - 1]) ?? '')) return startLine; diff --git a/packages/core/src/semantics.ts b/packages/core/src/semantics.ts index a8c6412..cebfb8f 100644 --- a/packages/core/src/semantics.ts +++ b/packages/core/src/semantics.ts @@ -120,9 +120,9 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) for (const symbol of symbols) { declarationOffsets.set(offsetAt(source, symbol.selectionRange.start), symbol); } - const callRanges = new Map(); + const statementCallTargets = new Set(); for (const call of document.statements.filter(statement => statement.kind === 'call' && statement.name !== undefined && statement.nameRange !== undefined)) { - callRanges.set(offsetAt(source, call.nameRange!.start), call.name!); + statementCallTargets.add(offsetAt(source, call.nameRange!.start)); } const references: QuickReference[] = []; @@ -141,9 +141,8 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) continue; } const resolved = declarationsByName.get(token.lexeme.toUpperCase()); - const callName = callRanges.get(token.span.start); const next = nextSignificant(document.tokens, index); - const isFunctionCall = callName !== undefined || next?.lexeme === '('; + const isFunctionCall = statementCallTargets.has(token.span.start) || next?.lexeme === '('; if (isFunctionCall && !knownCallableNames.has(token.lexeme.toUpperCase())) { diagnostics.push({ code: 'unknown-function', @@ -152,8 +151,8 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) range: token.range, }); } - if (resolved !== undefined || callName !== undefined) { - const kind: ReferenceKind = callName !== undefined ? 'call' : next?.lexeme === '=' ? 'write' : 'read'; + if (resolved !== undefined || isFunctionCall) { + const kind: ReferenceKind = isFunctionCall ? 'call' : next?.lexeme === '=' ? 'write' : 'read'; references.push({ name: token.lexeme, kind, range: token.range, declarationId: resolved?.id }); } } From 823b9382b4cebf29a8cdf86ff521ee25ad5ed08a Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:15:48 +0200 Subject: [PATCH 22/40] test(language): cover comment isolation and CALL expressions --- packages/core/test/languageService.test.ts | 4 ++ packages/core/test/parser.test.ts | 56 +++++++++++++++++++ packages/core/test/semantics.test.ts | 50 +++++++++++++++++ packages/core/test/tokenizer.test.ts | 18 ++++++ .../language-server/test/features.test.ts | 44 +++++++++++++++ 5 files changed, 172 insertions(+) diff --git a/packages/core/test/languageService.test.ts b/packages/core/test/languageService.test.ts index 2f2bdc7..82b699a 100644 --- a/packages/core/test/languageService.test.ts +++ b/packages/core/test/languageService.test.ts @@ -21,6 +21,10 @@ suite('QuickScript language service', () => { test('returns hover only for facts backed by language or document data', () => { assert.strictEqual(hoverAt(model, { line: 0, character: 5 })?.detail, 'Local INTEGER variable'); assert.match(hoverAt(model, { line: 2, character: 8 })?.detail ?? '', /IT-functions/); + assert.match( + hoverAt(analyzeQuickScript('Value = CALL GetSplittByIndex(Source, ".", 1);'), { line: 0, character: 15 })?.detail ?? '', + /Hermes Own functions/, + ); assert.strictEqual(hoverAt(analyzeQuickScript('UnknownName;'), { line: 0, character: 2 }), undefined); }); diff --git a/packages/core/test/parser.test.ts b/packages/core/test/parser.test.ts index 41ad166..836a699 100644 --- a/packages/core/test/parser.test.ts +++ b/packages/core/test/parser.test.ts @@ -99,6 +99,62 @@ suite('QuickScript structure parser', () => { assert.ok(!document.diagnostics.some(item => item.code === 'missing-semicolon')); }); + test('treats brace, apostrophe, and metadata comments as syntax trivia', () => { + const sources = [ + [ + '{', + 'Version history:', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + 'FR I = 1 TO 10', + 'IF X THEN;', + 'TABINDEX + TABINDEX + 1;', + '}', + ].join('\n'), + "' DIM X AS FALSCH; CALL NichtVorhanden();", + '{> Version Name Usage CALL DIM}', + '{< Version Name Usage CALL DIM}', + '{# Version Name Usage CALL DIM}', + '{region Version Name Usage CALL DIM}', + '{endregion Version Name Usage CALL DIM}', + ]; + + for (const source of sources) { + assert.deepStrictEqual(parseQuickScript(source).diagnostics, [], source); + } + }); + + test('accepts CALL expressions in assignments, arguments, and multiline calls', () => { + const sources = [ + 'CALL Foo();', + 'X = CALL Foo();', + 'Object.Field = CALL Foo();', + 'X = Bar(CALL Foo());', + 'X = CALL Foo(Bar(1), Y);', + 'CALL Foo(CALL Bar());', + [ + 'TAB_HandF.Reference = CALL SetReferenceBool(', + ' tTopic,', + ' BYTE + 20,', + ' BitS1', + ');', + ].join('\n'), + [ + 'tTopic = StringLower(', + ' CALL GetSplittByIndex(', + ' TAB_AAFF.Reference,', + ' ".",', + ' 1', + ' )', + ');', + ].join('\n'), + ]; + + for (const source of sources) { + assert.deepStrictEqual(parseQuickScript(source).diagnostics, [], source); + } + }); + test('accepts the documented statement and expression productions', () => { const sources = [ 'DIM First, Second AS REAL;', diff --git a/packages/core/test/semantics.test.ts b/packages/core/test/semantics.test.ts index 1e2c5c3..b8b7827 100644 --- a/packages/core/test/semantics.test.ts +++ b/packages/core/test/semantics.test.ts @@ -25,4 +25,54 @@ suite('QuickScript semantic model', () => { assert.strictEqual(definitionAt(model, { line: 1, character: 7 }), undefined); assert.strictEqual(definitionAt(model, { line: 1, character: 15 }), undefined); }); + + test('does not emit syntax or semantic diagnostics from comment tokens', () => { + const sources = [ + [ + '{', + 'Version history:', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + 'FR I = 1 TO 10', + 'IF X THEN;', + 'TABINDEX + TABINDEX + 1;', + '}', + ].join('\n'), + "' DIM X AS FALSCH; CALL NichtVorhanden();", + '{> Version Name Usage CALL DIM NichtVorhanden()}', + ]; + + for (const source of sources) { + assert.deepStrictEqual(analyzeQuickScript(source).diagnostics, [], source); + } + }); + + test('separates CALL expression syntax from known-function resolution', () => { + const known = analyzeQuickScript([ + 'X = CALL GetSplittByIndex(Source, ".", 1);', + 'Object.Field = CALL SetReferenceBool(Topic, 1, Bit);', + 'X = StringLower(CALL GetSplittByIndex(Source, ".", 1));', + ].join('\n')); + const unknown = analyzeQuickScript('X = CALL GetSplittByIndeXx(Source, ".", 1);'); + + assert.deepStrictEqual(known.diagnostics, []); + assert.deepStrictEqual(unknown.diagnostics.map(item => [item.code, item.range.start]), [ + ['unknown-function', { line: 0, character: 9 }], + ]); + }); + + test('uses the existing definition and reference path for CALL expression targets', () => { + const source = [ + 'DIM LocalCallable AS INTEGER;', + 'CALL LocalCallable();', + 'Value = CALL LocalCallable();', + 'Value = Wrapper(CALL LocalCallable());', + ].join('\n'); + const model = analyzeQuickScript(source, { knownFunctionNames: ['LocalCallable', 'Wrapper'] }); + const callReferences = model.references.filter(reference => reference.name === 'LocalCallable' && reference.kind === 'call'); + + assert.strictEqual(callReferences.length, 3); + assert.deepStrictEqual(definitionAt(model, { line: 2, character: 15 }), model.symbols[0].selectionRange); + assert.strictEqual(referencesAt(model, { line: 2, character: 15 }).length, 4); + }); }); diff --git a/packages/core/test/tokenizer.test.ts b/packages/core/test/tokenizer.test.ts index 20c3794..5b64b6e 100644 --- a/packages/core/test/tokenizer.test.ts +++ b/packages/core/test/tokenizer.test.ts @@ -90,6 +90,24 @@ suite('QuickScript tokenizer', () => { assert.deepStrictEqual(call?.range.start, { line: 6, character: 0 }); }); + test('keeps invalid-looking multiline QuickScript inside one comment token', () => { + const source = [ + '{', + 'Version history:', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + 'FR I = 1 TO 10', + 'IF X THEN;', + 'TABINDEX + TABINDEX + 1;', + '}', + ].join('\n'); + const content = tokenize(source).filter(token => token.kind !== TokenKind.EOF); + + assert.strictEqual(content.length, 1); + assert.strictEqual(content[0].kind, TokenKind.Comment); + assert.strictEqual(content[0].lexeme, source); + }); + test('keeps standalone comment nesting markers on their own line', () => { const tokens = tokenize('{>\nScript:\n{<}'); const comments = tokens.filter(token => token.kind === TokenKind.Comment); diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index b95dcf2..cdc9e17 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -170,6 +170,50 @@ suite('QuickScript language server features', () => { assert.ok(unknown.every(diagnostic => diagnostic.severity === 2)); }); + test('isolates code diagnostics from brace, apostrophe, and metadata comments', () => { + const source = [ + '{', + 'Version history:', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + 'FR I = 1 TO 10', + 'IF X THEN;', + 'TABINDEX + TABINDEX + 1;', + '}', + "' DIM Y AS FALSCH; CALL AuchNichtVorhanden();", + '{> Version Name Usage CALL DIM MetaNichtVorhanden()}', + ].join('\n'); + const commented = TextDocument.create('file:///comment-diagnostics.vbi', 'intouch', 1, source); + + assert.deepStrictEqual(diagnosticsFor(commented), []); + }); + + test('publishes only semantic diagnostics for syntactically valid CALL expressions', () => { + const source = [ + 'TAB_HandF.Reference = CALL SetReferenceBool(tTopic, 1, BitS1);', + 'tTopic = StringLower(CALL GetSplittByIndex(TAB_AAFF.Reference, ".", 1));', + 'Value = CALL GetSplittByIndeXx(Source, ".", 1);', + ].join('\n'); + const calls = TextDocument.create('file:///call-expressions.vbi', 'intouch', 1, source); + + assert.deepStrictEqual(diagnosticsFor(calls).map(item => [item.code, item.range.start]), [ + ['unknown-function', { line: 2, character: 13 }], + ]); + assert.ok(hoverFor(calls, { line: 1, character: 34 })); + assert.ok(completionsFor(calls).some(item => item.label === 'GetSplittByIndex')); + }); + + test('uses existing definition and references for CALL expression targets', () => { + const source = [ + 'DIM LocalCallable AS INTEGER;', + 'Value = CALL LocalCallable();', + ].join('\n'); + const calls = TextDocument.create('file:///call-expression-navigation.vbi', 'intouch', 1, source); + + assert.deepStrictEqual(definitionFor(calls, { line: 1, character: 15 })?.range.start, { line: 0, character: 4 }); + assert.strictEqual(referencesFor(calls, { line: 1, character: 15 }, true).length, 2); + }); + test('resolves QuickFunctions from open workspace documents case-insensitively', () => { const definitions = TextDocument.create('file:///definitions.vi', 'intouch', 1, 'Type: QuickFunction\nName: WorkspaceFunction'); const caller = TextDocument.create('file:///caller.vbi', 'intouch', 1, 'CALL workspacefunction();\nCALL WorkspaceFunctio();'); From fb064415b9369a7fae2307fd19da32a29555bfc0 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:15:57 +0200 Subject: [PATCH 23/40] docs(language): document CALL expression grammar --- docs/language/quickscript-grammar.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/language/quickscript-grammar.md b/docs/language/quickscript-grammar.md index abaaae2..eaf7830 100644 --- a/docs/language/quickscript-grammar.md +++ b/docs/language/quickscript-grammar.md @@ -47,8 +47,9 @@ additive = multiplicative, { ("+" | "-"), multiplicative } ; multiplicative = unary, { ("*" | "/" | "%" | "MOD"), unary } ; unary = { "+" | "-" | "NOT" | "!" | "~" }, postfix ; postfix = primary, { callSuffix | memberSuffix | indexSuffix } ; -primary = identifier | number | string | "TRUE" | "FALSE" | - "NULL" | "EOF" | "(", expression, ")" ; +primary = callExpression | identifier | number | string | "TRUE" | + "FALSE" | "NULL" | "EOF" | "(", expression, ")" ; +callExpression = "CALL", callable, "(", [ arguments ], ")" ; callSuffix = "(", [ expression, { ",", expression } ], ")" ; memberSuffix = ("." | "->" | ":"), identifier ; indexSuffix = "[", expression, "]" ; @@ -70,7 +71,7 @@ statement = dimStatement | assignment | callStatement | dimStatement = "DIM", identifier, { ",", identifier }, "AS", datatype, ";" ; assignment = assignable, "=", expression, ";" ; -callStatement = "CALL", callable, "(", [ arguments ], ")", ";" ; +callStatement = callExpression, ";" ; directCallStatement = callable, "(", [ arguments ], ")", ";" ; commandStatement = commandName, expression, ";" ; arguments = expression, { ",", expression } ; @@ -101,8 +102,11 @@ in `AND`, `OR`, or `NOT`. `EXIT FOR;` never opens or closes a loop. A function call may be used as a statement with or without `CALL`, as shown by -the repository corpus. Other bare expressions are not statements. In -particular, `X + X + 1;` is invalid while `X = X + 1;` is an assignment. +the repository corpus. Real HIL QuickScript also establishes `CALL` as an +expression prefix, including assignment values and nested arguments such as +`Value = CALL Foo();` and `Value = Bar(CALL Foo());`. Syntax validation and +callable-name resolution remain separate. Other bare expressions are not +statements. In particular, `X + X + 1;` is invalid while `X = X + 1;` is an assignment. The listed classic command statements use the repository-evidenced parenthesis-free form; the same names may still use normal call syntax when followed by `(`. From 30f395226464740b4255eadea0d6b95833d8c5c3 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:16:04 +0200 Subject: [PATCH 24/40] chore(release): prepare HIL version 1.5.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c053c1..df5fd85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.3", + "version": "1.5.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.3", + "version": "1.5.4", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index 7b4f7f8..25d3425 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.3", + "version": "1.5.4", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { From 12901654d33c2b833489b42d2fbe89cdd74da36f Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 19:13:58 +0200 Subject: [PATCH 25/40] fix(language): isolate multiline metadata comments --- CHANGELOG.md | 6 + dist/server.js | 42 +- docs/language/quickscript.md | 22 +- package-lock.json | 4 +- package.json | 2 +- packages/core/src/formatter.ts | 67 ++- packages/core/src/generatedFunctionCatalog.ts | 430 ++++++++++++++++++ packages/core/src/parser.ts | 18 +- packages/core/src/tokenizer.ts | 16 +- packages/core/test/formatter.test.ts | 69 ++- packages/core/test/parser.test.ts | 61 +++ packages/core/test/semantics.test.ts | 40 ++ packages/core/test/tokenizer.test.ts | 48 +- .../language-server/test/features.test.ts | 47 +- src/test/suite/extension.test.ts | 49 ++ syntaxes/intouch.tmLanguage.json | 7 +- 16 files changed, 862 insertions(+), 66 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f40353f..a907b92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ existing grammar, snippets, theme, and formatter command. - Add editor-independent core tests, language-server protocol smoke tests, and a manual `.vbi`/`.vi` HIL gate. +- Keep unclosed `{>` metadata blocks inside one multiline brace-comment token + while preserving diagnostics between same-line-closed nesting markers. +- Complete the generated Hermes helper catalog from the validated ground-program + QuickFunctions without reclassifying project helpers as native InTouch built-ins. +- Accept corpus-evidenced Unicode and digit-prefixed identifiers, numeric + dotfields, and multiline `IF` continuation forms. ### V1.4.0 diff --git a/dist/server.js b/dist/server.js index f00cf7f..3c3d226 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,28 +1,28 @@ -"use strict";var Ro=Object.defineProperty;var Vm=Object.getOwnPropertyDescriptor;var Xm=Object.getOwnPropertyNames;var Km=Object.prototype.hasOwnProperty;var ka=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},xa=(e,t)=>{for(var n in t)Ro(e,n,{get:t[n],enumerable:!0})},Ym=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xm(t))!Km.call(e,o)&&o!==n&&Ro(e,o,{get:()=>t[o],enumerable:!(r=Vm(t,o))||r.enumerable});return e};var Xn=e=>Ym(Ro({},"__esModule",{value:!0}),e);var Kn=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Jm;Ge.string=Ma;Ge.number=Zm;Ge.error=eh;Ge.func=Ea;Ge.array=qa;Ge.stringArray=th;Ge.typedArray=nh;Ge.thenable=rh;function Jm(e){return e===!0||e===!1}function Ma(e){return typeof e=="string"||e instanceof String}function Zm(e){return typeof e=="number"||e instanceof Number}function eh(e){return e instanceof Error}function Ea(e){return typeof e=="function"}function qa(e){return Array.isArray(e)}function th(e){return qa(e)&&e.every(t=>Ma(t))}function nh(e,t){return Array.isArray(e)&&e.every(t)}function rh(e){return e&&Ea(e.then)}});var Lt=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.boolean=oh;Ye.string=Na;Ye.number=ih;Ye.error=sh;Ye.func=ch;Ye.array=Aa;Ye.stringArray=ah;function oh(e){return e===!0||e===!1}function Na(e){return typeof e=="string"||e instanceof String}function ih(e){return typeof e=="number"||e instanceof Number}function sh(e){return e instanceof Error}function ch(e){return typeof e=="function"}function Aa(e){return Array.isArray(e)}function ah(e){return Aa(e)&&e.every(t=>Na(t))}});var ei=S(w=>{"use strict";var uh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.LRUCache=lt.LinkedMap=lt.Touch=void 0;var ue;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ue||(lt.Touch=ue={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ue.None){let r=this._map.get(t);if(r)return n!==ue.None&&this.touch(r,n),r.value}set(t,n,r=ue.None){let o=this._map.get(t);if(o)o.value=n,r!==ue.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ue.None:this.addItemLast(o);break;case ue.First:this.addItemFirst(o);break;case ue.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ue.First&&n!==ue.Last)){if(n===ue.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ue.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};lt.LinkedMap=Yn;var ti=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ue.AsNew){return super.get(t,n)}peek(t){return super.get(t,ue.None)}set(t,n){return super.set(t,n,ue.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};lt.LRUCache=ti});var Fa=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var ja;(function(e){function t(n){return{dispose:n}}e.create=t})(ja||(Jn.Disposable=ja={}))});var dt=S(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});var ri;function oi(){if(ri===void 0)throw new Error("No runtime abstraction layer installed");return ri}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ri=n}e.install=t})(oi||(oi={}));ii.default=oi});var Ht=S(ft=>{"use strict";var fh=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ft,"__esModule",{value:!0});ft.Emitter=ft.Event=void 0;var mh=fh(dt()),La;(function(e){let t={dispose(){}};e.None=function(){return t}})(La||(ft.Event=La={}));var si=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new si),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ft.Emitter=ci});var tr=S(Se=>{"use strict";var hh=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gh=Se&&Se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ph=Se&&Se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SharedArrayReceiverStrategy=Wt.SharedArraySenderStrategy=void 0;var vh=tr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var li=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Wt.SharedArraySenderStrategy=li;var di=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fi=class{token;constructor(t){this.token=new di(t)}cancel(){}dispose(){}},mi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new vh.CancellationTokenSource:new fi(n)}};Wt.SharedArrayReceiverStrategy=mi});var gi=S(Ut=>{"use strict";var Ch=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Semaphore=void 0;var Sh=Ch(dt()),hi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Sh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Ut.Semaphore=hi});var Ua=S(le=>{"use strict";var Ih=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Dh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,yi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};le.ReadableStreamMessageReader=_i});var Va=S(de=>{"use strict";var Rh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),kh=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xh=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(qh,r.byteLength.toString(),za),o.push(za),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};de.WriteableStreamMessageWriter=vi});var Xa=S(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AbstractMessageBuffer=void 0;var Nh=13,Ah=10,Gh=`\r -`,Ci=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};or.AbstractMessageBuffer=Ci});var Za=S(R=>{"use strict";var jh=R&&R.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fh=R&&R.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lh=R&&R.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(R.Trace=F={}));var Pi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Pi||(R.TraceValue=Pi={}));R.TraceValues=Pi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(R.Trace=F={}));var we;(function(e){e.Text="text",e.JSON="json"})(we||(R.TraceFormat=we={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(we||(R.TraceFormat=we={}));var Oi;(function(e){e.type=new x.NotificationType("$/setTrace")})(Oi||(R.SetTraceNotification=Oi={}));var ir;(function(e){e.type=new x.NotificationType("$/logTrace")})(ir||(R.LogTraceNotification=ir={}));var Sn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Sn||(R.ConnectionErrors=Sn={}));var $t=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};R.ConnectionError=$t;var Ri;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ri||(R.ConnectionStrategy=Ri={}));var sr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(sr||(R.IdCancellationReceiverStrategy=sr={}));var ki;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(ki||(R.RequestCancellationReceiverStrategy=ki={}));var cr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Si.CancellationTokenSource}});function t(n){return sr.is(n)||ki.is(n)}e.is=t})(cr||(R.CancellationReceiverStrategy=cr={}));var ar;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(ar||(R.CancellationSenderStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({receiver:cr.Message,sender:ar.Message});function t(n){let r=n;return r&&cr.is(r.receiver)&&ar.is(r.sender)}e.is=t})(ur||(R.CancellationStrategy=ur={}));var lr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(lr||(R.MessageStrategy=lr={}));var Ja;(function(e){function t(n){let r=n;return r&&(ur.is(r.cancellationStrategy)||Ri.is(r.connectionStrategy)||lr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Ja||(R.ConnectionOptions=Ja={}));var je;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(je||(je={}));function Wh(e,t,n,r){let o=n!==void 0?n:R.NullLogger,i=0,s=0,a=0,y="2.0",m=r?.maxParallelism??-1,f=0,_,h=new Map,v,O=new Map,q=new Map,G,k=new Ya.LinkedMap,g=new Map,l=new Set,I=new Map,E=F.Off,A=we.Text,B,V=je.New,st=new vn.Emitter,ya=new vn.Emitter,Ta=new vn.Emitter,_a=new vn.Emitter,ba=new vn.Emitter,ct=r&&r.cancellationStrategy?r.cancellationStrategy:ur.Message;function xm(u){}function va(){return V===je.Listening}function Ca(){return V===je.Closed}function jt(){return V===je.Disposed}function Sa(){(V===je.New||V===je.Listening)&&(V=je.Closed,ya.fire(void 0))}function Mm(u){st.fire([u,void 0,void 0])}function Em(u){st.fire(u)}e.onClose(Sa),e.onError(Mm),t.onClose(Sa),t.onError(Em);function Ia(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function qm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Nm(){return"not-"+(++s).toString()}function Am(u,b){x.Message.isRequest(b)?u.set(Ia(b.id),b):x.Message.isResponse(b)?m===-1?u.set(qm(b.id),b):wa(b):u.set(Nm(),b)}function Do(){G||k.size===0||m!==-1&&f>=m||(G=(0,Ka.default)().timer.setImmediate(async()=>{if(G=void 0,k.size===0||m!==-1&&f>=m)return;let u=k.shift(),b;try{f++;let C=r?.messageStrategy;lr.is(C)?b=C.handleMessage(u,Da):b=Da(u)}catch(C){o.error(`Processing message queue failed: ${C.toString()}`)}finally{b instanceof Promise?b.then(()=>{f--,Do()}).catch(C=>{o.error(`Processing message queue failed: ${C.toString()}`)}):f--,Do()}}))}async function Da(u){return x.Message.isRequest(u)?jm(u):x.Message.isNotification(u)?Fm(u):x.Message.isResponse(u)?wa(u):Lm(u)}let Gm=u=>{try{if(x.Message.isNotification(u)&&u.method===In.type.method){let b=u.params.id,C=Ia(b),P=k.get(C);if(x.Message.isRequest(P)){let X=r?.connectionStrategy,H=X&&X.cancelUndispatched?X.cancelUndispatched(P,xm):void 0;if(H&&(H.error!==void 0||H.result!==void 0)){k.delete(C),I.delete(b),H.id=P.id,wo(H,u.method,Date.now()),t.write(H).catch(()=>o.error("Sending response for canceled message failed."));return}}let j=I.get(b);if(j!==void 0){j.cancel(),Po(u);return}else l.add(b)}Am(k,u)}finally{Do()}};async function jm(u){if(jt())return Promise.resolve();function b(re,ae,J){let Z={jsonrpc:y,id:u.id};return re instanceof x.ResponseError?Z.error=re.toJson():Z.result=re===void 0?null:re,wo(Z,ae,J),t.write(Z)}function C(re,ae,J){let Z={jsonrpc:y,id:u.id,error:re.toJson()};return wo(Z,ae,J),t.write(Z)}Um(u);let P=h.get(u.method),j,X;P&&(j=P.type,X=P.handler);let H=Date.now();if(X||_){let re=u.id??String(Date.now()),ae=sr.is(ct.receiver)?ct.receiver.createCancellationTokenSource(re):ct.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&ae.cancel(),u.id!==null&&I.set(re,ae);try{let J;if(X)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,H);J=X(ae.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===x.ParameterStructures.byName)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,H);J=X(...u.params,ae.token)}else{if(j!==void 0&&j.parameterStructures===x.ParameterStructures.byPosition)return C(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,H);J=X(u.params,ae.token)}else _&&(J=_(u.method,u.params,ae.token));let Z=await J;await b(Z,u.method,H)}catch(J){J instanceof x.ResponseError?await b(J,u.method,H):J&&K.string(J.message)?await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,H):await C(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,H)}finally{I.delete(re)}}else await C(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,H)}function wa(u){if(!jt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let b=u.id,C=g.get(b);if(Bm(u,C),C!==void 0){g.delete(b);try{if(u.error){let P=u.error;C.reject(new x.ResponseError(P.code,P.message,P.data))}else if(u.result!==void 0)C.resolve(u.result);else throw new Error("Should never happen.")}catch(P){P.message?o.error(`Response handler '${C.method}' failed with message: ${P.message}`):o.error(`Response handler '${C.method}' failed unexpectedly.`)}}}}async function Fm(u){if(jt())return;let b,C;if(u.method===In.type.method){let P=u.params.id;l.delete(P),Po(u);return}else{let P=O.get(u.method);P&&(C=P.handler,b=P.type)}if(C||v)try{if(Po(u),C)if(u.params===void 0)b!==void 0&&b.numberOfParams!==0&&b.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received none.`),await C();else if(Array.isArray(u.params)){let P=u.params;u.method===Cn.type.method&&P.length===2&&Ii.is(P[0])?await C({token:P[0],value:P[1]}):(b!==void 0&&(b.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),b.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received ${P.length} arguments`)),await C(...P))}else b!==void 0&&b.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await C(u.params);else v&&await v(u.method,u.params)}catch(P){P.message?o.error(`Notification handler '${u.method}' failed with message: ${P.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Ta.fire(u)}function Lm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let b=u;if(K.string(b.id)||K.number(b.id)){let C=b.id,P=g.get(C);P&&P.reject(new Error("The received response has neither a result nor an error property."))}}function at(u){if(u!=null)switch(E){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Hm(u){if(!(E===F.Off||!B))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,b)}else Ft("send-request",u)}function Wm(u){if(!(E===F.Off||!B))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Sending notification '${u.method}'.`,b)}else Ft("send-notification",u)}function wo(u,b,C){if(!(E===F.Off||!B))if(A===we.Text){let P;(E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?P=`Error data: ${at(u.error.data)}`:u.result?P=`Result: ${at(u.result)}`:u.error===void 0&&(P="No result returned.")),B.log(`Sending response '${b} - (${u.id})'. Processing request took ${Date.now()-C}ms`,P)}else Ft("send-response",u)}function Um(u){if(!(E===F.Off||!B))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,b)}else Ft("receive-request",u)}function Po(u){if(!(E===F.Off||!B||u.method===ir.type.method))if(A===we.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Received notification '${u.method}'.`,b)}else Ft("receive-notification",u)}function Bm(u,b){if(!(E===F.Off||!B))if(A===we.Text){let C;if((E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?C=`Error data: ${at(u.error.data)}`:u.result?C=`Result: ${at(u.result)}`:u.error===void 0&&(C="No result returned.")),b){let P=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${b.method} - (${u.id})' in ${Date.now()-b.timerStart}ms.${P}`,C)}else B.log(`Received response ${u.id} without active response promise.`,C)}else Ft("receive-response",u)}function Ft(u,b){if(!B||E===F.Off)return;let C={isLSPMessage:!0,type:u,message:b,timestamp:Date.now()};B.log(C)}function pn(){if(Ca())throw new $t(Sn.Closed,"Connection is closed.");if(jt())throw new $t(Sn.Disposed,"Connection is disposed.")}function $m(){if(va())throw new $t(Sn.AlreadyListening,"Connection is already listening")}function zm(){if(!va())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function Pa(u){if(u!==null)return u}function Oa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Oo(u,b){switch(u){case x.ParameterStructures.auto:return Oa(b)?Pa(b):[yn(b)];case x.ParameterStructures.byName:if(!Oa(b))throw new Error("Received parameters by name but param is not an object literal.");return Pa(b);case x.ParameterStructures.byPosition:return[yn(b)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ra(u,b){let C,P=u.numberOfParams;switch(P){case 0:C=void 0;break;case 1:C=Oo(u.parameterStructures,b[0]);break;default:C=[];for(let j=0;j{pn();let C,P;if(K.string(u)){C=u;let X=b[0],H=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(X)&&(H=1,re=X);let ae=b.length,J=ae-H;switch(J){case 0:P=void 0;break;case 1:P=Oo(re,b[H]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);P=b.slice(H,ae).map(Z=>yn(Z));break}}else{let X=b;C=u.method,P=Ra(u,X)}let j={jsonrpc:y,method:C,params:P};return Wm(j),t.write(j).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,b)=>{pn();let C;return K.func(u)?v=u:b&&(K.string(u)?(C=u,O.set(u,{type:void 0,handler:b})):(C=u.method,O.set(u.method,{type:u,handler:b}))),{dispose:()=>{C!==void 0?O.get(C)?.handler===b&&O.delete(C):v===u&&(v=void 0)}}},onProgress:(u,b,C)=>{if(q.has(b))throw new Error(`Progress handler for token ${b} already registered`);return q.set(b,C),{dispose:()=>{q.get(b)===C&&q.delete(b)}}},sendProgress:(u,b,C)=>Dt.sendNotification(Cn.type,{token:b,value:C}),onUnhandledProgress:_a.event,sendRequest:(u,...b)=>{pn(),zm();function C(Z,Ae){let Ke=ct.sender.sendCancellation(Z,Ae);Ke===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ae}`):Ke.catch(()=>{o.log(`Sending cancellation messages for id ${Ae} failed.`)})}let P,j,X;if(K.string(u)){P=u;let Z=b[0],Ae=b[b.length-1],Ke=0,Tn=x.ParameterStructures.auto;x.ParameterStructures.is(Z)&&(Ke=1,Tn=Z);let wt=b.length;Si.CancellationToken.is(Ae)&&(wt=wt-1,X=Ae);let Be=wt-Ke;switch(Be){case 0:j=void 0;break;case 1:j=Oo(Tn,b[Ke]);break;default:if(Tn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);j=b.slice(Ke,wt).map(Qm=>yn(Qm));break}}else{let Z=b;P=u.method,j=Ra(u,Z);let Ae=u.numberOfParams;X=Si.CancellationToken.is(Z[Ae])?Z[Ae]:void 0}let H=i++,re,ae=!1;X!==void 0&&(X.isCancellationRequested?ae=!0:re=X.onCancellationRequested(()=>{C(Dt,H)}));let J={jsonrpc:y,id:H,method:P,params:j};return Hm(J),typeof ct.sender.enableCancellation=="function"&&ct.sender.enableCancellation(J),new Promise(async(Z,Ae)=>{let Ke=Be=>{Z(Be),ct.sender.cleanup(H),re?.dispose()},Tn=Be=>{Ae(Be),ct.sender.cleanup(H),re?.dispose()},wt={method:P,timerStart:Date.now(),resolve:Ke,reject:Tn};try{g.set(H,wt),await t.write(J),ae&&C(Dt,H)}catch(Be){throw g.delete(H),wt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,b)=>{pn();let C=null;return wi.is(u)?(C=void 0,_=u):K.string(u)?(C=null,b!==void 0&&(C=u,h.set(u,{handler:b,type:void 0}))):b!==void 0&&(C=u.method,h.set(u.method,{type:u,handler:b})),{dispose:()=>{C!==null&&(C!==void 0?h.get(C)?.handler===b&&h.delete(C):_===u&&(_=void 0))}}},hasPendingResponse:()=>g.size>0,trace:async(u,b,C)=>{let P=!1,j=we.Text;C!==void 0&&(K.boolean(C)?P=C:(P=C.sendNotification||!1,j=C.traceFormat||we.Text)),E=u,A=j,E===F.Off?B=void 0:B=b,P&&!Ca()&&!jt()&&await Dt.sendNotification(Oi.type,{value:F.toString(u)})},onError:st.event,onClose:ya.event,onUnhandledNotification:Ta.event,onDispose:ba.event,end:()=>{t.end()},dispose:()=>{if(jt())return;V=je.Disposed,ba.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let b of g.values())b.reject(u);g=new Map,I=new Map,l=new Set,k=new Ya.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{pn(),$m(),V=je.Listening,e.listen(Gm)},inspect:()=>{(0,Ka.default)().console.log("inspect")}};return Dt.onNotification(ir.type,u=>{if(E===F.Off||!B)return;let b=E===F.Verbose||E===F.Compact;B.log(u.message,b?u.verbose:void 0)}),Dt.onNotification(Cn.type,async u=>{let b=q.get(u.token);b?await b(u.value):_a.fire(u)}),Dt}});var Je=S(p=>{"use strict";var Uh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var $=ei();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var xi=ni();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return xi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return xi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return xi.Touch}});var Bh=Fa();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Bh.Disposable}});var eu=Ht();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return eu.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return eu.Emitter}});var tu=tr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return tu.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return tu.CancellationToken}});var nu=Ha();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return nu.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return nu.SharedArrayReceiverStrategy}});var Mi=Ua();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Mi.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Mi.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Mi.ReadableStreamMessageReader}});var Ei=Va();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ei.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ei.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ei.WriteableStreamMessageWriter}});var $h=Xa();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return $h.AbstractMessageBuffer}});var te=Za();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return te.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return te.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return te.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return te.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return te.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return te.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return te.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return te.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return te.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return te.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return te.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return te.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return te.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return te.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return te.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return te.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return te.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return te.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return te.TraceValues}});var zh=Uh(dt());p.RAL=zh.default});var vr={};xa(vr,{AnnotatedTextEdit:()=>Ze,ApplyKind:()=>ts,ChangeAnnotation:()=>mt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>ys,CodeActionContext:()=>ps,CodeActionKind:()=>gs,CodeActionTag:()=>yr,CodeActionTriggerKind:()=>xn,CodeDescription:()=>Ui,CodeLens:()=>Ts,Color:()=>fr,ColorInformation:()=>Gi,ColorPresentation:()=>ji,Command:()=>Ot,CompletionItem:()=>rs,CompletionItemKind:()=>Ki,CompletionItemLabelDetails:()=>ns,CompletionItemTag:()=>Ji,CompletionList:()=>os,CreateFile:()=>Qt,DeleteFile:()=>Xt,Diagnostic:()=>Pn,DiagnosticRelatedInformation:()=>mr,DiagnosticSeverity:()=>Hi,DiagnosticTag:()=>Wi,DocumentHighlight:()=>us,DocumentHighlightKind:()=>as,DocumentLink:()=>bs,DocumentSymbol:()=>hs,DocumentUri:()=>qi,EOL:()=>Qh,FoldingRange:()=>Li,FoldingRangeKind:()=>Fi,FormattingOptions:()=>_s,Hover:()=>is,InlayHint:()=>Rs,InlayHintKind:()=>Tr,InlayHintLabelPart:()=>_r,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>ks,InlineCompletionList:()=>xs,InlineCompletionTriggerKind:()=>Ms,InlineValueContext:()=>Os,InlineValueEvaluatableExpression:()=>Ps,InlineValueText:()=>Ds,InlineValueVariableLookup:()=>ws,InsertReplaceEdit:()=>Zi,InsertTextFormat:()=>Yi,InsertTextMode:()=>es,LanguageKind:()=>Vi,Location:()=>wn,LocationLink:()=>Ai,MarkedString:()=>kn,MarkupContent:()=>ht,MarkupKind:()=>pr,OptionalVersionedTextDocumentIdentifier:()=>Rn,ParameterInformation:()=>ss,Position:()=>ke,Range:()=>Y,RenameFile:()=>Vt,SelectedCompletionInfo:()=>Es,SelectionRange:()=>vs,SemanticTokenModifiers:()=>Ss,SemanticTokenTypes:()=>Cs,SemanticTokens:()=>Is,SignatureInformation:()=>cs,SnippetTextEdit:()=>Bi,StringValue:()=>br,SymbolInformation:()=>fs,SymbolKind:()=>ls,SymbolTag:()=>ds,TextDocument:()=>As,TextDocumentEdit:()=>On,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Xi,TextEdit:()=>$e,URI:()=>dr,VersionedTextDocumentIdentifier:()=>Qi,WorkspaceChange:()=>$i,WorkspaceEdit:()=>hr,WorkspaceFolder:()=>Ns,WorkspaceSymbol:()=>ms,integer:()=>Ni,uinteger:()=>Dn});var qi,dr,Ni,Dn,ke,Y,wn,Ai,fr,Gi,ji,Fi,Li,mr,Hi,Wi,Ui,Pn,Ot,$e,mt,oe,Ze,On,Qt,Vt,Xt,hr,zt,Bi,gr,$i,zi,Qi,Rn,Vi,Xi,pr,ht,Ki,Yi,Ji,Zi,es,ts,ns,rs,os,kn,is,ss,cs,as,us,ls,ds,fs,ms,hs,gs,xn,ps,yr,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,ws,Ps,Os,Tr,_r,Rs,br,ks,xs,Ms,Es,qs,Ns,Qh,As,Gs,d,Cr=ka(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(dr||(dr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ni||(Ni={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.line)&&d.uinteger(o.character)}e.is=n})(ke||(ke={}));(function(e){function t(r,o,i,s){if(d.uinteger(r)&&d.uinteger(o)&&d.uinteger(i)&&d.uinteger(s))return{start:ke.create(r,o),end:ke.create(i,s)};if(ke.is(r)&&ke.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.start)&&ke.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(d.string(o.uri)||d.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.targetRange)&&d.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||d.undefined(o.originSelectionRange))}e.is=n})(Ai||(Ai={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.numberRange(o.red,0,1)&&d.numberRange(o.green,0,1)&&d.numberRange(o.blue,0,1)&&d.numberRange(o.alpha,0,1)}e.is=n})(fr||(fr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&fr.is(o.color)}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.undefined(o.textEdit)||$e.is(o))&&(d.undefined(o.additionalTextEdits)||d.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(ji||(ji={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Fi||(Fi={}));(function(e){function t(r,o,i,s,a,y){let m={startLine:r,endLine:o};return d.defined(i)&&(m.startCharacter=i),d.defined(s)&&(m.endCharacter=s),d.defined(a)&&(m.kind=a),d.defined(y)&&(m.collapsedText=y),m}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.uinteger(o.startLine)&&d.uinteger(o.startLine)&&(d.undefined(o.startCharacter)||d.uinteger(o.startCharacter))&&(d.undefined(o.endCharacter)||d.uinteger(o.endCharacter))&&(d.undefined(o.kind)||d.string(o.kind))}e.is=n})(Li||(Li={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&wn.is(o.location)&&d.string(o.message)}e.is=n})(mr||(mr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Hi||(Hi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Wi||(Wi={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&d.string(r.href)}e.is=t})(Ui||(Ui={}));(function(e){function t(i,s,a,y,m,f){let _={range:i,message:s};return d.defined(a)&&(_.severity=a),d.defined(y)&&(_.code=y),d.defined(m)&&(_.source=m),d.defined(f)&&(_.relatedInformation=f),_}e.create=t;function n(i){var s;let a=i;return d.defined(a)&&Y.is(a.range)&&(d.string(a.message)||ht.is(a.message))&&(d.number(a.severity)||d.undefined(a.severity))&&(d.integer(a.code)||d.string(a.code)||d.undefined(a.code))&&(d.undefined(a.codeDescription)||d.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(d.string(a.source)||d.undefined(a.source))&&(d.undefined(a.relatedInformation)||d.typedArray(a.relatedInformation,mr.is))}e.is=n;function r(i){return d.string(i.message)}e.is3_17=r;function o(i){if(d.string(i.message))return i.message;if(ht.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Pn||(Pn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return d.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.title)&&(o.tooltip===void 0||d.string(o.tooltip))&&d.string(o.command)}e.is=n})(Ot||(Ot={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return d.objectLiteral(s)&&d.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&d.string(o.label)&&(d.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(d.string(o.description)||o.description===void 0)}e.is=n})(mt||(mt={}));(function(e){function t(n){let r=n;return d.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(mt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(Ze||(Ze={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Rn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(On||(On={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&d.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Qt||(Qt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&d.string(o.oldUri)&&d.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||d.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||d.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Vt||(Vt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&d.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||d.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||d.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>d.string(o.kind)?Qt.is(o)||Vt.is(o)||Xt.is(o):On.is(o)))}e.is=t})(hr||(hr={}));zt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):oe.is(r)?(i=r,o=Ze.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):oe.is(r)?(i=r,o=Ze.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Ze.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):oe.is(n)?(o=n,r=Ze.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Ze.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return d.objectLiteral(r)&&Y.is(r.range)&&br.isSnippet(r.snippet)&&(r.annotationId===void 0||mt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Bi||(Bi={}));gr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},$i=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new gr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(On.is(n)){let r=new zt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new zt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Rn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new zt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new zt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new gr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Qt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Qt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Vt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Vt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.integer(o.version)}e.is=n})(Qi||(Qi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&(o.version===null||d.integer(o.version))}e.is=n})(Rn||(Rn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Vi||(Vi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.string(o.uri)&&d.string(o.languageId)&&d.integer(o.version)&&d.string(o.text)}e.is=n})(Xi||(Xi={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(pr||(pr={}));(function(e){function t(n){let r=n;return d.objectLiteral(n)&&pr.is(r.kind)&&d.string(r.value)}e.is=t})(ht||(ht={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Ki||(Ki={}));(function(e){e.PlainText=1,e.Snippet=2})(Yi||(Yi={}));(function(e){e.Deprecated=1})(Ji||(Ji={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&d.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(Zi||(Zi={}));(function(e){e.asIs=1,e.adjustIndentation=2})(es||(es={}));(function(e){e.Replace=1,e.Merge=2})(ts||(ts={}));(function(e){function t(n){let r=n;return r&&(d.string(r.detail)||r.detail===void 0)&&(d.string(r.description)||r.description===void 0)}e.is=t})(ns||(ns={}));(function(e){function t(n){return{label:n}}e.create=t})(rs||(rs={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(os||(os={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return d.string(o)||d.objectLiteral(o)&&d.string(o.language)&&d.string(o.value)}e.is=n})(kn||(kn={}));(function(e){function t(n){let r=n;return!!r&&d.objectLiteral(r)&&(ht.is(r.contents)||kn.is(r.contents)||d.typedArray(r.contents,kn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(is||(is={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ss||(ss={}));(function(e){function t(n,r,...o){let i={label:n};return d.defined(r)&&(i.documentation=r),d.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(cs||(cs={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(as||(as={}));(function(e){function t(n,r){let o={range:n};return d.number(r)&&(o.kind=r),o}e.create=t})(us||(us={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ls||(ls={}));(function(e){e.Deprecated=1})(ds||(ds={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(fs||(fs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(ms||(ms={}));(function(e){function t(r,o,i,s,a,y){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return y!==void 0&&(m.children=y),m}e.create=t;function n(r){let o=r;return o&&d.string(o.name)&&d.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||d.string(o.detail))&&(o.deprecated===void 0||d.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(hs||(hs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(gs||(gs={}));(function(e){e.Invoked=1,e.Automatic=2})(xn||(xn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return d.defined(o)&&d.typedArray(o.diagnostics,Pn.is)&&(o.only===void 0||d.typedArray(o.only,d.string))&&(o.triggerKind===void 0||o.triggerKind===xn.Invoked||o.triggerKind===xn.Automatic)}e.is=n})(ps||(ps={}));(function(e){e.LLMGenerated=1;function t(n){return d.defined(n)&&n===e.LLMGenerated}e.is=t})(yr||(yr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Ot.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&d.string(o.title)&&(o.diagnostics===void 0||d.typedArray(o.diagnostics,Pn.is))&&(o.kind===void 0||d.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Ot.is(o.command))&&(o.isPreferred===void 0||d.boolean(o.isPreferred))&&(o.edit===void 0||hr.is(o.edit))&&(o.tags===void 0||d.typedArray(o.tags,yr.is))}e.is=n})(ys||(ys={}));(function(e){function t(r,o){let i={range:r};return d.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.command)||Ot.is(o.command))}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&d.uinteger(o.tabSize)&&d.boolean(o.insertSpaces)}e.is=n})(_s||(_s={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(o.range)&&(d.undefined(o.target)||d.string(o.target))}e.is=n})(bs||(bs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(vs||(vs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Cs||(Cs={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ss||(Ss={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Is||(Is={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.string(o.text)}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&d.boolean(o.caseSensitiveLookup)&&(d.string(o.variableName)||o.variableName===void 0)}e.is=n})(ws||(ws={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(d.string(o.expression)||o.expression===void 0)}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return d.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Os||(Os={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Tr||(Tr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||Ot.is(o.command))}e.is=n})(_r||(_r={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return d.objectLiteral(o)&&ke.is(o.position)&&(d.string(o.label)||d.typedArray(o.label,_r.is))&&(o.kind===void 0||Tr.is(o.kind))&&o.textEdits===void 0||d.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||d.string(o.tooltip)||ht.is(o.tooltip))&&(o.paddingLeft===void 0||d.boolean(o.paddingLeft))&&(o.paddingRight===void 0||d.boolean(o.paddingRight))}e.is=n})(Rs||(Rs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return d.objectLiteral(o)&&o.kind==="snippet"&&d.string(o.value)}e.isSnippet=n})(br||(br={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(ks||(ks={}));(function(e){function t(n){return{items:n}}e.create=t})(xs||(xs={}));(function(e){e.Invoked=1,e.Automatic=2})(Ms||(Ms={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Es||(Es={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return d.objectLiteral(r)&&dr.is(r.uri)&&d.string(r.name)}e.is=t})(Ns||(Ns={}));Qh=[` +"use strict";var Ro=Object.defineProperty;var Xm=Object.getOwnPropertyDescriptor;var Km=Object.getOwnPropertyNames;var Zm=Object.prototype.hasOwnProperty;var xa=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ma=(e,t)=>{for(var n in t)Ro(e,n,{get:t[n],enumerable:!0})},Ym=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Km(t))!Zm.call(e,o)&&o!==n&&Ro(e,o,{get:()=>t[o],enumerable:!(r=Xm(t,o))||r.enumerable});return e};var Kn=e=>Ym(Ro({},"__esModule",{value:!0}),e);var Zn=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Jm;Ge.string=Ea;Ge.number=eh;Ge.error=th;Ge.func=Aa;Ge.array=qa;Ge.stringArray=nh;Ge.typedArray=rh;Ge.thenable=oh;function Jm(e){return e===!0||e===!1}function Ea(e){return typeof e=="string"||e instanceof String}function eh(e){return typeof e=="number"||e instanceof Number}function th(e){return e instanceof Error}function Aa(e){return typeof e=="function"}function qa(e){return Array.isArray(e)}function nh(e){return qa(e)&&e.every(t=>Ea(t))}function rh(e,t){return Array.isArray(e)&&e.every(t)}function oh(e){return e&&Aa(e.then)}});var jt=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.boolean=ih;Ye.string=Na;Ye.number=sh;Ye.error=ch;Ye.func=ah;Ye.array=Ga;Ye.stringArray=uh;function ih(e){return e===!0||e===!1}function Na(e){return typeof e=="string"||e instanceof String}function sh(e){return typeof e=="number"||e instanceof Number}function ch(e){return e instanceof Error}function ah(e){return typeof e=="function"}function Ga(e){return Array.isArray(e)}function uh(e){return Ga(e)&&e.every(t=>Na(t))}});var ti=S(w=>{"use strict";var lh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.LRUCache=lt.LinkedMap=lt.Touch=void 0;var ue;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ue||(lt.Touch=ue={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ue.None){let r=this._map.get(t);if(r)return n!==ue.None&&this.touch(r,n),r.value}set(t,n,r=ue.None){let o=this._map.get(t);if(o)o.value=n,r!==ue.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ue.None:this.addItemLast(o);break;case ue.First:this.addItemFirst(o);break;case ue.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ue.First&&n!==ue.Last)){if(n===ue.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ue.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};lt.LinkedMap=Yn;var ni=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ue.AsNew){return super.get(t,n)}peek(t){return super.get(t,ue.None)}set(t,n){return super.set(t,n,ue.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};lt.LRUCache=ni});var ja=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var Fa;(function(e){function t(n){return{dispose:n}}e.create=t})(Fa||(Jn.Disposable=Fa={}))});var dt=S(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});var oi;function ii(){if(oi===void 0)throw new Error("No runtime abstraction layer installed");return oi}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");oi=n}e.install=t})(ii||(ii={}));si.default=ii});var Lt=S(ft=>{"use strict";var mh=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ft,"__esModule",{value:!0});ft.Emitter=ft.Event=void 0;var hh=mh(dt()),La;(function(e){let t={dispose(){}};e.None=function(){return t}})(La||(ft.Event=La={}));var ci=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new ci),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ft.Emitter=ai});var nr=S(Ie=>{"use strict";var gh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ph=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yh=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SharedArrayReceiverStrategy=Wt.SharedArraySenderStrategy=void 0;var vh=nr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var di=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Wt.SharedArraySenderStrategy=di;var fi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},mi=class{token;constructor(t){this.token=new fi(t)}cancel(){}dispose(){}},hi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new vh.CancellationTokenSource:new mi(n)}};Wt.SharedArrayReceiverStrategy=hi});var pi=S(Ut=>{"use strict";var Sh=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Semaphore=void 0;var Ih=Sh(dt()),gi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Ih.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Ut.Semaphore=gi});var Ba=S(le=>{"use strict";var Dh=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),wh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Ti.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};le.ReadableStreamMessageReader=bi});var Xa=S(de=>{"use strict";var Rh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xh=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mh=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(qh,r.byteLength.toString(),za),o.push(za),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};de.WriteableStreamMessageWriter=vi});var Ka=S(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.AbstractMessageBuffer=void 0;var Nh=13,Gh=10,Hh=`\r +`,Si=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};ir.AbstractMessageBuffer=Si});var eu=S(P=>{"use strict";var Fh=P&&P.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jh=P&&P.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lh=P&&P.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(P.Trace=F={}));var Pi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Pi||(P.TraceValue=Pi={}));P.TraceValues=Pi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(P.Trace=F={}));var Pe;(function(e){e.Text="text",e.JSON="json"})(Pe||(P.TraceFormat=Pe={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Pe||(P.TraceFormat=Pe={}));var Oi;(function(e){e.type=new x.NotificationType("$/setTrace")})(Oi||(P.SetTraceNotification=Oi={}));var sr;(function(e){e.type=new x.NotificationType("$/logTrace")})(sr||(P.LogTraceNotification=sr={}));var Sn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Sn||(P.ConnectionErrors=Sn={}));var Qt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};P.ConnectionError=Qt;var Ri;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ri||(P.ConnectionStrategy=Ri={}));var cr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(cr||(P.IdCancellationReceiverStrategy=cr={}));var xi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(xi||(P.RequestCancellationReceiverStrategy=xi={}));var ar;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ii.CancellationTokenSource}});function t(n){return cr.is(n)||xi.is(n)}e.is=t})(ar||(P.CancellationReceiverStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(ur||(P.CancellationSenderStrategy=ur={}));var lr;(function(e){e.Message=Object.freeze({receiver:ar.Message,sender:ur.Message});function t(n){let r=n;return r&&ar.is(r.receiver)&&ur.is(r.sender)}e.is=t})(lr||(P.CancellationStrategy=lr={}));var dr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(dr||(P.MessageStrategy=dr={}));var Ja;(function(e){function t(n){let r=n;return r&&(lr.is(r.cancellationStrategy)||Ri.is(r.connectionStrategy)||dr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Ja||(P.ConnectionOptions=Ja={}));var He;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(He||(He={}));function Uh(e,t,n,r){let o=n!==void 0?n:P.NullLogger,i=0,s=0,a=0,y="2.0",m=r?.maxParallelism??-1,d=0,_,h=new Map,C,O=new Map,q=new Map,G,R=new Ya.LinkedMap,g=new Map,l=new Set,I=new Map,E=F.Off,A=Pe.Text,B,V=He.New,Ke=new Cn.Emitter,Ta=new Cn.Emitter,_a=new Cn.Emitter,ba=new Cn.Emitter,Ca=new Cn.Emitter,ct=r&&r.cancellationStrategy?r.cancellationStrategy:lr.Message;function Mm(u){}function va(){return V===He.Listening}function Sa(){return V===He.Closed}function Ht(){return V===He.Disposed}function Ia(){(V===He.New||V===He.Listening)&&(V=He.Closed,Ta.fire(void 0))}function Em(u){Ke.fire([u,void 0,void 0])}function Am(u){Ke.fire(u)}e.onClose(Ia),e.onError(Em),t.onClose(Ia),t.onError(Am);function Da(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function qm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Nm(){return"not-"+(++s).toString()}function Gm(u,b){x.Message.isRequest(b)?u.set(Da(b.id),b):x.Message.isResponse(b)?m===-1?u.set(qm(b.id),b):ka(b):u.set(Nm(),b)}function wo(){G||R.size===0||m!==-1&&d>=m||(G=(0,Za.default)().timer.setImmediate(async()=>{if(G=void 0,R.size===0||m!==-1&&d>=m)return;let u=R.shift(),b;try{d++;let v=r?.messageStrategy;dr.is(v)?b=v.handleMessage(u,wa):b=wa(u)}catch(v){o.error(`Processing message queue failed: ${v.toString()}`)}finally{b instanceof Promise?b.then(()=>{d--,wo()}).catch(v=>{o.error(`Processing message queue failed: ${v.toString()}`)}):d--,wo()}}))}async function wa(u){return x.Message.isRequest(u)?Fm(u):x.Message.isNotification(u)?jm(u):x.Message.isResponse(u)?ka(u):Lm(u)}let Hm=u=>{try{if(x.Message.isNotification(u)&&u.method===In.type.method){let b=u.params.id,v=Da(b),k=R.get(v);if(x.Message.isRequest(k)){let X=r?.connectionStrategy,L=X&&X.cancelUndispatched?X.cancelUndispatched(k,Mm):void 0;if(L&&(L.error!==void 0||L.result!==void 0)){R.delete(v),I.delete(b),L.id=k.id,ko(L,u.method,Date.now()),t.write(L).catch(()=>o.error("Sending response for canceled message failed."));return}}let H=I.get(b);if(H!==void 0){H.cancel(),Po(u);return}else l.add(b)}Gm(R,u)}finally{wo()}};async function Fm(u){if(Ht())return Promise.resolve();function b(re,ae,Y){let J={jsonrpc:y,id:u.id};return re instanceof x.ResponseError?J.error=re.toJson():J.result=re===void 0?null:re,ko(J,ae,Y),t.write(J)}function v(re,ae,Y){let J={jsonrpc:y,id:u.id,error:re.toJson()};return ko(J,ae,Y),t.write(J)}Bm(u);let k=h.get(u.method),H,X;k&&(H=k.type,X=k.handler);let L=Date.now();if(X||_){let re=u.id??String(Date.now()),ae=cr.is(ct.receiver)?ct.receiver.createCancellationTokenSource(re):ct.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&ae.cancel(),u.id!==null&&I.set(re,ae);try{let Y;if(X)if(u.params===void 0){if(H!==void 0&&H.numberOfParams!==0)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${H.numberOfParams} params but received none.`),u.method,L);Y=X(ae.token)}else if(Array.isArray(u.params)){if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byName)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,L);Y=X(...u.params,ae.token)}else{if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byPosition)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,L);Y=X(u.params,ae.token)}else _&&(Y=_(u.method,u.params,ae.token));let J=await Y;await b(J,u.method,L)}catch(Y){Y instanceof x.ResponseError?await b(Y,u.method,L):Y&&K.string(Y.message)?await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${Y.message}`),u.method,L):await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,L)}finally{I.delete(re)}}else await v(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,L)}function ka(u){if(!Ht())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let b=u.id,v=g.get(b);if(Qm(u,v),v!==void 0){g.delete(b);try{if(u.error){let k=u.error;v.reject(new x.ResponseError(k.code,k.message,k.data))}else if(u.result!==void 0)v.resolve(u.result);else throw new Error("Should never happen.")}catch(k){k.message?o.error(`Response handler '${v.method}' failed with message: ${k.message}`):o.error(`Response handler '${v.method}' failed unexpectedly.`)}}}}async function jm(u){if(Ht())return;let b,v;if(u.method===In.type.method){let k=u.params.id;l.delete(k),Po(u);return}else{let k=O.get(u.method);k&&(v=k.handler,b=k.type)}if(v||C)try{if(Po(u),v)if(u.params===void 0)b!==void 0&&b.numberOfParams!==0&&b.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received none.`),await v();else if(Array.isArray(u.params)){let k=u.params;u.method===vn.type.method&&k.length===2&&Di.is(k[0])?await v({token:k[0],value:k[1]}):(b!==void 0&&(b.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),b.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received ${k.length} arguments`)),await v(...k))}else b!==void 0&&b.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await v(u.params);else C&&await C(u.method,u.params)}catch(k){k.message?o.error(`Notification handler '${u.method}' failed with message: ${k.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else _a.fire(u)}function Lm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let b=u;if(K.string(b.id)||K.number(b.id)){let v=b.id,k=g.get(v);k&&k.reject(new Error("The received response has neither a result nor an error property."))}}function at(u){if(u!=null)switch(E){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Wm(u){if(!(E===F.Off||!B))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,b)}else Ft("send-request",u)}function Um(u){if(!(E===F.Off||!B))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Sending notification '${u.method}'.`,b)}else Ft("send-notification",u)}function ko(u,b,v){if(!(E===F.Off||!B))if(A===Pe.Text){let k;(E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?k=`Error data: ${at(u.error.data)}`:u.result?k=`Result: ${at(u.result)}`:u.error===void 0&&(k="No result returned.")),B.log(`Sending response '${b} - (${u.id})'. Processing request took ${Date.now()-v}ms`,k)}else Ft("send-response",u)}function Bm(u){if(!(E===F.Off||!B))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,b)}else Ft("receive-request",u)}function Po(u){if(!(E===F.Off||!B||u.method===sr.type.method))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Received notification '${u.method}'.`,b)}else Ft("receive-notification",u)}function Qm(u,b){if(!(E===F.Off||!B))if(A===Pe.Text){let v;if((E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?v=`Error data: ${at(u.error.data)}`:u.result?v=`Result: ${at(u.result)}`:u.error===void 0&&(v="No result returned.")),b){let k=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${b.method} - (${u.id})' in ${Date.now()-b.timerStart}ms.${k}`,v)}else B.log(`Received response ${u.id} without active response promise.`,v)}else Ft("receive-response",u)}function Ft(u,b){if(!B||E===F.Off)return;let v={isLSPMessage:!0,type:u,message:b,timestamp:Date.now()};B.log(v)}function pn(){if(Sa())throw new Qt(Sn.Closed,"Connection is closed.");if(Ht())throw new Qt(Sn.Disposed,"Connection is disposed.")}function $m(){if(va())throw new Qt(Sn.AlreadyListening,"Connection is already listening")}function zm(){if(!va())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function Pa(u){if(u!==null)return u}function Oa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Oo(u,b){switch(u){case x.ParameterStructures.auto:return Oa(b)?Pa(b):[yn(b)];case x.ParameterStructures.byName:if(!Oa(b))throw new Error("Received parameters by name but param is not an object literal.");return Pa(b);case x.ParameterStructures.byPosition:return[yn(b)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ra(u,b){let v,k=u.numberOfParams;switch(k){case 0:v=void 0;break;case 1:v=Oo(u.parameterStructures,b[0]);break;default:v=[];for(let H=0;H{pn();let v,k;if(K.string(u)){v=u;let X=b[0],L=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(X)&&(L=1,re=X);let ae=b.length,Y=ae-L;switch(Y){case 0:k=void 0;break;case 1:k=Oo(re,b[L]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${Y} parameters for 'by Name' notification parameter structure.`);k=b.slice(L,ae).map(J=>yn(J));break}}else{let X=b;v=u.method,k=Ra(u,X)}let H={jsonrpc:y,method:v,params:k};return Um(H),t.write(H).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,b)=>{pn();let v;return K.func(u)?C=u:b&&(K.string(u)?(v=u,O.set(u,{type:void 0,handler:b})):(v=u.method,O.set(u.method,{type:u,handler:b}))),{dispose:()=>{v!==void 0?O.get(v)?.handler===b&&O.delete(v):C===u&&(C=void 0)}}},onProgress:(u,b,v)=>{if(q.has(b))throw new Error(`Progress handler for token ${b} already registered`);return q.set(b,v),{dispose:()=>{q.get(b)===v&&q.delete(b)}}},sendProgress:(u,b,v)=>Dt.sendNotification(vn.type,{token:b,value:v}),onUnhandledProgress:ba.event,sendRequest:(u,...b)=>{pn(),zm();function v(J,Ne){let Ze=ct.sender.sendCancellation(J,Ne);Ze===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ne}`):Ze.catch(()=>{o.log(`Sending cancellation messages for id ${Ne} failed.`)})}let k,H,X;if(K.string(u)){k=u;let J=b[0],Ne=b[b.length-1],Ze=0,Tn=x.ParameterStructures.auto;x.ParameterStructures.is(J)&&(Ze=1,Tn=J);let wt=b.length;Ii.CancellationToken.is(Ne)&&(wt=wt-1,X=Ne);let Be=wt-Ze;switch(Be){case 0:H=void 0;break;case 1:H=Oo(Tn,b[Ze]);break;default:if(Tn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);H=b.slice(Ze,wt).map(Vm=>yn(Vm));break}}else{let J=b;k=u.method,H=Ra(u,J);let Ne=u.numberOfParams;X=Ii.CancellationToken.is(J[Ne])?J[Ne]:void 0}let L=i++,re,ae=!1;X!==void 0&&(X.isCancellationRequested?ae=!0:re=X.onCancellationRequested(()=>{v(Dt,L)}));let Y={jsonrpc:y,id:L,method:k,params:H};return Wm(Y),typeof ct.sender.enableCancellation=="function"&&ct.sender.enableCancellation(Y),new Promise(async(J,Ne)=>{let Ze=Be=>{J(Be),ct.sender.cleanup(L),re?.dispose()},Tn=Be=>{Ne(Be),ct.sender.cleanup(L),re?.dispose()},wt={method:k,timerStart:Date.now(),resolve:Ze,reject:Tn};try{g.set(L,wt),await t.write(Y),ae&&v(Dt,L)}catch(Be){throw g.delete(L),wt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,b)=>{pn();let v=null;return ki.is(u)?(v=void 0,_=u):K.string(u)?(v=null,b!==void 0&&(v=u,h.set(u,{handler:b,type:void 0}))):b!==void 0&&(v=u.method,h.set(u.method,{type:u,handler:b})),{dispose:()=>{v!==null&&(v!==void 0?h.get(v)?.handler===b&&h.delete(v):_===u&&(_=void 0))}}},hasPendingResponse:()=>g.size>0,trace:async(u,b,v)=>{let k=!1,H=Pe.Text;v!==void 0&&(K.boolean(v)?k=v:(k=v.sendNotification||!1,H=v.traceFormat||Pe.Text)),E=u,A=H,E===F.Off?B=void 0:B=b,k&&!Sa()&&!Ht()&&await Dt.sendNotification(Oi.type,{value:F.toString(u)})},onError:Ke.event,onClose:Ta.event,onUnhandledNotification:_a.event,onDispose:Ca.event,end:()=>{t.end()},dispose:()=>{if(Ht())return;V=He.Disposed,Ca.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let b of g.values())b.reject(u);g=new Map,I=new Map,l=new Set,R=new Ya.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{pn(),$m(),V=He.Listening,e.listen(Hm)},inspect:()=>{(0,Za.default)().console.log("inspect")}};return Dt.onNotification(sr.type,u=>{if(E===F.Off||!B)return;let b=E===F.Verbose||E===F.Compact;B.log(u.message,b?u.verbose:void 0)}),Dt.onNotification(vn.type,async u=>{let b=q.get(u.token);b?await b(u.value):ba.fire(u)}),Dt}});var Je=S(p=>{"use strict";var Bh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var Q=ti();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return Q.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return Q.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return Q.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return Q.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return Q.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return Q.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return Q.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return Q.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return Q.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return Q.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return Q.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return Q.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return Q.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return Q.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return Q.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return Q.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return Q.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return Q.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return Q.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return Q.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return Q.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return Q.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return Q.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return Q.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return Q.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return Q.ParameterStructures}});var Mi=ri();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return Mi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return Mi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return Mi.Touch}});var Qh=ja();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Qh.Disposable}});var tu=Lt();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return tu.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return tu.Emitter}});var nu=nr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return nu.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return nu.CancellationToken}});var ru=Wa();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return ru.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return ru.SharedArrayReceiverStrategy}});var Ei=Ba();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Ei.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Ei.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Ei.ReadableStreamMessageReader}});var Ai=Xa();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ai.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ai.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ai.WriteableStreamMessageWriter}});var $h=Ka();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return $h.AbstractMessageBuffer}});var ne=eu();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return ne.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return ne.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return ne.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return ne.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return ne.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return ne.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return ne.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return ne.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return ne.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return ne.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return ne.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return ne.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return ne.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ne.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return ne.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return ne.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return ne.TraceValues}});var zh=Bh(dt());p.RAL=zh.default});var vr={};Ma(vr,{AnnotatedTextEdit:()=>et,ApplyKind:()=>ns,ChangeAnnotation:()=>mt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>Ts,CodeActionContext:()=>ys,CodeActionKind:()=>ps,CodeActionTag:()=>Tr,CodeActionTriggerKind:()=>xn,CodeDescription:()=>Bi,CodeLens:()=>_s,Color:()=>mr,ColorInformation:()=>Hi,ColorPresentation:()=>Fi,Command:()=>Pt,CompletionItem:()=>os,CompletionItemKind:()=>Zi,CompletionItemLabelDetails:()=>rs,CompletionItemTag:()=>Ji,CompletionList:()=>is,CreateFile:()=>zt,DeleteFile:()=>Xt,Diagnostic:()=>kn,DiagnosticRelatedInformation:()=>hr,DiagnosticSeverity:()=>Wi,DiagnosticTag:()=>Ui,DocumentHighlight:()=>ls,DocumentHighlightKind:()=>us,DocumentLink:()=>Cs,DocumentSymbol:()=>gs,DocumentUri:()=>qi,EOL:()=>Vh,FoldingRange:()=>Li,FoldingRangeKind:()=>ji,FormattingOptions:()=>bs,Hover:()=>ss,InlayHint:()=>Rs,InlayHintKind:()=>_r,InlayHintLabelPart:()=>br,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>xs,InlineCompletionList:()=>Ms,InlineCompletionTriggerKind:()=>Es,InlineValueContext:()=>Os,InlineValueEvaluatableExpression:()=>Ps,InlineValueText:()=>ws,InlineValueVariableLookup:()=>ks,InsertReplaceEdit:()=>es,InsertTextFormat:()=>Yi,InsertTextMode:()=>ts,LanguageKind:()=>Xi,Location:()=>wn,LocationLink:()=>Gi,MarkedString:()=>Rn,MarkupContent:()=>ht,MarkupKind:()=>yr,OptionalVersionedTextDocumentIdentifier:()=>On,ParameterInformation:()=>cs,Position:()=>xe,Range:()=>Z,RenameFile:()=>Vt,SelectedCompletionInfo:()=>As,SelectionRange:()=>vs,SemanticTokenModifiers:()=>Is,SemanticTokenTypes:()=>Ss,SemanticTokens:()=>Ds,SignatureInformation:()=>as,SnippetTextEdit:()=>Qi,StringValue:()=>Cr,SymbolInformation:()=>ms,SymbolKind:()=>ds,SymbolTag:()=>fs,TextDocument:()=>Gs,TextDocumentEdit:()=>Pn,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Ki,TextEdit:()=>Qe,URI:()=>fr,VersionedTextDocumentIdentifier:()=>Vi,WorkspaceChange:()=>$i,WorkspaceEdit:()=>gr,WorkspaceFolder:()=>Ns,WorkspaceSymbol:()=>hs,integer:()=>Ni,uinteger:()=>Dn});var qi,fr,Ni,Dn,xe,Z,wn,Gi,mr,Hi,Fi,ji,Li,hr,Wi,Ui,Bi,kn,Pt,Qe,mt,oe,et,Pn,zt,Vt,Xt,gr,$t,Qi,pr,$i,zi,Vi,On,Xi,Ki,yr,ht,Zi,Yi,Ji,es,ts,ns,rs,os,is,Rn,ss,cs,as,us,ls,ds,fs,ms,hs,gs,ps,xn,ys,Tr,Ts,_s,bs,Cs,vs,Ss,Is,Ds,ws,ks,Ps,Os,_r,br,Rs,Cr,xs,Ms,Es,As,qs,Ns,Vh,Gs,Hs,f,Sr=xa(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(fr||(fr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ni||(Ni={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(xe||(xe={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:xe.create(r,o),end:xe.create(i,s)};if(xe.is(r)&&xe.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.start)&&xe.is(o.end)}e.is=n})(Z||(Z={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.targetRange)&&f.string(o.targetUri)&&Z.is(o.targetSelectionRange)&&(Z.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(mr||(mr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&mr.is(o.color)}e.is=n})(Hi||(Hi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||Qe.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,Qe.is))}e.is=n})(Fi||(Fi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ji||(ji={}));(function(e){function t(r,o,i,s,a,y){let m={startLine:r,endLine:o};return f.defined(i)&&(m.startCharacter=i),f.defined(s)&&(m.endCharacter=s),f.defined(a)&&(m.kind=a),f.defined(y)&&(m.collapsedText=y),m}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Li||(Li={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&wn.is(o.location)&&f.string(o.message)}e.is=n})(hr||(hr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Wi||(Wi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Ui||(Ui={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(Bi||(Bi={}));(function(e){function t(i,s,a,y,m,d){let _={range:i,message:s};return f.defined(a)&&(_.severity=a),f.defined(y)&&(_.code=y),f.defined(m)&&(_.source=m),f.defined(d)&&(_.relatedInformation=d),_}e.create=t;function n(i){var s;let a=i;return f.defined(a)&&Z.is(a.range)&&(f.string(a.message)||ht.is(a.message))&&(f.number(a.severity)||f.undefined(a.severity))&&(f.integer(a.code)||f.string(a.code)||f.undefined(a.code))&&(f.undefined(a.codeDescription)||f.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(a.source)||f.undefined(a.source))&&(f.undefined(a.relatedInformation)||f.typedArray(a.relatedInformation,hr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(ht.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(kn||(kn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(Pt||(Pt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Z.is(s.range)}e.is=o})(Qe||(Qe={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(mt||(mt={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return Qe.is(s)&&(mt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(et||(et={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&On.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Pn||(Pn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(zt||(zt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Vt||(Vt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?zt.is(o)||Vt.is(o)||Xt.is(o):Pn.is(o)))}e.is=t})(gr||(gr={}));$t=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=Qe.insert(t,n):oe.is(r)?(i=r,o=et.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=et.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=Qe.replace(t,n):oe.is(r)?(i=r,o=et.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=et.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=Qe.del(t):oe.is(n)?(o=n,r=et.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=et.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Z.is(r.range)&&Cr.isSnippet(r.snippet)&&(r.annotationId===void 0||mt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Qi||(Qi={}));pr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},$i=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new pr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Pn.is(n)){let r=new $t(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new $t(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(On.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new $t(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new $t(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new pr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=zt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=zt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Vt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Vt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(Vi||(Vi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(On||(On={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Xi||(Xi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(Ki||(Ki={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(yr||(yr={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&yr.is(r.kind)&&f.string(r.value)}e.is=t})(ht||(ht={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Zi||(Zi={}));(function(e){e.PlainText=1,e.Snippet=2})(Yi||(Yi={}));(function(e){e.Deprecated=1})(Ji||(Ji={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Z.is(o.insert)&&Z.is(o.replace)}e.is=n})(es||(es={}));(function(e){e.asIs=1,e.adjustIndentation=2})(ts||(ts={}));(function(e){e.Replace=1,e.Merge=2})(ns||(ns={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(rs||(rs={}));(function(e){function t(n){return{label:n}}e.create=t})(os||(os={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(is||(is={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(Rn||(Rn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(ht.is(r.contents)||Rn.is(r.contents)||f.typedArray(r.contents,Rn.is))&&(n.range===void 0||Z.is(n.range))}e.is=t})(ss||(ss={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(cs||(cs={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(as||(as={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(us||(us={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(ls||(ls={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ds||(ds={}));(function(e){e.Deprecated=1})(fs||(fs={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(ms||(ms={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(hs||(hs={}));(function(e){function t(r,o,i,s,a,y){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return y!==void 0&&(m.children=y),m}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Z.is(o.range)&&Z.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(gs||(gs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(ps||(ps={}));(function(e){e.Invoked=1,e.Automatic=2})(xn||(xn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,kn.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===xn.Invoked||o.triggerKind===xn.Automatic)}e.is=n})(ys||(ys={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Tr||(Tr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Pt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,kn.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Pt.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||gr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Tr.is))}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.command)||Pt.is(o.command))}e.is=n})(_s||(_s={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(bs||(bs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Cs||(Cs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(vs||(vs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Ss||(Ss={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Is||(Is={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Ds||(Ds={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.string(o.text)}e.is=n})(ws||(ws={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(ks||(ks={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(r.stoppedLocation)}e.is=n})(Os||(Os={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(_r||(_r={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||ht.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||Pt.is(o.command))}e.is=n})(br||(br={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,br.is))&&(o.kind===void 0||_r.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,Qe.is)&&(o.tooltip===void 0||f.string(o.tooltip)||ht.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(Rs||(Rs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Cr||(Cr={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(xs||(xs={}));(function(e){function t(n){return{items:n}}e.create=t})(Ms||(Ms={}));(function(e){e.Invoked=1,e.Automatic=2})(Es||(Es={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(As||(As={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&fr.is(r.uri)&&f.string(r.name)}e.is=t})(Ns||(Ns={}));Vh=[` `,`\r -`,"\r"];(function(e){function t(i,s,a,y){return new Gs(i,s,a,y)}e.create=t;function n(i){let s=i;return!!(d.defined(s)&&d.string(s.uri)&&(d.undefined(s.languageId)||d.string(s.languageId))&&d.uinteger(s.lineCount)&&d.func(s.getText)&&d.func(s.positionAt)&&d.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),y=o(s,(f,_)=>{let h=f.range.start.line-_.range.start.line;return h===0?f.range.start.character-_.range.start.character:h}),m=a.length;for(let f=y.length-1;f>=0;f--){let _=y[f],h=i.offsetAt(_.range.start),v=i.offsetAt(_.range.end);if(v<=m)a=a.substring(0,h)+_.newText+a.substring(v,a.length);else throw new Error("Overlapping edit");m=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,y=i.slice(0,a),m=i.slice(a);o(y,s),o(m,s);let f=0,_=0,h=0;for(;f{let h=d.range.start.line-_.range.start.line;return h===0?d.range.start.character-_.range.start.character:h}),m=a.length;for(let d=y.length-1;d>=0;d--){let _=y[d],h=i.offsetAt(_.range.start),C=i.offsetAt(_.range.end);if(C<=m)a=a.substring(0,h)+_.newText+a.substring(C,a.length);else throw new Error("Overlapping edit");m=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,y=i.slice(0,a),m=i.slice(a);o(y,s),o(m,s);let d=0,_=0,h=0;for(;d0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return ke.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return ke.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(v){return v===!0||v===!1}e.boolean=o;function i(v){return t.call(v)==="[object String]"}e.string=i;function s(v){return t.call(v)==="[object Number]"}e.number=s;function a(v,O,q){return t.call(v)==="[object Number]"&&O<=v&&v<=q}e.numberRange=a;function y(v){return t.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}e.integer=y;function m(v){return t.call(v)==="[object Number]"&&0<=v&&v<=2147483647}e.uinteger=m;function f(v){return t.call(v)==="[object Function]"}e.func=f;function _(v){return v!==null&&typeof v=="object"}e.objectLiteral=_;function h(v,O){return Array.isArray(v)&&v.every(O)}e.typedArray=h})(d||(d={}))});var Q=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.CM=fe.ProtocolNotificationType=fe.ProtocolNotificationType0=fe.ProtocolRequestType=fe.ProtocolRequestType0=fe.RegistrationType=fe.MessageDirection=void 0;var Kt=Je(),ru;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(ru||(fe.MessageDirection=ru={}));var js=class{____;method;constructor(t){this.method=t}};fe.RegistrationType=js;var Fs=class extends Kt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};fe.ProtocolRequestType0=Fs;var Ls=class extends Kt.RequestType{__;___;____;_pr;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolRequestType=Ls;var Hs=class extends Kt.NotificationType0{___;____;constructor(t){super(t)}};fe.ProtocolNotificationType0=Hs;var Ws=class extends Kt.NotificationType{___;____;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolNotificationType=Ws;var ou;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(ou||(fe.CM=ou={}))});var Sr=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Vh;Fe.string=iu;Fe.number=Xh;Fe.error=Kh;Fe.func=Yh;Fe.array=su;Fe.stringArray=Jh;Fe.typedArray=Zh;Fe.objectLiteral=eg;function Vh(e){return e===!0||e===!1}function iu(e){return typeof e=="string"||e instanceof String}function Xh(e){return typeof e=="number"||e instanceof Number}function Kh(e){return e instanceof Error}function Yh(e){return typeof e=="function"}function su(e){return Array.isArray(e)}function Jh(e){return su(e)&&e.every(t=>iu(t))}function Zh(e,t){return Array.isArray(e)&&e.every(t)}function eg(e){return e!==null&&typeof e=="object"}});var au=S(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.ImplementationRequest=void 0;var Us=Q(),cu;(function(e){e.method="textDocument/implementation",e.messageDirection=Us.MessageDirection.clientToServer,e.type=new Us.ProtocolRequestType(e.method),e.capabilities=Us.CM.create("textDocument.implementation","implementationProvider")})(cu||(Ir.ImplementationRequest=cu={}))});var lu=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeDefinitionRequest=void 0;var Bs=Q(),uu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(uu||(Dr.TypeDefinitionRequest=uu={}))});var mu=S(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DidChangeWorkspaceFoldersNotification=Jt.WorkspaceFoldersRequest=void 0;var Yt=Q(),du;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Yt.MessageDirection.serverToClient,e.type=new Yt.ProtocolRequestType0(e.method),e.capabilities=Yt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(du||(Jt.WorkspaceFoldersRequest=du={}));var fu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolNotificationType(e.method),e.capabilities=Yt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(fu||(Jt.DidChangeWorkspaceFoldersNotification=fu={}))});var gu=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var $s=Q(),hu;(function(e){e.method="workspace/configuration",e.messageDirection=$s.MessageDirection.serverToClient,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("workspace.configuration",void 0)})(hu||(wr.ConfigurationRequest=hu={}))});var Tu=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ColorPresentationRequest=en.DocumentColorRequest=void 0;var Zt=Q(),pu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(pu||(en.DocumentColorRequest=pu={}));var yu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolRequestType(e.method),e.capabilities=Zt.CM.create("textDocument.colorProvider","colorProvider")})(yu||(en.ColorPresentationRequest=yu={}))});var vu=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.FoldingRangeRefreshRequest=nn.FoldingRangeRequest=void 0;var tn=Q(),_u;(function(e){e.method="textDocument/foldingRange",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(_u||(nn.FoldingRangeRequest=_u={}));var bu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=tn.MessageDirection.serverToClient,e.type=new tn.ProtocolRequestType0(e.method),e.capabilities=tn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(bu||(nn.FoldingRangeRefreshRequest=bu={}))});var Su=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=Q(),Cu;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(Cu||(Pr.DeclarationRequest=Cu={}))});var Du=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var Qs=Q(),Iu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Qs.MessageDirection.clientToServer,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Iu||(Or.SelectionRangeRequest=Iu={}))});var Ru=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.WorkDoneProgressCancelNotification=gt.WorkDoneProgressCreateRequest=gt.WorkDoneProgress=void 0;var tg=Je(),Mn=Q(),wu;(function(e){e.type=new tg.ProgressType;function t(n){return n===e.type}e.is=t})(wu||(gt.WorkDoneProgress=wu={}));var Pu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(Pu||(gt.WorkDoneProgressCreateRequest=Pu={}));var Ou;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(Ou||(gt.WorkDoneProgressCancelNotification=Ou={}))});var Eu=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CallHierarchyOutgoingCallsRequest=pt.CallHierarchyIncomingCallsRequest=pt.CallHierarchyPrepareRequest=void 0;var et=Q(),ku;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(ku||(pt.CallHierarchyPrepareRequest=ku={}));var xu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(xu||(pt.CallHierarchyIncomingCallsRequest=xu={}));var Mu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.capabilities=et.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Mu||(pt.CallHierarchyOutgoingCallsRequest=Mu={}))});var Fu=S(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SemanticTokensRefreshRequest=Ie.SemanticTokensRangeRequest=Ie.SemanticTokensDeltaRequest=Ie.SemanticTokensRequest=Ie.SemanticTokensRegistrationType=Ie.TokenFormat=void 0;var Pe=Q(),qu;(function(e){e.Relative="relative"})(qu||(Ie.TokenFormat=qu={}));var En;(function(e){e.method="textDocument/semanticTokens",e.type=new Pe.RegistrationType(e.method)})(En||(Ie.SemanticTokensRegistrationType=En={}));var Nu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Nu||(Ie.SemanticTokensRequest=Nu={}));var Au;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Au||(Ie.SemanticTokensDeltaRequest=Au={}));var Gu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Pe.MessageDirection.clientToServer,e.type=new Pe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Pe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Gu||(Ie.SemanticTokensRangeRequest=Gu={}));var ju;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Pe.MessageDirection.serverToClient,e.type=new Pe.ProtocolRequestType0(e.method),e.capabilities=Pe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(ju||(Ie.SemanticTokensRefreshRequest=ju={}))});var Hu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Vs=Q(),Lu;(function(e){e.method="window/showDocument",e.messageDirection=Vs.MessageDirection.serverToClient,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("window.showDocument.support",void 0)})(Lu||(Rr.ShowDocumentRequest=Lu={}))});var Uu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.LinkedEditingRangeRequest=void 0;var Xs=Q(),Wu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Xs.MessageDirection.clientToServer,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Wu||(kr.LinkedEditingRangeRequest=Wu={}))});var Yu=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.WillDeleteFilesRequest=me.DidDeleteFilesNotification=me.DidRenameFilesNotification=me.WillRenameFilesRequest=me.DidCreateFilesNotification=me.WillCreateFilesRequest=me.FileOperationPatternKind=void 0;var ie=Q(),Bu;(function(e){e.file="file",e.folder="folder"})(Bu||(me.FileOperationPatternKind=Bu={}));var $u;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})($u||(me.WillCreateFilesRequest=$u={}));var zu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(zu||(me.DidCreateFilesNotification=zu={}));var Qu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Qu||(me.WillRenameFilesRequest=Qu={}));var Vu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Vu||(me.DidRenameFilesNotification=Vu={}));var Xu;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Xu||(me.DidDeleteFilesNotification=Xu={}));var Ku;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Ku||(me.WillDeleteFilesRequest=Ku={}))});var tl=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.MonikerRequest=yt.MonikerKind=yt.UniquenessLevel=void 0;var Ks=Q(),Ju;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Ju||(yt.UniquenessLevel=Ju={}));var Zu;(function(e){e.$import="import",e.$export="export",e.local="local"})(Zu||(yt.MonikerKind=Zu={}));var el;(function(e){e.method="textDocument/moniker",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.moniker","monikerProvider")})(el||(yt.MonikerRequest=el={}))});var il=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TypeHierarchySubtypesRequest=Tt.TypeHierarchySupertypesRequest=Tt.TypeHierarchyPrepareRequest=void 0;var Rt=Q(),nl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Rt.MessageDirection.clientToServer,e.type=new Rt.ProtocolRequestType(e.method),e.capabilities=Rt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(nl||(Tt.TypeHierarchyPrepareRequest=nl={}));var rl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Rt.MessageDirection.clientToServer,e.type=new Rt.ProtocolRequestType(e.method)})(rl||(Tt.TypeHierarchySupertypesRequest=rl={}));var ol;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Rt.MessageDirection.clientToServer,e.type=new Rt.ProtocolRequestType(e.method)})(ol||(Tt.TypeHierarchySubtypesRequest=ol={}))});var al=S(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.InlineValueRefreshRequest=on.InlineValueRequest=void 0;var rn=Q(),sl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.inlineValue","inlineValueProvider")})(sl||(on.InlineValueRequest=sl={}));var cl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(cl||(on.InlineValueRefreshRequest=cl={}))});var fl=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var tt=Q(),ul;(function(e){e.method="textDocument/inlayHint",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint","inlayHintProvider")})(ul||(_t.InlayHintRequest=ul={}));var ll;(function(e){e.method="inlayHint/resolve",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(ll||(_t.InlayHintResolveRequest=ll={}));var dl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=tt.MessageDirection.serverToClient,e.type=new tt.ProtocolRequestType0(e.method),e.capabilities=tt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(dl||(_t.InlayHintRefreshRequest=dl={}))});var _l=S(se=>{"use strict";var ng=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rg=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),og=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var sg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),cg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ag=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.InlineCompletionRequest=void 0;var Zs=Q(),Pl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Pl||(Mr.InlineCompletionRequest=Pl={}))});var xl=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.TextDocumentContentRefreshRequest=cn.TextDocumentContentRequest=void 0;var Nn=Q(),Rl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Nn.MessageDirection.clientToServer,e.type=new Nn.ProtocolRequestType(e.method),e.capabilities=Nn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Rl||(cn.TextDocumentContentRequest=Rl={}));var kl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Nn.MessageDirection.serverToClient,e.type=new Nn.ProtocolRequestType(e.method)})(kl||(cn.TextDocumentContentRefreshRequest=kl={}))});var $d=S(c=>{"use strict";var ug=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Fl||(c.StaticRegistrationOptions=Fl={}));var Ll;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||rc.is(r.documentSelector))}e.is=t})(Ll||(c.TextDocumentRegistrationOptions=Ll={}));var Hl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Hl||(c.WorkDoneProgressOptions=Hl={}));var Wl;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Wl||(c.InitializeRequest=Wl={}));var Ul;(function(e){e.unknownProtocolVersion=1})(Ul||(c.InitializeErrorCodes=Ul={}));var Bl;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Bl||(c.InitializedNotification=Bl={}));var $l;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})($l||(c.ShutdownRequest=$l={}));var zl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(zl||(c.ExitNotification=zl={}));var Ql;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Ql||(c.DidChangeConfigurationNotification=Ql={}));var Vl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Vl||(c.MessageType=Vl={}));var Xl;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Xl||(c.ShowMessageNotification=Xl={}));var Kl;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Kl||(c.ShowMessageRequest=Kl={}));var Yl;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Yl||(c.LogMessageNotification=Yl={}));var Jl;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Jl||(c.TelemetryEventNotification=Jl={}));var Zl;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Zl||(c.TextDocumentSyncKind=Zl={}));var ed;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ed||(c.DidOpenTextDocumentNotification=ed={}));var td;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(td||(c.TextDocumentContentChangeEvent=td={}));var nd;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(nd||(c.DidChangeTextDocumentNotification=nd={}));var rd;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(rd||(c.DidCloseTextDocumentNotification=rd={}));var od;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(od||(c.DidSaveTextDocumentNotification=od={}));var id;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(id||(c.TextDocumentSaveReason=id={}));var sd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(sd||(c.WillSaveTextDocumentNotification=sd={}));var cd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(cd||(c.WillSaveTextDocumentWaitUntilRequest=cd={}));var ad;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(ad||(c.DidChangeWatchedFilesNotification=ad={}));var ud;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ud||(c.FileChangeType=ud={}));var oc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Ml.URI.is(r.baseUri)||Ml.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(oc||(c.RelativePattern=oc={}));var ic;(function(e){function t(n){let r=n;return ce.string(r)||oc.is(r)}e.is=t})(ic||(c.GlobPattern=ic={}));var ld;(function(e){e.Create=1,e.Change=2,e.Delete=4})(ld||(c.WatchKind=ld={}));var dd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(dd||(c.PublishDiagnosticsNotification=dd={}));var fd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(fd||(c.CompletionTriggerKind=fd={}));var md;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(md||(c.CompletionRequest=md={}));var hd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(hd||(c.CompletionResolveRequest=hd={}));var gd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(gd||(c.HoverRequest=gd={}));var pd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(pd||(c.SignatureHelpTriggerKind=pd={}));var yd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(yd||(c.SignatureHelpRequest=yd={}));var Td;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(Td||(c.DefinitionRequest=Td={}));var _d;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(_d||(c.ReferencesRequest=_d={}));var bd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(bd||(c.DocumentHighlightRequest=bd={}));var vd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(vd||(c.DocumentSymbolRequest=vd={}));var Cd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Cd||(c.CodeActionRequest=Cd={}));var Sd;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Sd||(c.CodeActionResolveRequest=Sd={}));var Id;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Id||(c.WorkspaceSymbolRequest=Id={}));var Dd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Dd||(c.WorkspaceSymbolResolveRequest=Dd={}));var wd;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(wd||(c.CodeLensRequest=wd={}));var Pd;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Pd||(c.CodeLensResolveRequest=Pd={}));var Od;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Od||(c.CodeLensRefreshRequest=Od={}));var Rd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(Rd||(c.DocumentLinkRequest=Rd={}));var kd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(kd||(c.DocumentLinkResolveRequest=kd={}));var xd;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(xd||(c.DocumentFormattingRequest=xd={}));var Md;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Md||(c.DocumentRangeFormattingRequest=Md={}));var Ed;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Ed||(c.DocumentRangesFormattingRequest=Ed={}));var qd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(qd||(c.DocumentOnTypeFormattingRequest=qd={}));var Nd;(function(e){e.Identifier=1})(Nd||(c.PrepareSupportDefaultBehavior=Nd={}));var Ad;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Ad||(c.RenameRequest=Ad={}));var Gd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Gd||(c.PrepareRenameRequest=Gd={}));var jd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(jd||(c.ExecuteCommandRequest=jd={}));var Fd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(Fd||(c.ApplyWorkspaceEditRequest=Fd={}))});var Qd=S(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.createProtocolConnection=bg;var zd=Je();function bg(e,t,n,r){return zd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,zd.createMessageConnection)(e,t,n,r)}});var ee=S(De=>{"use strict";var vg=De&&De.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Er=De&&De.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&vg(t,e,n)};Object.defineProperty(De,"__esModule",{value:!0});De.LSPErrorCodes=De.createProtocolConnection=void 0;Er(Je(),De);Er((Cr(),Xn(vr)),De);Er(Q(),De);Er($d(),De);var Cg=Qd();Object.defineProperty(De,"createProtocolConnection",{enumerable:!0,get:function(){return Cg.createProtocolConnection}});var Vd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Vd||(De.LSPErrorCodes=Vd={}))});var mc=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.empty=void 0;bt.v4=Xd;bt.isUUID=Kd;bt.parse=Ig;bt.generateUuid=Dg;var Gn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},fc=class e extends Gn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};bt.empty=new Gn("00000000-0000-0000-0000-000000000000");function Xd(){return new fc}var Sg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Kd(e){return Sg.test(e)}function Ig(e){if(!Kd(e))throw new Error("invalid uuid");return new Gn(e)}function Dg(){return Xd().asHex()}});var Yd=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ProgressFeature=void 0;ln.attachWorkDone=Pg;ln.attachPartialResult=Rg;var vt=ee(),wg=mc(),un=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends un{_source;constructor(t,n){super(t,n),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends jn{_source;constructor(){super(),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Pg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new un(e,n)}var Og=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(vt.WorkDoneProgressCancelNotification.type,n=>{let r=un.Instances.get(n.token);(r instanceof qr||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new un(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,wg.generateUuid)();return this.connection.sendRequest(vt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Nr)}};ln.ProgressFeature=Og;var hc;(function(e){e.type=new vt.ProgressType})(hc||(hc={}));var gc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(hc.type,this._token,t)}};function Rg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new gc(e,n)}});var Jd=S(Ve=>{"use strict";var kg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?qg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Eg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ng});var Zd=S(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.WorkspaceFoldersFeature=void 0;var Ar=ee(),Ag=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ar.Emitter,this.connection.onNotification(Ar.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ar.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ar.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Gr.WorkspaceFoldersFeature=Ag});var ef=S(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.CallHierarchyFeature=void 0;var pc=ee(),Gg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(pc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=pc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=pc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};jr.CallHierarchyFeature=Gg});var Tc=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.SemanticTokensBuilder=Ct.SemanticTokensDiff=Ct.SemanticTokensFeature=void 0;var Fr=ee(),jg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Fr.SemanticTokensRefreshRequest.type),on:t=>{let n=Fr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Fr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Fr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ct.SemanticTokensFeature=jg;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let y=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;y[this._dataLen++]=s,y[this._dataLen++]=a,y[this._dataLen++]=r,y[this._dataLen++]=o,y[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],f=t[5*y];if(m===f){let _=t[5*a+1],h=t[5*y+1];return _-h}return m-f});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ShowDocumentFeature=void 0;var Fg=ee(),Lg=e=>class extends e{showDocument(t){return this.connection.sendRequest(Fg.ShowDocumentRequest.type,t)}};Hr.ShowDocumentFeature=Lg});var nf=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.FileOperationsFeature=void 0;var dn=ee(),Hg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(dn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(dn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(dn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(dn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(dn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(dn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Wr.FileOperationsFeature=Hg});var rf=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeFeature=void 0;var Wg=ee(),Ug=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Wg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Ur.LinkedEditingRangeFeature=Ug});var of=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.TypeHierarchyFeature=void 0;var _c=ee(),Bg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(_c.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=_c.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=_c.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Br.TypeHierarchyFeature=Bg});var cf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlineValueFeature=void 0;var sf=ee(),$g=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(sf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(sf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};$r.InlineValueFeature=$g});var uf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var af=ee(),zg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(af.FoldingRangeRefreshRequest.type),on:t=>{let n=af.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=zg});var lf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlayHintFeature=void 0;var bc=ee(),Qg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(bc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(bc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(bc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Qr.InlayHintFeature=Qg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DiagnosticFeature=void 0;var Fn=ee(),Vg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Vr.DiagnosticFeature=Vg});var Cc=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.TextDocuments=void 0;var xt=ee(),vc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new xt.Emitter,this._onDidOpen=new xt.Emitter,this._onDidClose=new xt.Emitter,this._onDidSave=new xt.Emitter,this._onWillSave=new xt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=xt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),xt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Xr.TextDocuments=vc});var Dc=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.NotebookDocuments=fn.NotebookSyncFeature=void 0;var xe=ee(),ff=Cc(),Xg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(xe.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(xe.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(xe.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(xe.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};fn.NotebookSyncFeature=Xg;var Sc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,xe.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,xe.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,xe.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ic=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof ff.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new ff.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new xe.Emitter,this._onDidChange=new xe.Emitter,this._onDidSave=new xe.Emitter,this._onDidClose=new xe.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Sc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,y=o.change;y.metadata!==void 0&&(a=!0,i.metadata=y.metadata);let m=[],f=[],_=[],h=[];if(y.cells!==void 0){let k=y.cells;if(k.structure!==void 0){let g=k.structure.array;if(i.cells.splice(g.start,g.deleteCount,...g.cells!==void 0?g.cells:[]),k.structure.didOpen!==void 0)for(let l of k.structure.didOpen)await n.openTextDocument({textDocument:l}),m.push(l.uri);if(k.structure.didClose)for(let l of k.structure.didClose)await n.closeTextDocument({textDocument:l}),f.push(l.uri)}if(k.data!==void 0){let g=new Map(k.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let I=g.get(i.cells[l].document);if(I!==void 0){let E=i.cells.splice(l,1,I);if(_.push({old:E[0],new:I}),g.delete(I.document),g.size===0)break}}}if(k.textContent!==void 0)for(let g of k.textContent)await n.changeTextDocument({textDocument:g.document,contentChanges:g.changes}),h.push(g.document.uri)}this.updateCellMap(i);let v={notebookDocument:i};a&&(v.metadata={old:s,new:i.metadata});let O=[];for(let k of m)O.push(this.getNotebookCell(k));let q=[];for(let k of f)q.push(this.getNotebookCell(k));let G=[];for(let k of h)G.push(this.getNotebookCell(k));(O.length>0||q.length>0||_.length>0||G.length>0)&&(v.cells={added:O,removed:q,changed:{data:_,textContent:G}}),(v.metadata!==void 0||v.cells!==void 0)&&this._onDidChange.fire(v)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),xe.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};fn.NotebookDocuments=Ic});var mf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.MonikerFeature=void 0;var Kg=ee(),Yg=e=>class extends e{get moniker(){return{on:t=>{let n=Kg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Kr.MonikerFeature=Yg});var hf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Jg=ee(),Zg=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Jg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=Zg});var pf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var gf=ee(),ep=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(gf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(gf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=ep});var xc=S(U=>{"use strict";var tp=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),np=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sf=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Oc;var Zr=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(wc)}},yf=(0,cp.ShowDocumentFeature)((0,M.ProgressFeature)(Rc)),Tf;(function(e){function t(){return new eo}e.create=t})(Tf||(U.BulkRegistration=Tf={}));var eo=class{_registrations=[];_registered=new Set;add(t,n){let r=Me.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Pc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},_f;(function(e){function t(){return new Ln(void 0,[])}e.create=t})(_f||(U.BulkUnregistration=_f={}));var Ln=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Me.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},to=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof eo?this.registerMany(t):t instanceof Ln?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Me.string(n)?n:n.method,i=Pc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Me.string(t)?t:t.method,o=Pc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Ln(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},kc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},bf=(0,Tp.TextDocumentContentFeature)((0,ap.FileOperationsFeature)((0,op.WorkspaceFoldersFeature)((0,rp.ConfigurationFeature)(kc)))),no=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},ro=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=oo;var vf=(0,yp.InlineCompletionFeature)((0,fp.FoldingRangeFeature)((0,pp.MonikerFeature)((0,hp.DiagnosticFeature)((0,mp.InlayHintFeature)((0,dp.InlineValueFeature)((0,lp.TypeHierarchyFeature)((0,up.LinkedEditingRangeFeature)((0,sp.SemanticTokensFeature)((0,ip.CallHierarchyFeature)(oo)))))))))),io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=io;var Cf=(0,gp.NotebookSyncFeature)(io);function If(e,t){return function(n){return t(e(n))}}function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function Of(e,t){return function(n){return t(e(n))}}function Rf(e,t){return function(n){return t(e(n))}}function kf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function _p(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,If),tracer:n(e.tracer,t.tracer,wf),telemetry:n(e.telemetry,t.telemetry,Df),client:n(e.client,t.client,Pf),window:n(e.window,t.window,Of),workspace:n(e.workspace,t.workspace,Rf),languages:n(e.languages,t.languages,kf),notebooks:n(e.notebooks,t.notebooks,xf)}}function bp(e,t,n){let r=n&&n.console?new(n.console(Zr)):new Zr,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(no)):new no,s=n&&n.telemetry?new(n.telemetry(ro)):new ro,a=n&&n.client?new(n.client(to)):new to,y=n&&n.window?new(n.window(yf)):new yf,m=n&&n.workspace?new(n.workspace(bf)):new bf,f=n&&n.languages?new(n.languages(vf)):new vf,_=n&&n.notebooks?new(n.notebooks(Cf)):new Cf,h=[r,i,s,a,y,m,f,_];function v(g){return g instanceof Promise?g:Me.thenable(g)?new Promise((l,I)=>{g.then(E=>l(E),E=>I(E))}):Promise.resolve(g)}let O,q,G,k={listen:()=>o.listen(),sendRequest:(g,...l)=>o.sendRequest(Me.string(g)?g:g.method,...l),onRequest:(g,l)=>o.onRequest(g,l),sendNotification:(g,l)=>{let I=Me.string(g)?g:g.method;return o.sendNotification(I,l)},onNotification:(g,l)=>o.onNotification(g,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:g=>(q=g,{dispose:()=>{q=void 0}}),onInitialized:g=>o.onNotification(D.InitializedNotification.type,g),onShutdown:g=>(O=g,{dispose:()=>{O=void 0}}),onExit:g=>(G=g,{dispose:()=>{G=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return y},get workspace(){return m},get languages(){return f},get notebooks(){return _},onDidChangeConfiguration:g=>o.onNotification(D.DidChangeConfigurationNotification.type,g),onDidChangeWatchedFiles:g=>o.onNotification(D.DidChangeWatchedFilesNotification.type,g),__textDocumentSync:void 0,onDidOpenTextDocument:g=>o.onNotification(D.DidOpenTextDocumentNotification.type,g),onDidChangeTextDocument:g=>o.onNotification(D.DidChangeTextDocumentNotification.type,g),onDidCloseTextDocument:g=>o.onNotification(D.DidCloseTextDocumentNotification.type,g),onWillSaveTextDocument:g=>o.onNotification(D.WillSaveTextDocumentNotification.type,g),onWillSaveTextDocumentWaitUntil:g=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,g),onDidSaveTextDocument:g=>o.onNotification(D.DidSaveTextDocumentNotification.type,g),sendDiagnostics:g=>o.sendNotification(D.PublishDiagnosticsNotification.type,g),onHover:g=>o.onRequest(D.HoverRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onCompletion:g=>o.onRequest(D.CompletionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCompletionResolve:g=>o.onRequest(D.CompletionResolveRequest.type,g),onSignatureHelp:g=>o.onRequest(D.SignatureHelpRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDeclaration:g=>o.onRequest(D.DeclarationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDefinition:g=>o.onRequest(D.DefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onTypeDefinition:g=>o.onRequest(D.TypeDefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onImplementation:g=>o.onRequest(D.ImplementationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onReferences:g=>o.onRequest(D.ReferencesRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentHighlight:g=>o.onRequest(D.DocumentHighlightRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentSymbol:g=>o.onRequest(D.DocumentSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbol:g=>o.onRequest(D.WorkspaceSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:g=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,g),onCodeAction:g=>o.onRequest(D.CodeActionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeActionResolve:g=>o.onRequest(D.CodeActionResolveRequest.type,(l,I)=>g(l,I)),onCodeLens:g=>o.onRequest(D.CodeLensRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeLensResolve:g=>o.onRequest(D.CodeLensResolveRequest.type,(l,I)=>g(l,I)),onDocumentFormatting:g=>o.onRequest(D.DocumentFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:g=>o.onRequest(D.DocumentRangeFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:g=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(l,I)=>g(l,I)),onRenameRequest:g=>o.onRequest(D.RenameRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onPrepareRename:g=>o.onRequest(D.PrepareRenameRequest.type,(l,I)=>g(l,I)),onDocumentLinks:g=>o.onRequest(D.DocumentLinkRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentLinkResolve:g=>o.onRequest(D.DocumentLinkResolveRequest.type,(l,I)=>g(l,I)),onDocumentColor:g=>o.onRequest(D.DocumentColorRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onColorPresentation:g=>o.onRequest(D.ColorPresentationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onFoldingRanges:g=>o.onRequest(D.FoldingRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onSelectionRanges:g=>o.onRequest(D.SelectionRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onExecuteCommand:g=>o.onRequest(D.ExecuteCommandRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let g of h)g.attach(k);return o.onRequest(D.InitializeRequest.type,g=>{t.initialize(g),Me.string(g.trace)&&(i.trace=D.Trace.fromString(g.trace));for(let l of h)l.initialize(g.capabilities);if(q){let l=q(g,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,g),void 0);return v(l).then(I=>{if(I instanceof D.ResponseError)return I;let E=I;E||(E={capabilities:{}});let A=E.capabilities;A||(A={},E.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None:!Me.number(A.textDocumentSync)&&!Me.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=Me.number(k.__textDocumentSync)?k.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of h)B.fillServerCapabilities(A);return E})}else{let l={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of h)I.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,O)return O(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(G)return G()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,g=>{i.trace=D.Trace.fromString(g.value)}),k}});var Mf=S(be=>{"use strict";var vp=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Cp=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ac=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return He.normalize(n.join("/"))}function Ec(){return process.platform==="win32"}function so(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let y=process.env,m=Object.create(null);Object.keys(y).forEach(f=>m[f]=y[f]),t&&Mc.existsSync(t)&&(m[o]?m[o]=t+He.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let f=(0,Gc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(f.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}f.on("error",h=>{a(h)}),f.on("message",h=>{h.c==="r"&&(f.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let _={c:"rs",a:e};f.send(_)}catch(f){a(f)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Ec()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Gc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Ec()?He.join(s,"node_modules"):He.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Dp(e){let t="yarn",n={encoding:"utf8"};Ec()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Gc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let y=JSON.parse(a);if(y.type==="log")return He.join(y.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Nc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Mc.existsSync(__filename.toUpperCase())||!Mc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?He.normalize(i).indexOf(He.normalize(o))===0:He.normalize(i).toLowerCase().indexOf(He.normalize(o).toLowerCase())===0}e.isParent=r})(Nc||(be.FileSystem=Nc={}));function wp(e,t,n,r){return n?(He.isAbsolute(n)||(n=He.join(e,n)),so(t,n,n,r).then(o=>Nc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>so(t,qc(r),e,r))):so(t,qc(r),e,r)}});var Nf=S(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var Ef=require("util"),rt=Je(),jc=class e extends rt.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Ef.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Fc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),rt.Disposable.create(()=>this.stream.off("data",t))}},Lc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),rt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),rt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),rt.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},qf=Object.freeze({messageBuffer:Object.freeze({create:e=>new jc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Ef.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Fc(e),asWritableStream:e=>new Lc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Hc(){return qf}(function(e){function t(){rt.RAL.install(qf)}e.install=t})(Hc||(Hc={}));Wc.default=Hc});var Vc=S(N=>{"use strict";var Gf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Uc;var Bc=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Bc;var $c=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=$c;var zc=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=zc;var Mt=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=Mt;var Et=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Et;var co=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,Hn.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=co;var ao=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,Hn.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=ao;var Ep=process.env.XDG_RUNTIME_DIR,qp=new Map([["linux",107],["darwin",102]]);function Np(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Af.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Mp.realpathSync(Ep??xp.tmpdir()),r=qp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Af.randomBytes)(Math.floor(e/2)).toString("hex");return kp.join(n,`lsp-${o}.sock`)}function Ap(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Gp(e,t="utf-8"){let n=(0,uo.createConnection)(e);return[new Mt(n,t),new Et(n,t)]}function jp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,uo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Fp(e,t="utf-8"){let n=(0,uo.createConnection)(e,"127.0.0.1");return[new Mt(n,t),new Et(n,t)]}function Lp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Hp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Wp(e,t,n,r){n||(n=Oe.NullLogger);let o=Lp(e)?new co(e):e,i=Hp(t)?new ao(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var Xc=S(ot=>{"use strict";var Up=ot&&ot.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jf=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Up(t,e,n)};Object.defineProperty(ot,"__esModule",{value:!0});ot.createProtocolConnection=$p;var Bp=Vc();jf(Vc(),ot);jf(ee(),ot);function $p(e,t,n,r){return(0,Bp.createMessageConnection)(e,t,n,r)}});var Kc=S(he=>{"use strict";var zp=he&&he.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lf=he&&he.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&zp(t,e,n)};Object.defineProperty(he,"__esModule",{value:!0});he.ProposedFeatures=he.NotebookDocuments=he.TextDocuments=he.SemanticTokensBuilder=void 0;var Qp=Tc();Object.defineProperty(he,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Qp.SemanticTokensBuilder}});Lf(ee(),he);var Vp=Cc();Object.defineProperty(he,"TextDocuments",{enumerable:!0,get:function(){return Vp.TextDocuments}});var Xp=Dc();Object.defineProperty(he,"NotebookDocuments",{enumerable:!0,get:function(){return Xp.NotebookDocuments}});Lf(xc(),he);var Ff;(function(e){e.all={__brand:"features"}})(Ff||(he.ProposedFeatures=Ff={}))});var Jc=S(ve=>{"use strict";var Bf=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Kp=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$f=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{lo(),process.exit(mn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Yc.number(t)&&Qf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(mn?0:1)}},3e3)},get shutdownReceived(){return mn},set shutdownReceived(e){mn=e},exit:e=>{lo(),process.exit(e)}};function ey(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),qt.ConnectionStrategy.is(e)||qt.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),ty(i,s,a,o)}function ty(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,y,m=process.argv.slice(2);for(let f=0;f{lo(),process.exit(mn?0:1)}),a.on("close",()=>{lo(),process.exit(mn?0:1)})}let s=a=>{let y=(0,qt.createProtocolConnection)(e,t,a,n);return o&&ny(a),y};return(0,Yp.createConnection)(s,Zp,r)}function ny(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Hf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Hf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Yf={};xa(Yf,{TextDocument:()=>Zc});function ea(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ea(r,t),ea(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function ry(e){let t=Kf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var fo,Zc,Jf=ka(()=>{"use strict";fo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Kf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),y=Math.max(o.end.line,0),m=this._lineOffsets,f=Vf(r.text,!1,i);if(y-a===f.length)for(let h=0,v=f.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Xf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new fo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof fo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ea(i.map(ry),(f,_)=>{let h=f.range.start.line-_.range.start.line;return h===0?f.range.start.character-_.range.start.character:h}),y=0,m=[];for(let f of a){let _=o.offsetAt(f.range.start);if(_y&&m.push(s.substring(y,_)),f.newText.length&&m.push(f.newText),y=o.offsetAt(f.range.end)}return m.push(s.substr(y)),m.join("")}e.applyEdits=r})(Zc||(Zc={}))});var Un=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.DATATYPE_SET=ge.KEYWORD_SET=ge.PUNCTUATION=ge.OPERATORS=ge.DATATYPES=ge.KEYWORDS=void 0;ge.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ge.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ge.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ge.PUNCTUATION=["(",")","[","]",";",",",":","."];ge.KEYWORD_SET=new Set(ge.KEYWORDS);ge.DATATYPE_SET=new Set(ge.DATATYPES)});var Nt=S(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.TokenKind=void 0;var Zf;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Zf||(mo.TokenKind=Zf={}))});var po=S(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.tokenize=sy;var go=Un(),Re=Nt();function oy(e){return e!==void 0&&/[A-Za-z_$#]/.test(e)}function em(e){return e!==void 0&&/[A-Za-z0-9_$#]/.test(e)}function ho(e){return e!==void 0&&/[0-9]/.test(e)}function iy(e){let t=e.toUpperCase();return go.DATATYPE_SET.has(t)?Re.TokenKind.Datatype:go.KEYWORD_SET.has(t)?Re.TokenKind.Keyword:Re.TokenKind.Identifier}function sy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return xe.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return xe.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(C){return C===!0||C===!1}e.boolean=o;function i(C){return t.call(C)==="[object String]"}e.string=i;function s(C){return t.call(C)==="[object Number]"}e.number=s;function a(C,O,q){return t.call(C)==="[object Number]"&&O<=C&&C<=q}e.numberRange=a;function y(C){return t.call(C)==="[object Number]"&&-2147483648<=C&&C<=2147483647}e.integer=y;function m(C){return t.call(C)==="[object Number]"&&0<=C&&C<=2147483647}e.uinteger=m;function d(C){return t.call(C)==="[object Function]"}e.func=d;function _(C){return C!==null&&typeof C=="object"}e.objectLiteral=_;function h(C,O){return Array.isArray(C)&&C.every(O)}e.typedArray=h})(f||(f={}))});var z=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.CM=fe.ProtocolNotificationType=fe.ProtocolNotificationType0=fe.ProtocolRequestType=fe.ProtocolRequestType0=fe.RegistrationType=fe.MessageDirection=void 0;var Kt=Je(),ou;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(ou||(fe.MessageDirection=ou={}));var Fs=class{____;method;constructor(t){this.method=t}};fe.RegistrationType=Fs;var js=class extends Kt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};fe.ProtocolRequestType0=js;var Ls=class extends Kt.RequestType{__;___;____;_pr;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolRequestType=Ls;var Ws=class extends Kt.NotificationType0{___;____;constructor(t){super(t)}};fe.ProtocolNotificationType0=Ws;var Us=class extends Kt.NotificationType{___;____;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolNotificationType=Us;var iu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(iu||(fe.CM=iu={}))});var Ir=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Xh;Fe.string=su;Fe.number=Kh;Fe.error=Zh;Fe.func=Yh;Fe.array=cu;Fe.stringArray=Jh;Fe.typedArray=eg;Fe.objectLiteral=tg;function Xh(e){return e===!0||e===!1}function su(e){return typeof e=="string"||e instanceof String}function Kh(e){return typeof e=="number"||e instanceof Number}function Zh(e){return e instanceof Error}function Yh(e){return typeof e=="function"}function cu(e){return Array.isArray(e)}function Jh(e){return cu(e)&&e.every(t=>su(t))}function eg(e,t){return Array.isArray(e)&&e.every(t)}function tg(e){return e!==null&&typeof e=="object"}});var uu=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ImplementationRequest=void 0;var Bs=z(),au;(function(e){e.method="textDocument/implementation",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.implementation","implementationProvider")})(au||(Dr.ImplementationRequest=au={}))});var du=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.TypeDefinitionRequest=void 0;var Qs=z(),lu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Qs.MessageDirection.clientToServer,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(lu||(wr.TypeDefinitionRequest=lu={}))});var hu=S(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.DidChangeWorkspaceFoldersNotification=Yt.WorkspaceFoldersRequest=void 0;var Zt=z(),fu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Zt.MessageDirection.serverToClient,e.type=new Zt.ProtocolRequestType0(e.method),e.capabilities=Zt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(fu||(Yt.WorkspaceFoldersRequest=fu={}));var mu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolNotificationType(e.method),e.capabilities=Zt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(mu||(Yt.DidChangeWorkspaceFoldersNotification=mu={}))});var pu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.ConfigurationRequest=void 0;var $s=z(),gu;(function(e){e.method="workspace/configuration",e.messageDirection=$s.MessageDirection.serverToClient,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("workspace.configuration",void 0)})(gu||(kr.ConfigurationRequest=gu={}))});var _u=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ColorPresentationRequest=en.DocumentColorRequest=void 0;var Jt=z(),yu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Jt.MessageDirection.clientToServer,e.type=new Jt.ProtocolRequestType(e.method),e.capabilities=Jt.CM.create("textDocument.colorProvider","colorProvider")})(yu||(en.DocumentColorRequest=yu={}));var Tu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Jt.MessageDirection.clientToServer,e.type=new Jt.ProtocolRequestType(e.method),e.capabilities=Jt.CM.create("textDocument.colorProvider","colorProvider")})(Tu||(en.ColorPresentationRequest=Tu={}))});var vu=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.FoldingRangeRefreshRequest=nn.FoldingRangeRequest=void 0;var tn=z(),bu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(bu||(nn.FoldingRangeRequest=bu={}));var Cu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=tn.MessageDirection.serverToClient,e.type=new tn.ProtocolRequestType0(e.method),e.capabilities=tn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Cu||(nn.FoldingRangeRefreshRequest=Cu={}))});var Iu=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=z(),Su;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(Su||(Pr.DeclarationRequest=Su={}))});var wu=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var Vs=z(),Du;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Du||(Or.SelectionRangeRequest=Du={}))});var Ru=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.WorkDoneProgressCancelNotification=gt.WorkDoneProgressCreateRequest=gt.WorkDoneProgress=void 0;var ng=Je(),Mn=z(),ku;(function(e){e.type=new ng.ProgressType;function t(n){return n===e.type}e.is=t})(ku||(gt.WorkDoneProgress=ku={}));var Pu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(Pu||(gt.WorkDoneProgressCreateRequest=Pu={}));var Ou;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(Ou||(gt.WorkDoneProgressCancelNotification=Ou={}))});var Au=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CallHierarchyOutgoingCallsRequest=pt.CallHierarchyIncomingCallsRequest=pt.CallHierarchyPrepareRequest=void 0;var tt=z(),xu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(xu||(pt.CallHierarchyPrepareRequest=xu={}));var Mu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Mu||(pt.CallHierarchyIncomingCallsRequest=Mu={}));var Eu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Eu||(pt.CallHierarchyOutgoingCallsRequest=Eu={}))});var ju=S(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Oe=z(),qu;(function(e){e.Relative="relative"})(qu||(De.TokenFormat=qu={}));var En;(function(e){e.method="textDocument/semanticTokens",e.type=new Oe.RegistrationType(e.method)})(En||(De.SemanticTokensRegistrationType=En={}));var Nu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Nu||(De.SemanticTokensRequest=Nu={}));var Gu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Gu||(De.SemanticTokensDeltaRequest=Gu={}));var Hu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Hu||(De.SemanticTokensRangeRequest=Hu={}));var Fu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Oe.MessageDirection.serverToClient,e.type=new Oe.ProtocolRequestType0(e.method),e.capabilities=Oe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Fu||(De.SemanticTokensRefreshRequest=Fu={}))});var Wu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Xs=z(),Lu;(function(e){e.method="window/showDocument",e.messageDirection=Xs.MessageDirection.serverToClient,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("window.showDocument.support",void 0)})(Lu||(Rr.ShowDocumentRequest=Lu={}))});var Bu=S(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.LinkedEditingRangeRequest=void 0;var Ks=z(),Uu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Uu||(xr.LinkedEditingRangeRequest=Uu={}))});var Yu=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.WillDeleteFilesRequest=me.DidDeleteFilesNotification=me.DidRenameFilesNotification=me.WillRenameFilesRequest=me.DidCreateFilesNotification=me.WillCreateFilesRequest=me.FileOperationPatternKind=void 0;var ie=z(),Qu;(function(e){e.file="file",e.folder="folder"})(Qu||(me.FileOperationPatternKind=Qu={}));var $u;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})($u||(me.WillCreateFilesRequest=$u={}));var zu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(zu||(me.DidCreateFilesNotification=zu={}));var Vu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Vu||(me.WillRenameFilesRequest=Vu={}));var Xu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Xu||(me.DidRenameFilesNotification=Xu={}));var Ku;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Ku||(me.DidDeleteFilesNotification=Ku={}));var Zu;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Zu||(me.WillDeleteFilesRequest=Zu={}))});var nl=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.MonikerRequest=yt.MonikerKind=yt.UniquenessLevel=void 0;var Zs=z(),Ju;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Ju||(yt.UniquenessLevel=Ju={}));var el;(function(e){e.$import="import",e.$export="export",e.local="local"})(el||(yt.MonikerKind=el={}));var tl;(function(e){e.method="textDocument/moniker",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.moniker","monikerProvider")})(tl||(yt.MonikerRequest=tl={}))});var sl=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TypeHierarchySubtypesRequest=Tt.TypeHierarchySupertypesRequest=Tt.TypeHierarchyPrepareRequest=void 0;var Ot=z(),rl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method),e.capabilities=Ot.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(rl||(Tt.TypeHierarchyPrepareRequest=rl={}));var ol;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(ol||(Tt.TypeHierarchySupertypesRequest=ol={}));var il;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(il||(Tt.TypeHierarchySubtypesRequest=il={}))});var ul=S(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.InlineValueRefreshRequest=on.InlineValueRequest=void 0;var rn=z(),cl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.inlineValue","inlineValueProvider")})(cl||(on.InlineValueRequest=cl={}));var al;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(al||(on.InlineValueRefreshRequest=al={}))});var ml=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var nt=z(),ll;(function(e){e.method="textDocument/inlayHint",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.inlayHint","inlayHintProvider")})(ll||(_t.InlayHintRequest=ll={}));var dl;(function(e){e.method="inlayHint/resolve",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(dl||(_t.InlayHintResolveRequest=dl={}));var fl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=nt.MessageDirection.serverToClient,e.type=new nt.ProtocolRequestType0(e.method),e.capabilities=nt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(fl||(_t.InlayHintRefreshRequest=fl={}))});var bl=S(se=>{"use strict";var rg=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),og=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ig=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var cg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ag=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ug=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.InlineCompletionRequest=void 0;var ec=z(),Pl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=ec.MessageDirection.clientToServer,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Pl||(Er.InlineCompletionRequest=Pl={}))});var Ml=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.TextDocumentContentRefreshRequest=cn.TextDocumentContentRequest=void 0;var qn=z(),Rl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=qn.MessageDirection.clientToServer,e.type=new qn.ProtocolRequestType(e.method),e.capabilities=qn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Rl||(cn.TextDocumentContentRequest=Rl={}));var xl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=qn.MessageDirection.serverToClient,e.type=new qn.ProtocolRequestType(e.method)})(xl||(cn.TextDocumentContentRefreshRequest=xl={}))});var $d=S(c=>{"use strict";var lg=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(jl||(c.StaticRegistrationOptions=jl={}));var Ll;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||oc.is(r.documentSelector))}e.is=t})(Ll||(c.TextDocumentRegistrationOptions=Ll={}));var Wl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Wl||(c.WorkDoneProgressOptions=Wl={}));var Ul;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Ul||(c.InitializeRequest=Ul={}));var Bl;(function(e){e.unknownProtocolVersion=1})(Bl||(c.InitializeErrorCodes=Bl={}));var Ql;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Ql||(c.InitializedNotification=Ql={}));var $l;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})($l||(c.ShutdownRequest=$l={}));var zl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(zl||(c.ExitNotification=zl={}));var Vl;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Vl||(c.DidChangeConfigurationNotification=Vl={}));var Xl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Xl||(c.MessageType=Xl={}));var Kl;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Kl||(c.ShowMessageNotification=Kl={}));var Zl;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Zl||(c.ShowMessageRequest=Zl={}));var Yl;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Yl||(c.LogMessageNotification=Yl={}));var Jl;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Jl||(c.TelemetryEventNotification=Jl={}));var ed;(function(e){e.None=0,e.Full=1,e.Incremental=2})(ed||(c.TextDocumentSyncKind=ed={}));var td;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(td||(c.DidOpenTextDocumentNotification=td={}));var nd;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(nd||(c.TextDocumentContentChangeEvent=nd={}));var rd;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(rd||(c.DidChangeTextDocumentNotification=rd={}));var od;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(od||(c.DidCloseTextDocumentNotification=od={}));var id;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(id||(c.DidSaveTextDocumentNotification=id={}));var sd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(sd||(c.TextDocumentSaveReason=sd={}));var cd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(cd||(c.WillSaveTextDocumentNotification=cd={}));var ad;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(ad||(c.WillSaveTextDocumentWaitUntilRequest=ad={}));var ud;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(ud||(c.DidChangeWatchedFilesNotification=ud={}));var ld;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ld||(c.FileChangeType=ld={}));var ic;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(El.URI.is(r.baseUri)||El.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(ic||(c.RelativePattern=ic={}));var sc;(function(e){function t(n){let r=n;return ce.string(r)||ic.is(r)}e.is=t})(sc||(c.GlobPattern=sc={}));var dd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(dd||(c.WatchKind=dd={}));var fd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(fd||(c.PublishDiagnosticsNotification=fd={}));var md;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(md||(c.CompletionTriggerKind=md={}));var hd;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(hd||(c.CompletionRequest=hd={}));var gd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(gd||(c.CompletionResolveRequest=gd={}));var pd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(pd||(c.HoverRequest=pd={}));var yd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(yd||(c.SignatureHelpTriggerKind=yd={}));var Td;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Td||(c.SignatureHelpRequest=Td={}));var _d;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(_d||(c.DefinitionRequest=_d={}));var bd;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(bd||(c.ReferencesRequest=bd={}));var Cd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Cd||(c.DocumentHighlightRequest=Cd={}));var vd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(vd||(c.DocumentSymbolRequest=vd={}));var Sd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Sd||(c.CodeActionRequest=Sd={}));var Id;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Id||(c.CodeActionResolveRequest=Id={}));var Dd;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Dd||(c.WorkspaceSymbolRequest=Dd={}));var wd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(wd||(c.WorkspaceSymbolResolveRequest=wd={}));var kd;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(kd||(c.CodeLensRequest=kd={}));var Pd;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Pd||(c.CodeLensResolveRequest=Pd={}));var Od;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Od||(c.CodeLensRefreshRequest=Od={}));var Rd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(Rd||(c.DocumentLinkRequest=Rd={}));var xd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(xd||(c.DocumentLinkResolveRequest=xd={}));var Md;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(Md||(c.DocumentFormattingRequest=Md={}));var Ed;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Ed||(c.DocumentRangeFormattingRequest=Ed={}));var Ad;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Ad||(c.DocumentRangesFormattingRequest=Ad={}));var qd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(qd||(c.DocumentOnTypeFormattingRequest=qd={}));var Nd;(function(e){e.Identifier=1})(Nd||(c.PrepareSupportDefaultBehavior=Nd={}));var Gd;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Gd||(c.RenameRequest=Gd={}));var Hd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Hd||(c.PrepareRenameRequest=Hd={}));var Fd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(Fd||(c.ExecuteCommandRequest=Fd={}));var jd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(jd||(c.ApplyWorkspaceEditRequest=jd={}))});var Vd=S(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.createProtocolConnection=Cg;var zd=Je();function Cg(e,t,n,r){return zd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,zd.createMessageConnection)(e,t,n,r)}});var ee=S(we=>{"use strict";var vg=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ar=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&vg(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;Ar(Je(),we);Ar((Sr(),Kn(vr)),we);Ar(z(),we);Ar($d(),we);var Sg=Vd();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Sg.createProtocolConnection}});var Xd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Xd||(we.LSPErrorCodes=Xd={}))});var hc=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.empty=void 0;bt.v4=Kd;bt.isUUID=Zd;bt.parse=Dg;bt.generateUuid=wg;var Gn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},mc=class e extends Gn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};bt.empty=new Gn("00000000-0000-0000-0000-000000000000");function Kd(){return new mc}var Ig=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Zd(e){return Ig.test(e)}function Dg(e){if(!Zd(e))throw new Error("invalid uuid");return new Gn(e)}function wg(){return Kd().asHex()}});var Yd=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ProgressFeature=void 0;ln.attachWorkDone=Pg;ln.attachPartialResult=Rg;var Ct=ee(),kg=hc(),un=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(Ct.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Ct.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Ct.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends un{_source;constructor(t,n){super(t,n),this._source=new Ct.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Hn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends Hn{_source;constructor(){super(),this._source=new Ct.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Pg(e,t){if(t===void 0||t.workDoneToken===void 0)return new Hn;let n=t.workDoneToken;return delete t.workDoneToken,new un(e,n)}var Og=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Ct.WorkDoneProgressCancelNotification.type,n=>{let r=un.Instances.get(n.token);(r instanceof qr||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Hn:new un(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,kg.generateUuid)();return this.connection.sendRequest(Ct.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Nr)}};ln.ProgressFeature=Og;var gc;(function(e){e.type=new Ct.ProgressType})(gc||(gc={}));var pc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(gc.type,this._token,t)}};function Rg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new pc(e,n)}});var Jd=S(Ve=>{"use strict";var xg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Mg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Eg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?qg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Ag.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ng});var ef=S(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.WorkspaceFoldersFeature=void 0;var Gr=ee(),Gg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Gr.Emitter,this.connection.onNotification(Gr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Gr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Gr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Hr.WorkspaceFoldersFeature=Gg});var tf=S(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.CallHierarchyFeature=void 0;var yc=ee(),Hg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(yc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=yc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=yc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Fr.CallHierarchyFeature=Hg});var _c=S(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.SemanticTokensBuilder=vt.SemanticTokensDiff=vt.SemanticTokensFeature=void 0;var jr=ee(),Fg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(jr.SemanticTokensRefreshRequest.type),on:t=>{let n=jr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=jr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=jr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};vt.SemanticTokensFeature=Fg;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let y=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;y[this._dataLen++]=s,y[this._dataLen++]=a,y[this._dataLen++]=r,y[this._dataLen++]=o,y[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],d=t[5*y];if(m===d){let _=t[5*a+1],h=t[5*y+1];return _-h}return m-d});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ShowDocumentFeature=void 0;var jg=ee(),Lg=e=>class extends e{showDocument(t){return this.connection.sendRequest(jg.ShowDocumentRequest.type,t)}};Wr.ShowDocumentFeature=Lg});var rf=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.FileOperationsFeature=void 0;var dn=ee(),Wg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(dn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(dn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(dn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(dn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(dn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(dn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Ur.FileOperationsFeature=Wg});var of=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.LinkedEditingRangeFeature=void 0;var Ug=ee(),Bg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Ug.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Br.LinkedEditingRangeFeature=Bg});var sf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.TypeHierarchyFeature=void 0;var bc=ee(),Qg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(bc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=bc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=bc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Qr.TypeHierarchyFeature=Qg});var af=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlineValueFeature=void 0;var cf=ee(),$g=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(cf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(cf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};$r.InlineValueFeature=$g});var lf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var uf=ee(),zg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(uf.FoldingRangeRefreshRequest.type),on:t=>{let n=uf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=zg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.InlayHintFeature=void 0;var Cc=ee(),Vg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Cc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Cc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Cc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Vr.InlayHintFeature=Vg});var ff=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.DiagnosticFeature=void 0;var Fn=ee(),Xg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Xr.DiagnosticFeature=Xg});var Sc=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.TextDocuments=void 0;var xt=ee(),vc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new xt.Emitter,this._onDidOpen=new xt.Emitter,this._onDidClose=new xt.Emitter,this._onDidSave=new xt.Emitter,this._onWillSave=new xt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=xt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),xt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Kr.TextDocuments=vc});var wc=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.NotebookDocuments=fn.NotebookSyncFeature=void 0;var Me=ee(),mf=Sc(),Kg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Me.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Me.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Me.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Me.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};fn.NotebookSyncFeature=Kg;var Ic=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Me.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Me.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Me.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Dc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof mf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new mf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Me.Emitter,this._onDidChange=new Me.Emitter,this._onDidSave=new Me.Emitter,this._onDidClose=new Me.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Ic,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,y=o.change;y.metadata!==void 0&&(a=!0,i.metadata=y.metadata);let m=[],d=[],_=[],h=[];if(y.cells!==void 0){let R=y.cells;if(R.structure!==void 0){let g=R.structure.array;if(i.cells.splice(g.start,g.deleteCount,...g.cells!==void 0?g.cells:[]),R.structure.didOpen!==void 0)for(let l of R.structure.didOpen)await n.openTextDocument({textDocument:l}),m.push(l.uri);if(R.structure.didClose)for(let l of R.structure.didClose)await n.closeTextDocument({textDocument:l}),d.push(l.uri)}if(R.data!==void 0){let g=new Map(R.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let I=g.get(i.cells[l].document);if(I!==void 0){let E=i.cells.splice(l,1,I);if(_.push({old:E[0],new:I}),g.delete(I.document),g.size===0)break}}}if(R.textContent!==void 0)for(let g of R.textContent)await n.changeTextDocument({textDocument:g.document,contentChanges:g.changes}),h.push(g.document.uri)}this.updateCellMap(i);let C={notebookDocument:i};a&&(C.metadata={old:s,new:i.metadata});let O=[];for(let R of m)O.push(this.getNotebookCell(R));let q=[];for(let R of d)q.push(this.getNotebookCell(R));let G=[];for(let R of h)G.push(this.getNotebookCell(R));(O.length>0||q.length>0||_.length>0||G.length>0)&&(C.cells={added:O,removed:q,changed:{data:_,textContent:G}}),(C.metadata!==void 0||C.cells!==void 0)&&this._onDidChange.fire(C)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Me.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};fn.NotebookDocuments=Dc});var hf=S(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.MonikerFeature=void 0;var Zg=ee(),Yg=e=>class extends e{get moniker(){return{on:t=>{let n=Zg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Zr.MonikerFeature=Yg});var gf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Jg=ee(),ep=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Jg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=ep});var yf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var pf=ee(),tp=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(pf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(pf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=tp});var Mc=S(U=>{"use strict";var np=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rp=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),If=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Oc;var eo=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(kc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(kc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(kc)}},Tf=(0,ap.ShowDocumentFeature)((0,M.ProgressFeature)(Rc)),_f;(function(e){function t(){return new to}e.create=t})(_f||(U.BulkRegistration=_f={}));var to=class{_registrations=[];_registered=new Set;add(t,n){let r=Ee.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Pc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},bf;(function(e){function t(){return new jn(void 0,[])}e.create=t})(bf||(U.BulkUnregistration=bf={}));var jn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ee.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},no=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof to?this.registerMany(t):t instanceof jn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ee.string(n)?n:n.method,i=Pc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Ee.string(t)?t:t.method,o=Pc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new jn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},xc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},Cf=(0,_p.TextDocumentContentFeature)((0,up.FileOperationsFeature)((0,ip.WorkspaceFoldersFeature)((0,op.ConfigurationFeature)(xc)))),ro=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=io;var vf=(0,Tp.InlineCompletionFeature)((0,mp.FoldingRangeFeature)((0,yp.MonikerFeature)((0,gp.DiagnosticFeature)((0,hp.InlayHintFeature)((0,fp.InlineValueFeature)((0,dp.TypeHierarchyFeature)((0,lp.LinkedEditingRangeFeature)((0,cp.SemanticTokensFeature)((0,sp.CallHierarchyFeature)(io)))))))))),so=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=so;var Sf=(0,pp.NotebookSyncFeature)(so);function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function kf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function Of(e,t){return function(n){return t(e(n))}}function Rf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function Mf(e,t){return function(n){return t(e(n))}}function bp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Df),tracer:n(e.tracer,t.tracer,kf),telemetry:n(e.telemetry,t.telemetry,wf),client:n(e.client,t.client,Pf),window:n(e.window,t.window,Of),workspace:n(e.workspace,t.workspace,Rf),languages:n(e.languages,t.languages,xf),notebooks:n(e.notebooks,t.notebooks,Mf)}}function Cp(e,t,n){let r=n&&n.console?new(n.console(eo)):new eo,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(ro)):new ro,s=n&&n.telemetry?new(n.telemetry(oo)):new oo,a=n&&n.client?new(n.client(no)):new no,y=n&&n.window?new(n.window(Tf)):new Tf,m=n&&n.workspace?new(n.workspace(Cf)):new Cf,d=n&&n.languages?new(n.languages(vf)):new vf,_=n&&n.notebooks?new(n.notebooks(Sf)):new Sf,h=[r,i,s,a,y,m,d,_];function C(g){return g instanceof Promise?g:Ee.thenable(g)?new Promise((l,I)=>{g.then(E=>l(E),E=>I(E))}):Promise.resolve(g)}let O,q,G,R={listen:()=>o.listen(),sendRequest:(g,...l)=>o.sendRequest(Ee.string(g)?g:g.method,...l),onRequest:(g,l)=>o.onRequest(g,l),sendNotification:(g,l)=>{let I=Ee.string(g)?g:g.method;return o.sendNotification(I,l)},onNotification:(g,l)=>o.onNotification(g,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:g=>(q=g,{dispose:()=>{q=void 0}}),onInitialized:g=>o.onNotification(D.InitializedNotification.type,g),onShutdown:g=>(O=g,{dispose:()=>{O=void 0}}),onExit:g=>(G=g,{dispose:()=>{G=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return y},get workspace(){return m},get languages(){return d},get notebooks(){return _},onDidChangeConfiguration:g=>o.onNotification(D.DidChangeConfigurationNotification.type,g),onDidChangeWatchedFiles:g=>o.onNotification(D.DidChangeWatchedFilesNotification.type,g),__textDocumentSync:void 0,onDidOpenTextDocument:g=>o.onNotification(D.DidOpenTextDocumentNotification.type,g),onDidChangeTextDocument:g=>o.onNotification(D.DidChangeTextDocumentNotification.type,g),onDidCloseTextDocument:g=>o.onNotification(D.DidCloseTextDocumentNotification.type,g),onWillSaveTextDocument:g=>o.onNotification(D.WillSaveTextDocumentNotification.type,g),onWillSaveTextDocumentWaitUntil:g=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,g),onDidSaveTextDocument:g=>o.onNotification(D.DidSaveTextDocumentNotification.type,g),sendDiagnostics:g=>o.sendNotification(D.PublishDiagnosticsNotification.type,g),onHover:g=>o.onRequest(D.HoverRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onCompletion:g=>o.onRequest(D.CompletionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCompletionResolve:g=>o.onRequest(D.CompletionResolveRequest.type,g),onSignatureHelp:g=>o.onRequest(D.SignatureHelpRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDeclaration:g=>o.onRequest(D.DeclarationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDefinition:g=>o.onRequest(D.DefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onTypeDefinition:g=>o.onRequest(D.TypeDefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onImplementation:g=>o.onRequest(D.ImplementationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onReferences:g=>o.onRequest(D.ReferencesRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentHighlight:g=>o.onRequest(D.DocumentHighlightRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentSymbol:g=>o.onRequest(D.DocumentSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbol:g=>o.onRequest(D.WorkspaceSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:g=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,g),onCodeAction:g=>o.onRequest(D.CodeActionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeActionResolve:g=>o.onRequest(D.CodeActionResolveRequest.type,(l,I)=>g(l,I)),onCodeLens:g=>o.onRequest(D.CodeLensRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeLensResolve:g=>o.onRequest(D.CodeLensResolveRequest.type,(l,I)=>g(l,I)),onDocumentFormatting:g=>o.onRequest(D.DocumentFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:g=>o.onRequest(D.DocumentRangeFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:g=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(l,I)=>g(l,I)),onRenameRequest:g=>o.onRequest(D.RenameRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onPrepareRename:g=>o.onRequest(D.PrepareRenameRequest.type,(l,I)=>g(l,I)),onDocumentLinks:g=>o.onRequest(D.DocumentLinkRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentLinkResolve:g=>o.onRequest(D.DocumentLinkResolveRequest.type,(l,I)=>g(l,I)),onDocumentColor:g=>o.onRequest(D.DocumentColorRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onColorPresentation:g=>o.onRequest(D.ColorPresentationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onFoldingRanges:g=>o.onRequest(D.FoldingRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onSelectionRanges:g=>o.onRequest(D.SelectionRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onExecuteCommand:g=>o.onRequest(D.ExecuteCommandRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let g of h)g.attach(R);return o.onRequest(D.InitializeRequest.type,g=>{t.initialize(g),Ee.string(g.trace)&&(i.trace=D.Trace.fromString(g.trace));for(let l of h)l.initialize(g.capabilities);if(q){let l=q(g,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,g),void 0);return C(l).then(I=>{if(I instanceof D.ResponseError)return I;let E=I;E||(E={capabilities:{}});let A=E.capabilities;A||(A={},E.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=Ee.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None:!Ee.number(A.textDocumentSync)&&!Ee.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=Ee.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of h)B.fillServerCapabilities(A);return E})}else{let l={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of h)I.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,O)return O(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(G)return G()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,g=>{i.trace=D.Trace.fromString(g.value)}),R}});var Ef=S(be=>{"use strict";var vp=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sp=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gc=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Le.normalize(n.join("/"))}function Ac(){return process.platform==="win32"}function co(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let y=process.env,m=Object.create(null);Object.keys(y).forEach(d=>m[d]=y[d]),t&&Ec.existsSync(t)&&(m[o]?m[o]=t+Le.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let d=(0,Hc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(d.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}d.on("error",h=>{a(h)}),d.on("message",h=>{h.c==="r"&&(d.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let _={c:"rs",a:e};d.send(_)}catch(d){a(d)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Ac()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Hc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Ac()?Le.join(s,"node_modules"):Le.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function wp(e){let t="yarn",n={encoding:"utf8"};Ac()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Hc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let y=JSON.parse(a);if(y.type==="log")return Le.join(y.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Nc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Ec.existsSync(__filename.toUpperCase())||!Ec.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Le.normalize(i).indexOf(Le.normalize(o))===0:Le.normalize(i).toLowerCase().indexOf(Le.normalize(o).toLowerCase())===0}e.isParent=r})(Nc||(be.FileSystem=Nc={}));function kp(e,t,n,r){return n?(Le.isAbsolute(n)||(n=Le.join(e,n)),co(t,n,n,r).then(o=>Nc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>co(t,qc(r),e,r))):co(t,qc(r),e,r)}});var Nf=S(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var Af=require("util"),ot=Je(),Fc=class e extends ot.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Af.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},jc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),ot.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),ot.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),ot.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),ot.Disposable.create(()=>this.stream.off("data",t))}},Lc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),ot.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),ot.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),ot.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},qf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Fc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Af.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new jc(e),asWritableStream:e=>new Lc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Wc(){return qf}(function(e){function t(){ot.RAL.install(qf)}e.install=t})(Wc||(Wc={}));Uc.default=Wc});var Xc=S(N=>{"use strict";var Hf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Re.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Bc;var Qc=class extends Re.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Qc;var $c=class extends Re.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Re.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=$c;var zc=class extends Re.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=zc;var Mt=class extends Re.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Ln.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=Mt;var Et=class extends Re.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Et;var ao=class extends Re.ReadableStreamMessageReader{constructor(t,n){super((0,Ln.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=ao;var uo=class extends Re.WriteableStreamMessageWriter{constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=uo;var Ap=process.env.XDG_RUNTIME_DIR,qp=new Map([["linux",107],["darwin",102]]);function Np(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Gf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Ep.realpathSync(Ap??Mp.tmpdir()),r=qp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Gf.randomBytes)(Math.floor(e/2)).toString("hex");return xp.join(n,`lsp-${o}.sock`)}function Gp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,lo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Hp(e,t="utf-8"){let n=(0,lo.createConnection)(e);return[new Mt(n,t),new Et(n,t)]}function Fp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,lo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function jp(e,t="utf-8"){let n=(0,lo.createConnection)(e,"127.0.0.1");return[new Mt(n,t),new Et(n,t)]}function Lp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Wp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Up(e,t,n,r){n||(n=Re.NullLogger);let o=Lp(e)?new ao(e):e,i=Wp(t)?new uo(t):t;return Re.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Re.createMessageConnection)(o,i,n,r)}});var Kc=S(it=>{"use strict";var Bp=it&&it.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ff=it&&it.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Bp(t,e,n)};Object.defineProperty(it,"__esModule",{value:!0});it.createProtocolConnection=$p;var Qp=Xc();Ff(Xc(),it);Ff(ee(),it);function $p(e,t,n,r){return(0,Qp.createMessageConnection)(e,t,n,r)}});var Zc=S(he=>{"use strict";var zp=he&&he.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lf=he&&he.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&zp(t,e,n)};Object.defineProperty(he,"__esModule",{value:!0});he.ProposedFeatures=he.NotebookDocuments=he.TextDocuments=he.SemanticTokensBuilder=void 0;var Vp=_c();Object.defineProperty(he,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Vp.SemanticTokensBuilder}});Lf(ee(),he);var Xp=Sc();Object.defineProperty(he,"TextDocuments",{enumerable:!0,get:function(){return Xp.TextDocuments}});var Kp=wc();Object.defineProperty(he,"NotebookDocuments",{enumerable:!0,get:function(){return Kp.NotebookDocuments}});Lf(Mc(),he);var jf;(function(e){e.all={__brand:"features"}})(jf||(he.ProposedFeatures=jf={}))});var Jc=S(Ce=>{"use strict";var Qf=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zp=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$f=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{fo(),process.exit(mn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Yc.number(t)&&Vf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(mn?0:1)}},3e3)},get shutdownReceived(){return mn},set shutdownReceived(e){mn=e},exit:e=>{fo(),process.exit(e)}};function ty(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),At.ConnectionStrategy.is(e)||At.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),ny(i,s,a,o)}function ny(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,y,m=process.argv.slice(2);for(let d=0;d{fo(),process.exit(mn?0:1)}),a.on("close",()=>{fo(),process.exit(mn?0:1)})}let s=a=>{let y=(0,At.createProtocolConnection)(e,t,a,n);return o&&ry(a),y};return(0,Yp.createConnection)(s,ey,r)}function ry(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Wf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Wf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Yf={};Ma(Yf,{TextDocument:()=>ea});function ta(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ta(r,t),ta(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function oy(e){let t=Zf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var mo,ea,Jf=xa(()=>{"use strict";mo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Zf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),y=Math.max(o.end.line,0),m=this._lineOffsets,d=Xf(r.text,!1,i);if(y-a===d.length)for(let h=0,C=d.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Kf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new mo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof mo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ta(i.map(oy),(d,_)=>{let h=d.range.start.line-_.range.start.line;return h===0?d.range.start.character-_.range.start.character:h}),y=0,m=[];for(let d of a){let _=o.offsetAt(d.range.start);if(_y&&m.push(s.substring(y,_)),d.newText.length&&m.push(d.newText),y=o.offsetAt(d.range.end)}return m.push(s.substr(y)),m.join("")}e.applyEdits=r})(ea||(ea={}))});var Un=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.DATATYPE_SET=ge.KEYWORD_SET=ge.PUNCTUATION=ge.OPERATORS=ge.DATATYPES=ge.KEYWORDS=void 0;ge.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ge.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ge.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ge.PUNCTUATION=["(",")","[","]",";",",",":","."];ge.KEYWORD_SET=new Set(ge.KEYWORDS);ge.DATATYPE_SET=new Set(ge.DATATYPES)});var qt=S(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.TokenKind=void 0;var em;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(em||(ho.TokenKind=em={}))});var yo=S(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.tokenize=sy;var po=Un(),ke=qt();function tm(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function Bn(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function go(e){return e!==void 0&&/[0-9]/.test(e)}function iy(e){let t=e.toUpperCase();return po.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:po.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function sy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n{let _=n,h=i();s(f),t.push({kind:m,lexeme:e.slice(_,f),span:{start:_,end:f},range:{start:h,end:i()}})};for(;n",n)||e.startsWith("{<",n))&&(O===-1||O>v);a(Re.TokenKind.Comment,q?v:O===-1?e.length:O+1);continue}if(m==="'"){let h=n+1;for(;he.startsWith(h,n));if(f!==void 0){a(Re.TokenKind.Operator,n+f.length);continue}if(go.PUNCTUATION.includes(m)){a(Re.TokenKind.Punctuation,n+1);continue}let _=e.codePointAt(n);a(Re.TokenKind.Unknown,n+(_!==void 0&&_>65535?2:1))}let y=i();return t.push({kind:Re.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:y,end:{...y}}}),t}});var yo=S(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.positionAt=ra;Bn.offsetAt=ay;Bn.sourceRange=uy;function na(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function tm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function nm(e){let t=[0];for(let n=0;n{let _=n,h=i();s(d),t.push({kind:m,lexeme:e.slice(_,d),span:{start:_,end:d},range:{start:h,end:i()}})};for(;ne.startsWith(h,n));if(d!==void 0){a(ke.TokenKind.Operator,n+d.length);continue}if(po.PUNCTUATION.includes(m)){a(ke.TokenKind.Punctuation,n+1);continue}let _=e.codePointAt(n);a(ke.TokenKind.Unknown,n+(_!==void 0&&_>65535?2:1))}let y=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:y,end:{...y}}}),t}});var To=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.positionAt=oa;Qn.offsetAt=ay;Qn.sourceRange=uy;function ra(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function nm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function rm(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ra(e,t){na(e,t);let n=nm(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=cy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function uy(e,t){if(na(e,t.start),na(e,t.end),t.end{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.parseQuickScript=vy;var ly=Un(),To=yo(),ne=Nt(),dy=po(),rm=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),om=new Set(["+","-","NOT","!","~"]),fy=new Set(["TRUE","FALSE","NULL","EOF"]),my=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),hy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function gy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function St(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function qe(e){return e?.kind===ne.TokenKind.Keyword?St(e):void 0}function im(e,t,n=t){return(0,To.sourceRange)(e,{start:t.span.start,end:n.span.end})}function py(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,To.sourceRange)(e,{start:n,end:n}).range}function pe(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:py(e,r)}}function yy(e,t){return e.filter(n=>n.range.start.line===t&&!gy(n))}function sm(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function cm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?St(e):e.lexeme}var oa=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;om.has(cm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(St(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||fy.has(St(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!my.has(St(t)??"")&&!rm.has(St(t)??"")&&!om.has(St(t)??"")}};function Ty(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):pe(n.code,n.message,n.token)}function Ee(e,t,n){let r=new oa(t).parse();return r===void 0?!0:(n.push(Ty(e,t,r)),!1)}var ia=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(pe("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ee(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):pe("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):pe("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ee(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&Ee(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&o_.lexeme==="=")&&r.some(_=>qe(_)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:f})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&t[n+1]?.kind===ne.TokenKind.Identifier){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ee(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function _y(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function by(e,t){let n=_y(e,t);if(n>t)return n;let r=e[t];if(qe(r[0])!=="IF"||r.some(o=>qe(o)==="THEN")||!["AND","OR","NOT"].includes(qe(r[r.length-1])??""))return t;for(let o=t+1;oqe(i)==="THEN"))return o;return t}function vy(e){let t=(0,dy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(h,v)=>yy(t,v)),o=[],i=[],s=[],a=new Array(n),y=[],m=[];for(let h=0;hv.kind==="dim"&&v.datatype!==void 0))if(!ly.DATATYPE_SET.has(h.datatype.toUpperCase())){let v=h.datatypeRange??h.range,O=`${v.start.line}:${v.start.character}`;if(f.has(O))continue;f.add(O),s.push({code:"unknown-datatype",message:`Unknown datatype '${h.datatype}'.`,severity:"error",range:v})}let _=(0,To.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,..._}}});var mm=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=dm;zn.formatQuickScriptStructure=fm;zn.formatQuickScript=Ry;var L=Nt(),ua=po(),Cy=_o();function am(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function aa(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function lm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ca(e){$n(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function Sy(e,t){if(e[t].lexeme!=="-"||lm(e,t)?.kind!==L.TokenKind.Number)return!1;let n=aa(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Iy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function dm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ua.tokenize)(r);if(o.some(m=>m.kind===L.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===L.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||ye(_,t.regionBlockCodeBegin??"{region"))&&(a=!0),v!==void 0&&(v.kind===L.TokenKind.Identifier||v.kind===L.TokenKind.Keyword||v.kind===L.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(f.lexeme)}let y=Iy(i.join(""),n);return{text:y,changed:y!==e}}function Dy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function wy(e){let t=(0,ua.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function ye(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function Py(e,t){return ye(e,t.blockCodeBegin??"{>")||ye(e,t.blockCodeEnd??"{<")||ye(e,t.blockCodeExclude??"{#")||ye(e,t.regionBlockCodeBegin??"{region")||ye(e,t.regionBlockCodeEnd??"{endregion")||ye(e,t.regionBlockCodeExclude??"{#")}function Oy(e,t){let n=new Map;for(let r of(0,ua.tokenize)(e)){if(r.kind!==L.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` -`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&!Py(s,t)&&n.set(r.range.start.line,r)}return n}function um(e,t){if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let n=e.match(/^[ \t]*/)?.[0]??"",r=t.targetIndent.length-t.originalIndent.length;return r<0?e.slice(Math.min(-r,n.length)):r>0?t.targetIndent.slice(0,r)+e:e}function fm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Cy.parseQuickScript)(r),i=r.split(n),s=Oy(r,t),a=[],y=Dy(t),m=0,f=0,_,h=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let O=0;O")||ye(k,t.regionBlockCodeBegin??"{region"))&&(m+=1)}let v=a.join(n);return{text:v,changed:v!==e,diagnostics:o.diagnostics}}function Ry(e,t={}){let n=dm(e,t);return fm(n.text,t)}});var vo=S(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.KNOWN_FUNCTIONS=void 0;bo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var ym=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.completions=xy;Qn.hoverAt=My;Qn.documentSymbols=Ey;var pm=vo(),hm=Un(),gm=Nt();function ky(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of hm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of hm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of pm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function My(e,t){let n=e.document.tokens.find(i=>ky(i.range,t));if(n===void 0)return;if(n.kind===gm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===gm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=pm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function Ey(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var vm=S(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.quickFunctionNames=bm;hn.analyzeQuickScript=jy;hn.definitionAt=Fy;hn.referencesAt=Ly;var qy=_o(),Ny=vo(),Tm=yo(),At=Nt();function _m(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![At.TokenKind.Whitespace,At.TokenKind.Newline,At.TokenKind.Comment].includes(e[n].kind))return e[n]}function Gy(e,t){for(let n=t+1;nf.name.toUpperCase()));for(let f of bm(e))s.add(f.toUpperCase());for(let f of t.knownFunctionNames??[])s.add(f.toUpperCase());for(let f of n.statements.filter(_=>_.kind==="dim"&&_.name!==void 0&&_.nameRange!==void 0)){let _=f.name.toUpperCase();if(i.get(_)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${f.name}' is already declared.`,severity:"error",range:f.nameRange});continue}let v={id:o.length,name:f.name,kind:"variable",range:f.range,selectionRange:f.nameRange,datatype:f.datatype,scopeId:0};o.push(v),i.set(_,v)}let a=new Map;for(let f of o)a.set((0,Tm.offsetAt)(e,f.selectionRange.start),f);let y=new Set;for(let f of n.statements.filter(_=>_.kind==="call"&&_.name!==void 0&&_.nameRange!==void 0))y.add((0,Tm.offsetAt)(e,f.nameRange.start));let m=[];for(let f=0;f")continue;let O=i.get(_.lexeme.toUpperCase()),q=Gy(n.tokens,f),G=y.has(_.span.start)||q?.lexeme==="(";if(G&&!s.has(_.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${_.lexeme}'.`,severity:"warning",range:_.range}),O!==void 0||G){let k=G?"call":q?.lexeme==="="?"write":"read";m.push({name:_.lexeme,kind:k,range:_.range,declarationId:O?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(f=>f.id)}],symbols:o,references:m,diagnostics:r}}function Fy(e,t){let n=e.references.find(r=>_m(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Ly(e,t,n=!0){let r=e.references.find(o=>_m(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var la=S(Ce=>{"use strict";var Hy=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),it=Ce&&Ce.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Hy(t,e,n)};Object.defineProperty(Ce,"__esModule",{value:!0});it(Un(),Ce);it(mm(),Ce);it(vo(),Ce);it(ym(),Ce);it(_o(),Ce);it(vm(),Ce);it(yo(),Ce);it(Nt(),Ce);it(po(),Ce)});var Cm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=Wy;Xe.diagnosticsFor=By;Xe.formattingEdits=$y;Xe.symbolsFor=zy;Xe.definitionFor=Qy;Xe.referencesFor=Vy;Xe.completionsFor=Xy;Xe.hoverFor=Ky;var Te=Jc(),Ne=la();function Wy(){return{capabilities:{textDocumentSync:Te.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function Uy(e){switch(e){case"keyword":return Te.CompletionItemKind.Keyword;case"datatype":return Te.CompletionItemKind.TypeParameter;case"variable":return Te.CompletionItemKind.Variable;case"call-target":return Te.CompletionItemKind.Method;default:return Te.CompletionItemKind.Function}}function By(e,t){return(0,Ne.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?Te.DiagnosticSeverity.Error:Te.DiagnosticSeverity.Warning,source:"intouch-language"}))}function $y(e,t){let n=(0,Ne.formatQuickScript)(e.getText(),t);return n.changed?[Te.TextEdit.replace(Te.Range.create(Te.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function zy(e){let t=n=>Te.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?Te.SymbolKind.Variable:Te.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,Ne.documentSymbols)((0,Ne.analyzeQuickScript)(e.getText())).map(t)}function Qy(e,t){let n=(0,Ne.definitionAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:Te.Location.create(e.uri,n)}function Vy(e,t,n){return(0,Ne.referencesAt)((0,Ne.analyzeQuickScript)(e.getText()),t,n).map(r=>Te.Location.create(e.uri,r))}function Xy(e){return(0,Ne.completions)((0,Ne.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:Uy(t.kind),detail:t.detail}))}function Ky(e,t){let n=(0,Ne.hoverAt)((0,Ne.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function oa(e,t){ra(e,t);let n=rm(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=cy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function uy(e,t){if(ra(e,t.start),ra(e,t.end),t.end{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.parseQuickScript=Cy;var ly=Un(),_o=To(),te=qt(),dy=yo(),om=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),im=new Set(["+","-","NOT","!","~"]),fy=new Set(["TRUE","FALSE","NULL","EOF"]),my=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),hy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function gy(e){return e.kind===te.TokenKind.Whitespace||e.kind===te.TokenKind.Newline||e.kind===te.TokenKind.Comment||e.kind===te.TokenKind.EOF}function St(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function ve(e){return e?.kind===te.TokenKind.Keyword?St(e):void 0}function sm(e,t,n=t){return(0,_o.sourceRange)(e,{start:t.span.start,end:n.span.end})}function py(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,_o.sourceRange)(e,{start:n,end:n}).range}function pe(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:py(e,r)}}function yy(e,t){return e.filter(n=>n.range.start.line===t&&!gy(n))}function cm(e,t){return e.some(n=>n.kind===te.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function am(e){return e===void 0?void 0:e.kind===te.TokenKind.Keyword?St(e):e.lexeme}var ia=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;im.has(am(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(St(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===te.TokenKind.Identifier||t.kind===te.TokenKind.Number||t.kind===te.TokenKind.String||this.isCallableKeyword(t)||fy.has(St(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===te.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===te.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===te.TokenKind.Keyword&&!my.has(St(t)??"")&&!om.has(St(t)??"")&&!im.has(St(t)??"")}};function Ty(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):pe(n.code,n.message,n.token)}function Ae(e,t,n){let r=new ia(t).parse();return r===void 0?!0:(n.push(Ty(e,t,r)),!1)}var sa=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(pe("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ae(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==te.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):pe("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):pe("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ae(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&Ae(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&o_.lexeme==="=")&&r.some(_=>ve(_)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:d})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[te.TokenKind.Identifier,te.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ae(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==te.TokenKind.Identifier&&t[0].kind!==te.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function _y(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function by(e,t){let n=_y(e,t);if(n>t)return n;let r=e[t],o=ve(r[0])==="IF",i=ve(r[0])==="ELSE"&&ve(r[1])==="IF";if(!o&&!i||r.some(m=>ve(m)==="THEN"))return t;let s=o&&r.length===1,a=["AND","OR","NOT"].includes(ve(r[r.length-1])??""),y=["AND","OR"].includes(ve(e[t+1]?.[0])??"");if(!s&&!a&&!y)return t;for(let m=t+1;mve(d)==="THEN"))return m;return t}function Cy(e){let t=(0,dy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(h,C)=>yy(t,C)),o=[],i=[],s=[],a=new Array(n),y=[],m=[];for(let h=0;hC.kind==="dim"&&C.datatype!==void 0))if(!ly.DATATYPE_SET.has(h.datatype.toUpperCase())){let C=h.datatypeRange??h.range,O=`${C.start.line}:${C.start.character}`;if(d.has(O))continue;d.add(O),s.push({code:"unknown-datatype",message:`Unknown datatype '${h.datatype}'.`,severity:"error",range:C})}let _=(0,_o.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,..._}}});var hm=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=fm;zn.formatQuickScriptStructure=mm;zn.formatQuickScript=Ry;var j=qt(),la=yo(),vy=bo();function um(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function ua(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function dm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function aa(e){$n(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function Sy(e,t){if(e[t].lexeme!=="-"||dm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=ua(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Iy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function fm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,la.tokenize)(r);if(o.some(m=>m.kind===j.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===j.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||ye(_,t.regionBlockCodeBegin??"{region"))&&(a=!0),C!==void 0&&(C.kind===j.TokenKind.Identifier||C.kind===j.TokenKind.Keyword||C.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(d.lexeme)}let y=Iy(i.join(""),n);return{text:y,changed:y!==e}}function Dy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function wy(e){let t=(0,la.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function ye(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function ky(e,t){return ye(e,t.blockCodeBegin??"{>")||ye(e,t.blockCodeEnd??"{<")||ye(e,t.blockCodeExclude??"{#")||ye(e,t.regionBlockCodeBegin??"{region")||ye(e,t.regionBlockCodeEnd??"{endregion")||ye(e,t.regionBlockCodeExclude??"{#")}function Py(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function Oy(e,t){let n=new Map;for(let r of(0,la.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` +`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:ky(s,t),contentIndent:Py(r.lexeme)})}return n}function lm(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function mm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,vy.parseQuickScript)(r),i=r.split(n),s=Oy(r,t),a=[],y=Dy(t),m=0,d=0,_,h=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let O=0;O")||ye(R,t.regionBlockCodeBegin??"{region"))&&A?.directive!==!0&&(m+=1)}let C=a.join(n);return{text:C,changed:C!==e,diagnostics:o.diagnostics}}function Ry(e,t={}){let n=fm(e,t),r=mm(n.text,t);return{...r,changed:r.text!==e}}});var vo=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.KNOWN_FUNCTIONS=void 0;Co.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Tm=S(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.completions=My;Vn.hoverAt=Ey;Vn.documentSymbols=Ay;var ym=vo(),gm=Un(),pm=qt();function xy(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of gm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of gm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of ym.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function Ey(e,t){let n=e.document.tokens.find(i=>xy(i.range,t));if(n===void 0)return;if(n.kind===pm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===pm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=ym.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function Ay(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var vm=S(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.quickFunctionNames=Cm;hn.analyzeQuickScript=Fy;hn.definitionAt=jy;hn.referencesAt=Ly;var qy=bo(),Ny=vo(),_m=To(),Nt=qt();function bm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Nt.TokenKind.Whitespace,Nt.TokenKind.Newline,Nt.TokenKind.Comment].includes(e[n].kind))return e[n]}function Hy(e,t){for(let n=t+1;nd.name.toUpperCase()));for(let d of Cm(e))s.add(d.toUpperCase());for(let d of t.knownFunctionNames??[])s.add(d.toUpperCase());for(let d of n.statements.filter(_=>_.kind==="dim"&&_.name!==void 0&&_.nameRange!==void 0)){let _=d.name.toUpperCase();if(i.get(_)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${d.name}' is already declared.`,severity:"error",range:d.nameRange});continue}let C={id:o.length,name:d.name,kind:"variable",range:d.range,selectionRange:d.nameRange,datatype:d.datatype,scopeId:0};o.push(C),i.set(_,C)}let a=new Map;for(let d of o)a.set((0,_m.offsetAt)(e,d.selectionRange.start),d);let y=new Set;for(let d of n.statements.filter(_=>_.kind==="call"&&_.name!==void 0&&_.nameRange!==void 0))y.add((0,_m.offsetAt)(e,d.nameRange.start));let m=[];for(let d=0;d")continue;let O=i.get(_.lexeme.toUpperCase()),q=Hy(n.tokens,d),G=y.has(_.span.start)||q?.lexeme==="(";if(G&&!s.has(_.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${_.lexeme}'.`,severity:"warning",range:_.range}),O!==void 0||G){let R=G?"call":q?.lexeme==="="?"write":"read";m.push({name:_.lexeme,kind:R,range:_.range,declarationId:O?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(d=>d.id)}],symbols:o,references:m,diagnostics:r}}function jy(e,t){let n=e.references.find(r=>bm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Ly(e,t,n=!0){let r=e.references.find(o=>bm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var da=S(Se=>{"use strict";var Wy=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),st=Se&&Se.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Wy(t,e,n)};Object.defineProperty(Se,"__esModule",{value:!0});st(Un(),Se);st(hm(),Se);st(vo(),Se);st(Tm(),Se);st(bo(),Se);st(vm(),Se);st(To(),Se);st(qt(),Se);st(yo(),Se)});var Sm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=Uy;Xe.diagnosticsFor=Qy;Xe.formattingEdits=$y;Xe.symbolsFor=zy;Xe.definitionFor=Vy;Xe.referencesFor=Xy;Xe.completionsFor=Ky;Xe.hoverFor=Zy;var Te=Jc(),qe=da();function Uy(){return{capabilities:{textDocumentSync:Te.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function By(e){switch(e){case"keyword":return Te.CompletionItemKind.Keyword;case"datatype":return Te.CompletionItemKind.TypeParameter;case"variable":return Te.CompletionItemKind.Variable;case"call-target":return Te.CompletionItemKind.Method;default:return Te.CompletionItemKind.Function}}function Qy(e,t){return(0,qe.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?Te.DiagnosticSeverity.Error:Te.DiagnosticSeverity.Warning,source:"intouch-language"}))}function $y(e,t){let n=(0,qe.formatQuickScript)(e.getText(),t);return n.changed?[Te.TextEdit.replace(Te.Range.create(Te.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function zy(e){let t=n=>Te.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?Te.SymbolKind.Variable:Te.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,qe.documentSymbols)((0,qe.analyzeQuickScript)(e.getText())).map(t)}function Vy(e,t){let n=(0,qe.definitionAt)((0,qe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:Te.Location.create(e.uri,n)}function Xy(e,t,n){return(0,qe.referencesAt)((0,qe.analyzeQuickScript)(e.getText()),t,n).map(r=>Te.Location.create(e.uri,r))}function Ky(e){return(0,qe.completions)((0,qe.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:By(t.kind),detail:t.detail}))}function Zy(e,t){let n=(0,qe.hoverAt)((0,qe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** -${n.detail}`},range:n.range}}});var Im=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.readSettings=Yy;Co.formattingSettings=Jy;function Gt(e){return typeof e=="object"&&e!==null?e:{}}function Sm(e){return typeof e=="number"?e:void 0}function da(e){return typeof e=="boolean"?e:void 0}function gn(e){return typeof e=="string"?e:void 0}function Yy(e){let t=Gt(e),n=t.VBI===void 0?t:Gt(t.VBI),r=Gt(n.formatter),o=Gt(r.EmptyLine),i=Gt(r.BC),s=Gt(r.Region),a=Gt(r.Misc);return{allowedNumberOfEmptyLines:Sm(o.allowedNumberOfEmptyLines),removeEmptyLines:da(o.RemoveEmptyLines),removeEmptyLinesInComments:da(o.EmptyLinesAlsoInComment),blockCodeBegin:gn(i.BlockCodeBegin),blockCodeEnd:gn(i.BlockCodeEnd),blockCodeExclude:gn(i.BlockCodeExclude),regionBlockCodeBegin:gn(s.BlockCodeBegin),regionBlockCodeEnd:gn(s.BlockCodeEnd),regionBlockCodeExclude:gn(s.BlockCodeExclude),insertSpaces:da(a.ReplaceTabToSpaces),indentSize:Sm(a.IndentSize)}}function Jy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var wm=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.WorkspaceFunctionIndex=void 0;var Dm=la(),fa=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,Dm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,Dm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};So.WorkspaceFunctionIndex=fa});var Zy=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ma=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,iT.fileURLToPath)(n)),km(ma),(0,It.serverCapabilities)()));_e.onInitialized(async()=>{let e=await _e.workspace.getConfiguration({section:"VBI"});ga=(0,ha.readSettings)({VBI:e}),Io()});_e.onDidChangeConfiguration(e=>{ga=(0,ha.readSettings)(e.settings),Io()});_e.onDidChangeWatchedFiles(()=>{km(ma)});Ue.onDidOpen(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidChangeContent(e=>{Vn.updateDocument(e.document),pa(e.document)});Ue.onDidClose(e=>{Vn.removeDocument(e.document.uri),_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Io()});_e.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.formattingEdits)(t,(0,ha.formattingSettings)(ga,e.options))});_e.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.symbolsFor)(t)});_e.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.completionsFor)(t)});_e.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.hoverFor)(t,e.position)});_e.onShutdown(()=>{});Ue.listen(_e);_e.listen(); +${n.detail}`},range:n.range}}});var Dm=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.readSettings=Yy;So.formattingSettings=Jy;function Gt(e){return typeof e=="object"&&e!==null?e:{}}function Im(e){return typeof e=="number"?e:void 0}function fa(e){return typeof e=="boolean"?e:void 0}function gn(e){return typeof e=="string"?e:void 0}function Yy(e){let t=Gt(e),n=t.VBI===void 0?t:Gt(t.VBI),r=Gt(n.formatter),o=Gt(r.EmptyLine),i=Gt(r.BC),s=Gt(r.Region),a=Gt(r.Misc);return{allowedNumberOfEmptyLines:Im(o.allowedNumberOfEmptyLines),removeEmptyLines:fa(o.RemoveEmptyLines),removeEmptyLinesInComments:fa(o.EmptyLinesAlsoInComment),blockCodeBegin:gn(i.BlockCodeBegin),blockCodeEnd:gn(i.BlockCodeEnd),blockCodeExclude:gn(i.BlockCodeExclude),regionBlockCodeBegin:gn(s.BlockCodeBegin),regionBlockCodeEnd:gn(s.BlockCodeEnd),regionBlockCodeExclude:gn(s.BlockCodeExclude),insertSpaces:fa(a.ReplaceTabToSpaces),indentSize:Im(a.IndentSize)}}function Jy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var km=S(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.WorkspaceFunctionIndex=void 0;var wm=da(),ma=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,wm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,wm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};Io.WorkspaceFunctionIndex=ma});var eT=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),tT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),nT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ha=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,sT.fileURLToPath)(n)),xm(ha),(0,It.serverCapabilities)()));_e.onInitialized(async()=>{let e=await _e.workspace.getConfiguration({section:"VBI"});pa=(0,ga.readSettings)({VBI:e}),Do()});_e.onDidChangeConfiguration(e=>{pa=(0,ga.readSettings)(e.settings),Do()});_e.onDidChangeWatchedFiles(()=>{xm(ha)});Ue.onDidOpen(e=>{Xn.updateDocument(e.document),ya(e.document)});Ue.onDidChangeContent(e=>{Xn.updateDocument(e.document),ya(e.document)});Ue.onDidClose(e=>{Xn.removeDocument(e.document.uri),_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Do()});_e.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.formattingEdits)(t,(0,ga.formattingSettings)(pa,e.options))});_e.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.symbolsFor)(t)});_e.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.completionsFor)(t)});_e.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.hoverFor)(t,e.position)});_e.onShutdown(()=>{});Ue.listen(_e);_e.listen(); //# sourceMappingURL=server.js.map diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index 2529780..d551580 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -18,7 +18,9 @@ Language knowledge is divided by responsibility: - `packages/core/src/tokenizer.ts` and `parser.ts` provide canonical lexical and structural interpretation. - `packages/core/src/generatedFunctionCatalog.ts` is generated from the - TextMate grammar for completion and hover; it is not edited manually. + TextMate grammar for completion, hover, and known-function diagnostics; it + preserves the distinction between native InTouch functions and Hermes + helpers and is not edited manually. - `language-configuration.json` and `snippets/vbi.json` provide editor behavior and authoring templates. - core tests and `src/test/suite/testfiles/` capture parser and formatter @@ -68,6 +70,18 @@ formatter calculates the opening line's original and structural target indent, then applies that same delta to every physical line through the closing brace. Relative indentation and comment text are otherwise preserved. -The configured `{>` / `{<}`, `{#`, `{region`, and `{endregion}` forms remain -formatter directives with their existing nesting behavior. They are not -reclassified as normal multiline comments. +Brace-comment closure takes lexical priority over formatter metadata. A marker +such as `{> following code shall be nested}` that contains `}` on its physical +line is one closed comment token, so its nesting directive can affect the real +QuickScript lines that follow. A marker such as `{>` without `}` on that line +opens a multiline brace comment through the next `}`. Its complete span, +including a later `{<}` closing line, is comment trivia and cannot contribute +parser or semantic diagnostics. The formatter indents that metadata comment as +one block while preserving relative indentation inside it. + +Known callable resolution combines the generated native InTouch and Hermes +catalog entries with QuickFunction declarations discovered in the current +document and workspace. The generated entries retain their catalog category; +workspace declarations remain a separate source. Configurable activation of +additional project-specific catalogs is planned rather than inferred from +individual call sites. diff --git a/package-lock.json b/package-lock.json index df5fd85..7264792 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.4", + "version": "1.5.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.4", + "version": "1.5.5", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index 25d3425..ede9dcd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.4", + "version": "1.5.5", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { diff --git a/packages/core/src/formatter.ts b/packages/core/src/formatter.ts index 4ddcf58..9da2aab 100644 --- a/packages/core/src/formatter.ts +++ b/packages/core/src/formatter.ts @@ -177,7 +177,9 @@ export function formatQuickScriptLexically(source: string, options: FormatOption if (token.kind === TokenKind.Comment) { const previous = previousSignificant(tokens, index); - if (previous?.kind === TokenKind.Keyword && previous.lexeme.toUpperCase() === 'THEN') { + if (previous?.kind === TokenKind.Keyword + && previous.lexeme.toUpperCase() === 'THEN' + && previous.range.end.line === token.range.start.line) { appendSingleSpace(output); } output.push(token.lexeme); @@ -235,6 +237,9 @@ interface MultilineCommentShift { endLine: number; originalIndent: string; targetIndent: string; + contentOriginalIndent?: string; + contentTargetIndent?: string; + alignClosingLine?: boolean; } function isFormatterDirective(line: string, options: FormatOptions): boolean { @@ -246,21 +251,53 @@ function isFormatterDirective(line: string, options: FormatOptions): boolean { || matchesDirective(line, options.regionBlockCodeExclude ?? '{#'); } -function multilineCommentStarts(source: string, options: FormatOptions): Map { - const starts = new Map(); +interface MultilineCommentStart { + token: Token; + directive: boolean; + contentIndent: string; +} + +function sharedContentIndent(comment: string): string { + const physicalLines = comment.split(/\r\n|\r|\n/); + const lines = physicalLines.slice(1, comment.endsWith('}') ? -1 : undefined).filter(line => line.trim().length > 0); + if (lines.length === 0) return ''; + let shared = lines[0].match(/^[ \t]*/)?.[0] ?? ''; + for (const line of lines.slice(1)) { + const leading = line.match(/^[ \t]*/)?.[0] ?? ''; + while (shared.length > 0 && !leading.startsWith(shared)) shared = shared.slice(0, -1); + } + return shared; +} + +function multilineCommentStarts(source: string, options: FormatOptions): Map { + const starts = new Map(); for (const token of tokenize(source)) { if (token.kind !== TokenKind.Comment || token.range.end.line <= token.range.start.line) continue; const lineStart = source.lastIndexOf('\n', token.span.start - 1) + 1; const beforeComment = source.slice(lineStart, token.span.start); const trimmed = token.lexeme.trimStart(); - if (/^[ \t]*$/.test(beforeComment) && trimmed.startsWith('{') && !isFormatterDirective(trimmed, options)) { - starts.set(token.range.start.line, token); + if (/^[ \t]*$/.test(beforeComment) && trimmed.startsWith('{')) { + starts.set(token.range.start.line, { + token, + directive: isFormatterDirective(trimmed, options), + contentIndent: sharedContentIndent(token.lexeme), + }); } } return starts; } -function shiftCommentLine(line: string, shift: MultilineCommentShift): string { +function shiftCommentLine(line: string, shift: MultilineCommentShift, lineNumber: number): string { + if (line.trim().length === 0) return ''; + if (shift.contentTargetIndent !== undefined && shift.contentOriginalIndent !== undefined) { + if (shift.alignClosingLine === true && lineNumber === shift.endLine) { + return shift.targetIndent + line.trimStart(); + } + if (line.startsWith(shift.contentOriginalIndent)) { + return shift.contentTargetIndent + line.slice(shift.contentOriginalIndent.length); + } + return shift.contentTargetIndent + line.trimStart(); + } if (line.startsWith(shift.originalIndent)) { return shift.targetIndent + line.slice(shift.originalIndent.length); } @@ -294,14 +331,14 @@ export function formatQuickScriptStructure(source: string, options: FormatOption if (original.trim().length === 0) { if (options.removeEmptyLinesInComments !== true) { blankCount = 0; - output.push(shiftCommentLine(original, commentShift)); + output.push(shiftCommentLine(original, commentShift, lineNumber)); } else { blankCount += 1; if (blankCount <= maximumBlankLines) output.push(''); } } else { blankCount = 0; - output.push(shiftCommentLine(original, commentShift)); + output.push(shiftCommentLine(original, commentShift, lineNumber)); } if (lineNumber === commentShift.endLine) commentShift = undefined; continue; @@ -336,7 +373,14 @@ export function formatQuickScriptStructure(source: string, options: FormatOption const originalIndent = original.match(/^[ \t]*/)?.[0] ?? ''; const targetIndent = indent.repeat(depth); output.push(targetIndent + original.slice(originalIndent.length)); - commentShift = { endLine: multilineComment.range.end.line, originalIndent, targetIndent }; + commentShift = { + endLine: multilineComment.token.range.end.line, + originalIndent, + targetIndent, + contentOriginalIndent: multilineComment.directive ? multilineComment.contentIndent : undefined, + contentTargetIndent: multilineComment.directive ? targetIndent + indent : undefined, + alignClosingLine: multilineComment.directive && multilineComment.token.lexeme.endsWith('}'), + }; } else if (structure?.preserveIndent) { output.push(original); } else { @@ -345,7 +389,7 @@ export function formatQuickScriptStructure(source: string, options: FormatOption const opensDirective = matchesDirective(trimmed, options.blockCodeBegin ?? '{>') || matchesDirective(trimmed, options.regionBlockCodeBegin ?? '{region'); - if (opensDirective) { + if (opensDirective && multilineComment?.directive !== true) { directiveDepth += 1; } } @@ -357,5 +401,6 @@ export function formatQuickScriptStructure(source: string, options: FormatOption /** Format QuickScript through the canonical tokenizer and structure parser. */ export function formatQuickScript(source: string, options: FormatOptions = {}): FormatResult { const lexical = formatQuickScriptLexically(source, options); - return formatQuickScriptStructure(lexical.text, options); + const structured = formatQuickScriptStructure(lexical.text, options); + return { ...structured, changed: structured.text !== source }; } diff --git a/packages/core/src/generatedFunctionCatalog.ts b/packages/core/src/generatedFunctionCatalog.ts index 8679f99..390e46f 100644 --- a/packages/core/src/generatedFunctionCatalog.ts +++ b/packages/core/src/generatedFunctionCatalog.ts @@ -28,6 +28,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 1", "sourceComment": "IT-functions Ground Teil 1" }, + { + "name": "Alarmkommentare", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "almAckAll", "category": "IT-functions Ground Teil 1", @@ -198,6 +203,51 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 1", "sourceComment": "IT-functions Ground Teil 1" }, + { + "name": "APAntriebStatistik", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "APMonatAktualisierenZaehler1", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "APMonatAktualisierenZaehler2", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "APMonatAktualisierenZaehler3", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "AppButonsConfig", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "ApplicomToUAReference", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "APTagAktualisierenZaehler1", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "APTagAktualisierenZaehler2", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "APTagAktualisierenZaehler3", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "APUFindAlarmGroupInstance", "category": "IT-functions Ground Teil 1", @@ -318,6 +368,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 1", "sourceComment": "IT-functions Ground Teil 1" }, + { + "name": "APZaehlerAbfragen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "ArcCos", "category": "IT-functions-Math", @@ -388,6 +443,36 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "BZMonatAktualisierenZaehler1", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "BZMonatAktualisierenZaehler2", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "BZMonatAktualisierenZaehler3", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "BZTagAktualisierenZaehler1", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "BZTagAktualisierenZaehler2", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "BZTagAktualisierenZaehler3", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "BZZaehlerAbfragen", "category": "Hermes helper", @@ -543,6 +628,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, + { + "name": "GetFullTopic", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "GetNodeName", "category": "IT-functions Ground Teil 2", @@ -573,6 +663,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, + { + "name": "HDWExport", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "HerBACKUP", "category": "Hermes helper", @@ -583,6 +678,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "HerGATEWAYStatusLesen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "HerGATEWAYtriggerFreigabe", "category": "Hermes helper", @@ -598,6 +698,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "HerProViewStartV", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "Hide", "category": "IT-functions Ground Teil 2", @@ -688,6 +793,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, + { + "name": "Hubbodensteuerung", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "InfoAppActive", "category": "IT-functions-System", @@ -1008,6 +1118,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "loadVarFromDB", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "Log", "category": "IT-functions-Math", @@ -1033,6 +1148,21 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "MADatum", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "MAKurvenAbfragen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "MAKurvenProfileAbfragen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "MessageBox", "category": "IT-functions Ground Teil 3", @@ -1053,6 +1183,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, + { + "name": "Mouse", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "MoveWindow", "category": "IT-functions Ground Teil 3", @@ -1063,6 +1198,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "OnlineHilfeAufrufen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "OpenWindowsList", "category": "IT-functions Ground Teil 3", @@ -1288,6 +1428,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, + { + "name": "Scripsnippets_Intouch", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "SendKeys", "category": "IT-functions Ground Teil 3", @@ -1353,6 +1498,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "SetReferenceINT", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "SetReferenceMerkerByte", "category": "Hermes helper", @@ -1373,11 +1523,21 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "SetSMELAccessname", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "SetTagEU", "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "SetTopicTest", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "SetVarInputBoolsch", "category": "Hermes helper", @@ -1428,6 +1588,46 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, + { + "name": "SMELCPUPopup", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SMELEditorAufrufen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SMELInfo", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SMELInfoView", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SMELSQL", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SmelUpdateDB", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SMELUpdateDBWTaV", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SMELUpdateDBWTnV", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "Sollwertaenderung", "category": "Hermes helper", @@ -1468,6 +1668,26 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Intouch AddOns functions", "sourceComment": "Intouch AddOns functions" }, + { + "name": "SpecialAccessChangeGUI", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SpecialAccessChangePw", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SpecialAccessCheckGUI", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "SpeciallAccessCheckPw", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "SQLAppendStatement", "category": "Intouch AddOns functions", @@ -1683,6 +1903,16 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-System", "sourceComment": "IT-functions-System" }, + { + "name": "StartEP2", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "StartEP3", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "StatusExtApp", "category": "Hermes helper", @@ -1843,6 +2073,66 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "sysuhrzeitsynchron", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABAntrieb", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABCommentTo2z", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABHER012AZ", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABHER012AZS", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABHER012EA", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABHER012EAF", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABHER012EAFB", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABHER012EAS", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABHER062", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABResetPLSReferences", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "TABWILO", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "TagExists", "category": "IT-functions Ground Teil 3", @@ -1888,6 +2178,51 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "VZMonatAktualisierenZaehler1", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "VZMonatAktualisierenZaehler2", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "VZMonatAktualisierenZaehler3", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "VZTagAktualisierenZaehler1", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "VZTagAktualisierenZaehler2", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "VZTagAktualisierenZaehler3", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "VZVerbrauchsdaten", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "VZZaehlerAbfragen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "WBBetriebsstunden", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "wcAddItem", "category": "IT-functions Ground Teil 3", @@ -1958,11 +2293,21 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "WebCPUaufrufen", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "WindowState", "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, + { + "name": "WVVerbrauchsdaten", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "wwalmdbtrigger", "category": "Hermes helper", @@ -2103,6 +2448,56 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "xAT01Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT02Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT03Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT04Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT05Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT06Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT07Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT08Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT09Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xAT10Config", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "xBZVZSettings", "category": "Hermes helper", @@ -2118,21 +2513,51 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "xHerDebugL", + "category": "Hermes helper", + "sourceComment": "Hermes Own functions 1" + }, { "name": "xHerGATEWAYSettings", "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "xHerGatewayStart", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xKonfigSpeichern", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "xLoggingConfig", "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "xLogoffOnTSMaster", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, + { + "name": "xLogoutFromStationTS", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "xSetDateiPfade", "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "xSetDeverloper", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "xSetSQLConfig", "category": "Hermes helper", @@ -2148,6 +2573,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Hermes helper", "sourceComment": "Hermes Own functions 1" }, + { + "name": "xSetupDeploymentMode", + "category": "Hermes helper", + "sourceComment": "Hermes ground-program QuickFunctions" + }, { "name": "xSTATION1BiosName", "category": "Hermes helper", diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts index daec37c..e4b4465 100644 --- a/packages/core/src/parser.ts +++ b/packages/core/src/parser.ts @@ -230,7 +230,7 @@ class ExpressionParser { } if (value === '.' || value === '->' || value === ':') { this.position += 1; - if (!this.isName(this.tokens[this.position])) { + if (!this.isMemberName(this.tokens[this.position])) { this.issue = { code: 'missing-expression', message: `Expected an identifier after '${value}'.`, token: this.tokens[this.position] }; return; } @@ -331,6 +331,10 @@ class ExpressionParser { return token?.kind === TokenKind.Identifier || this.isCallableKeyword(token); } + private isMemberName(token: Token | undefined): boolean { + return token?.kind === TokenKind.Number || this.isName(token); + } + private isCallableKeyword(token: Token | undefined): boolean { return token?.kind === TokenKind.Keyword && !CONTROL_KEYWORDS.has(word(token) ?? '') @@ -657,7 +661,8 @@ class StatementParser { if (tokens.length === 0 || tokens[0].kind !== TokenKind.Identifier) return false; let index = 1; while (index < tokens.length) { - if (['.', '->', ':'].includes(tokens[index].lexeme) && tokens[index + 1]?.kind === TokenKind.Identifier) { + if (['.', '->', ':'].includes(tokens[index].lexeme) + && [TokenKind.Identifier, TokenKind.Number].includes(tokens[index + 1]?.kind)) { index += 2; continue; } @@ -710,8 +715,13 @@ function continuationEnd(tokensByLine: readonly Token[][], startLine: number): n const delimiterEnd = delimiterContinuationEnd(tokensByLine, startLine); if (delimiterEnd > startLine) return delimiterEnd; const first = tokensByLine[startLine]; - if (keyword(first[0]) !== 'IF' || first.some(token => keyword(token) === 'THEN')) return startLine; - if (!['AND', 'OR', 'NOT'].includes(keyword(first[first.length - 1]) ?? '')) return startLine; + const startsIf = keyword(first[0]) === 'IF'; + const startsElseIf = keyword(first[0]) === 'ELSE' && keyword(first[1]) === 'IF'; + if ((!startsIf && !startsElseIf) || first.some(token => keyword(token) === 'THEN')) return startLine; + const bareIf = startsIf && first.length === 1; + const trailingContinuation = ['AND', 'OR', 'NOT'].includes(keyword(first[first.length - 1]) ?? ''); + const leadingContinuation = ['AND', 'OR'].includes(keyword(tokensByLine[startLine + 1]?.[0]) ?? ''); + if (!bareIf && !trailingContinuation && !leadingContinuation) return startLine; for (let line = startLine + 1; line < tokensByLine.length; line += 1) { if (tokensByLine[line].some(token => keyword(token) === 'THEN')) return line; } diff --git a/packages/core/src/tokenizer.ts b/packages/core/src/tokenizer.ts index 6334429..e530bec 100644 --- a/packages/core/src/tokenizer.ts +++ b/packages/core/src/tokenizer.ts @@ -3,11 +3,11 @@ import { Position } from './source'; import { Token, TokenKind } from './token'; function isIdentifierStart(character: string | undefined): boolean { - return character !== undefined && /[A-Za-z_$#]/.test(character); + return character !== undefined && /[\p{L}_$#]/u.test(character); } function isIdentifierPart(character: string | undefined): boolean { - return character !== undefined && /[A-Za-z0-9_$#]/.test(character); + return character !== undefined && /[\p{L}\p{N}_$#]/u.test(character); } function isDigit(character: string | undefined): boolean { @@ -95,12 +95,8 @@ export function tokenize(source: string): Token[] { } if (current === '{') { - const lineEnd = source.slice(offset).search(/\r|\n/); - const endOfLine = lineEnd === -1 ? source.length : offset + lineEnd; const closingBrace = source.indexOf('}', offset + 1); - const isStandaloneNestingMarker = (source.startsWith('{>', offset) || source.startsWith('{<', offset)) - && (closingBrace === -1 || closingBrace > endOfLine); - emit(TokenKind.Comment, isStandaloneNestingMarker ? endOfLine : closingBrace === -1 ? source.length : closingBrace + 1); + emit(TokenKind.Comment, closingBrace === -1 ? source.length : closingBrace + 1); continue; } @@ -123,6 +119,12 @@ export function tokenize(source: string): Token[] { while (isDigit(source[end])) { end += 1; } + } else if (isIdentifierPart(source[end]) || (source[end] === '-' && isIdentifierStart(source[end + 1]))) { + while (isIdentifierPart(source[end]) || (source[end] === '-' && isIdentifierPart(source[end + 1]))) { + end += 1; + } + emit(TokenKind.Identifier, end); + continue; } emit(TokenKind.Number, end); continue; diff --git a/packages/core/test/formatter.test.ts b/packages/core/test/formatter.test.ts index 09b63bf..17d4b9f 100644 --- a/packages/core/test/formatter.test.ts +++ b/packages/core/test/formatter.test.ts @@ -53,6 +53,7 @@ suite('QuickScript lexical formatter', () => { 'ENDIF;', ].join('\r\n')); assert.strictEqual(twice.text, once.text); + assert.strictEqual(twice.changed, false); }); test('preserves multiline comment blank lines unless explicitly configured', () => { @@ -119,20 +120,70 @@ suite('QuickScript lexical formatter', () => { assert.strictEqual(twice, once); }); - test('keeps configured comment directives separate from normal comment blocks', () => { + test('does not treat a later multiline comment as inline content of a preceding THEN', () => { const source = [ - '{>', - ' { nested comment', - ' relative text', + 'IF Ready THEN', + '', + ' {', + ' Documentation:', + ' Relative detail', + ' }', + 'ENDIF;', + ].join('\n'); + const expected = [ + 'IF Ready THEN', + '', + ' {', + ' Documentation:', + ' Relative detail', ' }', - '{<-------------------------------------------}', - '{region sample}', - '{endregion}', + 'ENDIF;', + ].join('\r\n'); + const once = formatQuickScript(source).text; + + assert.strictEqual(once, expected); + assert.strictEqual(formatQuickScript(once).text, once); + }); + + test('formats a multiline metadata comment as one relative-indentation block', () => { + const source = [ + '{>', + ' Script:', + ' Relative detail', + '', + ' Version history:', + '{<}', ].join('\n'); const once = formatQuickScript(source).text; - assert.ok(once.includes('{>\r\n { nested comment\r\n relative text\r\n }')); - assert.ok(once.endsWith('{<-------------------------------------------}\r\n{region sample}\r\n{endregion}')); + assert.strictEqual(once, [ + '{>', + ' Script:', + ' Relative detail', + '', + ' Version history:', + '{<}', + ].join('\r\n')); + assert.strictEqual(formatQuickScript(once).text, once); + }); + + test('keeps the real QuickFunction header stable and idempotent as one multiline comment', () => { + const source = [ + '{>', + ' Script:', + ' Type: QuickFunction', + ' Name: TABHER012EA', + '', + ' Parameters:', + ' No formal parameters.', + '', + ' Usage:', + ' CALL TABHER012EA( );', + '{<}', + ].join('\n'); + const once = formatQuickScript(source).text; + + assert.strictEqual(once, source.replace(/\n/g, '\r\n')); assert.strictEqual(formatQuickScript(once).text, once); }); diff --git a/packages/core/test/parser.test.ts b/packages/core/test/parser.test.ts index 836a699..c7ea460 100644 --- a/packages/core/test/parser.test.ts +++ b/packages/core/test/parser.test.ts @@ -45,6 +45,42 @@ suite('QuickScript structure parser', () => { assert.deepStrictEqual(document.diagnostics, []); }); + test('parses corpus-evidenced multiline IF continuations', () => { + const sources = [ + [ + 'IF', + ' Ready == 1 OR', + ' Waiting == 1 THEN', + 'Value = 1;', + 'ENDIF;', + ].join('\n'), + [ + 'IF Ready == 1 THEN', + 'ELSE IF Waiting == 1 OR', + ' Starting == 1 THEN', + 'Value = 2;', + 'ENDIF; ENDIF;', + ].join('\n'), + [ + 'IF (First > 0)', + ' OR (Second > 0)', + ' OR (Third > 0) THEN', + 'Value = 3;', + 'ENDIF;', + ].join('\n'), + ]; + + for (const source of sources) { + assert.deepStrictEqual(parseQuickScript(source).diagnostics, [], source); + } + }); + + test('accepts numeric dotfields and digit-prefixed tag names', () => { + const source = 'IF Parameter.08 == 0 THEN Value = 123Pump.Name; ENDIF;'; + + assert.deepStrictEqual(parseQuickScript(source).diagnostics, []); + }); + test('supports multiple DIM names and repository-evidenced WHILE/NEXT blocks', () => { const document = parseQuickScript('DIM First, Second AS REAL;\nWHILE First < Second\nFirst = First + 1;\nNEXT;'); @@ -111,6 +147,18 @@ suite('QuickScript structure parser', () => { 'TABINDEX + TABINDEX + 1;', '}', ].join('\n'), + [ + '{>', + 'Script:', + 'Type: QuickFunction', + 'Name: Test', + '', + 'Version history:', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + 'FR I = 1 TO 10', + '{<}', + ].join('\n'), "' DIM X AS FALSCH; CALL NichtVorhanden();", '{> Version Name Usage CALL DIM}', '{< Version Name Usage CALL DIM}', @@ -124,6 +172,19 @@ suite('QuickScript structure parser', () => { } }); + test('parses code between same-line-closed nesting markers', () => { + const source = [ + '{> following code shall be nested}', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + '{<-------------------------------------------}', + ].join('\n'); + const document = parseQuickScript(source); + + assert.deepStrictEqual(document.statements.map(statement => statement.kind), ['dim', 'call']); + assert.deepStrictEqual(document.diagnostics.map(item => item.code), ['unknown-datatype']); + }); + test('accepts CALL expressions in assignments, arguments, and multiline calls', () => { const sources = [ 'CALL Foo();', diff --git a/packages/core/test/semantics.test.ts b/packages/core/test/semantics.test.ts index b8b7827..da7205b 100644 --- a/packages/core/test/semantics.test.ts +++ b/packages/core/test/semantics.test.ts @@ -1,5 +1,6 @@ import * as assert from 'assert'; +import { KNOWN_FUNCTIONS } from '../src/generatedFunctionCatalog'; import { analyzeQuickScript, definitionAt, referencesAt } from '../src/semantics'; suite('QuickScript semantic model', () => { @@ -38,6 +39,18 @@ suite('QuickScript semantic model', () => { 'TABINDEX + TABINDEX + 1;', '}', ].join('\n'), + [ + '{>', + 'Script:', + 'Type: QuickFunction', + 'Name: Test', + '', + 'Version history:', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + 'FR I = 1 TO 10', + '{<}', + ].join('\n'), "' DIM X AS FALSCH; CALL NichtVorhanden();", '{> Version Name Usage CALL DIM NichtVorhanden()}', ]; @@ -47,6 +60,33 @@ suite('QuickScript semantic model', () => { } }); + test('keeps diagnostics active between same-line-closed nesting markers', () => { + const model = analyzeQuickScript([ + '{> following code shall be nested}', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + '{<-------------------------------------------}', + ].join('\n')); + + assert.deepStrictEqual(model.diagnostics.map(item => item.code), ['unknown-datatype', 'unknown-function']); + }); + + test('classifies ground-program functions as Hermes helpers without accepting misspellings', () => { + const catalogEntries = ['xHerDebugL', 'Alarmkommentare', 'AppButonsConfig'] + .map(name => KNOWN_FUNCTIONS.find(item => item.name === name)); + const model = analyzeQuickScript('CALL xHerDebugL("ok", 10);\nCALL xHerDebugLX("ok", 10);'); + + assert.deepStrictEqual(catalogEntries.map(item => item?.category), [ + 'Hermes helper', + 'Hermes helper', + 'Hermes helper', + ]); + assert.deepStrictEqual( + model.diagnostics.filter(item => item.code === 'unknown-function').map(item => item.range.start), + [{ line: 1, character: 5 }], + ); + }); + test('separates CALL expression syntax from known-function resolution', () => { const known = analyzeQuickScript([ 'X = CALL GetSplittByIndex(Source, ".", 1);', diff --git a/packages/core/test/tokenizer.test.ts b/packages/core/test/tokenizer.test.ts index 5b64b6e..859895a 100644 --- a/packages/core/test/tokenizer.test.ts +++ b/packages/core/test/tokenizer.test.ts @@ -55,6 +55,14 @@ suite('QuickScript tokenizer', () => { ); }); + test('keeps Unicode letters and numbers inside QuickScript identifiers', () => { + const tokens = significant(tokenize('Größe2 = Außentemperatur_1 + 123Pump.Name + 2-3;')); + const identifiers = tokens.filter(token => token.kind === TokenKind.Identifier); + + assert.deepStrictEqual(identifiers.map(token => token.lexeme), ['Größe2', 'Außentemperatur_1', '123Pump', 'Name']); + assert.ok(tokens.some(token => token.kind === TokenKind.Operator && token.lexeme === '-')); + }); + test('keeps syntax-looking text inside strings and comments', () => { const source = 'Empty = ""; Message = "IF {not a comment} then"; { IF a >= 1 }\n\' NEXT is a comment'; const tokens = tokenize(source); @@ -108,12 +116,44 @@ suite('QuickScript tokenizer', () => { assert.strictEqual(content[0].lexeme, source); }); - test('keeps standalone comment nesting markers on their own line', () => { - const tokens = tokenize('{>\nScript:\n{<}'); + test('keeps an unclosed metadata opener through the later closing brace in one comment token', () => { + const source = [ + '{>', + 'Script:', + 'Type: QuickFunction', + 'Name: Test', + '', + 'Version history:', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + 'FR I = 1 TO 10', + '{<}', + ].join('\n'); + const content = tokenize(source).filter(token => token.kind !== TokenKind.EOF); + + assert.strictEqual(content.length, 1); + assert.strictEqual(content[0].kind, TokenKind.Comment); + assert.strictEqual(content[0].lexeme, source); + assert.strictEqual(content.map(token => token.lexeme).join(''), source); + }); + + test('keeps code between same-line-closed nesting markers as QuickScript tokens', () => { + const source = [ + '{> following code shall be nested}', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + '{<-------------------------------------------}', + ].join('\n'); + const tokens = tokenize(source); const comments = tokens.filter(token => token.kind === TokenKind.Comment); - assert.deepStrictEqual(comments.map(token => token.lexeme), ['{>', '{<}']); - assert.ok(tokens.some(token => token.lexeme === 'Script')); + assert.deepStrictEqual(comments.map(token => token.lexeme), [ + '{> following code shall be nested}', + '{<-------------------------------------------}', + ]); + assert.ok(tokens.some(token => token.kind === TokenKind.Keyword && token.lexeme === 'DIM')); + assert.ok(tokens.some(token => token.kind === TokenKind.Keyword && token.lexeme === 'CALL')); + assert.strictEqual(tokens.slice(0, -1).map(token => token.lexeme).join(''), source); }); test('matches operators longest-first and recognizes QuickScript punctuation', () => { diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index cdc9e17..32373f3 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -99,7 +99,7 @@ suite('QuickScript language server features', () => { assert.strictEqual(twice, expected); }); - test('keeps extra comment nesting across blank lines through the language-server formatter entrypoint', () => { + test('formats a multiline metadata comment across blank lines through the language-server entrypoint', () => { const source = [ '{>', 'Script:', @@ -145,6 +145,44 @@ suite('QuickScript language server features', () => { assert.strictEqual(twice, expected); }); + test('isolates the exact real QuickFunction headers through the LSP diagnostic pipeline', () => { + const source = [ + '{>', + ' Script:', + ' Type: QuickFunction', + ' Name: TABHER012EA', + '', + ' Parameters:', + ' No formal parameters.', + '', + ' Usage:', + ' CALL TABHER012EA( );', + '{<}', + '', + '{>', + ' Version history:', + ' V2.0.0 16.10.2020 ViRu Irgend etwas passt da vorn und Hinten nicht!', + ' V2.1.0 03.02.2022 ViRu Typ (typ + 10 = ohne PLS --> PLSActive AS Memory Discrete --> Als Globale Variable festlegen!)', + ' V2.2.0 30.10.2024 ViRu debug mit xHerDebugL', + '{<}', + ].join('\r\n'); + const document = TextDocument.create('file:///TABHER012EA.vbi', 'intouch', 1, source); + + assert.deepStrictEqual(diagnosticsFor(document), []); + }); + + test('keeps LSP diagnostics active between same-line-closed nesting markers', () => { + const source = [ + '{> following code shall be nested}', + 'DIM X AS FALSCH;', + 'CALL NichtVorhanden();', + '{<-------------------------------------------}', + ].join('\n'); + const document = TextDocument.create('file:///nested-code.vbi', 'intouch', 1, source); + + assert.deepStrictEqual(diagnosticsFor(document).map(item => item.code), ['unknown-datatype', 'unknown-function']); + }); + test('diagnoses unresolved CALL and expression functions while resolving catalogs and QuickFunctions', () => { const source = [ 'CALL xHerDebuga(Funkt + " ", 40);', @@ -214,13 +252,18 @@ suite('QuickScript language server features', () => { assert.strictEqual(referencesFor(calls, { line: 1, character: 15 }, true).length, 2); }); - test('resolves QuickFunctions from open workspace documents case-insensitively', () => { + test('resolves project functions only when the workspace declares them', () => { const definitions = TextDocument.create('file:///definitions.vi', 'intouch', 1, 'Type: QuickFunction\nName: WorkspaceFunction'); const caller = TextDocument.create('file:///caller.vbi', 'intouch', 1, 'CALL workspacefunction();\nCALL WorkspaceFunctio();'); const workspace = new WorkspaceFunctionIndex(); + const isolated = diagnosticsFor(caller).filter(diagnostic => diagnostic.code === 'unknown-function'); workspace.updateDocument(definitions); const diagnostics = diagnosticsFor(caller, workspace.knownFunctionNames()).filter(diagnostic => diagnostic.code === 'unknown-function'); + assert.deepStrictEqual(isolated.map(diagnostic => diagnostic.range.start), [ + { line: 0, character: 5 }, + { line: 1, character: 5 }, + ]); assert.deepStrictEqual(diagnostics.map(diagnostic => diagnostic.range.start), [{ line: 1, character: 5 }]); }); diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts index a5dba3b..96c7f33 100644 --- a/src/test/suite/extension.test.ts +++ b/src/test/suite/extension.test.ts @@ -3,6 +3,29 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; +async function waitForDiagnosticCode(uri: vscode.Uri, code: string): Promise { + const find = (): readonly vscode.Diagnostic[] | undefined => { + const diagnostics = vscode.languages.getDiagnostics(uri); + return diagnostics.some(diagnostic => diagnostic.code === code) ? diagnostics : undefined; + }; + const current = find(); + if (current !== undefined) return current; + return new Promise((resolve, reject) => { + let subscription: vscode.Disposable | undefined; + const timeout = setTimeout(() => { + subscription?.dispose(); + reject(new Error(`Timed out waiting for diagnostic '${code}'.`)); + }, 10000); + subscription = vscode.languages.onDidChangeDiagnostics(event => { + if (!event.uris.some(changed => changed.toString() === uri.toString())) return; + const diagnostics = find(); + if (diagnostics === undefined) return; + clearTimeout(timeout); + subscription?.dispose(); + resolve(diagnostics); + }); + }); +} suite('Extension Test Suite', () => { vscode.window.showInformationMessage('Start all tests.'); @@ -64,4 +87,30 @@ suite('Extension Test Suite', () => { assert.ok(secondEdits === undefined || secondEdits.length === 0); assert.strictEqual(document.getText(), expected); }); + + test('isolates a real multiline metadata header through the production language client', async () => { + const extension = vscode.extensions.getExtension('Vitaly-ruhl.intouch-language'); + assert.ok(extension); + await extension.activate(); + const source = [ + '{>', + ' Script:', + ' Type: QuickFunction', + ' Name: TABHER012EA', + '', + ' Parameters:', + ' No formal parameters.', + '', + ' Usage:', + ' CALL TABHER012EA( );', + '{<}', + 'DIM X AS FALSCH;', + ].join('\n'); + const document = await vscode.workspace.openTextDocument({ language: 'intouch', content: source }); + const diagnostics = await waitForDiagnosticCode(document.uri, 'unknown-datatype'); + + assert.deepStrictEqual(diagnostics.map(diagnostic => [diagnostic.code, diagnostic.range.start.line]), [ + ['unknown-datatype', 11], + ]); + }); }); diff --git a/syntaxes/intouch.tmLanguage.json b/syntaxes/intouch.tmLanguage.json index 9de0cf3..8325ed3 100644 --- a/syntaxes/intouch.tmLanguage.json +++ b/syntaxes/intouch.tmLanguage.json @@ -130,7 +130,7 @@ }, { - "match": "(?i:\\s*\\b(GetSplittByIndex|HerGATEWAYanzeigeAktualisieren|HerGATEWAYtriggerFreigabe|HerGATEWAYueberwachen|SetReferenceBool|SetReferenceByte|SetReferenceDINT|SetReferenceDINTs|SetReferenceMerkerByte|SetReferenceReal|SetReferenceString|SetReferenceWord|SetVarInputBoolsch|SetVarToggleBoolsch|BDEDatenLesen|BDEDatenSpeichern|BDEDatenSuchen|BDESchichtSchreiben|BDESchichtwerteDatenOK|BDESchichtwerteZuweisen|BDETageswerteDatenOK|BDETageswerteSchreiben|BDETageswerteZuweisen|BZBetriebsstunden|BZZaehlerAbfragen|ExterneModuleUeberwachen|FUWerte|GetSplittByIndex|HerBACKUP|HerProViewStart|HideAllPLS|KonfigLesen|KonfigSpeichern|QFFilter|QFFilterRegler15Schritt|QFLuftwerte|QFRinne|SessionUserInfoAkt|Sollwertaenderung|StatusExtApp|StatusleistenInfofelder|SWReal|wwalmdbtrigger|xAnlagenConfig|xBZVZSettings|xGatawaySettings|xHerDebug|xHerGATEWAYSettings|xLoggingConfig|xSetDateiPfade|xSetSQLConfig|xSetTSStation|xSetUhrzeitserver)\\b\\s*)", + "match": "(?i:\\s*\\b(GetSplittByIndex|HerGATEWAYanzeigeAktualisieren|HerGATEWAYtriggerFreigabe|HerGATEWAYueberwachen|SetReferenceBool|SetReferenceByte|SetReferenceDINT|SetReferenceDINTs|SetReferenceMerkerByte|SetReferenceReal|SetReferenceString|SetReferenceWord|SetVarInputBoolsch|SetVarToggleBoolsch|BDEDatenLesen|BDEDatenSpeichern|BDEDatenSuchen|BDESchichtSchreiben|BDESchichtwerteDatenOK|BDESchichtwerteZuweisen|BDETageswerteDatenOK|BDETageswerteSchreiben|BDETageswerteZuweisen|BZBetriebsstunden|BZZaehlerAbfragen|ExterneModuleUeberwachen|FUWerte|GetSplittByIndex|HerBACKUP|HerProViewStart|HideAllPLS|KonfigLesen|KonfigSpeichern|QFFilter|QFFilterRegler15Schritt|QFLuftwerte|QFRinne|SessionUserInfoAkt|Sollwertaenderung|StatusExtApp|StatusleistenInfofelder|SWReal|wwalmdbtrigger|xAnlagenConfig|xBZVZSettings|xGatawaySettings|xHerDebug|xHerDebugL|xHerGATEWAYSettings|xLoggingConfig|xSetDateiPfade|xSetSQLConfig|xSetTSStation|xSetUhrzeitserver)\\b\\s*)", "name": "keyword.other", "comment": "Hermes Own functions 1" }, @@ -138,6 +138,11 @@ "match": "(?i:\\s*\\b(xSTATION9BiosName|xSTATION8BiosName|xSTATION7BiosName|xSTATION6BiosName|xSTATION5BiosName|xSTATION4BiosName|xSTATION3BiosName|xSTATION2BiosName|xSTATION1BiosName)\\b\\s*)", "name": "support.function", "comment": "Hermes Own functions 2" + }, + { + "match": "(?i:\\s*\\b(Alarmkommentare|APAntriebStatistik|APMonatAktualisierenZaehler1|APMonatAktualisierenZaehler2|APMonatAktualisierenZaehler3|ApplicomToUAReference|APTagAktualisierenZaehler1|APTagAktualisierenZaehler2|APTagAktualisierenZaehler3|APZaehlerAbfragen|BZMonatAktualisierenZaehler1|BZMonatAktualisierenZaehler2|BZMonatAktualisierenZaehler3|BZTagAktualisierenZaehler1|BZTagAktualisierenZaehler2|BZTagAktualisierenZaehler3|GetFullTopic|HDWExport|HerGATEWAYStatusLesen|Hubbodensteuerung|loadVarFromDB|MADatum|MAKurvenAbfragen|MAKurvenProfileAbfragen|Mouse|OnlineHilfeAufrufen|Scripsnippets_Intouch|SetReferenceINT|SetSMELAccessname|SetTopicTest|SMELCPUPopup|SMELEditorAufrufen|SMELInfo|SMELInfoView|SMELSQL|SmelUpdateDB|SMELUpdateDBWTaV|SMELUpdateDBWTnV|SpecialAccessChangeGUI|SpecialAccessChangePw|SpecialAccessCheckGUI|SpeciallAccessCheckPw|sysuhrzeitsynchron|TABAntrieb|TABCommentTo2z|TABHER012AZ|TABHER012AZS|TABHER012EA|TABHER012EAF|TABHER012EAFB|TABHER012EAS|TABHER062|TABResetPLSReferences|TABWILO|VZMonatAktualisierenZaehler1|VZMonatAktualisierenZaehler2|VZMonatAktualisierenZaehler3|VZTagAktualisierenZaehler1|VZTagAktualisierenZaehler2|VZTagAktualisierenZaehler3|VZVerbrauchsdaten|VZZaehlerAbfragen|WBBetriebsstunden|WVVerbrauchsdaten|xKonfigSpeichern|AppButonsConfig|HerProViewStartV|StartEP2|StartEP3|WebCPUaufrufen|xAT01Config|xAT02Config|xAT03Config|xAT04Config|xAT05Config|xAT06Config|xAT07Config|xAT08Config|xAT09Config|xAT10Config|xHerGatewayStart|xLogoffOnTSMaster|xLogoutFromStationTS|xSetDeverloper|xSetupDeploymentMode)\\b\\s*)", + "name": "support.function", + "comment": "Hermes ground-program QuickFunctions" } ] }, From bd77d31d733aeb41046b7f04864c2e70f95cbc1d Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 19:28:51 +0200 Subject: [PATCH 26/40] feat(language): add QuickScript quality diagnostics --- dist/server.js | 42 ++++---- package.json | 18 ++++ packages/core/src/index.ts | 1 + packages/core/src/parser.ts | 3 +- packages/core/src/quality.ts | 121 +++++++++++++++++++++++ packages/core/src/semantics.ts | 86 ++++++++++++++-- packages/language-server/src/features.ts | 28 +++++- packages/language-server/src/server.ts | 2 +- packages/language-server/src/settings.ts | 14 +++ 9 files changed, 279 insertions(+), 36 deletions(-) create mode 100644 packages/core/src/quality.ts diff --git a/dist/server.js b/dist/server.js index 3c3d226..f6858f8 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,28 +1,28 @@ -"use strict";var Ro=Object.defineProperty;var Xm=Object.getOwnPropertyDescriptor;var Km=Object.getOwnPropertyNames;var Zm=Object.prototype.hasOwnProperty;var xa=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ma=(e,t)=>{for(var n in t)Ro(e,n,{get:t[n],enumerable:!0})},Ym=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Km(t))!Zm.call(e,o)&&o!==n&&Ro(e,o,{get:()=>t[o],enumerable:!(r=Xm(t,o))||r.enumerable});return e};var Kn=e=>Ym(Ro({},"__esModule",{value:!0}),e);var Zn=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=Jm;Ge.string=Ea;Ge.number=eh;Ge.error=th;Ge.func=Aa;Ge.array=qa;Ge.stringArray=nh;Ge.typedArray=rh;Ge.thenable=oh;function Jm(e){return e===!0||e===!1}function Ea(e){return typeof e=="string"||e instanceof String}function eh(e){return typeof e=="number"||e instanceof Number}function th(e){return e instanceof Error}function Aa(e){return typeof e=="function"}function qa(e){return Array.isArray(e)}function nh(e){return qa(e)&&e.every(t=>Ea(t))}function rh(e,t){return Array.isArray(e)&&e.every(t)}function oh(e){return e&&Aa(e.then)}});var jt=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.boolean=ih;Ye.string=Na;Ye.number=sh;Ye.error=ch;Ye.func=ah;Ye.array=Ga;Ye.stringArray=uh;function ih(e){return e===!0||e===!1}function Na(e){return typeof e=="string"||e instanceof String}function sh(e){return typeof e=="number"||e instanceof Number}function ch(e){return e instanceof Error}function ah(e){return typeof e=="function"}function Ga(e){return Array.isArray(e)}function uh(e){return Ga(e)&&e.every(t=>Na(t))}});var ti=S(w=>{"use strict";var lh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dh=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fh=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.LRUCache=lt.LinkedMap=lt.Touch=void 0;var ue;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ue||(lt.Touch=ue={}));var Yn=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=ue.None){let r=this._map.get(t);if(r)return n!==ue.None&&this.touch(r,n),r.value}set(t,n,r=ue.None){let o=this._map.get(t);if(o)o.value=n,r!==ue.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case ue.None:this.addItemLast(o);break;case ue.First:this.addItemFirst(o);break;case ue.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ue.First&&n!==ue.Last)){if(n===ue.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===ue.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};lt.LinkedMap=Yn;var ni=class extends Yn{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=ue.AsNew){return super.get(t,n)}peek(t){return super.get(t,ue.None)}set(t,n){return super.set(t,n,ue.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};lt.LRUCache=ni});var ja=S(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Disposable=void 0;var Fa;(function(e){function t(n){return{dispose:n}}e.create=t})(Fa||(Jn.Disposable=Fa={}))});var dt=S(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});var oi;function ii(){if(oi===void 0)throw new Error("No runtime abstraction layer installed");return oi}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");oi=n}e.install=t})(ii||(ii={}));si.default=ii});var Lt=S(ft=>{"use strict";var mh=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ft,"__esModule",{value:!0});ft.Emitter=ft.Event=void 0;var hh=mh(dt()),La;(function(e){let t={dispose(){}};e.None=function(){return t}})(La||(ft.Event=La={}));var ci=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new ci),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ft.Emitter=ai});var nr=S(Ie=>{"use strict";var gh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ph=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yh=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SharedArrayReceiverStrategy=Wt.SharedArraySenderStrategy=void 0;var vh=nr(),_n;(function(e){e.Continue=0,e.Cancelled=1})(_n||(_n={}));var di=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_n.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,_n.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Wt.SharedArraySenderStrategy=di;var fi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_n.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},mi=class{token;constructor(t){this.token=new fi(t)}cancel(){}dispose(){}},hi=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new vh.CancellationTokenSource:new mi(n)}};Wt.SharedArrayReceiverStrategy=hi});var pi=S(Ut=>{"use strict";var Sh=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Semaphore=void 0;var Ih=Sh(dt()),gi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Ih.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Ut.Semaphore=gi});var Ba=S(le=>{"use strict";var Dh=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),wh=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kh=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Ti.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};le.ReadableStreamMessageReader=bi});var Xa=S(de=>{"use strict";var Rh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xh=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mh=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(qh,r.byteLength.toString(),za),o.push(za),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};de.WriteableStreamMessageWriter=vi});var Ka=S(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.AbstractMessageBuffer=void 0;var Nh=13,Gh=10,Hh=`\r -`,Si=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};ir.AbstractMessageBuffer=Si});var eu=S(P=>{"use strict";var Fh=P&&P.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jh=P&&P.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lh=P&&P.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(P.Trace=F={}));var Pi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Pi||(P.TraceValue=Pi={}));P.TraceValues=Pi;(function(e){function t(r){if(!K.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(P.Trace=F={}));var Pe;(function(e){e.Text="text",e.JSON="json"})(Pe||(P.TraceFormat=Pe={}));(function(e){function t(n){return K.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Pe||(P.TraceFormat=Pe={}));var Oi;(function(e){e.type=new x.NotificationType("$/setTrace")})(Oi||(P.SetTraceNotification=Oi={}));var sr;(function(e){e.type=new x.NotificationType("$/logTrace")})(sr||(P.LogTraceNotification=sr={}));var Sn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Sn||(P.ConnectionErrors=Sn={}));var Qt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};P.ConnectionError=Qt;var Ri;(function(e){function t(n){let r=n;return r&&K.func(r.cancelUndispatched)}e.is=t})(Ri||(P.ConnectionStrategy=Ri={}));var cr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(cr||(P.IdCancellationReceiverStrategy=cr={}));var xi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&K.func(r.createCancellationTokenSource)&&(r.dispose===void 0||K.func(r.dispose))}e.is=t})(xi||(P.RequestCancellationReceiverStrategy=xi={}));var ar;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ii.CancellationTokenSource}});function t(n){return cr.is(n)||xi.is(n)}e.is=t})(ar||(P.CancellationReceiverStrategy=ar={}));var ur;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(In.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&K.func(r.sendCancellation)&&K.func(r.cleanup)}e.is=t})(ur||(P.CancellationSenderStrategy=ur={}));var lr;(function(e){e.Message=Object.freeze({receiver:ar.Message,sender:ur.Message});function t(n){let r=n;return r&&ar.is(r.receiver)&&ur.is(r.sender)}e.is=t})(lr||(P.CancellationStrategy=lr={}));var dr;(function(e){function t(n){let r=n;return r&&K.func(r.handleMessage)}e.is=t})(dr||(P.MessageStrategy=dr={}));var Ja;(function(e){function t(n){let r=n;return r&&(lr.is(r.cancellationStrategy)||Ri.is(r.connectionStrategy)||dr.is(r.messageStrategy)||K.number(r.maxParallelism))}e.is=t})(Ja||(P.ConnectionOptions=Ja={}));var He;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(He||(He={}));function Uh(e,t,n,r){let o=n!==void 0?n:P.NullLogger,i=0,s=0,a=0,y="2.0",m=r?.maxParallelism??-1,d=0,_,h=new Map,C,O=new Map,q=new Map,G,R=new Ya.LinkedMap,g=new Map,l=new Set,I=new Map,E=F.Off,A=Pe.Text,B,V=He.New,Ke=new Cn.Emitter,Ta=new Cn.Emitter,_a=new Cn.Emitter,ba=new Cn.Emitter,Ca=new Cn.Emitter,ct=r&&r.cancellationStrategy?r.cancellationStrategy:lr.Message;function Mm(u){}function va(){return V===He.Listening}function Sa(){return V===He.Closed}function Ht(){return V===He.Disposed}function Ia(){(V===He.New||V===He.Listening)&&(V=He.Closed,Ta.fire(void 0))}function Em(u){Ke.fire([u,void 0,void 0])}function Am(u){Ke.fire(u)}e.onClose(Ia),e.onError(Em),t.onClose(Ia),t.onError(Am);function Da(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function qm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Nm(){return"not-"+(++s).toString()}function Gm(u,b){x.Message.isRequest(b)?u.set(Da(b.id),b):x.Message.isResponse(b)?m===-1?u.set(qm(b.id),b):ka(b):u.set(Nm(),b)}function wo(){G||R.size===0||m!==-1&&d>=m||(G=(0,Za.default)().timer.setImmediate(async()=>{if(G=void 0,R.size===0||m!==-1&&d>=m)return;let u=R.shift(),b;try{d++;let v=r?.messageStrategy;dr.is(v)?b=v.handleMessage(u,wa):b=wa(u)}catch(v){o.error(`Processing message queue failed: ${v.toString()}`)}finally{b instanceof Promise?b.then(()=>{d--,wo()}).catch(v=>{o.error(`Processing message queue failed: ${v.toString()}`)}):d--,wo()}}))}async function wa(u){return x.Message.isRequest(u)?Fm(u):x.Message.isNotification(u)?jm(u):x.Message.isResponse(u)?ka(u):Lm(u)}let Hm=u=>{try{if(x.Message.isNotification(u)&&u.method===In.type.method){let b=u.params.id,v=Da(b),k=R.get(v);if(x.Message.isRequest(k)){let X=r?.connectionStrategy,L=X&&X.cancelUndispatched?X.cancelUndispatched(k,Mm):void 0;if(L&&(L.error!==void 0||L.result!==void 0)){R.delete(v),I.delete(b),L.id=k.id,ko(L,u.method,Date.now()),t.write(L).catch(()=>o.error("Sending response for canceled message failed."));return}}let H=I.get(b);if(H!==void 0){H.cancel(),Po(u);return}else l.add(b)}Gm(R,u)}finally{wo()}};async function Fm(u){if(Ht())return Promise.resolve();function b(re,ae,Y){let J={jsonrpc:y,id:u.id};return re instanceof x.ResponseError?J.error=re.toJson():J.result=re===void 0?null:re,ko(J,ae,Y),t.write(J)}function v(re,ae,Y){let J={jsonrpc:y,id:u.id,error:re.toJson()};return ko(J,ae,Y),t.write(J)}Bm(u);let k=h.get(u.method),H,X;k&&(H=k.type,X=k.handler);let L=Date.now();if(X||_){let re=u.id??String(Date.now()),ae=cr.is(ct.receiver)?ct.receiver.createCancellationTokenSource(re):ct.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&ae.cancel(),u.id!==null&&I.set(re,ae);try{let Y;if(X)if(u.params===void 0){if(H!==void 0&&H.numberOfParams!==0)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${H.numberOfParams} params but received none.`),u.method,L);Y=X(ae.token)}else if(Array.isArray(u.params)){if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byName)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,L);Y=X(...u.params,ae.token)}else{if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byPosition)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,L);Y=X(u.params,ae.token)}else _&&(Y=_(u.method,u.params,ae.token));let J=await Y;await b(J,u.method,L)}catch(Y){Y instanceof x.ResponseError?await b(Y,u.method,L):Y&&K.string(Y.message)?await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${Y.message}`),u.method,L):await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,L)}finally{I.delete(re)}}else await v(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,L)}function ka(u){if(!Ht())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let b=u.id,v=g.get(b);if(Qm(u,v),v!==void 0){g.delete(b);try{if(u.error){let k=u.error;v.reject(new x.ResponseError(k.code,k.message,k.data))}else if(u.result!==void 0)v.resolve(u.result);else throw new Error("Should never happen.")}catch(k){k.message?o.error(`Response handler '${v.method}' failed with message: ${k.message}`):o.error(`Response handler '${v.method}' failed unexpectedly.`)}}}}async function jm(u){if(Ht())return;let b,v;if(u.method===In.type.method){let k=u.params.id;l.delete(k),Po(u);return}else{let k=O.get(u.method);k&&(v=k.handler,b=k.type)}if(v||C)try{if(Po(u),v)if(u.params===void 0)b!==void 0&&b.numberOfParams!==0&&b.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received none.`),await v();else if(Array.isArray(u.params)){let k=u.params;u.method===vn.type.method&&k.length===2&&Di.is(k[0])?await v({token:k[0],value:k[1]}):(b!==void 0&&(b.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),b.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${b.numberOfParams} params but received ${k.length} arguments`)),await v(...k))}else b!==void 0&&b.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await v(u.params);else C&&await C(u.method,u.params)}catch(k){k.message?o.error(`Notification handler '${u.method}' failed with message: ${k.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else _a.fire(u)}function Lm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let b=u;if(K.string(b.id)||K.number(b.id)){let v=b.id,k=g.get(v);k&&k.reject(new Error("The received response has neither a result nor an error property."))}}function at(u){if(u!=null)switch(E){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Wm(u){if(!(E===F.Off||!B))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,b)}else Ft("send-request",u)}function Um(u){if(!(E===F.Off||!B))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Sending notification '${u.method}'.`,b)}else Ft("send-notification",u)}function ko(u,b,v){if(!(E===F.Off||!B))if(A===Pe.Text){let k;(E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?k=`Error data: ${at(u.error.data)}`:u.result?k=`Result: ${at(u.result)}`:u.error===void 0&&(k="No result returned.")),B.log(`Sending response '${b} - (${u.id})'. Processing request took ${Date.now()-v}ms`,k)}else Ft("send-response",u)}function Bm(u){if(!(E===F.Off||!B))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&u.params&&(b=`Params: ${at(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,b)}else Ft("receive-request",u)}function Po(u){if(!(E===F.Off||!B||u.method===sr.type.method))if(A===Pe.Text){let b;(E===F.Verbose||E===F.Compact)&&(u.params?b=`Params: ${at(u.params)}`:b="No parameters provided."),B.log(`Received notification '${u.method}'.`,b)}else Ft("receive-notification",u)}function Qm(u,b){if(!(E===F.Off||!B))if(A===Pe.Text){let v;if((E===F.Verbose||E===F.Compact)&&(u.error&&u.error.data?v=`Error data: ${at(u.error.data)}`:u.result?v=`Result: ${at(u.result)}`:u.error===void 0&&(v="No result returned.")),b){let k=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${b.method} - (${u.id})' in ${Date.now()-b.timerStart}ms.${k}`,v)}else B.log(`Received response ${u.id} without active response promise.`,v)}else Ft("receive-response",u)}function Ft(u,b){if(!B||E===F.Off)return;let v={isLSPMessage:!0,type:u,message:b,timestamp:Date.now()};B.log(v)}function pn(){if(Sa())throw new Qt(Sn.Closed,"Connection is closed.");if(Ht())throw new Qt(Sn.Disposed,"Connection is disposed.")}function $m(){if(va())throw new Qt(Sn.AlreadyListening,"Connection is already listening")}function zm(){if(!va())throw new Error("Call listen() first.")}function yn(u){return u===void 0?null:u}function Pa(u){if(u!==null)return u}function Oa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Oo(u,b){switch(u){case x.ParameterStructures.auto:return Oa(b)?Pa(b):[yn(b)];case x.ParameterStructures.byName:if(!Oa(b))throw new Error("Received parameters by name but param is not an object literal.");return Pa(b);case x.ParameterStructures.byPosition:return[yn(b)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Ra(u,b){let v,k=u.numberOfParams;switch(k){case 0:v=void 0;break;case 1:v=Oo(u.parameterStructures,b[0]);break;default:v=[];for(let H=0;H{pn();let v,k;if(K.string(u)){v=u;let X=b[0],L=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(X)&&(L=1,re=X);let ae=b.length,Y=ae-L;switch(Y){case 0:k=void 0;break;case 1:k=Oo(re,b[L]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${Y} parameters for 'by Name' notification parameter structure.`);k=b.slice(L,ae).map(J=>yn(J));break}}else{let X=b;v=u.method,k=Ra(u,X)}let H={jsonrpc:y,method:v,params:k};return Um(H),t.write(H).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,b)=>{pn();let v;return K.func(u)?C=u:b&&(K.string(u)?(v=u,O.set(u,{type:void 0,handler:b})):(v=u.method,O.set(u.method,{type:u,handler:b}))),{dispose:()=>{v!==void 0?O.get(v)?.handler===b&&O.delete(v):C===u&&(C=void 0)}}},onProgress:(u,b,v)=>{if(q.has(b))throw new Error(`Progress handler for token ${b} already registered`);return q.set(b,v),{dispose:()=>{q.get(b)===v&&q.delete(b)}}},sendProgress:(u,b,v)=>Dt.sendNotification(vn.type,{token:b,value:v}),onUnhandledProgress:ba.event,sendRequest:(u,...b)=>{pn(),zm();function v(J,Ne){let Ze=ct.sender.sendCancellation(J,Ne);Ze===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ne}`):Ze.catch(()=>{o.log(`Sending cancellation messages for id ${Ne} failed.`)})}let k,H,X;if(K.string(u)){k=u;let J=b[0],Ne=b[b.length-1],Ze=0,Tn=x.ParameterStructures.auto;x.ParameterStructures.is(J)&&(Ze=1,Tn=J);let wt=b.length;Ii.CancellationToken.is(Ne)&&(wt=wt-1,X=Ne);let Be=wt-Ze;switch(Be){case 0:H=void 0;break;case 1:H=Oo(Tn,b[Ze]);break;default:if(Tn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);H=b.slice(Ze,wt).map(Vm=>yn(Vm));break}}else{let J=b;k=u.method,H=Ra(u,J);let Ne=u.numberOfParams;X=Ii.CancellationToken.is(J[Ne])?J[Ne]:void 0}let L=i++,re,ae=!1;X!==void 0&&(X.isCancellationRequested?ae=!0:re=X.onCancellationRequested(()=>{v(Dt,L)}));let Y={jsonrpc:y,id:L,method:k,params:H};return Wm(Y),typeof ct.sender.enableCancellation=="function"&&ct.sender.enableCancellation(Y),new Promise(async(J,Ne)=>{let Ze=Be=>{J(Be),ct.sender.cleanup(L),re?.dispose()},Tn=Be=>{Ne(Be),ct.sender.cleanup(L),re?.dispose()},wt={method:k,timerStart:Date.now(),resolve:Ze,reject:Tn};try{g.set(L,wt),await t.write(Y),ae&&v(Dt,L)}catch(Be){throw g.delete(L),wt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,b)=>{pn();let v=null;return ki.is(u)?(v=void 0,_=u):K.string(u)?(v=null,b!==void 0&&(v=u,h.set(u,{handler:b,type:void 0}))):b!==void 0&&(v=u.method,h.set(u.method,{type:u,handler:b})),{dispose:()=>{v!==null&&(v!==void 0?h.get(v)?.handler===b&&h.delete(v):_===u&&(_=void 0))}}},hasPendingResponse:()=>g.size>0,trace:async(u,b,v)=>{let k=!1,H=Pe.Text;v!==void 0&&(K.boolean(v)?k=v:(k=v.sendNotification||!1,H=v.traceFormat||Pe.Text)),E=u,A=H,E===F.Off?B=void 0:B=b,k&&!Sa()&&!Ht()&&await Dt.sendNotification(Oi.type,{value:F.toString(u)})},onError:Ke.event,onClose:Ta.event,onUnhandledNotification:_a.event,onDispose:Ca.event,end:()=>{t.end()},dispose:()=>{if(Ht())return;V=He.Disposed,Ca.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let b of g.values())b.reject(u);g=new Map,I=new Map,l=new Set,R=new Ya.LinkedMap,K.func(t.dispose)&&t.dispose(),K.func(e.dispose)&&e.dispose()},listen:()=>{pn(),$m(),V=He.Listening,e.listen(Hm)},inspect:()=>{(0,Za.default)().console.log("inspect")}};return Dt.onNotification(sr.type,u=>{if(E===F.Off||!B)return;let b=E===F.Verbose||E===F.Compact;B.log(u.message,b?u.verbose:void 0)}),Dt.onNotification(vn.type,async u=>{let b=q.get(u.token);b?await b(u.value):ba.fire(u)}),Dt}});var Je=S(p=>{"use strict";var Bh=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.ProgressType=p.ProgressToken=p.createMessageConnection=p.NullLogger=p.ConnectionOptions=p.ConnectionStrategy=p.AbstractMessageBuffer=p.WriteableStreamMessageWriter=p.AbstractMessageWriter=p.MessageWriter=p.ReadableStreamMessageReader=p.AbstractMessageReader=p.MessageReader=p.SharedArrayReceiverStrategy=p.SharedArraySenderStrategy=p.CancellationToken=p.CancellationTokenSource=p.Emitter=p.Event=p.Disposable=p.LRUCache=p.Touch=p.LinkedMap=p.ParameterStructures=p.NotificationType9=p.NotificationType8=p.NotificationType7=p.NotificationType6=p.NotificationType5=p.NotificationType4=p.NotificationType3=p.NotificationType2=p.NotificationType1=p.NotificationType0=p.NotificationType=p.ErrorCodes=p.ResponseError=p.RequestType9=p.RequestType8=p.RequestType7=p.RequestType6=p.RequestType5=p.RequestType4=p.RequestType3=p.RequestType2=p.RequestType1=p.RequestType0=p.RequestType=p.Message=p.RAL=void 0;p.MessageStrategy=p.CancellationStrategy=p.CancellationSenderStrategy=p.RequestCancellationReceiverStrategy=p.IdCancellationReceiverStrategy=p.CancellationReceiverStrategy=p.ConnectionError=p.ConnectionErrors=p.LogTraceNotification=p.SetTraceNotification=p.TraceFormat=p.TraceValues=p.TraceValue=p.Trace=void 0;var Q=ti();Object.defineProperty(p,"Message",{enumerable:!0,get:function(){return Q.Message}});Object.defineProperty(p,"RequestType",{enumerable:!0,get:function(){return Q.RequestType}});Object.defineProperty(p,"RequestType0",{enumerable:!0,get:function(){return Q.RequestType0}});Object.defineProperty(p,"RequestType1",{enumerable:!0,get:function(){return Q.RequestType1}});Object.defineProperty(p,"RequestType2",{enumerable:!0,get:function(){return Q.RequestType2}});Object.defineProperty(p,"RequestType3",{enumerable:!0,get:function(){return Q.RequestType3}});Object.defineProperty(p,"RequestType4",{enumerable:!0,get:function(){return Q.RequestType4}});Object.defineProperty(p,"RequestType5",{enumerable:!0,get:function(){return Q.RequestType5}});Object.defineProperty(p,"RequestType6",{enumerable:!0,get:function(){return Q.RequestType6}});Object.defineProperty(p,"RequestType7",{enumerable:!0,get:function(){return Q.RequestType7}});Object.defineProperty(p,"RequestType8",{enumerable:!0,get:function(){return Q.RequestType8}});Object.defineProperty(p,"RequestType9",{enumerable:!0,get:function(){return Q.RequestType9}});Object.defineProperty(p,"ResponseError",{enumerable:!0,get:function(){return Q.ResponseError}});Object.defineProperty(p,"ErrorCodes",{enumerable:!0,get:function(){return Q.ErrorCodes}});Object.defineProperty(p,"NotificationType",{enumerable:!0,get:function(){return Q.NotificationType}});Object.defineProperty(p,"NotificationType0",{enumerable:!0,get:function(){return Q.NotificationType0}});Object.defineProperty(p,"NotificationType1",{enumerable:!0,get:function(){return Q.NotificationType1}});Object.defineProperty(p,"NotificationType2",{enumerable:!0,get:function(){return Q.NotificationType2}});Object.defineProperty(p,"NotificationType3",{enumerable:!0,get:function(){return Q.NotificationType3}});Object.defineProperty(p,"NotificationType4",{enumerable:!0,get:function(){return Q.NotificationType4}});Object.defineProperty(p,"NotificationType5",{enumerable:!0,get:function(){return Q.NotificationType5}});Object.defineProperty(p,"NotificationType6",{enumerable:!0,get:function(){return Q.NotificationType6}});Object.defineProperty(p,"NotificationType7",{enumerable:!0,get:function(){return Q.NotificationType7}});Object.defineProperty(p,"NotificationType8",{enumerable:!0,get:function(){return Q.NotificationType8}});Object.defineProperty(p,"NotificationType9",{enumerable:!0,get:function(){return Q.NotificationType9}});Object.defineProperty(p,"ParameterStructures",{enumerable:!0,get:function(){return Q.ParameterStructures}});var Mi=ri();Object.defineProperty(p,"LinkedMap",{enumerable:!0,get:function(){return Mi.LinkedMap}});Object.defineProperty(p,"LRUCache",{enumerable:!0,get:function(){return Mi.LRUCache}});Object.defineProperty(p,"Touch",{enumerable:!0,get:function(){return Mi.Touch}});var Qh=ja();Object.defineProperty(p,"Disposable",{enumerable:!0,get:function(){return Qh.Disposable}});var tu=Lt();Object.defineProperty(p,"Event",{enumerable:!0,get:function(){return tu.Event}});Object.defineProperty(p,"Emitter",{enumerable:!0,get:function(){return tu.Emitter}});var nu=nr();Object.defineProperty(p,"CancellationTokenSource",{enumerable:!0,get:function(){return nu.CancellationTokenSource}});Object.defineProperty(p,"CancellationToken",{enumerable:!0,get:function(){return nu.CancellationToken}});var ru=Wa();Object.defineProperty(p,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return ru.SharedArraySenderStrategy}});Object.defineProperty(p,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return ru.SharedArrayReceiverStrategy}});var Ei=Ba();Object.defineProperty(p,"MessageReader",{enumerable:!0,get:function(){return Ei.MessageReader}});Object.defineProperty(p,"AbstractMessageReader",{enumerable:!0,get:function(){return Ei.AbstractMessageReader}});Object.defineProperty(p,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Ei.ReadableStreamMessageReader}});var Ai=Xa();Object.defineProperty(p,"MessageWriter",{enumerable:!0,get:function(){return Ai.MessageWriter}});Object.defineProperty(p,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ai.AbstractMessageWriter}});Object.defineProperty(p,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ai.WriteableStreamMessageWriter}});var $h=Ka();Object.defineProperty(p,"AbstractMessageBuffer",{enumerable:!0,get:function(){return $h.AbstractMessageBuffer}});var ne=eu();Object.defineProperty(p,"ConnectionStrategy",{enumerable:!0,get:function(){return ne.ConnectionStrategy}});Object.defineProperty(p,"ConnectionOptions",{enumerable:!0,get:function(){return ne.ConnectionOptions}});Object.defineProperty(p,"NullLogger",{enumerable:!0,get:function(){return ne.NullLogger}});Object.defineProperty(p,"createMessageConnection",{enumerable:!0,get:function(){return ne.createMessageConnection}});Object.defineProperty(p,"ProgressToken",{enumerable:!0,get:function(){return ne.ProgressToken}});Object.defineProperty(p,"ProgressType",{enumerable:!0,get:function(){return ne.ProgressType}});Object.defineProperty(p,"Trace",{enumerable:!0,get:function(){return ne.Trace}});Object.defineProperty(p,"TraceValue",{enumerable:!0,get:function(){return ne.TraceValue}});Object.defineProperty(p,"TraceFormat",{enumerable:!0,get:function(){return ne.TraceFormat}});Object.defineProperty(p,"SetTraceNotification",{enumerable:!0,get:function(){return ne.SetTraceNotification}});Object.defineProperty(p,"LogTraceNotification",{enumerable:!0,get:function(){return ne.LogTraceNotification}});Object.defineProperty(p,"ConnectionErrors",{enumerable:!0,get:function(){return ne.ConnectionErrors}});Object.defineProperty(p,"ConnectionError",{enumerable:!0,get:function(){return ne.ConnectionError}});Object.defineProperty(p,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.CancellationReceiverStrategy}});Object.defineProperty(p,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.IdCancellationReceiverStrategy}});Object.defineProperty(p,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.RequestCancellationReceiverStrategy}});Object.defineProperty(p,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ne.CancellationSenderStrategy}});Object.defineProperty(p,"CancellationStrategy",{enumerable:!0,get:function(){return ne.CancellationStrategy}});Object.defineProperty(p,"MessageStrategy",{enumerable:!0,get:function(){return ne.MessageStrategy}});Object.defineProperty(p,"TraceValues",{enumerable:!0,get:function(){return ne.TraceValues}});var zh=Bh(dt());p.RAL=zh.default});var vr={};Ma(vr,{AnnotatedTextEdit:()=>et,ApplyKind:()=>ns,ChangeAnnotation:()=>mt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>Ts,CodeActionContext:()=>ys,CodeActionKind:()=>ps,CodeActionTag:()=>Tr,CodeActionTriggerKind:()=>xn,CodeDescription:()=>Bi,CodeLens:()=>_s,Color:()=>mr,ColorInformation:()=>Hi,ColorPresentation:()=>Fi,Command:()=>Pt,CompletionItem:()=>os,CompletionItemKind:()=>Zi,CompletionItemLabelDetails:()=>rs,CompletionItemTag:()=>Ji,CompletionList:()=>is,CreateFile:()=>zt,DeleteFile:()=>Xt,Diagnostic:()=>kn,DiagnosticRelatedInformation:()=>hr,DiagnosticSeverity:()=>Wi,DiagnosticTag:()=>Ui,DocumentHighlight:()=>ls,DocumentHighlightKind:()=>us,DocumentLink:()=>Cs,DocumentSymbol:()=>gs,DocumentUri:()=>qi,EOL:()=>Vh,FoldingRange:()=>Li,FoldingRangeKind:()=>ji,FormattingOptions:()=>bs,Hover:()=>ss,InlayHint:()=>Rs,InlayHintKind:()=>_r,InlayHintLabelPart:()=>br,InlineCompletionContext:()=>qs,InlineCompletionItem:()=>xs,InlineCompletionList:()=>Ms,InlineCompletionTriggerKind:()=>Es,InlineValueContext:()=>Os,InlineValueEvaluatableExpression:()=>Ps,InlineValueText:()=>ws,InlineValueVariableLookup:()=>ks,InsertReplaceEdit:()=>es,InsertTextFormat:()=>Yi,InsertTextMode:()=>ts,LanguageKind:()=>Xi,Location:()=>wn,LocationLink:()=>Gi,MarkedString:()=>Rn,MarkupContent:()=>ht,MarkupKind:()=>yr,OptionalVersionedTextDocumentIdentifier:()=>On,ParameterInformation:()=>cs,Position:()=>xe,Range:()=>Z,RenameFile:()=>Vt,SelectedCompletionInfo:()=>As,SelectionRange:()=>vs,SemanticTokenModifiers:()=>Is,SemanticTokenTypes:()=>Ss,SemanticTokens:()=>Ds,SignatureInformation:()=>as,SnippetTextEdit:()=>Qi,StringValue:()=>Cr,SymbolInformation:()=>ms,SymbolKind:()=>ds,SymbolTag:()=>fs,TextDocument:()=>Gs,TextDocumentEdit:()=>Pn,TextDocumentIdentifier:()=>zi,TextDocumentItem:()=>Ki,TextEdit:()=>Qe,URI:()=>fr,VersionedTextDocumentIdentifier:()=>Vi,WorkspaceChange:()=>$i,WorkspaceEdit:()=>gr,WorkspaceFolder:()=>Ns,WorkspaceSymbol:()=>hs,integer:()=>Ni,uinteger:()=>Dn});var qi,fr,Ni,Dn,xe,Z,wn,Gi,mr,Hi,Fi,ji,Li,hr,Wi,Ui,Bi,kn,Pt,Qe,mt,oe,et,Pn,zt,Vt,Xt,gr,$t,Qi,pr,$i,zi,Vi,On,Xi,Ki,yr,ht,Zi,Yi,Ji,es,ts,ns,rs,os,is,Rn,ss,cs,as,us,ls,ds,fs,ms,hs,gs,ps,xn,ys,Tr,Ts,_s,bs,Cs,vs,Ss,Is,Ds,ws,ks,Ps,Os,_r,br,Rs,Cr,xs,Ms,Es,As,qs,Ns,Vh,Gs,Hs,f,Sr=xa(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(qi||(qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(fr||(fr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ni||(Ni={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Dn||(Dn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=Dn.MAX_VALUE),o===Number.MAX_VALUE&&(o=Dn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(xe||(xe={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:xe.create(r,o),end:xe.create(i,s)};if(xe.is(r)&&xe.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.start)&&xe.is(o.end)}e.is=n})(Z||(Z={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(wn||(wn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.targetRange)&&f.string(o.targetUri)&&Z.is(o.targetSelectionRange)&&(Z.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})(Gi||(Gi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(mr||(mr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&mr.is(o.color)}e.is=n})(Hi||(Hi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||Qe.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,Qe.is))}e.is=n})(Fi||(Fi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ji||(ji={}));(function(e){function t(r,o,i,s,a,y){let m={startLine:r,endLine:o};return f.defined(i)&&(m.startCharacter=i),f.defined(s)&&(m.endCharacter=s),f.defined(a)&&(m.kind=a),f.defined(y)&&(m.collapsedText=y),m}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Li||(Li={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&wn.is(o.location)&&f.string(o.message)}e.is=n})(hr||(hr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Wi||(Wi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Ui||(Ui={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(Bi||(Bi={}));(function(e){function t(i,s,a,y,m,d){let _={range:i,message:s};return f.defined(a)&&(_.severity=a),f.defined(y)&&(_.code=y),f.defined(m)&&(_.source=m),f.defined(d)&&(_.relatedInformation=d),_}e.create=t;function n(i){var s;let a=i;return f.defined(a)&&Z.is(a.range)&&(f.string(a.message)||ht.is(a.message))&&(f.number(a.severity)||f.undefined(a.severity))&&(f.integer(a.code)||f.string(a.code)||f.undefined(a.code))&&(f.undefined(a.codeDescription)||f.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(a.source)||f.undefined(a.source))&&(f.undefined(a.relatedInformation)||f.typedArray(a.relatedInformation,hr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(ht.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(kn||(kn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(Pt||(Pt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Z.is(s.range)}e.is=o})(Qe||(Qe={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(mt||(mt={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return Qe.is(s)&&(mt.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(et||(et={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&On.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Pn||(Pn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(zt||(zt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Vt||(Vt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?zt.is(o)||Vt.is(o)||Xt.is(o):Pn.is(o)))}e.is=t})(gr||(gr={}));$t=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=Qe.insert(t,n):oe.is(r)?(i=r,o=et.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=et.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=Qe.replace(t,n):oe.is(r)?(i=r,o=et.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=et.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=Qe.del(t):oe.is(n)?(o=n,r=et.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=et.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Z.is(r.range)&&Cr.isSnippet(r.snippet)&&(r.annotationId===void 0||mt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Qi||(Qi={}));pr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},$i=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new pr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Pn.is(n)){let r=new $t(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new $t(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(On.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new $t(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new $t(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new pr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=zt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=zt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;mt.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Vt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Vt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;mt.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(zi||(zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(Vi||(Vi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(On||(On={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Xi||(Xi={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(Ki||(Ki={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(yr||(yr={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&yr.is(r.kind)&&f.string(r.value)}e.is=t})(ht||(ht={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Zi||(Zi={}));(function(e){e.PlainText=1,e.Snippet=2})(Yi||(Yi={}));(function(e){e.Deprecated=1})(Ji||(Ji={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Z.is(o.insert)&&Z.is(o.replace)}e.is=n})(es||(es={}));(function(e){e.asIs=1,e.adjustIndentation=2})(ts||(ts={}));(function(e){e.Replace=1,e.Merge=2})(ns||(ns={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(rs||(rs={}));(function(e){function t(n){return{label:n}}e.create=t})(os||(os={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(is||(is={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(Rn||(Rn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(ht.is(r.contents)||Rn.is(r.contents)||f.typedArray(r.contents,Rn.is))&&(n.range===void 0||Z.is(n.range))}e.is=t})(ss||(ss={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(cs||(cs={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(as||(as={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(us||(us={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(ls||(ls={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ds||(ds={}));(function(e){e.Deprecated=1})(fs||(fs={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(ms||(ms={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(hs||(hs={}));(function(e){function t(r,o,i,s,a,y){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return y!==void 0&&(m.children=y),m}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Z.is(o.range)&&Z.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(gs||(gs={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(ps||(ps={}));(function(e){e.Invoked=1,e.Automatic=2})(xn||(xn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,kn.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===xn.Invoked||o.triggerKind===xn.Automatic)}e.is=n})(ys||(ys={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Tr||(Tr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Pt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,kn.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Pt.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||gr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Tr.is))}e.is=n})(Ts||(Ts={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.command)||Pt.is(o.command))}e.is=n})(_s||(_s={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(bs||(bs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Cs||(Cs={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(vs||(vs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Ss||(Ss={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Is||(Is={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Ds||(Ds={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.string(o.text)}e.is=n})(ws||(ws={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(ks||(ks={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(r.stoppedLocation)}e.is=n})(Os||(Os={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(_r||(_r={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||ht.is(o.tooltip))&&(o.location===void 0||wn.is(o.location))&&(o.command===void 0||Pt.is(o.command))}e.is=n})(br||(br={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,br.is))&&(o.kind===void 0||_r.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,Qe.is)&&(o.tooltip===void 0||f.string(o.tooltip)||ht.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(Rs||(Rs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Cr||(Cr={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(xs||(xs={}));(function(e){function t(n){return{items:n}}e.create=t})(Ms||(Ms={}));(function(e){e.Invoked=1,e.Automatic=2})(Es||(Es={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(As||(As={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(qs||(qs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&fr.is(r.uri)&&f.string(r.name)}e.is=t})(Ns||(Ns={}));Vh=[` +"use strict";var Ao=Object.defineProperty;var nh=Object.getOwnPropertyDescriptor;var rh=Object.getOwnPropertyNames;var oh=Object.prototype.hasOwnProperty;var Na=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ga=(e,t)=>{for(var n in t)Ao(e,n,{get:t[n],enumerable:!0})},ih=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rh(t))!oh.call(e,o)&&o!==n&&Ao(e,o,{get:()=>t[o],enumerable:!(r=nh(t,o))||r.enumerable});return e};var Jn=e=>ih(Ao({},"__esModule",{value:!0}),e);var er=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=sh;Ge.string=Ha;Ge.number=ch;Ge.error=ah;Ge.func=Fa;Ge.array=ja;Ge.stringArray=uh;Ge.typedArray=lh;Ge.thenable=dh;function sh(e){return e===!0||e===!1}function Ha(e){return typeof e=="string"||e instanceof String}function ch(e){return typeof e=="number"||e instanceof Number}function ah(e){return e instanceof Error}function Fa(e){return typeof e=="function"}function ja(e){return Array.isArray(e)}function uh(e){return ja(e)&&e.every(t=>Ha(t))}function lh(e,t){return Array.isArray(e)&&e.every(t)}function dh(e){return e&&Fa(e.then)}});var Ut=S(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.boolean=fh;Je.string=La;Je.number=mh;Je.error=hh;Je.func=gh;Je.array=Wa;Je.stringArray=ph;function fh(e){return e===!0||e===!1}function La(e){return typeof e=="string"||e instanceof String}function mh(e){return typeof e=="number"||e instanceof Number}function hh(e){return e instanceof Error}function gh(e){return typeof e=="function"}function Wa(e){return Array.isArray(e)}function ph(e){return Wa(e)&&e.every(t=>La(t))}});var ii=S(w=>{"use strict";var yh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Th=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_h=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.LRUCache=dt.LinkedMap=dt.Touch=void 0;var le;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(le||(dt.Touch=le={}));var tr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=le.None){let r=this._map.get(t);if(r)return n!==le.None&&this.touch(r,n),r.value}set(t,n,r=le.None){let o=this._map.get(t);if(o)o.value=n,r!==le.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case le.None:this.addItemLast(o);break;case le.First:this.addItemFirst(o);break;case le.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==le.First&&n!==le.Last)){if(n===le.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===le.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};dt.LinkedMap=tr;var si=class extends tr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=le.AsNew){return super.get(t,n)}peek(t){return super.get(t,le.None)}set(t,n){return super.set(t,n,le.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};dt.LRUCache=si});var Qa=S(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.Disposable=void 0;var Ba;(function(e){function t(n){return{dispose:n}}e.create=t})(Ba||(nr.Disposable=Ba={}))});var ft=S(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});var ai;function ui(){if(ai===void 0)throw new Error("No runtime abstraction layer installed");return ai}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ai=n}e.install=t})(ui||(ui={}));li.default=ui});var Bt=S(mt=>{"use strict";var bh=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mt,"__esModule",{value:!0});mt.Emitter=mt.Event=void 0;var Ch=bh(ft()),$a;(function(e){let t={dispose(){}};e.None=function(){return t}})($a||(mt.Event=$a={}));var di=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new di),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};mt.Emitter=fi});var ir=S(Ie=>{"use strict";var vh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sh=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ih=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.SharedArrayReceiverStrategy=Qt.SharedArraySenderStrategy=void 0;var Oh=ir(),Cn;(function(e){e.Continue=0,e.Cancelled=1})(Cn||(Cn={}));var gi=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Cn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Cn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Qt.SharedArraySenderStrategy=gi;var pi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Cn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},yi=class{token;constructor(t){this.token=new pi(t)}cancel(){}dispose(){}},Ti=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Oh.CancellationTokenSource:new yi(n)}};Qt.SharedArrayReceiverStrategy=Ti});var bi=S($t=>{"use strict";var Rh=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($t,"__esModule",{value:!0});$t.Semaphore=void 0;var xh=Rh(ft()),_i=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,xh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};$t.Semaphore=_i});var Ka=S(de=>{"use strict";var Mh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eh=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ah=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,vi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};de.ReadableStreamMessageReader=Ii});var eu=S(fe=>{"use strict";var Gh=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hh=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(Wh,r.byteLength.toString(),Ya),o.push(Ya),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};fe.WriteableStreamMessageWriter=wi});var tu=S(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.AbstractMessageBuffer=void 0;var Uh=13,Bh=10,Qh=`\r +`,ki=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};ar.AbstractMessageBuffer=ki});var iu=S(O=>{"use strict";var $h=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),zh=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vh=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(O.Trace=F={}));var Mi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Mi||(O.TraceValue=Mi={}));O.TraceValues=Mi;(function(e){function t(r){if(!X.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(O.Trace=F={}));var Pe;(function(e){e.Text="text",e.JSON="json"})(Pe||(O.TraceFormat=Pe={}));(function(e){function t(n){return X.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Pe||(O.TraceFormat=Pe={}));var Ei;(function(e){e.type=new x.NotificationType("$/setTrace")})(Ei||(O.SetTraceNotification=Ei={}));var ur;(function(e){e.type=new x.NotificationType("$/logTrace")})(ur||(O.LogTraceNotification=ur={}));var Dn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Dn||(O.ConnectionErrors=Dn={}));var Vt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=Vt;var Ai;(function(e){function t(n){let r=n;return r&&X.func(r.cancelUndispatched)}e.is=t})(Ai||(O.ConnectionStrategy=Ai={}));var lr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(lr||(O.IdCancellationReceiverStrategy=lr={}));var qi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(qi||(O.RequestCancellationReceiverStrategy=qi={}));var dr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Pi.CancellationTokenSource}});function t(n){return lr.is(n)||qi.is(n)}e.is=t})(dr||(O.CancellationReceiverStrategy=dr={}));var fr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(wn.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&X.func(r.sendCancellation)&&X.func(r.cleanup)}e.is=t})(fr||(O.CancellationSenderStrategy=fr={}));var mr;(function(e){e.Message=Object.freeze({receiver:dr.Message,sender:fr.Message});function t(n){let r=n;return r&&dr.is(r.receiver)&&fr.is(r.sender)}e.is=t})(mr||(O.CancellationStrategy=mr={}));var hr;(function(e){function t(n){let r=n;return r&&X.func(r.handleMessage)}e.is=t})(hr||(O.MessageStrategy=hr={}));var ou;(function(e){function t(n){let r=n;return r&&(mr.is(r.cancellationStrategy)||Ai.is(r.connectionStrategy)||hr.is(r.messageStrategy)||X.number(r.maxParallelism))}e.is=t})(ou||(O.ConnectionOptions=ou={}));var He;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(He||(He={}));function Xh(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,a=0,p="2.0",m=r?.maxParallelism??-1,h=0,C,l=new Map,b,P=new Map,E=new Map,G,R=new ru.LinkedMap,g=new Map,d=new Set,I=new Map,A=F.Off,q=Pe.Text,B,V=He.New,Ze=new Sn.Emitter,Sa=new Sn.Emitter,Ia=new Sn.Emitter,Da=new Sn.Emitter,wa=new Sn.Emitter,at=r&&r.cancellationStrategy?r.cancellationStrategy:mr.Message;function Fm(u){}function ka(){return V===He.Listening}function Pa(){return V===He.Closed}function Lt(){return V===He.Disposed}function Oa(){(V===He.New||V===He.Listening)&&(V=He.Closed,Sa.fire(void 0))}function jm(u){Ze.fire([u,void 0,void 0])}function Lm(u){Ze.fire(u)}e.onClose(Oa),e.onError(jm),t.onClose(Oa),t.onError(Lm);function Ra(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function Wm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Um(){return"not-"+(++s).toString()}function Bm(u,_){x.Message.isRequest(_)?u.set(Ra(_.id),_):x.Message.isResponse(_)?m===-1?u.set(Wm(_.id),_):Ma(_):u.set(Um(),_)}function Ro(){G||R.size===0||m!==-1&&h>=m||(G=(0,nu.default)().timer.setImmediate(async()=>{if(G=void 0,R.size===0||m!==-1&&h>=m)return;let u=R.shift(),_;try{h++;let v=r?.messageStrategy;hr.is(v)?_=v.handleMessage(u,xa):_=xa(u)}catch(v){o.error(`Processing message queue failed: ${v.toString()}`)}finally{_ instanceof Promise?_.then(()=>{h--,Ro()}).catch(v=>{o.error(`Processing message queue failed: ${v.toString()}`)}):h--,Ro()}}))}async function xa(u){return x.Message.isRequest(u)?$m(u):x.Message.isNotification(u)?zm(u):x.Message.isResponse(u)?Ma(u):Vm(u)}let Qm=u=>{try{if(x.Message.isNotification(u)&&u.method===wn.type.method){let _=u.params.id,v=Ra(_),k=R.get(v);if(x.Message.isRequest(k)){let K=r?.connectionStrategy,L=K&&K.cancelUndispatched?K.cancelUndispatched(k,Fm):void 0;if(L&&(L.error!==void 0||L.result!==void 0)){R.delete(v),I.delete(_),L.id=k.id,xo(L,u.method,Date.now()),t.write(L).catch(()=>o.error("Sending response for canceled message failed."));return}}let H=I.get(_);if(H!==void 0){H.cancel(),Mo(u);return}else d.add(_)}Bm(R,u)}finally{Ro()}};async function $m(u){if(Lt())return Promise.resolve();function _(re,ue,Y){let J={jsonrpc:p,id:u.id};return re instanceof x.ResponseError?J.error=re.toJson():J.result=re===void 0?null:re,xo(J,ue,Y),t.write(J)}function v(re,ue,Y){let J={jsonrpc:p,id:u.id,error:re.toJson()};return xo(J,ue,Y),t.write(J)}Zm(u);let k=l.get(u.method),H,K;k&&(H=k.type,K=k.handler);let L=Date.now();if(K||C){let re=u.id??String(Date.now()),ue=lr.is(at.receiver)?at.receiver.createCancellationTokenSource(re):at.receiver.createCancellationTokenSource(u);u.id!==null&&d.has(u.id)&&ue.cancel(),u.id!==null&&I.set(re,ue);try{let Y;if(K)if(u.params===void 0){if(H!==void 0&&H.numberOfParams!==0)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${H.numberOfParams} params but received none.`),u.method,L);Y=K(ue.token)}else if(Array.isArray(u.params)){if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byName)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,L);Y=K(...u.params,ue.token)}else{if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byPosition)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,L);Y=K(u.params,ue.token)}else C&&(Y=C(u.method,u.params,ue.token));let J=await Y;await _(J,u.method,L)}catch(Y){Y instanceof x.ResponseError?await _(Y,u.method,L):Y&&X.string(Y.message)?await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${Y.message}`),u.method,L):await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,L)}finally{I.delete(re)}}else await v(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,L)}function Ma(u){if(!Lt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let _=u.id,v=g.get(_);if(Ym(u,v),v!==void 0){g.delete(_);try{if(u.error){let k=u.error;v.reject(new x.ResponseError(k.code,k.message,k.data))}else if(u.result!==void 0)v.resolve(u.result);else throw new Error("Should never happen.")}catch(k){k.message?o.error(`Response handler '${v.method}' failed with message: ${k.message}`):o.error(`Response handler '${v.method}' failed unexpectedly.`)}}}}async function zm(u){if(Lt())return;let _,v;if(u.method===wn.type.method){let k=u.params.id;d.delete(k),Mo(u);return}else{let k=P.get(u.method);k&&(v=k.handler,_=k.type)}if(v||b)try{if(Mo(u),v)if(u.params===void 0)_!==void 0&&_.numberOfParams!==0&&_.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received none.`),await v();else if(Array.isArray(u.params)){let k=u.params;u.method===In.type.method&&k.length===2&&Oi.is(k[0])?await v({token:k[0],value:k[1]}):(_!==void 0&&(_.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),_.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received ${k.length} arguments`)),await v(...k))}else _!==void 0&&_.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await v(u.params);else b&&await b(u.method,u.params)}catch(k){k.message?o.error(`Notification handler '${u.method}' failed with message: ${k.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Ia.fire(u)}function Vm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let _=u;if(X.string(_.id)||X.number(_.id)){let v=_.id,k=g.get(v);k&&k.reject(new Error("The received response has neither a result nor an error property."))}}function ut(u){if(u!=null)switch(A){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Km(u){if(!(A===F.Off||!B))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&u.params&&(_=`Params: ${ut(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,_)}else Wt("send-request",u)}function Xm(u){if(!(A===F.Off||!B))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&(u.params?_=`Params: ${ut(u.params)}`:_="No parameters provided."),B.log(`Sending notification '${u.method}'.`,_)}else Wt("send-notification",u)}function xo(u,_,v){if(!(A===F.Off||!B))if(q===Pe.Text){let k;(A===F.Verbose||A===F.Compact)&&(u.error&&u.error.data?k=`Error data: ${ut(u.error.data)}`:u.result?k=`Result: ${ut(u.result)}`:u.error===void 0&&(k="No result returned.")),B.log(`Sending response '${_} - (${u.id})'. Processing request took ${Date.now()-v}ms`,k)}else Wt("send-response",u)}function Zm(u){if(!(A===F.Off||!B))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&u.params&&(_=`Params: ${ut(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,_)}else Wt("receive-request",u)}function Mo(u){if(!(A===F.Off||!B||u.method===ur.type.method))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&(u.params?_=`Params: ${ut(u.params)}`:_="No parameters provided."),B.log(`Received notification '${u.method}'.`,_)}else Wt("receive-notification",u)}function Ym(u,_){if(!(A===F.Off||!B))if(q===Pe.Text){let v;if((A===F.Verbose||A===F.Compact)&&(u.error&&u.error.data?v=`Error data: ${ut(u.error.data)}`:u.result?v=`Result: ${ut(u.result)}`:u.error===void 0&&(v="No result returned.")),_){let k=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${_.method} - (${u.id})' in ${Date.now()-_.timerStart}ms.${k}`,v)}else B.log(`Received response ${u.id} without active response promise.`,v)}else Wt("receive-response",u)}function Wt(u,_){if(!B||A===F.Off)return;let v={isLSPMessage:!0,type:u,message:_,timestamp:Date.now()};B.log(v)}function Tn(){if(Pa())throw new Vt(Dn.Closed,"Connection is closed.");if(Lt())throw new Vt(Dn.Disposed,"Connection is disposed.")}function Jm(){if(ka())throw new Vt(Dn.AlreadyListening,"Connection is already listening")}function eh(){if(!ka())throw new Error("Call listen() first.")}function _n(u){return u===void 0?null:u}function Ea(u){if(u!==null)return u}function Aa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Eo(u,_){switch(u){case x.ParameterStructures.auto:return Aa(_)?Ea(_):[_n(_)];case x.ParameterStructures.byName:if(!Aa(_))throw new Error("Received parameters by name but param is not an object literal.");return Ea(_);case x.ParameterStructures.byPosition:return[_n(_)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function qa(u,_){let v,k=u.numberOfParams;switch(k){case 0:v=void 0;break;case 1:v=Eo(u.parameterStructures,_[0]);break;default:v=[];for(let H=0;H<_.length&&H{Tn();let v,k;if(X.string(u)){v=u;let K=_[0],L=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(K)&&(L=1,re=K);let ue=_.length,Y=ue-L;switch(Y){case 0:k=void 0;break;case 1:k=Eo(re,_[L]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${Y} parameters for 'by Name' notification parameter structure.`);k=_.slice(L,ue).map(J=>_n(J));break}}else{let K=_;v=u.method,k=qa(u,K)}let H={jsonrpc:p,method:v,params:k};return Xm(H),t.write(H).catch(K=>{throw o.error("Sending notification failed."),K})},onNotification:(u,_)=>{Tn();let v;return X.func(u)?b=u:_&&(X.string(u)?(v=u,P.set(u,{type:void 0,handler:_})):(v=u.method,P.set(u.method,{type:u,handler:_}))),{dispose:()=>{v!==void 0?P.get(v)?.handler===_&&P.delete(v):b===u&&(b=void 0)}}},onProgress:(u,_,v)=>{if(E.has(_))throw new Error(`Progress handler for token ${_} already registered`);return E.set(_,v),{dispose:()=>{E.get(_)===v&&E.delete(_)}}},sendProgress:(u,_,v)=>Ot.sendNotification(In.type,{token:_,value:v}),onUnhandledProgress:Da.event,sendRequest:(u,..._)=>{Tn(),eh();function v(J,Ne){let Ye=at.sender.sendCancellation(J,Ne);Ye===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ne}`):Ye.catch(()=>{o.log(`Sending cancellation messages for id ${Ne} failed.`)})}let k,H,K;if(X.string(u)){k=u;let J=_[0],Ne=_[_.length-1],Ye=0,bn=x.ParameterStructures.auto;x.ParameterStructures.is(J)&&(Ye=1,bn=J);let Rt=_.length;Pi.CancellationToken.is(Ne)&&(Rt=Rt-1,K=Ne);let Be=Rt-Ye;switch(Be){case 0:H=void 0;break;case 1:H=Eo(bn,_[Ye]);break;default:if(bn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);H=_.slice(Ye,Rt).map(th=>_n(th));break}}else{let J=_;k=u.method,H=qa(u,J);let Ne=u.numberOfParams;K=Pi.CancellationToken.is(J[Ne])?J[Ne]:void 0}let L=i++,re,ue=!1;K!==void 0&&(K.isCancellationRequested?ue=!0:re=K.onCancellationRequested(()=>{v(Ot,L)}));let Y={jsonrpc:p,id:L,method:k,params:H};return Km(Y),typeof at.sender.enableCancellation=="function"&&at.sender.enableCancellation(Y),new Promise(async(J,Ne)=>{let Ye=Be=>{J(Be),at.sender.cleanup(L),re?.dispose()},bn=Be=>{Ne(Be),at.sender.cleanup(L),re?.dispose()},Rt={method:k,timerStart:Date.now(),resolve:Ye,reject:bn};try{g.set(L,Rt),await t.write(Y),ue&&v(Ot,L)}catch(Be){throw g.delete(L),Rt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,_)=>{Tn();let v=null;return xi.is(u)?(v=void 0,C=u):X.string(u)?(v=null,_!==void 0&&(v=u,l.set(u,{handler:_,type:void 0}))):_!==void 0&&(v=u.method,l.set(u.method,{type:u,handler:_})),{dispose:()=>{v!==null&&(v!==void 0?l.get(v)?.handler===_&&l.delete(v):C===u&&(C=void 0))}}},hasPendingResponse:()=>g.size>0,trace:async(u,_,v)=>{let k=!1,H=Pe.Text;v!==void 0&&(X.boolean(v)?k=v:(k=v.sendNotification||!1,H=v.traceFormat||Pe.Text)),A=u,q=H,A===F.Off?B=void 0:B=_,k&&!Pa()&&!Lt()&&await Ot.sendNotification(Ei.type,{value:F.toString(u)})},onError:Ze.event,onClose:Sa.event,onUnhandledNotification:Ia.event,onDispose:wa.event,end:()=>{t.end()},dispose:()=>{if(Lt())return;V=He.Disposed,wa.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let _ of g.values())_.reject(u);g=new Map,I=new Map,d=new Set,R=new ru.LinkedMap,X.func(t.dispose)&&t.dispose(),X.func(e.dispose)&&e.dispose()},listen:()=>{Tn(),Jm(),V=He.Listening,e.listen(Qm)},inspect:()=>{(0,nu.default)().console.log("inspect")}};return Ot.onNotification(ur.type,u=>{if(A===F.Off||!B)return;let _=A===F.Verbose||A===F.Compact;B.log(u.message,_?u.verbose:void 0)}),Ot.onNotification(In.type,async u=>{let _=E.get(u.token);_?await _(u.value):Da.fire(u)}),Ot}});var et=S(y=>{"use strict";var Zh=y&&y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y,"__esModule",{value:!0});y.ProgressType=y.ProgressToken=y.createMessageConnection=y.NullLogger=y.ConnectionOptions=y.ConnectionStrategy=y.AbstractMessageBuffer=y.WriteableStreamMessageWriter=y.AbstractMessageWriter=y.MessageWriter=y.ReadableStreamMessageReader=y.AbstractMessageReader=y.MessageReader=y.SharedArrayReceiverStrategy=y.SharedArraySenderStrategy=y.CancellationToken=y.CancellationTokenSource=y.Emitter=y.Event=y.Disposable=y.LRUCache=y.Touch=y.LinkedMap=y.ParameterStructures=y.NotificationType9=y.NotificationType8=y.NotificationType7=y.NotificationType6=y.NotificationType5=y.NotificationType4=y.NotificationType3=y.NotificationType2=y.NotificationType1=y.NotificationType0=y.NotificationType=y.ErrorCodes=y.ResponseError=y.RequestType9=y.RequestType8=y.RequestType7=y.RequestType6=y.RequestType5=y.RequestType4=y.RequestType3=y.RequestType2=y.RequestType1=y.RequestType0=y.RequestType=y.Message=y.RAL=void 0;y.MessageStrategy=y.CancellationStrategy=y.CancellationSenderStrategy=y.RequestCancellationReceiverStrategy=y.IdCancellationReceiverStrategy=y.CancellationReceiverStrategy=y.ConnectionError=y.ConnectionErrors=y.LogTraceNotification=y.SetTraceNotification=y.TraceFormat=y.TraceValues=y.TraceValue=y.Trace=void 0;var Q=ii();Object.defineProperty(y,"Message",{enumerable:!0,get:function(){return Q.Message}});Object.defineProperty(y,"RequestType",{enumerable:!0,get:function(){return Q.RequestType}});Object.defineProperty(y,"RequestType0",{enumerable:!0,get:function(){return Q.RequestType0}});Object.defineProperty(y,"RequestType1",{enumerable:!0,get:function(){return Q.RequestType1}});Object.defineProperty(y,"RequestType2",{enumerable:!0,get:function(){return Q.RequestType2}});Object.defineProperty(y,"RequestType3",{enumerable:!0,get:function(){return Q.RequestType3}});Object.defineProperty(y,"RequestType4",{enumerable:!0,get:function(){return Q.RequestType4}});Object.defineProperty(y,"RequestType5",{enumerable:!0,get:function(){return Q.RequestType5}});Object.defineProperty(y,"RequestType6",{enumerable:!0,get:function(){return Q.RequestType6}});Object.defineProperty(y,"RequestType7",{enumerable:!0,get:function(){return Q.RequestType7}});Object.defineProperty(y,"RequestType8",{enumerable:!0,get:function(){return Q.RequestType8}});Object.defineProperty(y,"RequestType9",{enumerable:!0,get:function(){return Q.RequestType9}});Object.defineProperty(y,"ResponseError",{enumerable:!0,get:function(){return Q.ResponseError}});Object.defineProperty(y,"ErrorCodes",{enumerable:!0,get:function(){return Q.ErrorCodes}});Object.defineProperty(y,"NotificationType",{enumerable:!0,get:function(){return Q.NotificationType}});Object.defineProperty(y,"NotificationType0",{enumerable:!0,get:function(){return Q.NotificationType0}});Object.defineProperty(y,"NotificationType1",{enumerable:!0,get:function(){return Q.NotificationType1}});Object.defineProperty(y,"NotificationType2",{enumerable:!0,get:function(){return Q.NotificationType2}});Object.defineProperty(y,"NotificationType3",{enumerable:!0,get:function(){return Q.NotificationType3}});Object.defineProperty(y,"NotificationType4",{enumerable:!0,get:function(){return Q.NotificationType4}});Object.defineProperty(y,"NotificationType5",{enumerable:!0,get:function(){return Q.NotificationType5}});Object.defineProperty(y,"NotificationType6",{enumerable:!0,get:function(){return Q.NotificationType6}});Object.defineProperty(y,"NotificationType7",{enumerable:!0,get:function(){return Q.NotificationType7}});Object.defineProperty(y,"NotificationType8",{enumerable:!0,get:function(){return Q.NotificationType8}});Object.defineProperty(y,"NotificationType9",{enumerable:!0,get:function(){return Q.NotificationType9}});Object.defineProperty(y,"ParameterStructures",{enumerable:!0,get:function(){return Q.ParameterStructures}});var Ni=ci();Object.defineProperty(y,"LinkedMap",{enumerable:!0,get:function(){return Ni.LinkedMap}});Object.defineProperty(y,"LRUCache",{enumerable:!0,get:function(){return Ni.LRUCache}});Object.defineProperty(y,"Touch",{enumerable:!0,get:function(){return Ni.Touch}});var Yh=Qa();Object.defineProperty(y,"Disposable",{enumerable:!0,get:function(){return Yh.Disposable}});var su=Bt();Object.defineProperty(y,"Event",{enumerable:!0,get:function(){return su.Event}});Object.defineProperty(y,"Emitter",{enumerable:!0,get:function(){return su.Emitter}});var cu=ir();Object.defineProperty(y,"CancellationTokenSource",{enumerable:!0,get:function(){return cu.CancellationTokenSource}});Object.defineProperty(y,"CancellationToken",{enumerable:!0,get:function(){return cu.CancellationToken}});var au=za();Object.defineProperty(y,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return au.SharedArraySenderStrategy}});Object.defineProperty(y,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return au.SharedArrayReceiverStrategy}});var Gi=Ka();Object.defineProperty(y,"MessageReader",{enumerable:!0,get:function(){return Gi.MessageReader}});Object.defineProperty(y,"AbstractMessageReader",{enumerable:!0,get:function(){return Gi.AbstractMessageReader}});Object.defineProperty(y,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Gi.ReadableStreamMessageReader}});var Hi=eu();Object.defineProperty(y,"MessageWriter",{enumerable:!0,get:function(){return Hi.MessageWriter}});Object.defineProperty(y,"AbstractMessageWriter",{enumerable:!0,get:function(){return Hi.AbstractMessageWriter}});Object.defineProperty(y,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Hi.WriteableStreamMessageWriter}});var Jh=tu();Object.defineProperty(y,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Jh.AbstractMessageBuffer}});var ne=iu();Object.defineProperty(y,"ConnectionStrategy",{enumerable:!0,get:function(){return ne.ConnectionStrategy}});Object.defineProperty(y,"ConnectionOptions",{enumerable:!0,get:function(){return ne.ConnectionOptions}});Object.defineProperty(y,"NullLogger",{enumerable:!0,get:function(){return ne.NullLogger}});Object.defineProperty(y,"createMessageConnection",{enumerable:!0,get:function(){return ne.createMessageConnection}});Object.defineProperty(y,"ProgressToken",{enumerable:!0,get:function(){return ne.ProgressToken}});Object.defineProperty(y,"ProgressType",{enumerable:!0,get:function(){return ne.ProgressType}});Object.defineProperty(y,"Trace",{enumerable:!0,get:function(){return ne.Trace}});Object.defineProperty(y,"TraceValue",{enumerable:!0,get:function(){return ne.TraceValue}});Object.defineProperty(y,"TraceFormat",{enumerable:!0,get:function(){return ne.TraceFormat}});Object.defineProperty(y,"SetTraceNotification",{enumerable:!0,get:function(){return ne.SetTraceNotification}});Object.defineProperty(y,"LogTraceNotification",{enumerable:!0,get:function(){return ne.LogTraceNotification}});Object.defineProperty(y,"ConnectionErrors",{enumerable:!0,get:function(){return ne.ConnectionErrors}});Object.defineProperty(y,"ConnectionError",{enumerable:!0,get:function(){return ne.ConnectionError}});Object.defineProperty(y,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.CancellationReceiverStrategy}});Object.defineProperty(y,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.IdCancellationReceiverStrategy}});Object.defineProperty(y,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.RequestCancellationReceiverStrategy}});Object.defineProperty(y,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ne.CancellationSenderStrategy}});Object.defineProperty(y,"CancellationStrategy",{enumerable:!0,get:function(){return ne.CancellationStrategy}});Object.defineProperty(y,"MessageStrategy",{enumerable:!0,get:function(){return ne.MessageStrategy}});Object.defineProperty(y,"TraceValues",{enumerable:!0,get:function(){return ne.TraceValues}});var eg=Zh(ft());y.RAL=eg.default});var Dr={};Ga(Dr,{AnnotatedTextEdit:()=>tt,ApplyKind:()=>ss,ChangeAnnotation:()=>ht,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>vs,CodeActionContext:()=>Cs,CodeActionKind:()=>bs,CodeActionTag:()=>Cr,CodeActionTriggerKind:()=>En,CodeDescription:()=>Vi,CodeLens:()=>Ss,Color:()=>pr,ColorInformation:()=>Wi,ColorPresentation:()=>Ui,Command:()=>Mt,CompletionItem:()=>as,CompletionItemKind:()=>ts,CompletionItemLabelDetails:()=>cs,CompletionItemTag:()=>rs,CompletionList:()=>us,CreateFile:()=>Xt,DeleteFile:()=>Yt,Diagnostic:()=>On,DiagnosticRelatedInformation:()=>yr,DiagnosticSeverity:()=>$i,DiagnosticTag:()=>zi,DocumentHighlight:()=>hs,DocumentHighlightKind:()=>ms,DocumentLink:()=>Ds,DocumentSymbol:()=>_s,DocumentUri:()=>Fi,EOL:()=>tg,FoldingRange:()=>Qi,FoldingRangeKind:()=>Bi,FormattingOptions:()=>Is,Hover:()=>ls,InlayHint:()=>As,InlayHintKind:()=>vr,InlayHintLabelPart:()=>Sr,InlineCompletionContext:()=>Fs,InlineCompletionItem:()=>qs,InlineCompletionList:()=>Ns,InlineCompletionTriggerKind:()=>Gs,InlineValueContext:()=>Es,InlineValueEvaluatableExpression:()=>Ms,InlineValueText:()=>Rs,InlineValueVariableLookup:()=>xs,InsertReplaceEdit:()=>os,InsertTextFormat:()=>ns,InsertTextMode:()=>is,LanguageKind:()=>Ji,Location:()=>Pn,LocationLink:()=>Li,MarkedString:()=>Mn,MarkupContent:()=>gt,MarkupKind:()=>br,OptionalVersionedTextDocumentIdentifier:()=>xn,ParameterInformation:()=>ds,Position:()=>Me,Range:()=>Z,RenameFile:()=>Zt,SelectedCompletionInfo:()=>Hs,SelectionRange:()=>ws,SemanticTokenModifiers:()=>Ps,SemanticTokenTypes:()=>ks,SemanticTokens:()=>Os,SignatureInformation:()=>fs,SnippetTextEdit:()=>Ki,StringValue:()=>Ir,SymbolInformation:()=>ys,SymbolKind:()=>gs,SymbolTag:()=>ps,TextDocument:()=>Ls,TextDocumentEdit:()=>Rn,TextDocumentIdentifier:()=>Zi,TextDocumentItem:()=>es,TextEdit:()=>Qe,URI:()=>gr,VersionedTextDocumentIdentifier:()=>Yi,WorkspaceChange:()=>Xi,WorkspaceEdit:()=>Tr,WorkspaceFolder:()=>js,WorkspaceSymbol:()=>Ts,integer:()=>ji,uinteger:()=>kn});var Fi,gr,ji,kn,Me,Z,Pn,Li,pr,Wi,Ui,Bi,Qi,yr,$i,zi,Vi,On,Mt,Qe,ht,oe,tt,Rn,Xt,Zt,Yt,Tr,Kt,Ki,_r,Xi,Zi,Yi,xn,Ji,es,br,gt,ts,ns,rs,os,is,ss,cs,as,us,Mn,ls,ds,fs,ms,hs,gs,ps,ys,Ts,_s,bs,En,Cs,Cr,vs,Ss,Is,Ds,ws,ks,Ps,Os,Rs,xs,Ms,Es,vr,Sr,As,Ir,qs,Ns,Gs,Hs,Fs,js,tg,Ls,Ws,f,wr=Na(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Fi||(Fi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(gr||(gr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(ji||(ji={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(kn||(kn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=kn.MAX_VALUE),o===Number.MAX_VALUE&&(o=kn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(Me||(Me={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:Me.create(r,o),end:Me.create(i,s)};if(Me.is(r)&&Me.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.start)&&Me.is(o.end)}e.is=n})(Z||(Z={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(Pn||(Pn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.targetRange)&&f.string(o.targetUri)&&Z.is(o.targetSelectionRange)&&(Z.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})(Li||(Li={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(pr||(pr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&pr.is(o.color)}e.is=n})(Wi||(Wi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||Qe.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,Qe.is))}e.is=n})(Ui||(Ui={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Bi||(Bi={}));(function(e){function t(r,o,i,s,a,p){let m={startLine:r,endLine:o};return f.defined(i)&&(m.startCharacter=i),f.defined(s)&&(m.endCharacter=s),f.defined(a)&&(m.kind=a),f.defined(p)&&(m.collapsedText=p),m}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Qi||(Qi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Pn.is(o.location)&&f.string(o.message)}e.is=n})(yr||(yr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})($i||($i={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(zi||(zi={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(Vi||(Vi={}));(function(e){function t(i,s,a,p,m,h){let C={range:i,message:s};return f.defined(a)&&(C.severity=a),f.defined(p)&&(C.code=p),f.defined(m)&&(C.source=m),f.defined(h)&&(C.relatedInformation=h),C}e.create=t;function n(i){var s;let a=i;return f.defined(a)&&Z.is(a.range)&&(f.string(a.message)||gt.is(a.message))&&(f.number(a.severity)||f.undefined(a.severity))&&(f.integer(a.code)||f.string(a.code)||f.undefined(a.code))&&(f.undefined(a.codeDescription)||f.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(a.source)||f.undefined(a.source))&&(f.undefined(a.relatedInformation)||f.typedArray(a.relatedInformation,yr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(gt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(On||(On={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(Mt||(Mt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Z.is(s.range)}e.is=o})(Qe||(Qe={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(ht||(ht={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return Qe.is(s)&&(ht.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(tt||(tt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&xn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Rn||(Rn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Zt||(Zt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Yt||(Yt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?Xt.is(o)||Zt.is(o)||Yt.is(o):Rn.is(o)))}e.is=t})(Tr||(Tr={}));Kt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=Qe.insert(t,n):oe.is(r)?(i=r,o=tt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=Qe.replace(t,n):oe.is(r)?(i=r,o=tt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=Qe.del(t):oe.is(n)?(o=n,r=tt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=tt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Z.is(r.range)&&Ir.isSnippet(r.snippet)&&(r.annotationId===void 0||ht.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Ki||(Ki={}));_r=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Xi=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new _r(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Rn.is(n)){let r=new Kt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Kt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(xn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Kt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Kt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new _r,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ht.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;ht.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Zt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Zt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ht.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Yt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Yt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(Zi||(Zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(Yi||(Yi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(xn||(xn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Ji||(Ji={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(es||(es={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(br||(br={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&br.is(r.kind)&&f.string(r.value)}e.is=t})(gt||(gt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ts||(ts={}));(function(e){e.PlainText=1,e.Snippet=2})(ns||(ns={}));(function(e){e.Deprecated=1})(rs||(rs={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Z.is(o.insert)&&Z.is(o.replace)}e.is=n})(os||(os={}));(function(e){e.asIs=1,e.adjustIndentation=2})(is||(is={}));(function(e){e.Replace=1,e.Merge=2})(ss||(ss={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(cs||(cs={}));(function(e){function t(n){return{label:n}}e.create=t})(as||(as={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(us||(us={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(Mn||(Mn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(gt.is(r.contents)||Mn.is(r.contents)||f.typedArray(r.contents,Mn.is))&&(n.range===void 0||Z.is(n.range))}e.is=t})(ls||(ls={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ds||(ds={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(fs||(fs={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(ms||(ms={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(hs||(hs={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(gs||(gs={}));(function(e){e.Deprecated=1})(ps||(ps={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(ys||(ys={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(Ts||(Ts={}));(function(e){function t(r,o,i,s,a,p){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return p!==void 0&&(m.children=p),m}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Z.is(o.range)&&Z.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(_s||(_s={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(bs||(bs={}));(function(e){e.Invoked=1,e.Automatic=2})(En||(En={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,On.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===En.Invoked||o.triggerKind===En.Automatic)}e.is=n})(Cs||(Cs={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Cr||(Cr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Mt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,On.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Mt.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||Tr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Cr.is))}e.is=n})(vs||(vs={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.command)||Mt.is(o.command))}e.is=n})(Ss||(Ss={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(Is||(Is={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(ws||(ws={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(ks||(ks={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ps||(Ps={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Os||(Os={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.string(o.text)}e.is=n})(Rs||(Rs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(xs||(xs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Ms||(Ms={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(r.stoppedLocation)}e.is=n})(Es||(Es={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(vr||(vr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||gt.is(o.tooltip))&&(o.location===void 0||Pn.is(o.location))&&(o.command===void 0||Mt.is(o.command))}e.is=n})(Sr||(Sr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,Sr.is))&&(o.kind===void 0||vr.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,Qe.is)&&(o.tooltip===void 0||f.string(o.tooltip)||gt.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(As||(As={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Ir||(Ir={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(qs||(qs={}));(function(e){function t(n){return{items:n}}e.create=t})(Ns||(Ns={}));(function(e){e.Invoked=1,e.Automatic=2})(Gs||(Gs={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Hs||(Hs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Fs||(Fs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&gr.is(r.uri)&&f.string(r.name)}e.is=t})(js||(js={}));tg=[` `,`\r -`,"\r"];(function(e){function t(i,s,a,y){return new Hs(i,s,a,y)}e.create=t;function n(i){let s=i;return!!(f.defined(s)&&f.string(s.uri)&&(f.undefined(s.languageId)||f.string(s.languageId))&&f.uinteger(s.lineCount)&&f.func(s.getText)&&f.func(s.positionAt)&&f.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),y=o(s,(d,_)=>{let h=d.range.start.line-_.range.start.line;return h===0?d.range.start.character-_.range.start.character:h}),m=a.length;for(let d=y.length-1;d>=0;d--){let _=y[d],h=i.offsetAt(_.range.start),C=i.offsetAt(_.range.end);if(C<=m)a=a.substring(0,h)+_.newText+a.substring(C,a.length);else throw new Error("Overlapping edit");m=h}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,y=i.slice(0,a),m=i.slice(a);o(y,s),o(m,s);let d=0,_=0,h=0;for(;d{let l=h.range.start.line-C.range.start.line;return l===0?h.range.start.character-C.range.start.character:l}),m=a.length;for(let h=p.length-1;h>=0;h--){let C=p[h],l=i.offsetAt(C.range.start),b=i.offsetAt(C.range.end);if(b<=m)a=a.substring(0,l)+C.newText+a.substring(b,a.length);else throw new Error("Overlapping edit");m=l}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,p=i.slice(0,a),m=i.slice(a);o(p,s),o(m,s);let h=0,C=0,l=0;for(;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return xe.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return xe.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(C){return C===!0||C===!1}e.boolean=o;function i(C){return t.call(C)==="[object String]"}e.string=i;function s(C){return t.call(C)==="[object Number]"}e.number=s;function a(C,O,q){return t.call(C)==="[object Number]"&&O<=C&&C<=q}e.numberRange=a;function y(C){return t.call(C)==="[object Number]"&&-2147483648<=C&&C<=2147483647}e.integer=y;function m(C){return t.call(C)==="[object Number]"&&0<=C&&C<=2147483647}e.uinteger=m;function d(C){return t.call(C)==="[object Function]"}e.func=d;function _(C){return C!==null&&typeof C=="object"}e.objectLiteral=_;function h(C,O){return Array.isArray(C)&&C.every(O)}e.typedArray=h})(f||(f={}))});var z=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.CM=fe.ProtocolNotificationType=fe.ProtocolNotificationType0=fe.ProtocolRequestType=fe.ProtocolRequestType0=fe.RegistrationType=fe.MessageDirection=void 0;var Kt=Je(),ou;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(ou||(fe.MessageDirection=ou={}));var Fs=class{____;method;constructor(t){this.method=t}};fe.RegistrationType=Fs;var js=class extends Kt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};fe.ProtocolRequestType0=js;var Ls=class extends Kt.RequestType{__;___;____;_pr;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolRequestType=Ls;var Ws=class extends Kt.NotificationType0{___;____;constructor(t){super(t)}};fe.ProtocolNotificationType0=Ws;var Us=class extends Kt.NotificationType{___;____;constructor(t){super(t,Kt.ParameterStructures.byName)}};fe.ProtocolNotificationType=Us;var iu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(iu||(fe.CM=iu={}))});var Ir=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=Xh;Fe.string=su;Fe.number=Kh;Fe.error=Zh;Fe.func=Yh;Fe.array=cu;Fe.stringArray=Jh;Fe.typedArray=eg;Fe.objectLiteral=tg;function Xh(e){return e===!0||e===!1}function su(e){return typeof e=="string"||e instanceof String}function Kh(e){return typeof e=="number"||e instanceof Number}function Zh(e){return e instanceof Error}function Yh(e){return typeof e=="function"}function cu(e){return Array.isArray(e)}function Jh(e){return cu(e)&&e.every(t=>su(t))}function eg(e,t){return Array.isArray(e)&&e.every(t)}function tg(e){return e!==null&&typeof e=="object"}});var uu=S(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ImplementationRequest=void 0;var Bs=z(),au;(function(e){e.method="textDocument/implementation",e.messageDirection=Bs.MessageDirection.clientToServer,e.type=new Bs.ProtocolRequestType(e.method),e.capabilities=Bs.CM.create("textDocument.implementation","implementationProvider")})(au||(Dr.ImplementationRequest=au={}))});var du=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.TypeDefinitionRequest=void 0;var Qs=z(),lu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Qs.MessageDirection.clientToServer,e.type=new Qs.ProtocolRequestType(e.method),e.capabilities=Qs.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(lu||(wr.TypeDefinitionRequest=lu={}))});var hu=S(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.DidChangeWorkspaceFoldersNotification=Yt.WorkspaceFoldersRequest=void 0;var Zt=z(),fu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Zt.MessageDirection.serverToClient,e.type=new Zt.ProtocolRequestType0(e.method),e.capabilities=Zt.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(fu||(Yt.WorkspaceFoldersRequest=fu={}));var mu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Zt.MessageDirection.clientToServer,e.type=new Zt.ProtocolNotificationType(e.method),e.capabilities=Zt.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(mu||(Yt.DidChangeWorkspaceFoldersNotification=mu={}))});var pu=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.ConfigurationRequest=void 0;var $s=z(),gu;(function(e){e.method="workspace/configuration",e.messageDirection=$s.MessageDirection.serverToClient,e.type=new $s.ProtocolRequestType(e.method),e.capabilities=$s.CM.create("workspace.configuration",void 0)})(gu||(kr.ConfigurationRequest=gu={}))});var _u=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ColorPresentationRequest=en.DocumentColorRequest=void 0;var Jt=z(),yu;(function(e){e.method="textDocument/documentColor",e.messageDirection=Jt.MessageDirection.clientToServer,e.type=new Jt.ProtocolRequestType(e.method),e.capabilities=Jt.CM.create("textDocument.colorProvider","colorProvider")})(yu||(en.DocumentColorRequest=yu={}));var Tu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Jt.MessageDirection.clientToServer,e.type=new Jt.ProtocolRequestType(e.method),e.capabilities=Jt.CM.create("textDocument.colorProvider","colorProvider")})(Tu||(en.ColorPresentationRequest=Tu={}))});var vu=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.FoldingRangeRefreshRequest=nn.FoldingRangeRequest=void 0;var tn=z(),bu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=tn.MessageDirection.clientToServer,e.type=new tn.ProtocolRequestType(e.method),e.capabilities=tn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(bu||(nn.FoldingRangeRequest=bu={}));var Cu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=tn.MessageDirection.serverToClient,e.type=new tn.ProtocolRequestType0(e.method),e.capabilities=tn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Cu||(nn.FoldingRangeRefreshRequest=Cu={}))});var Iu=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var zs=z(),Su;(function(e){e.method="textDocument/declaration",e.messageDirection=zs.MessageDirection.clientToServer,e.type=new zs.ProtocolRequestType(e.method),e.capabilities=zs.CM.create("textDocument.declaration","declarationProvider")})(Su||(Pr.DeclarationRequest=Su={}))});var wu=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.SelectionRangeRequest=void 0;var Vs=z(),Du;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Du||(Or.SelectionRangeRequest=Du={}))});var Ru=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.WorkDoneProgressCancelNotification=gt.WorkDoneProgressCreateRequest=gt.WorkDoneProgress=void 0;var ng=Je(),Mn=z(),ku;(function(e){e.type=new ng.ProgressType;function t(n){return n===e.type}e.is=t})(ku||(gt.WorkDoneProgress=ku={}));var Pu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Mn.MessageDirection.serverToClient,e.type=new Mn.ProtocolRequestType(e.method),e.capabilities=Mn.CM.create("window.workDoneProgress",void 0)})(Pu||(gt.WorkDoneProgressCreateRequest=Pu={}));var Ou;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Mn.MessageDirection.clientToServer,e.type=new Mn.ProtocolNotificationType(e.method)})(Ou||(gt.WorkDoneProgressCancelNotification=Ou={}))});var Au=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CallHierarchyOutgoingCallsRequest=pt.CallHierarchyIncomingCallsRequest=pt.CallHierarchyPrepareRequest=void 0;var tt=z(),xu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(xu||(pt.CallHierarchyPrepareRequest=xu={}));var Mu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Mu||(pt.CallHierarchyIncomingCallsRequest=Mu={}));var Eu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=tt.MessageDirection.clientToServer,e.type=new tt.ProtocolRequestType(e.method),e.capabilities=tt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Eu||(pt.CallHierarchyOutgoingCallsRequest=Eu={}))});var ju=S(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Oe=z(),qu;(function(e){e.Relative="relative"})(qu||(De.TokenFormat=qu={}));var En;(function(e){e.method="textDocument/semanticTokens",e.type=new Oe.RegistrationType(e.method)})(En||(De.SemanticTokensRegistrationType=En={}));var Nu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Nu||(De.SemanticTokensRequest=Nu={}));var Gu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Gu||(De.SemanticTokensDeltaRequest=Gu={}));var Hu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=En.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Hu||(De.SemanticTokensRangeRequest=Hu={}));var Fu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Oe.MessageDirection.serverToClient,e.type=new Oe.ProtocolRequestType0(e.method),e.capabilities=Oe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Fu||(De.SemanticTokensRefreshRequest=Fu={}))});var Wu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ShowDocumentRequest=void 0;var Xs=z(),Lu;(function(e){e.method="window/showDocument",e.messageDirection=Xs.MessageDirection.serverToClient,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("window.showDocument.support",void 0)})(Lu||(Rr.ShowDocumentRequest=Lu={}))});var Bu=S(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.LinkedEditingRangeRequest=void 0;var Ks=z(),Uu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Uu||(xr.LinkedEditingRangeRequest=Uu={}))});var Yu=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.WillDeleteFilesRequest=me.DidDeleteFilesNotification=me.DidRenameFilesNotification=me.WillRenameFilesRequest=me.DidCreateFilesNotification=me.WillCreateFilesRequest=me.FileOperationPatternKind=void 0;var ie=z(),Qu;(function(e){e.file="file",e.folder="folder"})(Qu||(me.FileOperationPatternKind=Qu={}));var $u;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})($u||(me.WillCreateFilesRequest=$u={}));var zu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(zu||(me.DidCreateFilesNotification=zu={}));var Vu;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Vu||(me.WillRenameFilesRequest=Vu={}));var Xu;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(Xu||(me.DidRenameFilesNotification=Xu={}));var Ku;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(Ku||(me.DidDeleteFilesNotification=Ku={}));var Zu;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(Zu||(me.WillDeleteFilesRequest=Zu={}))});var nl=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.MonikerRequest=yt.MonikerKind=yt.UniquenessLevel=void 0;var Zs=z(),Ju;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Ju||(yt.UniquenessLevel=Ju={}));var el;(function(e){e.$import="import",e.$export="export",e.local="local"})(el||(yt.MonikerKind=el={}));var tl;(function(e){e.method="textDocument/moniker",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.moniker","monikerProvider")})(tl||(yt.MonikerRequest=tl={}))});var sl=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TypeHierarchySubtypesRequest=Tt.TypeHierarchySupertypesRequest=Tt.TypeHierarchyPrepareRequest=void 0;var Ot=z(),rl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method),e.capabilities=Ot.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(rl||(Tt.TypeHierarchyPrepareRequest=rl={}));var ol;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(ol||(Tt.TypeHierarchySupertypesRequest=ol={}));var il;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Ot.MessageDirection.clientToServer,e.type=new Ot.ProtocolRequestType(e.method)})(il||(Tt.TypeHierarchySubtypesRequest=il={}))});var ul=S(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.InlineValueRefreshRequest=on.InlineValueRequest=void 0;var rn=z(),cl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=rn.MessageDirection.clientToServer,e.type=new rn.ProtocolRequestType(e.method),e.capabilities=rn.CM.create("textDocument.inlineValue","inlineValueProvider")})(cl||(on.InlineValueRequest=cl={}));var al;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=rn.MessageDirection.serverToClient,e.type=new rn.ProtocolRequestType0(e.method),e.capabilities=rn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(al||(on.InlineValueRefreshRequest=al={}))});var ml=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var nt=z(),ll;(function(e){e.method="textDocument/inlayHint",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.inlayHint","inlayHintProvider")})(ll||(_t.InlayHintRequest=ll={}));var dl;(function(e){e.method="inlayHint/resolve",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(dl||(_t.InlayHintResolveRequest=dl={}));var fl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=nt.MessageDirection.serverToClient,e.type=new nt.ProtocolRequestType0(e.method),e.capabilities=nt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(fl||(_t.InlayHintRefreshRequest=fl={}))});var bl=S(se=>{"use strict";var rg=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),og=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ig=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var cg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ag=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ug=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.InlineCompletionRequest=void 0;var ec=z(),Pl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=ec.MessageDirection.clientToServer,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Pl||(Er.InlineCompletionRequest=Pl={}))});var Ml=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.TextDocumentContentRefreshRequest=cn.TextDocumentContentRequest=void 0;var qn=z(),Rl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=qn.MessageDirection.clientToServer,e.type=new qn.ProtocolRequestType(e.method),e.capabilities=qn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Rl||(cn.TextDocumentContentRequest=Rl={}));var xl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=qn.MessageDirection.serverToClient,e.type=new qn.ProtocolRequestType(e.method)})(xl||(cn.TextDocumentContentRefreshRequest=xl={}))});var $d=S(c=>{"use strict";var lg=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fg=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(jl||(c.StaticRegistrationOptions=jl={}));var Ll;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||oc.is(r.documentSelector))}e.is=t})(Ll||(c.TextDocumentRegistrationOptions=Ll={}));var Wl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(Wl||(c.WorkDoneProgressOptions=Wl={}));var Ul;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Ul||(c.InitializeRequest=Ul={}));var Bl;(function(e){e.unknownProtocolVersion=1})(Bl||(c.InitializeErrorCodes=Bl={}));var Ql;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Ql||(c.InitializedNotification=Ql={}));var $l;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})($l||(c.ShutdownRequest=$l={}));var zl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(zl||(c.ExitNotification=zl={}));var Vl;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Vl||(c.DidChangeConfigurationNotification=Vl={}));var Xl;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Xl||(c.MessageType=Xl={}));var Kl;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Kl||(c.ShowMessageNotification=Kl={}));var Zl;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(Zl||(c.ShowMessageRequest=Zl={}));var Yl;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Yl||(c.LogMessageNotification=Yl={}));var Jl;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(Jl||(c.TelemetryEventNotification=Jl={}));var ed;(function(e){e.None=0,e.Full=1,e.Incremental=2})(ed||(c.TextDocumentSyncKind=ed={}));var td;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(td||(c.DidOpenTextDocumentNotification=td={}));var nd;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(nd||(c.TextDocumentContentChangeEvent=nd={}));var rd;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(rd||(c.DidChangeTextDocumentNotification=rd={}));var od;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(od||(c.DidCloseTextDocumentNotification=od={}));var id;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(id||(c.DidSaveTextDocumentNotification=id={}));var sd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(sd||(c.TextDocumentSaveReason=sd={}));var cd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(cd||(c.WillSaveTextDocumentNotification=cd={}));var ad;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(ad||(c.WillSaveTextDocumentWaitUntilRequest=ad={}));var ud;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(ud||(c.DidChangeWatchedFilesNotification=ud={}));var ld;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ld||(c.FileChangeType=ld={}));var ic;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(El.URI.is(r.baseUri)||El.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(ic||(c.RelativePattern=ic={}));var sc;(function(e){function t(n){let r=n;return ce.string(r)||ic.is(r)}e.is=t})(sc||(c.GlobPattern=sc={}));var dd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(dd||(c.WatchKind=dd={}));var fd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(fd||(c.PublishDiagnosticsNotification=fd={}));var md;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(md||(c.CompletionTriggerKind=md={}));var hd;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(hd||(c.CompletionRequest=hd={}));var gd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(gd||(c.CompletionResolveRequest=gd={}));var pd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(pd||(c.HoverRequest=pd={}));var yd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(yd||(c.SignatureHelpTriggerKind=yd={}));var Td;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Td||(c.SignatureHelpRequest=Td={}));var _d;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(_d||(c.DefinitionRequest=_d={}));var bd;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(bd||(c.ReferencesRequest=bd={}));var Cd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Cd||(c.DocumentHighlightRequest=Cd={}));var vd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(vd||(c.DocumentSymbolRequest=vd={}));var Sd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Sd||(c.CodeActionRequest=Sd={}));var Id;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Id||(c.CodeActionResolveRequest=Id={}));var Dd;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Dd||(c.WorkspaceSymbolRequest=Dd={}));var wd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(wd||(c.WorkspaceSymbolResolveRequest=wd={}));var kd;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(kd||(c.CodeLensRequest=kd={}));var Pd;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Pd||(c.CodeLensResolveRequest=Pd={}));var Od;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Od||(c.CodeLensRefreshRequest=Od={}));var Rd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(Rd||(c.DocumentLinkRequest=Rd={}));var xd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(xd||(c.DocumentLinkResolveRequest=xd={}));var Md;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(Md||(c.DocumentFormattingRequest=Md={}));var Ed;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Ed||(c.DocumentRangeFormattingRequest=Ed={}));var Ad;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Ad||(c.DocumentRangesFormattingRequest=Ad={}));var qd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(qd||(c.DocumentOnTypeFormattingRequest=qd={}));var Nd;(function(e){e.Identifier=1})(Nd||(c.PrepareSupportDefaultBehavior=Nd={}));var Gd;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Gd||(c.RenameRequest=Gd={}));var Hd;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Hd||(c.PrepareRenameRequest=Hd={}));var Fd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(Fd||(c.ExecuteCommandRequest=Fd={}));var jd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(jd||(c.ApplyWorkspaceEditRequest=jd={}))});var Vd=S(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.createProtocolConnection=Cg;var zd=Je();function Cg(e,t,n,r){return zd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,zd.createMessageConnection)(e,t,n,r)}});var ee=S(we=>{"use strict";var vg=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ar=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&vg(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;Ar(Je(),we);Ar((Sr(),Kn(vr)),we);Ar(z(),we);Ar($d(),we);var Sg=Vd();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Sg.createProtocolConnection}});var Xd;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Xd||(we.LSPErrorCodes=Xd={}))});var hc=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.empty=void 0;bt.v4=Kd;bt.isUUID=Zd;bt.parse=Dg;bt.generateUuid=wg;var Gn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},mc=class e extends Gn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};bt.empty=new Gn("00000000-0000-0000-0000-000000000000");function Kd(){return new mc}var Ig=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Zd(e){return Ig.test(e)}function Dg(e){if(!Zd(e))throw new Error("invalid uuid");return new Gn(e)}function wg(){return Kd().asHex()}});var Yd=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ProgressFeature=void 0;ln.attachWorkDone=Pg;ln.attachPartialResult=Rg;var Ct=ee(),kg=hc(),un=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(Ct.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Ct.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Ct.WorkDoneProgress.type,this._token,{kind:"end"})}},qr=class extends un{_source;constructor(t,n){super(t,n),this._source=new Ct.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Hn=class{constructor(){}begin(){}report(){}done(){}},Nr=class extends Hn{_source;constructor(){super(),this._source=new Ct.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Pg(e,t){if(t===void 0||t.workDoneToken===void 0)return new Hn;let n=t.workDoneToken;return delete t.workDoneToken,new un(e,n)}var Og=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Ct.WorkDoneProgressCancelNotification.type,n=>{let r=un.Instances.get(n.token);(r instanceof qr||r instanceof Nr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Hn:new un(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,kg.generateUuid)();return this.connection.sendRequest(Ct.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qr(this.connection,t))}else return Promise.resolve(new Nr)}};ln.ProgressFeature=Og;var gc;(function(e){e.type=new Ct.ProgressType})(gc||(gc={}));var pc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(gc.type,this._token,t)}};function Rg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new pc(e,n)}});var Jd=S(Ve=>{"use strict";var xg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Mg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Eg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?qg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Ag.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ng});var ef=S(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.WorkspaceFoldersFeature=void 0;var Gr=ee(),Gg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Gr.Emitter,this.connection.onNotification(Gr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Gr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Gr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Hr.WorkspaceFoldersFeature=Gg});var tf=S(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.CallHierarchyFeature=void 0;var yc=ee(),Hg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(yc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=yc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=yc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Fr.CallHierarchyFeature=Hg});var _c=S(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.SemanticTokensBuilder=vt.SemanticTokensDiff=vt.SemanticTokensFeature=void 0;var jr=ee(),Fg=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(jr.SemanticTokensRefreshRequest.type),on:t=>{let n=jr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=jr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=jr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};vt.SemanticTokensFeature=Fg;var Lr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let y=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;y[this._dataLen++]=s,y[this._dataLen++]=a,y[this._dataLen++]=r,y[this._dataLen++]=o,y[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],d=t[5*y];if(m===d){let _=t[5*a+1],h=t[5*y+1];return _-h}return m-d});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ShowDocumentFeature=void 0;var jg=ee(),Lg=e=>class extends e{showDocument(t){return this.connection.sendRequest(jg.ShowDocumentRequest.type,t)}};Wr.ShowDocumentFeature=Lg});var rf=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.FileOperationsFeature=void 0;var dn=ee(),Wg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(dn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(dn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(dn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(dn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(dn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(dn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Ur.FileOperationsFeature=Wg});var of=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.LinkedEditingRangeFeature=void 0;var Ug=ee(),Bg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Ug.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Br.LinkedEditingRangeFeature=Bg});var sf=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.TypeHierarchyFeature=void 0;var bc=ee(),Qg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(bc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=bc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=bc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Qr.TypeHierarchyFeature=Qg});var af=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.InlineValueFeature=void 0;var cf=ee(),$g=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(cf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(cf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};$r.InlineValueFeature=$g});var lf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.FoldingRangeFeature=void 0;var uf=ee(),zg=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(uf.FoldingRangeRefreshRequest.type),on:t=>{let n=uf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zr.FoldingRangeFeature=zg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.InlayHintFeature=void 0;var Cc=ee(),Vg=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Cc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Cc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Cc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Vr.InlayHintFeature=Vg});var ff=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.DiagnosticFeature=void 0;var Fn=ee(),Xg=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fn.WorkspaceDiagnosticRequest.partialResult,n)))}}};Xr.DiagnosticFeature=Xg});var Sc=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.TextDocuments=void 0;var xt=ee(),vc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new xt.Emitter,this._onDidOpen=new xt.Emitter,this._onDidClose=new xt.Emitter,this._onDidSave=new xt.Emitter,this._onWillSave=new xt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=xt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),xt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Kr.TextDocuments=vc});var wc=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.NotebookDocuments=fn.NotebookSyncFeature=void 0;var Me=ee(),mf=Sc(),Kg=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Me.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Me.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Me.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Me.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};fn.NotebookSyncFeature=Kg;var Ic=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Me.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Me.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Me.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Dc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof mf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new mf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Me.Emitter,this._onDidChange=new Me.Emitter,this._onDidSave=new Me.Emitter,this._onDidClose=new Me.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Ic,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,y=o.change;y.metadata!==void 0&&(a=!0,i.metadata=y.metadata);let m=[],d=[],_=[],h=[];if(y.cells!==void 0){let R=y.cells;if(R.structure!==void 0){let g=R.structure.array;if(i.cells.splice(g.start,g.deleteCount,...g.cells!==void 0?g.cells:[]),R.structure.didOpen!==void 0)for(let l of R.structure.didOpen)await n.openTextDocument({textDocument:l}),m.push(l.uri);if(R.structure.didClose)for(let l of R.structure.didClose)await n.closeTextDocument({textDocument:l}),d.push(l.uri)}if(R.data!==void 0){let g=new Map(R.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let I=g.get(i.cells[l].document);if(I!==void 0){let E=i.cells.splice(l,1,I);if(_.push({old:E[0],new:I}),g.delete(I.document),g.size===0)break}}}if(R.textContent!==void 0)for(let g of R.textContent)await n.changeTextDocument({textDocument:g.document,contentChanges:g.changes}),h.push(g.document.uri)}this.updateCellMap(i);let C={notebookDocument:i};a&&(C.metadata={old:s,new:i.metadata});let O=[];for(let R of m)O.push(this.getNotebookCell(R));let q=[];for(let R of d)q.push(this.getNotebookCell(R));let G=[];for(let R of h)G.push(this.getNotebookCell(R));(O.length>0||q.length>0||_.length>0||G.length>0)&&(C.cells={added:O,removed:q,changed:{data:_,textContent:G}}),(C.metadata!==void 0||C.cells!==void 0)&&this._onDidChange.fire(C)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Me.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};fn.NotebookDocuments=Dc});var hf=S(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.MonikerFeature=void 0;var Zg=ee(),Yg=e=>class extends e{get moniker(){return{on:t=>{let n=Zg.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Zr.MonikerFeature=Yg});var gf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.InlineCompletionFeature=void 0;var Jg=ee(),ep=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(Jg.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Yr.InlineCompletionFeature=ep});var yf=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocumentContentFeature=void 0;var pf=ee(),tp=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(pf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(pf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Jr.TextDocumentContentFeature=tp});var Mc=S(U=>{"use strict";var np=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rp=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),If=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Oc;var eo=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Rc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(kc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(kc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(kc)}},Tf=(0,ap.ShowDocumentFeature)((0,M.ProgressFeature)(Rc)),_f;(function(e){function t(){return new to}e.create=t})(_f||(U.BulkRegistration=_f={}));var to=class{_registrations=[];_registered=new Set;add(t,n){let r=Ee.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Pc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},bf;(function(e){function t(){return new jn(void 0,[])}e.create=t})(bf||(U.BulkUnregistration=bf={}));var jn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ee.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},no=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof to?this.registerMany(t):t instanceof jn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ee.string(n)?n:n.method,i=Pc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Ee.string(t)?t:t.method,o=Pc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new jn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},xc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},Cf=(0,_p.TextDocumentContentFeature)((0,up.FileOperationsFeature)((0,ip.WorkspaceFoldersFeature)((0,op.ConfigurationFeature)(xc)))),ro=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},oo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},io=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=io;var vf=(0,Tp.InlineCompletionFeature)((0,mp.FoldingRangeFeature)((0,yp.MonikerFeature)((0,gp.DiagnosticFeature)((0,hp.InlayHintFeature)((0,fp.InlineValueFeature)((0,dp.TypeHierarchyFeature)((0,lp.LinkedEditingRangeFeature)((0,cp.SemanticTokensFeature)((0,sp.CallHierarchyFeature)(io)))))))))),so=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=so;var Sf=(0,pp.NotebookSyncFeature)(so);function Df(e,t){return function(n){return t(e(n))}}function wf(e,t){return function(n){return t(e(n))}}function kf(e,t){return function(n){return t(e(n))}}function Pf(e,t){return function(n){return t(e(n))}}function Of(e,t){return function(n){return t(e(n))}}function Rf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function Mf(e,t){return function(n){return t(e(n))}}function bp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Df),tracer:n(e.tracer,t.tracer,kf),telemetry:n(e.telemetry,t.telemetry,wf),client:n(e.client,t.client,Pf),window:n(e.window,t.window,Of),workspace:n(e.workspace,t.workspace,Rf),languages:n(e.languages,t.languages,xf),notebooks:n(e.notebooks,t.notebooks,Mf)}}function Cp(e,t,n){let r=n&&n.console?new(n.console(eo)):new eo,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(ro)):new ro,s=n&&n.telemetry?new(n.telemetry(oo)):new oo,a=n&&n.client?new(n.client(no)):new no,y=n&&n.window?new(n.window(Tf)):new Tf,m=n&&n.workspace?new(n.workspace(Cf)):new Cf,d=n&&n.languages?new(n.languages(vf)):new vf,_=n&&n.notebooks?new(n.notebooks(Sf)):new Sf,h=[r,i,s,a,y,m,d,_];function C(g){return g instanceof Promise?g:Ee.thenable(g)?new Promise((l,I)=>{g.then(E=>l(E),E=>I(E))}):Promise.resolve(g)}let O,q,G,R={listen:()=>o.listen(),sendRequest:(g,...l)=>o.sendRequest(Ee.string(g)?g:g.method,...l),onRequest:(g,l)=>o.onRequest(g,l),sendNotification:(g,l)=>{let I=Ee.string(g)?g:g.method;return o.sendNotification(I,l)},onNotification:(g,l)=>o.onNotification(g,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:g=>(q=g,{dispose:()=>{q=void 0}}),onInitialized:g=>o.onNotification(D.InitializedNotification.type,g),onShutdown:g=>(O=g,{dispose:()=>{O=void 0}}),onExit:g=>(G=g,{dispose:()=>{G=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return y},get workspace(){return m},get languages(){return d},get notebooks(){return _},onDidChangeConfiguration:g=>o.onNotification(D.DidChangeConfigurationNotification.type,g),onDidChangeWatchedFiles:g=>o.onNotification(D.DidChangeWatchedFilesNotification.type,g),__textDocumentSync:void 0,onDidOpenTextDocument:g=>o.onNotification(D.DidOpenTextDocumentNotification.type,g),onDidChangeTextDocument:g=>o.onNotification(D.DidChangeTextDocumentNotification.type,g),onDidCloseTextDocument:g=>o.onNotification(D.DidCloseTextDocumentNotification.type,g),onWillSaveTextDocument:g=>o.onNotification(D.WillSaveTextDocumentNotification.type,g),onWillSaveTextDocumentWaitUntil:g=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,g),onDidSaveTextDocument:g=>o.onNotification(D.DidSaveTextDocumentNotification.type,g),sendDiagnostics:g=>o.sendNotification(D.PublishDiagnosticsNotification.type,g),onHover:g=>o.onRequest(D.HoverRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onCompletion:g=>o.onRequest(D.CompletionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCompletionResolve:g=>o.onRequest(D.CompletionResolveRequest.type,g),onSignatureHelp:g=>o.onRequest(D.SignatureHelpRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDeclaration:g=>o.onRequest(D.DeclarationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDefinition:g=>o.onRequest(D.DefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onTypeDefinition:g=>o.onRequest(D.TypeDefinitionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onImplementation:g=>o.onRequest(D.ImplementationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onReferences:g=>o.onRequest(D.ReferencesRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentHighlight:g=>o.onRequest(D.DocumentHighlightRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentSymbol:g=>o.onRequest(D.DocumentSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbol:g=>o.onRequest(D.WorkspaceSymbolRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:g=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,g),onCodeAction:g=>o.onRequest(D.CodeActionRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeActionResolve:g=>o.onRequest(D.CodeActionResolveRequest.type,(l,I)=>g(l,I)),onCodeLens:g=>o.onRequest(D.CodeLensRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onCodeLensResolve:g=>o.onRequest(D.CodeLensResolveRequest.type,(l,I)=>g(l,I)),onDocumentFormatting:g=>o.onRequest(D.DocumentFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:g=>o.onRequest(D.DocumentRangeFormattingRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:g=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(l,I)=>g(l,I)),onRenameRequest:g=>o.onRequest(D.RenameRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),onPrepareRename:g=>o.onRequest(D.PrepareRenameRequest.type,(l,I)=>g(l,I)),onDocumentLinks:g=>o.onRequest(D.DocumentLinkRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onDocumentLinkResolve:g=>o.onRequest(D.DocumentLinkResolveRequest.type,(l,I)=>g(l,I)),onDocumentColor:g=>o.onRequest(D.DocumentColorRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onColorPresentation:g=>o.onRequest(D.ColorPresentationRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onFoldingRanges:g=>o.onRequest(D.FoldingRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onSelectionRanges:g=>o.onRequest(D.SelectionRangeRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),(0,M.attachPartialResult)(o,l))),onExecuteCommand:g=>o.onRequest(D.ExecuteCommandRequest.type,(l,I)=>g(l,I,(0,M.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let g of h)g.attach(R);return o.onRequest(D.InitializeRequest.type,g=>{t.initialize(g),Ee.string(g.trace)&&(i.trace=D.Trace.fromString(g.trace));for(let l of h)l.initialize(g.capabilities);if(q){let l=q(g,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,g),void 0);return C(l).then(I=>{if(I instanceof D.ResponseError)return I;let E=I;E||(E={capabilities:{}});let A=E.capabilities;A||(A={},E.capabilities=A),A.textDocumentSync===void 0||A.textDocumentSync===null?A.textDocumentSync=Ee.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None:!Ee.number(A.textDocumentSync)&&!Ee.number(A.textDocumentSync.change)&&(A.textDocumentSync.change=Ee.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of h)B.fillServerCapabilities(A);return E})}else{let l={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of h)I.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,O)return O(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(G)return G()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,g=>{i.trace=D.Trace.fromString(g.value)}),R}});var Ef=S(be=>{"use strict";var vp=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sp=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gc=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Le.normalize(n.join("/"))}function Ac(){return process.platform==="win32"}function co(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let y=process.env,m=Object.create(null);Object.keys(y).forEach(d=>m[d]=y[d]),t&&Ec.existsSync(t)&&(m[o]?m[o]=t+Le.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let d=(0,Hc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(d.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}d.on("error",h=>{a(h)}),d.on("message",h=>{h.c==="r"&&(d.send({c:"e"}),h.s?s(h.r):a(new Error(`Failed to resolve module: ${e}`)))});let _={c:"rs",a:e};d.send(_)}catch(d){a(d)}})}function qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Ac()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Hc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Ac()?Le.join(s,"node_modules"):Le.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function wp(e){let t="yarn",n={encoding:"utf8"};Ac()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Hc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let y=JSON.parse(a);if(y.type==="log")return Le.join(y.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Nc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Ec.existsSync(__filename.toUpperCase())||!Ec.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Le.normalize(i).indexOf(Le.normalize(o))===0:Le.normalize(i).toLowerCase().indexOf(Le.normalize(o).toLowerCase())===0}e.isParent=r})(Nc||(be.FileSystem=Nc={}));function kp(e,t,n,r){return n?(Le.isAbsolute(n)||(n=Le.join(e,n)),co(t,n,n,r).then(o=>Nc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>co(t,qc(r),e,r))):co(t,qc(r),e,r)}});var Nf=S(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var Af=require("util"),ot=Je(),Fc=class e extends ot.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Af.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},jc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),ot.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),ot.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),ot.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),ot.Disposable.create(()=>this.stream.off("data",t))}},Lc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),ot.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),ot.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),ot.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},qf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Fc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Af.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new jc(e),asWritableStream:e=>new Lc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Wc(){return qf}(function(e){function t(){ot.RAL.install(qf)}e.install=t})(Wc||(Wc={}));Uc.default=Wc});var Xc=S(N=>{"use strict";var Hf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Re.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Bc;var Qc=class extends Re.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Qc;var $c=class extends Re.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Re.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=$c;var zc=class extends Re.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=zc;var Mt=class extends Re.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Ln.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=Mt;var Et=class extends Re.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Et;var ao=class extends Re.ReadableStreamMessageReader{constructor(t,n){super((0,Ln.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=ao;var uo=class extends Re.WriteableStreamMessageWriter{constructor(t,n){super((0,Ln.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=uo;var Ap=process.env.XDG_RUNTIME_DIR,qp=new Map([["linux",107],["darwin",102]]);function Np(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Gf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Ep.realpathSync(Ap??Mp.tmpdir()),r=qp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Gf.randomBytes)(Math.floor(e/2)).toString("hex");return xp.join(n,`lsp-${o}.sock`)}function Gp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,lo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Hp(e,t="utf-8"){let n=(0,lo.createConnection)(e);return[new Mt(n,t),new Et(n,t)]}function Fp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,lo.createServer)(a=>{s.close(),n([new Mt(a,t),new Et(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function jp(e,t="utf-8"){let n=(0,lo.createConnection)(e,"127.0.0.1");return[new Mt(n,t),new Et(n,t)]}function Lp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Wp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Up(e,t,n,r){n||(n=Re.NullLogger);let o=Lp(e)?new ao(e):e,i=Wp(t)?new uo(t):t;return Re.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Re.createMessageConnection)(o,i,n,r)}});var Kc=S(it=>{"use strict";var Bp=it&&it.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ff=it&&it.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Bp(t,e,n)};Object.defineProperty(it,"__esModule",{value:!0});it.createProtocolConnection=$p;var Qp=Xc();Ff(Xc(),it);Ff(ee(),it);function $p(e,t,n,r){return(0,Qp.createMessageConnection)(e,t,n,r)}});var Zc=S(he=>{"use strict";var zp=he&&he.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lf=he&&he.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&zp(t,e,n)};Object.defineProperty(he,"__esModule",{value:!0});he.ProposedFeatures=he.NotebookDocuments=he.TextDocuments=he.SemanticTokensBuilder=void 0;var Vp=_c();Object.defineProperty(he,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Vp.SemanticTokensBuilder}});Lf(ee(),he);var Xp=Sc();Object.defineProperty(he,"TextDocuments",{enumerable:!0,get:function(){return Xp.TextDocuments}});var Kp=wc();Object.defineProperty(he,"NotebookDocuments",{enumerable:!0,get:function(){return Kp.NotebookDocuments}});Lf(Mc(),he);var jf;(function(e){e.all={__brand:"features"}})(jf||(he.ProposedFeatures=jf={}))});var Jc=S(Ce=>{"use strict";var Qf=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zp=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$f=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{fo(),process.exit(mn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;Yc.number(t)&&Vf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(mn?0:1)}},3e3)},get shutdownReceived(){return mn},set shutdownReceived(e){mn=e},exit:e=>{fo(),process.exit(e)}};function ty(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),At.ConnectionStrategy.is(e)||At.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),ny(i,s,a,o)}function ny(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,y,m=process.argv.slice(2);for(let d=0;d{fo(),process.exit(mn?0:1)}),a.on("close",()=>{fo(),process.exit(mn?0:1)})}let s=a=>{let y=(0,At.createProtocolConnection)(e,t,a,n);return o&&ry(a),y};return(0,Yp.createConnection)(s,ey,r)}function ry(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,Wf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,Wf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var Yf={};Ma(Yf,{TextDocument:()=>ea});function ta(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ta(r,t),ta(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function oy(e){let t=Zf(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var mo,ea,Jf=xa(()=>{"use strict";mo=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=Zf(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),y=Math.max(o.end.line,0),m=this._lineOffsets,d=Xf(r.text,!1,i);if(y-a===d.length)for(let h=0,C=d.length;ht?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&Kf(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new mo(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof mo)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ta(i.map(oy),(d,_)=>{let h=d.range.start.line-_.range.start.line;return h===0?d.range.start.character-_.range.start.character:h}),y=0,m=[];for(let d of a){let _=o.offsetAt(d.range.start);if(_y&&m.push(s.substring(y,_)),d.newText.length&&m.push(d.newText),y=o.offsetAt(d.range.end)}return m.push(s.substr(y)),m.join("")}e.applyEdits=r})(ea||(ea={}))});var Un=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.DATATYPE_SET=ge.KEYWORD_SET=ge.PUNCTUATION=ge.OPERATORS=ge.DATATYPES=ge.KEYWORDS=void 0;ge.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ge.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ge.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ge.PUNCTUATION=["(",")","[","]",";",",",":","."];ge.KEYWORD_SET=new Set(ge.KEYWORDS);ge.DATATYPE_SET=new Set(ge.DATATYPES)});var qt=S(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.TokenKind=void 0;var em;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(em||(ho.TokenKind=em={}))});var yo=S(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.tokenize=sy;var po=Un(),ke=qt();function tm(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function Bn(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function go(e){return e!==void 0&&/[0-9]/.test(e)}function iy(e){let t=e.toUpperCase();return po.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:po.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function sy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Me.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Me.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(b){return b===!0||b===!1}e.boolean=o;function i(b){return t.call(b)==="[object String]"}e.string=i;function s(b){return t.call(b)==="[object Number]"}e.number=s;function a(b,P,E){return t.call(b)==="[object Number]"&&P<=b&&b<=E}e.numberRange=a;function p(b){return t.call(b)==="[object Number]"&&-2147483648<=b&&b<=2147483647}e.integer=p;function m(b){return t.call(b)==="[object Number]"&&0<=b&&b<=2147483647}e.uinteger=m;function h(b){return t.call(b)==="[object Function]"}e.func=h;function C(b){return b!==null&&typeof b=="object"}e.objectLiteral=C;function l(b,P){return Array.isArray(b)&&b.every(P)}e.typedArray=l})(f||(f={}))});var z=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CM=me.ProtocolNotificationType=me.ProtocolNotificationType0=me.ProtocolRequestType=me.ProtocolRequestType0=me.RegistrationType=me.MessageDirection=void 0;var Jt=et(),uu;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(uu||(me.MessageDirection=uu={}));var Us=class{____;method;constructor(t){this.method=t}};me.RegistrationType=Us;var Bs=class extends Jt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};me.ProtocolRequestType0=Bs;var Qs=class extends Jt.RequestType{__;___;____;_pr;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolRequestType=Qs;var $s=class extends Jt.NotificationType0{___;____;constructor(t){super(t)}};me.ProtocolNotificationType0=$s;var zs=class extends Jt.NotificationType{___;____;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolNotificationType=zs;var lu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(lu||(me.CM=lu={}))});var kr=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=ng;Fe.string=du;Fe.number=rg;Fe.error=og;Fe.func=ig;Fe.array=fu;Fe.stringArray=sg;Fe.typedArray=cg;Fe.objectLiteral=ag;function ng(e){return e===!0||e===!1}function du(e){return typeof e=="string"||e instanceof String}function rg(e){return typeof e=="number"||e instanceof Number}function og(e){return e instanceof Error}function ig(e){return typeof e=="function"}function fu(e){return Array.isArray(e)}function sg(e){return fu(e)&&e.every(t=>du(t))}function cg(e,t){return Array.isArray(e)&&e.every(t)}function ag(e){return e!==null&&typeof e=="object"}});var hu=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.ImplementationRequest=void 0;var Vs=z(),mu;(function(e){e.method="textDocument/implementation",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.implementation","implementationProvider")})(mu||(Pr.ImplementationRequest=mu={}))});var pu=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.TypeDefinitionRequest=void 0;var Ks=z(),gu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(gu||(Or.TypeDefinitionRequest=gu={}))});var _u=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.DidChangeWorkspaceFoldersNotification=tn.WorkspaceFoldersRequest=void 0;var en=z(),yu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=en.MessageDirection.serverToClient,e.type=new en.ProtocolRequestType0(e.method),e.capabilities=en.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(yu||(tn.WorkspaceFoldersRequest=yu={}));var Tu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=en.MessageDirection.clientToServer,e.type=new en.ProtocolNotificationType(e.method),e.capabilities=en.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Tu||(tn.DidChangeWorkspaceFoldersNotification=Tu={}))});var Cu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ConfigurationRequest=void 0;var Xs=z(),bu;(function(e){e.method="workspace/configuration",e.messageDirection=Xs.MessageDirection.serverToClient,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("workspace.configuration",void 0)})(bu||(Rr.ConfigurationRequest=bu={}))});var Iu=S(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.ColorPresentationRequest=rn.DocumentColorRequest=void 0;var nn=z(),vu;(function(e){e.method="textDocument/documentColor",e.messageDirection=nn.MessageDirection.clientToServer,e.type=new nn.ProtocolRequestType(e.method),e.capabilities=nn.CM.create("textDocument.colorProvider","colorProvider")})(vu||(rn.DocumentColorRequest=vu={}));var Su;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=nn.MessageDirection.clientToServer,e.type=new nn.ProtocolRequestType(e.method),e.capabilities=nn.CM.create("textDocument.colorProvider","colorProvider")})(Su||(rn.ColorPresentationRequest=Su={}))});var ku=S(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.FoldingRangeRefreshRequest=sn.FoldingRangeRequest=void 0;var on=z(),Du;(function(e){e.method="textDocument/foldingRange",e.messageDirection=on.MessageDirection.clientToServer,e.type=new on.ProtocolRequestType(e.method),e.capabilities=on.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Du||(sn.FoldingRangeRequest=Du={}));var wu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=on.MessageDirection.serverToClient,e.type=new on.ProtocolRequestType0(e.method),e.capabilities=on.CM.create("workspace.foldingRange.refreshSupport",void 0)})(wu||(sn.FoldingRangeRefreshRequest=wu={}))});var Ou=S(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.DeclarationRequest=void 0;var Zs=z(),Pu;(function(e){e.method="textDocument/declaration",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.declaration","declarationProvider")})(Pu||(xr.DeclarationRequest=Pu={}))});var xu=S(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.SelectionRangeRequest=void 0;var Ys=z(),Ru;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Ys.MessageDirection.clientToServer,e.type=new Ys.ProtocolRequestType(e.method),e.capabilities=Ys.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Ru||(Mr.SelectionRangeRequest=Ru={}))});var qu=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.WorkDoneProgressCancelNotification=pt.WorkDoneProgressCreateRequest=pt.WorkDoneProgress=void 0;var ug=et(),An=z(),Mu;(function(e){e.type=new ug.ProgressType;function t(n){return n===e.type}e.is=t})(Mu||(pt.WorkDoneProgress=Mu={}));var Eu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=An.MessageDirection.serverToClient,e.type=new An.ProtocolRequestType(e.method),e.capabilities=An.CM.create("window.workDoneProgress",void 0)})(Eu||(pt.WorkDoneProgressCreateRequest=Eu={}));var Au;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=An.MessageDirection.clientToServer,e.type=new An.ProtocolNotificationType(e.method)})(Au||(pt.WorkDoneProgressCancelNotification=Au={}))});var Fu=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.CallHierarchyOutgoingCallsRequest=yt.CallHierarchyIncomingCallsRequest=yt.CallHierarchyPrepareRequest=void 0;var nt=z(),Nu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Nu||(yt.CallHierarchyPrepareRequest=Nu={}));var Gu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Gu||(yt.CallHierarchyIncomingCallsRequest=Gu={}));var Hu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Hu||(yt.CallHierarchyOutgoingCallsRequest=Hu={}))});var Qu=S(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Oe=z(),ju;(function(e){e.Relative="relative"})(ju||(De.TokenFormat=ju={}));var qn;(function(e){e.method="textDocument/semanticTokens",e.type=new Oe.RegistrationType(e.method)})(qn||(De.SemanticTokensRegistrationType=qn={}));var Lu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Lu||(De.SemanticTokensRequest=Lu={}));var Wu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Wu||(De.SemanticTokensDeltaRequest=Wu={}));var Uu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Uu||(De.SemanticTokensRangeRequest=Uu={}));var Bu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Oe.MessageDirection.serverToClient,e.type=new Oe.ProtocolRequestType0(e.method),e.capabilities=Oe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Bu||(De.SemanticTokensRefreshRequest=Bu={}))});var zu=S(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.ShowDocumentRequest=void 0;var Js=z(),$u;(function(e){e.method="window/showDocument",e.messageDirection=Js.MessageDirection.serverToClient,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("window.showDocument.support",void 0)})($u||(Er.ShowDocumentRequest=$u={}))});var Ku=S(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.LinkedEditingRangeRequest=void 0;var ec=z(),Vu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=ec.MessageDirection.clientToServer,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Vu||(Ar.LinkedEditingRangeRequest=Vu={}))});var rl=S(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.WillDeleteFilesRequest=he.DidDeleteFilesNotification=he.DidRenameFilesNotification=he.WillRenameFilesRequest=he.DidCreateFilesNotification=he.WillCreateFilesRequest=he.FileOperationPatternKind=void 0;var ie=z(),Xu;(function(e){e.file="file",e.folder="folder"})(Xu||(he.FileOperationPatternKind=Xu={}));var Zu;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Zu||(he.WillCreateFilesRequest=Zu={}));var Yu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Yu||(he.DidCreateFilesNotification=Yu={}));var Ju;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Ju||(he.WillRenameFilesRequest=Ju={}));var el;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(el||(he.DidRenameFilesNotification=el={}));var tl;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(tl||(he.DidDeleteFilesNotification=tl={}));var nl;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(nl||(he.WillDeleteFilesRequest=nl={}))});var cl=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.MonikerRequest=Tt.MonikerKind=Tt.UniquenessLevel=void 0;var tc=z(),ol;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(ol||(Tt.UniquenessLevel=ol={}));var il;(function(e){e.$import="import",e.$export="export",e.local="local"})(il||(Tt.MonikerKind=il={}));var sl;(function(e){e.method="textDocument/moniker",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.moniker","monikerProvider")})(sl||(Tt.MonikerRequest=sl={}))});var dl=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.TypeHierarchySubtypesRequest=_t.TypeHierarchySupertypesRequest=_t.TypeHierarchyPrepareRequest=void 0;var Et=z(),al;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method),e.capabilities=Et.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(al||(_t.TypeHierarchyPrepareRequest=al={}));var ul;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method)})(ul||(_t.TypeHierarchySupertypesRequest=ul={}));var ll;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method)})(ll||(_t.TypeHierarchySubtypesRequest=ll={}))});var hl=S(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.InlineValueRefreshRequest=an.InlineValueRequest=void 0;var cn=z(),fl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=cn.MessageDirection.clientToServer,e.type=new cn.ProtocolRequestType(e.method),e.capabilities=cn.CM.create("textDocument.inlineValue","inlineValueProvider")})(fl||(an.InlineValueRequest=fl={}));var ml;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=cn.MessageDirection.serverToClient,e.type=new cn.ProtocolRequestType0(e.method),e.capabilities=cn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(ml||(an.InlineValueRefreshRequest=ml={}))});var Tl=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.InlayHintRefreshRequest=bt.InlayHintResolveRequest=bt.InlayHintRequest=void 0;var rt=z(),gl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint","inlayHintProvider")})(gl||(bt.InlayHintRequest=gl={}));var pl;(function(e){e.method="inlayHint/resolve",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(pl||(bt.InlayHintResolveRequest=pl={}));var yl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=rt.MessageDirection.serverToClient,e.type=new rt.ProtocolRequestType0(e.method),e.capabilities=rt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(yl||(bt.InlayHintRefreshRequest=yl={}))});var Dl=S(se=>{"use strict";var lg=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dg=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fg=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var hg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pg=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.InlineCompletionRequest=void 0;var oc=z(),El;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=oc.MessageDirection.clientToServer,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(El||(Nr.InlineCompletionRequest=El={}))});var Gl=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.TextDocumentContentRefreshRequest=ln.TextDocumentContentRequest=void 0;var Gn=z(),ql;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Gn.MessageDirection.clientToServer,e.type=new Gn.ProtocolRequestType(e.method),e.capabilities=Gn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(ql||(ln.TextDocumentContentRequest=ql={}));var Nl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Gn.MessageDirection.serverToClient,e.type=new Gn.ProtocolRequestType(e.method)})(Nl||(ln.TextDocumentContentRefreshRequest=Nl={}))});var Zd=S(c=>{"use strict";var yg=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Tg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_g=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Ql||(c.StaticRegistrationOptions=Ql={}));var $l;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||ac.is(r.documentSelector))}e.is=t})($l||(c.TextDocumentRegistrationOptions=$l={}));var zl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(zl||(c.WorkDoneProgressOptions=zl={}));var Vl;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Vl||(c.InitializeRequest=Vl={}));var Kl;(function(e){e.unknownProtocolVersion=1})(Kl||(c.InitializeErrorCodes=Kl={}));var Xl;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Xl||(c.InitializedNotification=Xl={}));var Zl;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})(Zl||(c.ShutdownRequest=Zl={}));var Yl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(Yl||(c.ExitNotification=Yl={}));var Jl;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Jl||(c.DidChangeConfigurationNotification=Jl={}));var ed;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ed||(c.MessageType=ed={}));var td;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(td||(c.ShowMessageNotification=td={}));var nd;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(nd||(c.ShowMessageRequest=nd={}));var rd;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(rd||(c.LogMessageNotification=rd={}));var od;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(od||(c.TelemetryEventNotification=od={}));var id;(function(e){e.None=0,e.Full=1,e.Incremental=2})(id||(c.TextDocumentSyncKind=id={}));var sd;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(sd||(c.DidOpenTextDocumentNotification=sd={}));var cd;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(cd||(c.TextDocumentContentChangeEvent=cd={}));var ad;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(ad||(c.DidChangeTextDocumentNotification=ad={}));var ud;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ud||(c.DidCloseTextDocumentNotification=ud={}));var ld;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(ld||(c.DidSaveTextDocumentNotification=ld={}));var dd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(dd||(c.TextDocumentSaveReason=dd={}));var fd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(fd||(c.WillSaveTextDocumentNotification=fd={}));var md;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(md||(c.WillSaveTextDocumentWaitUntilRequest=md={}));var hd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(hd||(c.DidChangeWatchedFilesNotification=hd={}));var gd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(gd||(c.FileChangeType=gd={}));var uc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Hl.URI.is(r.baseUri)||Hl.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(uc||(c.RelativePattern=uc={}));var lc;(function(e){function t(n){let r=n;return ce.string(r)||uc.is(r)}e.is=t})(lc||(c.GlobPattern=lc={}));var pd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(pd||(c.WatchKind=pd={}));var yd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(yd||(c.PublishDiagnosticsNotification=yd={}));var Td;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Td||(c.CompletionTriggerKind=Td={}));var _d;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(_d||(c.CompletionRequest=_d={}));var bd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(bd||(c.CompletionResolveRequest=bd={}));var Cd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(Cd||(c.HoverRequest=Cd={}));var vd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(vd||(c.SignatureHelpTriggerKind=vd={}));var Sd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Sd||(c.SignatureHelpRequest=Sd={}));var Id;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(Id||(c.DefinitionRequest=Id={}));var Dd;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(Dd||(c.ReferencesRequest=Dd={}));var wd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(wd||(c.DocumentHighlightRequest=wd={}));var kd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(kd||(c.DocumentSymbolRequest=kd={}));var Pd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Pd||(c.CodeActionRequest=Pd={}));var Od;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Od||(c.CodeActionResolveRequest=Od={}));var Rd;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Rd||(c.WorkspaceSymbolRequest=Rd={}));var xd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(xd||(c.WorkspaceSymbolResolveRequest=xd={}));var Md;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(Md||(c.CodeLensRequest=Md={}));var Ed;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Ed||(c.CodeLensResolveRequest=Ed={}));var Ad;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Ad||(c.CodeLensRefreshRequest=Ad={}));var qd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(qd||(c.DocumentLinkRequest=qd={}));var Nd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Nd||(c.DocumentLinkResolveRequest=Nd={}));var Gd;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(Gd||(c.DocumentFormattingRequest=Gd={}));var Hd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Hd||(c.DocumentRangeFormattingRequest=Hd={}));var Fd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Fd||(c.DocumentRangesFormattingRequest=Fd={}));var jd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(jd||(c.DocumentOnTypeFormattingRequest=jd={}));var Ld;(function(e){e.Identifier=1})(Ld||(c.PrepareSupportDefaultBehavior=Ld={}));var Wd;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Wd||(c.RenameRequest=Wd={}));var Ud;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Ud||(c.PrepareRenameRequest=Ud={}));var Bd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(Bd||(c.ExecuteCommandRequest=Bd={}));var Qd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(Qd||(c.ApplyWorkspaceEditRequest=Qd={}))});var Jd=S(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.createProtocolConnection=Pg;var Yd=et();function Pg(e,t,n,r){return Yd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Yd.createMessageConnection)(e,t,n,r)}});var ee=S(we=>{"use strict";var Og=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gr=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Og(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;Gr(et(),we);Gr((wr(),Jn(Dr)),we);Gr(z(),we);Gr(Zd(),we);var Rg=Jd();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Rg.createProtocolConnection}});var ef;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(ef||(we.LSPErrorCodes=ef={}))});var Tc=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.empty=void 0;Ct.v4=tf;Ct.isUUID=nf;Ct.parse=Mg;Ct.generateUuid=Eg;var Fn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},yc=class e extends Fn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};Ct.empty=new Fn("00000000-0000-0000-0000-000000000000");function tf(){return new yc}var xg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function nf(e){return xg.test(e)}function Mg(e){if(!nf(e))throw new Error("invalid uuid");return new Fn(e)}function Eg(){return tf().asHex()}});var rf=S(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.ProgressFeature=void 0;mn.attachWorkDone=qg;mn.attachPartialResult=Gg;var vt=ee(),Ag=Tc(),fn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,{kind:"end"})}},Hr=class extends fn{_source;constructor(t,n){super(t,n),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Fr=class extends jn{_source;constructor(){super(),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function qg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new fn(e,n)}var Ng=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(vt.WorkDoneProgressCancelNotification.type,n=>{let r=fn.Instances.get(n.token);(r instanceof Hr||r instanceof Fr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new fn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,Ag.generateUuid)();return this.connection.sendRequest(vt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new Hr(this.connection,t))}else return Promise.resolve(new Fr)}};mn.ProgressFeature=Ng;var _c;(function(e){e.type=new vt.ProgressType})(_c||(_c={}));var bc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(_c.type,this._token,t)}};function Gg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new bc(e,n)}});var of=S(Ve=>{"use strict";var Hg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?Wg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Lg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ug});var sf=S(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.WorkspaceFoldersFeature=void 0;var jr=ee(),Bg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new jr.Emitter,this.connection.onNotification(jr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(jr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(jr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Lr.WorkspaceFoldersFeature=Bg});var cf=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.CallHierarchyFeature=void 0;var Cc=ee(),Qg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Cc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Cc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Cc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Wr.CallHierarchyFeature=Qg});var Sc=S(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.SemanticTokensBuilder=St.SemanticTokensDiff=St.SemanticTokensFeature=void 0;var Ur=ee(),$g=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Ur.SemanticTokensRefreshRequest.type),on:t=>{let n=Ur.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Ur.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Ur.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};St.SemanticTokensFeature=$g;var Br=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let p=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;p[this._dataLen++]=s,p[this._dataLen++]=a,p[this._dataLen++]=r,p[this._dataLen++]=o,p[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],h=t[5*p];if(m===h){let C=t[5*a+1],l=t[5*p+1];return C-l}return m-h});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.ShowDocumentFeature=void 0;var zg=ee(),Vg=e=>class extends e{showDocument(t){return this.connection.sendRequest(zg.ShowDocumentRequest.type,t)}};Qr.ShowDocumentFeature=Vg});var uf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.FileOperationsFeature=void 0;var hn=ee(),Kg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(hn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(hn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(hn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(hn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(hn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(hn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};$r.FileOperationsFeature=Kg});var lf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.LinkedEditingRangeFeature=void 0;var Xg=ee(),Zg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Xg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};zr.LinkedEditingRangeFeature=Zg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.TypeHierarchyFeature=void 0;var Ic=ee(),Yg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ic.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Ic.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Ic.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Vr.TypeHierarchyFeature=Yg});var mf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.InlineValueFeature=void 0;var ff=ee(),Jg=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(ff.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(ff.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Kr.InlineValueFeature=Jg});var gf=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.FoldingRangeFeature=void 0;var hf=ee(),ep=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(hf.FoldingRangeRefreshRequest.type),on:t=>{let n=hf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Xr.FoldingRangeFeature=ep});var pf=S(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.InlayHintFeature=void 0;var Dc=ee(),tp=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Dc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Dc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Dc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Zr.InlayHintFeature=tp});var yf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.DiagnosticFeature=void 0;var Ln=ee(),np=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Ln.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Ln.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ln.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Ln.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ln.WorkspaceDiagnosticRequest.partialResult,n)))}}};Yr.DiagnosticFeature=np});var kc=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocuments=void 0;var qt=ee(),wc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new qt.Emitter,this._onDidOpen=new qt.Emitter,this._onDidClose=new qt.Emitter,this._onDidSave=new qt.Emitter,this._onWillSave=new qt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=qt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),qt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Jr.TextDocuments=wc});var Rc=S(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.NotebookDocuments=gn.NotebookSyncFeature=void 0;var Ee=ee(),Tf=kc(),rp=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Ee.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Ee.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Ee.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Ee.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};gn.NotebookSyncFeature=rp;var Pc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Ee.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Ee.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Ee.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Oc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof Tf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Tf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Ee.Emitter,this._onDidChange=new Ee.Emitter,this._onDidSave=new Ee.Emitter,this._onDidClose=new Ee.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Pc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,p=o.change;p.metadata!==void 0&&(a=!0,i.metadata=p.metadata);let m=[],h=[],C=[],l=[];if(p.cells!==void 0){let R=p.cells;if(R.structure!==void 0){let g=R.structure.array;if(i.cells.splice(g.start,g.deleteCount,...g.cells!==void 0?g.cells:[]),R.structure.didOpen!==void 0)for(let d of R.structure.didOpen)await n.openTextDocument({textDocument:d}),m.push(d.uri);if(R.structure.didClose)for(let d of R.structure.didClose)await n.closeTextDocument({textDocument:d}),h.push(d.uri)}if(R.data!==void 0){let g=new Map(R.data.map(d=>[d.document,d]));for(let d=0;d<=i.cells.length;d++){let I=g.get(i.cells[d].document);if(I!==void 0){let A=i.cells.splice(d,1,I);if(C.push({old:A[0],new:I}),g.delete(I.document),g.size===0)break}}}if(R.textContent!==void 0)for(let g of R.textContent)await n.changeTextDocument({textDocument:g.document,contentChanges:g.changes}),l.push(g.document.uri)}this.updateCellMap(i);let b={notebookDocument:i};a&&(b.metadata={old:s,new:i.metadata});let P=[];for(let R of m)P.push(this.getNotebookCell(R));let E=[];for(let R of h)E.push(this.getNotebookCell(R));let G=[];for(let R of l)G.push(this.getNotebookCell(R));(P.length>0||E.length>0||C.length>0||G.length>0)&&(b.cells={added:P,removed:E,changed:{data:C,textContent:G}}),(b.metadata!==void 0||b.cells!==void 0)&&this._onDidChange.fire(b)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Ee.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};gn.NotebookDocuments=Oc});var _f=S(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.MonikerFeature=void 0;var op=ee(),ip=e=>class extends e{get moniker(){return{on:t=>{let n=op.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};eo.MonikerFeature=ip});var bf=S(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.InlineCompletionFeature=void 0;var sp=ee(),cp=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(sp.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};to.InlineCompletionFeature=cp});var vf=S(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.TextDocumentContentFeature=void 0;var Cf=ee(),ap=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Cf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Cf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};no.TextDocumentContentFeature=ap});var Nc=S(U=>{"use strict";var up=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lp=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Of=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Ec;var ro=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Ac=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}},Sf=(0,gp.ShowDocumentFeature)((0,M.ProgressFeature)(Ac)),If;(function(e){function t(){return new oo}e.create=t})(If||(U.BulkRegistration=If={}));var oo=class{_registrations=[];_registered=new Set;add(t,n){let r=Ae.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Mc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Df;(function(e){function t(){return new Wn(void 0,[])}e.create=t})(Df||(U.BulkUnregistration=Df={}));var Wn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ae.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},io=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof oo?this.registerMany(t):t instanceof Wn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ae.string(n)?n:n.method,i=Mc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Ae.string(t)?t:t.method,o=Mc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Wn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},qc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},wf=(0,wp.TextDocumentContentFeature)((0,pp.FileOperationsFeature)((0,fp.WorkspaceFoldersFeature)((0,dp.ConfigurationFeature)(qc)))),so=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},co=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},ao=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=ao;var kf=(0,Dp.InlineCompletionFeature)((0,bp.FoldingRangeFeature)((0,Ip.MonikerFeature)((0,vp.DiagnosticFeature)((0,Cp.InlayHintFeature)((0,_p.InlineValueFeature)((0,Tp.TypeHierarchyFeature)((0,yp.LinkedEditingRangeFeature)((0,hp.SemanticTokensFeature)((0,mp.CallHierarchyFeature)(ao)))))))))),uo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=uo;var Pf=(0,Sp.NotebookSyncFeature)(uo);function Rf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function Mf(e,t){return function(n){return t(e(n))}}function Ef(e,t){return function(n){return t(e(n))}}function Af(e,t){return function(n){return t(e(n))}}function qf(e,t){return function(n){return t(e(n))}}function Nf(e,t){return function(n){return t(e(n))}}function Gf(e,t){return function(n){return t(e(n))}}function kp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Rf),tracer:n(e.tracer,t.tracer,Mf),telemetry:n(e.telemetry,t.telemetry,xf),client:n(e.client,t.client,Ef),window:n(e.window,t.window,Af),workspace:n(e.workspace,t.workspace,qf),languages:n(e.languages,t.languages,Nf),notebooks:n(e.notebooks,t.notebooks,Gf)}}function Pp(e,t,n){let r=n&&n.console?new(n.console(ro)):new ro,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(so)):new so,s=n&&n.telemetry?new(n.telemetry(co)):new co,a=n&&n.client?new(n.client(io)):new io,p=n&&n.window?new(n.window(Sf)):new Sf,m=n&&n.workspace?new(n.workspace(wf)):new wf,h=n&&n.languages?new(n.languages(kf)):new kf,C=n&&n.notebooks?new(n.notebooks(Pf)):new Pf,l=[r,i,s,a,p,m,h,C];function b(g){return g instanceof Promise?g:Ae.thenable(g)?new Promise((d,I)=>{g.then(A=>d(A),A=>I(A))}):Promise.resolve(g)}let P,E,G,R={listen:()=>o.listen(),sendRequest:(g,...d)=>o.sendRequest(Ae.string(g)?g:g.method,...d),onRequest:(g,d)=>o.onRequest(g,d),sendNotification:(g,d)=>{let I=Ae.string(g)?g:g.method;return o.sendNotification(I,d)},onNotification:(g,d)=>o.onNotification(g,d),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:g=>(E=g,{dispose:()=>{E=void 0}}),onInitialized:g=>o.onNotification(D.InitializedNotification.type,g),onShutdown:g=>(P=g,{dispose:()=>{P=void 0}}),onExit:g=>(G=g,{dispose:()=>{G=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return p},get workspace(){return m},get languages(){return h},get notebooks(){return C},onDidChangeConfiguration:g=>o.onNotification(D.DidChangeConfigurationNotification.type,g),onDidChangeWatchedFiles:g=>o.onNotification(D.DidChangeWatchedFilesNotification.type,g),__textDocumentSync:void 0,onDidOpenTextDocument:g=>o.onNotification(D.DidOpenTextDocumentNotification.type,g),onDidChangeTextDocument:g=>o.onNotification(D.DidChangeTextDocumentNotification.type,g),onDidCloseTextDocument:g=>o.onNotification(D.DidCloseTextDocumentNotification.type,g),onWillSaveTextDocument:g=>o.onNotification(D.WillSaveTextDocumentNotification.type,g),onWillSaveTextDocumentWaitUntil:g=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,g),onDidSaveTextDocument:g=>o.onNotification(D.DidSaveTextDocumentNotification.type,g),sendDiagnostics:g=>o.sendNotification(D.PublishDiagnosticsNotification.type,g),onHover:g=>o.onRequest(D.HoverRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onCompletion:g=>o.onRequest(D.CompletionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onCompletionResolve:g=>o.onRequest(D.CompletionResolveRequest.type,g),onSignatureHelp:g=>o.onRequest(D.SignatureHelpRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onDeclaration:g=>o.onRequest(D.DeclarationRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDefinition:g=>o.onRequest(D.DefinitionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onTypeDefinition:g=>o.onRequest(D.TypeDefinitionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onImplementation:g=>o.onRequest(D.ImplementationRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onReferences:g=>o.onRequest(D.ReferencesRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDocumentHighlight:g=>o.onRequest(D.DocumentHighlightRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDocumentSymbol:g=>o.onRequest(D.DocumentSymbolRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onWorkspaceSymbol:g=>o.onRequest(D.WorkspaceSymbolRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onWorkspaceSymbolResolve:g=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,g),onCodeAction:g=>o.onRequest(D.CodeActionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onCodeActionResolve:g=>o.onRequest(D.CodeActionResolveRequest.type,(d,I)=>g(d,I)),onCodeLens:g=>o.onRequest(D.CodeLensRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onCodeLensResolve:g=>o.onRequest(D.CodeLensResolveRequest.type,(d,I)=>g(d,I)),onDocumentFormatting:g=>o.onRequest(D.DocumentFormattingRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onDocumentRangeFormatting:g=>o.onRequest(D.DocumentRangeFormattingRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onDocumentOnTypeFormatting:g=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(d,I)=>g(d,I)),onRenameRequest:g=>o.onRequest(D.RenameRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onPrepareRename:g=>o.onRequest(D.PrepareRenameRequest.type,(d,I)=>g(d,I)),onDocumentLinks:g=>o.onRequest(D.DocumentLinkRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDocumentLinkResolve:g=>o.onRequest(D.DocumentLinkResolveRequest.type,(d,I)=>g(d,I)),onDocumentColor:g=>o.onRequest(D.DocumentColorRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onColorPresentation:g=>o.onRequest(D.ColorPresentationRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onFoldingRanges:g=>o.onRequest(D.FoldingRangeRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onSelectionRanges:g=>o.onRequest(D.SelectionRangeRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onExecuteCommand:g=>o.onRequest(D.ExecuteCommandRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),dispose:()=>o.dispose()};for(let g of l)g.attach(R);return o.onRequest(D.InitializeRequest.type,g=>{t.initialize(g),Ae.string(g.trace)&&(i.trace=D.Trace.fromString(g.trace));for(let d of l)d.initialize(g.capabilities);if(E){let d=E(g,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,g),void 0);return b(d).then(I=>{if(I instanceof D.ResponseError)return I;let A=I;A||(A={capabilities:{}});let q=A.capabilities;q||(q={},A.capabilities=q),q.textDocumentSync===void 0||q.textDocumentSync===null?q.textDocumentSync=Ae.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None:!Ae.number(q.textDocumentSync)&&!Ae.number(q.textDocumentSync.change)&&(q.textDocumentSync.change=Ae.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of l)B.fillServerCapabilities(q);return A})}else{let d={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of l)I.fillServerCapabilities(d.capabilities);return d}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,P)return P(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(G)return G()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,g=>{i.trace=D.Trace.fromString(g.value)}),R}});var Hf=S(Ce=>{"use strict";var Op=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Rp=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lc=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Le.normalize(n.join("/"))}function Hc(){return process.platform==="win32"}function lo(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let p=process.env,m=Object.create(null);Object.keys(p).forEach(h=>m[h]=p[h]),t&&Gc.existsSync(t)&&(m[o]?m[o]=t+Le.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let h=(0,Wc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(h.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}h.on("error",l=>{a(l)}),h.on("message",l=>{l.c==="r"&&(h.send({c:"e"}),l.s?s(l.r):a(new Error(`Failed to resolve module: ${e}`)))});let C={c:"rs",a:e};h.send(C)}catch(h){a(h)}})}function Fc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Hc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Wc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Hc()?Le.join(s,"node_modules"):Le.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Ep(e){let t="yarn",n={encoding:"utf8"};Hc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Wc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let p=JSON.parse(a);if(p.type==="log")return Le.join(p.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var jc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Gc.existsSync(__filename.toUpperCase())||!Gc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Le.normalize(i).indexOf(Le.normalize(o))===0:Le.normalize(i).toLowerCase().indexOf(Le.normalize(o).toLowerCase())===0}e.isParent=r})(jc||(Ce.FileSystem=jc={}));function Ap(e,t,n,r){return n?(Le.isAbsolute(n)||(n=Le.join(e,n)),lo(t,n,n,r).then(o=>jc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>lo(t,Fc(r),e,r))):lo(t,Fc(r),e,r)}});var Lf=S(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var Ff=require("util"),it=et(),Uc=class e extends it.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Ff.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Bc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),it.Disposable.create(()=>this.stream.off("data",t))}},Qc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},jf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Uc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Ff.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Bc(e),asWritableStream:e=>new Qc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function $c(){return jf}(function(e){function t(){it.RAL.install(jf)}e.install=t})($c||($c={}));zc.default=$c});var Jc=S(N=>{"use strict";var Uf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Re.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Vc;var Kc=class extends Re.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Kc;var Xc=class extends Re.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Re.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=Xc;var Zc=class extends Re.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=Zc;var Nt=class extends Re.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Un.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=Nt;var Gt=class extends Re.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Un.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Gt;var fo=class extends Re.ReadableStreamMessageReader{constructor(t,n){super((0,Un.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=fo;var mo=class extends Re.WriteableStreamMessageWriter{constructor(t,n){super((0,Un.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=mo;var Lp=process.env.XDG_RUNTIME_DIR,Wp=new Map([["linux",107],["darwin",102]]);function Up(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Wf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=jp.realpathSync(Lp??Fp.tmpdir()),r=Wp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Wf.randomBytes)(Math.floor(e/2)).toString("hex");return Hp.join(n,`lsp-${o}.sock`)}function Bp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ho.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Qp(e,t="utf-8"){let n=(0,ho.createConnection)(e);return[new Nt(n,t),new Gt(n,t)]}function $p(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ho.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function zp(e,t="utf-8"){let n=(0,ho.createConnection)(e,"127.0.0.1");return[new Nt(n,t),new Gt(n,t)]}function Vp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Kp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Xp(e,t,n,r){n||(n=Re.NullLogger);let o=Vp(e)?new fo(e):e,i=Kp(t)?new mo(t):t;return Re.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Re.createMessageConnection)(o,i,n,r)}});var ea=S(st=>{"use strict";var Zp=st&&st.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Bf=st&&st.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Zp(t,e,n)};Object.defineProperty(st,"__esModule",{value:!0});st.createProtocolConnection=Jp;var Yp=Jc();Bf(Jc(),st);Bf(ee(),st);function Jp(e,t,n,r){return(0,Yp.createMessageConnection)(e,t,n,r)}});var ta=S(ge=>{"use strict";var ey=ge&&ge.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$f=ge&&ge.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ey(t,e,n)};Object.defineProperty(ge,"__esModule",{value:!0});ge.ProposedFeatures=ge.NotebookDocuments=ge.TextDocuments=ge.SemanticTokensBuilder=void 0;var ty=Sc();Object.defineProperty(ge,"SemanticTokensBuilder",{enumerable:!0,get:function(){return ty.SemanticTokensBuilder}});$f(ee(),ge);var ny=kc();Object.defineProperty(ge,"TextDocuments",{enumerable:!0,get:function(){return ny.TextDocuments}});var ry=Rc();Object.defineProperty(ge,"NotebookDocuments",{enumerable:!0,get:function(){return ry.NotebookDocuments}});$f(Nc(),ge);var Qf;(function(e){e.all={__brand:"features"}})(Qf||(ge.ProposedFeatures=Qf={}))});var ra=S(ve=>{"use strict";var Xf=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oy=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Zf=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{go(),process.exit(pn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;na.number(t)&&Jf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(pn?0:1)}},3e3)},get shutdownReceived(){return pn},set shutdownReceived(e){pn=e},exit:e=>{go(),process.exit(e)}};function ay(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),Ht.ConnectionStrategy.is(e)||Ht.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),uy(i,s,a,o)}function uy(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,p,m=process.argv.slice(2);for(let h=0;h{go(),process.exit(pn?0:1)}),a.on("close",()=>{go(),process.exit(pn?0:1)})}let s=a=>{let p=(0,Ht.createProtocolConnection)(e,t,a,n);return o&&ly(a),p};return(0,iy.createConnection)(s,cy,r)}function ly(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,zf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,zf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var rm={};Ga(rm,{TextDocument:()=>oa});function ia(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ia(r,t),ia(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function dy(e){let t=nm(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var po,oa,om=Na(()=>{"use strict";po=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=nm(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),p=Math.max(o.end.line,0),m=this._lineOffsets,h=em(r.text,!1,i);if(p-a===h.length)for(let l=0,b=h.length;lt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&tm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new po(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof po)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ia(i.map(dy),(h,C)=>{let l=h.range.start.line-C.range.start.line;return l===0?h.range.start.character-C.range.start.character:l}),p=0,m=[];for(let h of a){let C=o.offsetAt(h.range.start);if(Cp&&m.push(s.substring(p,C)),h.newText.length&&m.push(h.newText),p=o.offsetAt(h.range.end)}return m.push(s.substr(p)),m.join("")}e.applyEdits=r})(oa||(oa={}))});var Qn=S(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.DATATYPE_SET=pe.KEYWORD_SET=pe.PUNCTUATION=pe.OPERATORS=pe.DATATYPES=pe.KEYWORDS=void 0;pe.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];pe.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];pe.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];pe.PUNCTUATION=["(",")","[","]",";",",",":","."];pe.KEYWORD_SET=new Set(pe.KEYWORDS);pe.DATATYPE_SET=new Set(pe.DATATYPES)});var It=S(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.TokenKind=void 0;var im;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(im||(yo.TokenKind=im={}))});var zn=S(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.tokenize=my;var _o=Qn(),ke=It();function sm(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function $n(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function To(e){return e!==void 0&&/[0-9]/.test(e)}function fy(e){let t=e.toUpperCase();return _o.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:_o.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function my(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n{let _=n,h=i();s(d),t.push({kind:m,lexeme:e.slice(_,d),span:{start:_,end:d},range:{start:h,end:i()}})};for(;n{let C=n,l=i();s(h),t.push({kind:m,lexeme:e.slice(C,h),span:{start:C,end:h},range:{start:l,end:i()}})};for(;ne.startsWith(h,n));if(d!==void 0){a(ke.TokenKind.Operator,n+d.length);continue}if(po.PUNCTUATION.includes(m)){a(ke.TokenKind.Punctuation,n+1);continue}let _=e.codePointAt(n);a(ke.TokenKind.Unknown,n+(_!==void 0&&_>65535?2:1))}let y=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:y,end:{...y}}}),t}});var To=S(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.positionAt=oa;Qn.offsetAt=ay;Qn.sourceRange=uy;function ra(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function nm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function rm(e){let t=[0];for(let n=0;ne.startsWith(l,n));if(h!==void 0){a(ke.TokenKind.Operator,n+h.length);continue}if(_o.PUNCTUATION.includes(m)){a(ke.TokenKind.Punctuation,n+1);continue}let C=e.codePointAt(n);a(ke.TokenKind.Unknown,n+(C!==void 0&&C>65535?2:1))}let p=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:p,end:{...p}}}),t}});var bo=S(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.positionAt=aa;Vn.offsetAt=gy;Vn.sourceRange=py;function ca(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function cm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function am(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function oa(e,t){ra(e,t);let n=rm(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=cy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function uy(e,t){if(ra(e,t.start),ra(e,t.end),t.end{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.parseQuickScript=Cy;var ly=Un(),_o=To(),te=qt(),dy=yo(),om=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),im=new Set(["+","-","NOT","!","~"]),fy=new Set(["TRUE","FALSE","NULL","EOF"]),my=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),hy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function gy(e){return e.kind===te.TokenKind.Whitespace||e.kind===te.TokenKind.Newline||e.kind===te.TokenKind.Comment||e.kind===te.TokenKind.EOF}function St(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function ve(e){return e?.kind===te.TokenKind.Keyword?St(e):void 0}function sm(e,t,n=t){return(0,_o.sourceRange)(e,{start:t.span.start,end:n.span.end})}function py(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,_o.sourceRange)(e,{start:n,end:n}).range}function pe(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:py(e,r)}}function yy(e,t){return e.filter(n=>n.range.start.line===t&&!gy(n))}function cm(e,t){return e.some(n=>n.kind===te.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function am(e){return e===void 0?void 0:e.kind===te.TokenKind.Keyword?St(e):e.lexeme}var ia=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;im.has(am(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(St(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===te.TokenKind.Identifier||t.kind===te.TokenKind.Number||t.kind===te.TokenKind.String||this.isCallableKeyword(t)||fy.has(St(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===te.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===te.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===te.TokenKind.Keyword&&!my.has(St(t)??"")&&!om.has(St(t)??"")&&!im.has(St(t)??"")}};function Ty(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):pe(n.code,n.message,n.token)}function Ae(e,t,n){let r=new ia(t).parse();return r===void 0?!0:(n.push(Ty(e,t,r)),!1)}var sa=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(pe("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ae(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(pe("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==te.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):pe("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):pe("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ae(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&Ae(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&o_.lexeme==="=")&&r.some(_=>ve(_)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:d})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[te.TokenKind.Identifier,te.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ae(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==te.TokenKind.Identifier&&t[0].kind!==te.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function _y(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function by(e,t){let n=_y(e,t);if(n>t)return n;let r=e[t],o=ve(r[0])==="IF",i=ve(r[0])==="ELSE"&&ve(r[1])==="IF";if(!o&&!i||r.some(m=>ve(m)==="THEN"))return t;let s=o&&r.length===1,a=["AND","OR","NOT"].includes(ve(r[r.length-1])??""),y=["AND","OR"].includes(ve(e[t+1]?.[0])??"");if(!s&&!a&&!y)return t;for(let m=t+1;mve(d)==="THEN"))return m;return t}function Cy(e){let t=(0,dy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(h,C)=>yy(t,C)),o=[],i=[],s=[],a=new Array(n),y=[],m=[];for(let h=0;hC.kind==="dim"&&C.datatype!==void 0))if(!ly.DATATYPE_SET.has(h.datatype.toUpperCase())){let C=h.datatypeRange??h.range,O=`${C.start.line}:${C.start.character}`;if(d.has(O))continue;d.add(O),s.push({code:"unknown-datatype",message:`Unknown datatype '${h.datatype}'.`,severity:"error",range:C})}let _=(0,_o.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,..._}}});var hm=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.formatQuickScriptLexically=fm;zn.formatQuickScriptStructure=mm;zn.formatQuickScript=Ry;var j=qt(),la=yo(),vy=bo();function um(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function ua(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function dm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function aa(e){$n(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function Sy(e,t){if(e[t].lexeme!=="-"||dm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=ua(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function Iy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function fm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,la.tokenize)(r);if(o.some(m=>m.kind===j.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===j.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||ye(_,t.regionBlockCodeBegin??"{region"))&&(a=!0),C!==void 0&&(C.kind===j.TokenKind.Identifier||C.kind===j.TokenKind.Keyword||C.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(d.lexeme)}let y=Iy(i.join(""),n);return{text:y,changed:y!==e}}function Dy(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function wy(e){let t=(0,la.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function ye(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function ky(e,t){return ye(e,t.blockCodeBegin??"{>")||ye(e,t.blockCodeEnd??"{<")||ye(e,t.blockCodeExclude??"{#")||ye(e,t.regionBlockCodeBegin??"{region")||ye(e,t.regionBlockCodeEnd??"{endregion")||ye(e,t.regionBlockCodeExclude??"{#")}function Py(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function Oy(e,t){let n=new Map;for(let r of(0,la.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` -`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:ky(s,t),contentIndent:Py(r.lexeme)})}return n}function lm(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function mm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,vy.parseQuickScript)(r),i=r.split(n),s=Oy(r,t),a=[],y=Dy(t),m=0,d=0,_,h=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let O=0;O")||ye(R,t.regionBlockCodeBegin??"{region"))&&A?.directive!==!0&&(m+=1)}let C=a.join(n);return{text:C,changed:C!==e,diagnostics:o.diagnostics}}function Ry(e,t={}){let n=fm(e,t),r=mm(n.text,t);return{...r,changed:r.text!==e}}});var vo=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.KNOWN_FUNCTIONS=void 0;Co.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Tm=S(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.completions=My;Vn.hoverAt=Ey;Vn.documentSymbols=Ay;var ym=vo(),gm=Un(),pm=qt();function xy(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of gm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of gm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of ym.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function Ey(e,t){let n=e.document.tokens.find(i=>xy(i.range,t));if(n===void 0)return;if(n.kind===pm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===pm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=ym.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function Ay(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var vm=S(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.quickFunctionNames=Cm;hn.analyzeQuickScript=Fy;hn.definitionAt=jy;hn.referencesAt=Ly;var qy=bo(),Ny=vo(),_m=To(),Nt=qt();function bm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Nt.TokenKind.Whitespace,Nt.TokenKind.Newline,Nt.TokenKind.Comment].includes(e[n].kind))return e[n]}function Hy(e,t){for(let n=t+1;nd.name.toUpperCase()));for(let d of Cm(e))s.add(d.toUpperCase());for(let d of t.knownFunctionNames??[])s.add(d.toUpperCase());for(let d of n.statements.filter(_=>_.kind==="dim"&&_.name!==void 0&&_.nameRange!==void 0)){let _=d.name.toUpperCase();if(i.get(_)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${d.name}' is already declared.`,severity:"error",range:d.nameRange});continue}let C={id:o.length,name:d.name,kind:"variable",range:d.range,selectionRange:d.nameRange,datatype:d.datatype,scopeId:0};o.push(C),i.set(_,C)}let a=new Map;for(let d of o)a.set((0,_m.offsetAt)(e,d.selectionRange.start),d);let y=new Set;for(let d of n.statements.filter(_=>_.kind==="call"&&_.name!==void 0&&_.nameRange!==void 0))y.add((0,_m.offsetAt)(e,d.nameRange.start));let m=[];for(let d=0;d")continue;let O=i.get(_.lexeme.toUpperCase()),q=Hy(n.tokens,d),G=y.has(_.span.start)||q?.lexeme==="(";if(G&&!s.has(_.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${_.lexeme}'.`,severity:"warning",range:_.range}),O!==void 0||G){let R=G?"call":q?.lexeme==="="?"write":"read";m.push({name:_.lexeme,kind:R,range:_.range,declarationId:O?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(d=>d.id)}],symbols:o,references:m,diagnostics:r}}function jy(e,t){let n=e.references.find(r=>bm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function Ly(e,t,n=!0){let r=e.references.find(o=>bm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var da=S(Se=>{"use strict";var Wy=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),st=Se&&Se.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Wy(t,e,n)};Object.defineProperty(Se,"__esModule",{value:!0});st(Un(),Se);st(hm(),Se);st(vo(),Se);st(Tm(),Se);st(bo(),Se);st(vm(),Se);st(To(),Se);st(qt(),Se);st(yo(),Se)});var Sm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=Uy;Xe.diagnosticsFor=Qy;Xe.formattingEdits=$y;Xe.symbolsFor=zy;Xe.definitionFor=Vy;Xe.referencesFor=Xy;Xe.completionsFor=Ky;Xe.hoverFor=Zy;var Te=Jc(),qe=da();function Uy(){return{capabilities:{textDocumentSync:Te.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function By(e){switch(e){case"keyword":return Te.CompletionItemKind.Keyword;case"datatype":return Te.CompletionItemKind.TypeParameter;case"variable":return Te.CompletionItemKind.Variable;case"call-target":return Te.CompletionItemKind.Method;default:return Te.CompletionItemKind.Function}}function Qy(e,t){return(0,qe.analyzeQuickScript)(e.getText(),{knownFunctionNames:t}).diagnostics.map(n=>({code:n.code,message:n.message,range:n.range,severity:n.severity==="error"?Te.DiagnosticSeverity.Error:Te.DiagnosticSeverity.Warning,source:"intouch-language"}))}function $y(e,t){let n=(0,qe.formatQuickScript)(e.getText(),t);return n.changed?[Te.TextEdit.replace(Te.Range.create(Te.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function zy(e){let t=n=>Te.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?Te.SymbolKind.Variable:Te.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,qe.documentSymbols)((0,qe.analyzeQuickScript)(e.getText())).map(t)}function Vy(e,t){let n=(0,qe.definitionAt)((0,qe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:Te.Location.create(e.uri,n)}function Xy(e,t,n){return(0,qe.referencesAt)((0,qe.analyzeQuickScript)(e.getText()),t,n).map(r=>Te.Location.create(e.uri,r))}function Ky(e){return(0,qe.completions)((0,qe.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:By(t.kind),detail:t.detail}))}function Zy(e,t){let n=(0,qe.hoverAt)((0,qe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** +`)&&t.push(n+1);return t}function hy(e,t,n){if(n+1>=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function aa(e,t){ca(e,t);let n=am(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=hy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function py(e,t){if(ca(e,t.start),ca(e,t.end),t.end{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.parseQuickScript=Py;var yy=Qn(),Co=bo(),te=It(),Ty=zn(),um=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),lm=new Set(["+","-","NOT","!","~"]),_y=new Set(["TRUE","FALSE","NULL","EOF"]),by=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),Cy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function vy(e){return e.kind===te.TokenKind.Whitespace||e.kind===te.TokenKind.Newline||e.kind===te.TokenKind.Comment||e.kind===te.TokenKind.EOF}function Dt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function Se(e){return e?.kind===te.TokenKind.Keyword?Dt(e):void 0}function dm(e,t,n=t){return(0,Co.sourceRange)(e,{start:t.span.start,end:n.span.end})}function Sy(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,Co.sourceRange)(e,{start:n,end:n}).range}function ye(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:Sy(e,r)}}function Iy(e,t){return e.filter(n=>n.range.start.line===t&&!vy(n))}function fm(e,t){return e.some(n=>n.kind===te.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function mm(e){return e===void 0?void 0:e.kind===te.TokenKind.Keyword?Dt(e):e.lexeme}var ua=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;lm.has(mm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(Dt(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===te.TokenKind.Identifier||t.kind===te.TokenKind.Number||t.kind===te.TokenKind.String||this.isCallableKeyword(t)||_y.has(Dt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===te.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===te.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===te.TokenKind.Keyword&&!by.has(Dt(t)??"")&&!um.has(Dt(t)??"")&&!lm.has(Dt(t)??"")}};function Dy(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):ye(n.code,n.message,n.token)}function qe(e,t,n){let r=new ua(t).parse();return r===void 0?!0:(n.push(Dy(e,t,r)),!1)}var la=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(ye("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else qe(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(ye("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(ye("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==te.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):ye("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):ye("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{qe(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&qe(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&oC.lexeme==="=")&&r.some(C=>Se(C)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:h})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[te.TokenKind.Identifier,te.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!qe(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==te.TokenKind.Identifier&&t[0].kind!==te.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function wy(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function ky(e,t){let n=wy(e,t);if(n>t)return n;let r=e[t],o=Se(r[0])==="IF",i=Se(r[0])==="ELSE"&&Se(r[1])==="IF";if(!o&&!i||r.some(m=>Se(m)==="THEN"))return t;let s=o&&r.length===1,a=["AND","OR","NOT"].includes(Se(r[r.length-1])??""),p=["AND","OR"].includes(Se(e[t+1]?.[0])??"");if(!s&&!a&&!p)return t;for(let m=t+1;mSe(h)==="THEN"))return m;return t}function Py(e){let t=(0,Ty.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(l,b)=>Iy(t,b)),o=[],i=[],s=[],a=new Array(n),p=[],m=[];for(let l=0;lb.kind==="dim"&&b.datatype!==void 0))if(!yy.DATATYPE_SET.has(l.datatype.toUpperCase())){let b=l.datatypeRange??l.range,P=`${b.start.line}:${b.start.character}`;if(h.has(P))continue;h.add(P),s.push({code:"unknown-datatype",message:`Unknown datatype '${l.datatype}'.`,severity:"error",range:b})}let C=(0,Co.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,...C}}});var _m=S(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.formatQuickScriptLexically=ym;Xn.formatQuickScriptStructure=Tm;Xn.formatQuickScript=Gy;var j=It(),ha=zn(),Oy=vo();function hm(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function ma(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function pm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function fa(e){Kn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function Ry(e,t){if(e[t].lexeme!=="-"||pm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=ma(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function xy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function ym(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ha.tokenize)(r);if(o.some(m=>m.kind===j.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===j.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||Te(C,t.regionBlockCodeBegin??"{region"))&&(a=!0),b!==void 0&&(b.kind===j.TokenKind.Identifier||b.kind===j.TokenKind.Keyword||b.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(h.lexeme)}let p=xy(i.join(""),n);return{text:p,changed:p!==e}}function My(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function Ey(e){let t=(0,ha.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function Te(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function Ay(e,t){return Te(e,t.blockCodeBegin??"{>")||Te(e,t.blockCodeEnd??"{<")||Te(e,t.blockCodeExclude??"{#")||Te(e,t.regionBlockCodeBegin??"{region")||Te(e,t.regionBlockCodeEnd??"{endregion")||Te(e,t.regionBlockCodeExclude??"{#")}function qy(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function Ny(e,t){let n=new Map;for(let r of(0,ha.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` +`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:Ay(s,t),contentIndent:qy(r.lexeme)})}return n}function gm(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function Tm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Oy.parseQuickScript)(r),i=r.split(n),s=Ny(r,t),a=[],p=My(t),m=0,h=0,C,l=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let P=0;P")||Te(R,t.regionBlockCodeBegin??"{region"))&&q?.directive!==!0&&(m+=1)}let b=a.join(n);return{text:b,changed:b!==e,diagnostics:o.diagnostics}}function Gy(e,t={}){let n=ym(e,t),r=Tm(n.text,t);return{...r,changed:r.text!==e}}});var Io=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.KNOWN_FUNCTIONS=void 0;So.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Sm=S(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.completions=Fy;Zn.hoverAt=jy;Zn.documentSymbols=Ly;var vm=Io(),bm=Qn(),Cm=It();function Hy(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of bm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of bm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of vm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function jy(e,t){let n=e.document.tokens.find(i=>Hy(i.range,t));if(n===void 0)return;if(n.kind===Cm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Cm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=vm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function Ly(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var Im=S(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.QUALITY_DIAGNOSTIC_CODES=void 0;wt.qualityDiagnostics=Vy;var yn=It();wt.QUALITY_DIAGNOSTIC_CODES={nonAsciiIdentifier:"quickscript.naming.nonAsciiIdentifier",windowWhitespace:"quickscript.naming.windowWhitespace",windowNonAscii:"quickscript.naming.windowNonAscii"};var Wy=/^[A-Za-z0-9_$#-]+$/,Uy=new Set(["HIDE","SHOW"]),By=new Set(["HIDE","INFOAPPSTATUS","INFOAPPTITLEEXPAND","MOVEWINDOW","PRINTWINDOW","SHOW","SHOWAT","SHOWTOPLEFTAT","WINDOWSTATE"]);function Qy(e){return e.document.tokens.filter(t=>![yn.TokenKind.Whitespace,yn.TokenKind.Newline,yn.TokenKind.Comment,yn.TokenKind.EOF].includes(t.kind))}function $y(e){return e.lexeme.startsWith('"')&&e.lexeme.endsWith('"')?e.lexeme.slice(1,-1):e.lexeme.slice(1)}function zy(e){let t=Qy(e),n=[];for(let r=0;r")){if(Uy.has(o)&&t[r+1]?.kind===yn.TokenKind.String){n.push(t[r+1]);continue}By.has(o)&&t[r+1]?.lexeme==="("&&t[r+2]?.kind===yn.TokenKind.String&&n.push(t[r+2])}}return n}function ga(e,t,n,r){if(n!=="off")return{code:e,message:t,severity:n,range:r.range,source:"intouch-quality"}}function Vy(e,t={}){let n=[],r=new Set,o=t.nonAsciiIdentifiers??"warning";for(let i of e.identifiers){let s=i.name.toUpperCase();if(Wy.test(i.name)||r.has(s))continue;r.add(s);let a=ga(wt.QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier,`Avoid non-ASCII characters in identifier '${i.name}'.`,o,i);a!==void 0&&n.push(a)}for(let i of zy(e)){let s=$y(i);if(/\s/u.test(s)){let a=ga(wt.QUALITY_DIAGNOSTIC_CODES.windowWhitespace,"Avoid whitespace in window names.",t.windowWhitespace??"warning",i);a!==void 0&&n.push(a)}if(/[^\x00-\x7f]/u.test(s)){let a=ga(wt.QUALITY_DIAGNOSTIC_CODES.windowNonAscii,"Avoid non-ASCII characters in window names.",t.windowNonAscii??"warning",i);a!==void 0&&n.push(a)}}return n}});var Om=S(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.quickFunctionDeclarations=Pm;Ft.quickFunctionNames=eT;Ft.analyzeQuickScript=tT;Ft.definitionAt=nT;Ft.referencesAt=rT;var Ky=vo(),Xy=Io(),Do=bo(),kt=It(),Zy=zn();function wm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![kt.TokenKind.Whitespace,kt.TokenKind.Newline,kt.TokenKind.Comment].includes(e[n].kind))return e[n]}function Jy(e,t){for(let n=t+1;ns.kind===kt.TokenKind.Comment))for(let s of i.lexeme.matchAll(r)){let a=s[1],p=s.index??0,m=p+s[0].lastIndexOf(a),h=(0,Do.sourceRange)(e,{start:i.span.start+m,end:i.span.start+m+a.length}).range,C=[],l=i.lexeme.slice(p).match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu);if(l!==null){let b=p+(l.index??0)+l[0].indexOf(l[1]);for(let P of l[1].matchAll(o)){let E=P[1],G=b+(P.index??0)+P[0].lastIndexOf(E);C.push({name:E,kind:"parameter",range:(0,Do.sourceRange)(e,{start:i.span.start+G,end:i.span.start+G+E.length}).range})}}n.push({name:a,nameRange:h,parameters:C})}return n}function Pm(e){return km(e,(0,Zy.tokenize)(e))}function eT(e){let t=new Map;for(let n of Pm(e))t.set(n.name.toUpperCase(),n.name);return[...t.values()]}function tT(e,t={}){let n=(0,Ky.parseQuickScript)(e),r=[...n.diagnostics],o=[],i=km(e,n.tokens),s=new Map,a=new Set(Xy.KNOWN_FUNCTIONS.map(l=>l.name.toUpperCase()));for(let l of i)a.add(l.name.toUpperCase());for(let l of t.knownFunctionNames??[])a.add(l.toUpperCase());for(let l of n.statements.filter(b=>b.kind==="dim"&&b.name!==void 0&&b.nameRange!==void 0)){let b=l.name.toUpperCase();if(s.get(b)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${l.name}' is already declared.`,severity:"error",range:l.nameRange});continue}let E={id:o.length,name:l.name,kind:"variable",range:l.range,selectionRange:l.nameRange,datatype:l.datatype,scopeId:0};o.push(E),s.set(b,E)}let p=new Map;for(let l of o)p.set((0,Do.offsetAt)(e,l.selectionRange.start),l);let m=new Set;for(let l of n.statements.filter(b=>b.kind==="call"&&b.name!==void 0&&b.nameRange!==void 0))m.add((0,Do.offsetAt)(e,l.nameRange.start));let h=[],C=i.flatMap(l=>[{name:l.name,kind:"function",range:l.nameRange},...l.parameters]);for(let l of o)C.push({name:l.name,kind:"local",range:l.selectionRange});for(let l=0;l"){C.push({name:b.lexeme,kind:"member",range:b.range});continue}let G=s.get(b.lexeme.toUpperCase()),R=Jy(n.tokens,l),g=m.has(b.span.start)||R?.lexeme==="(";if(C.push({name:b.lexeme,kind:g?"function":G===void 0?"global":"local",range:b.range}),g&&!a.has(b.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${b.lexeme}'.`,severity:"warning",range:b.range}),G!==void 0||g){let d=g?"call":R?.lexeme==="="?"write":"read";h.push({name:b.lexeme,kind:d,range:b.range,declarationId:G?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(l=>l.id)}],symbols:o,references:h,identifiers:C,quickFunctions:i,diagnostics:r}}function nT(e,t){let n=e.references.find(r=>wm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function rT(e,t,n=!0){let r=e.references.find(o=>wm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var pa=S(_e=>{"use strict";var oT=_e&&_e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ke=_e&&_e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&oT(t,e,n)};Object.defineProperty(_e,"__esModule",{value:!0});Ke(Qn(),_e);Ke(_m(),_e);Ke(Io(),_e);Ke(Sm(),_e);Ke(vo(),_e);Ke(Im(),_e);Ke(Om(),_e);Ke(bo(),_e);Ke(It(),_e);Ke(zn(),_e)});var Rm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=iT;Xe.diagnosticsFor=aT;Xe.formattingEdits=uT;Xe.symbolsFor=lT;Xe.definitionFor=dT;Xe.referencesFor=fT;Xe.completionsFor=mT;Xe.hoverFor=hT;var ae=ra(),xe=pa();function iT(){return{capabilities:{textDocumentSync:ae.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function sT(e){switch(e){case"keyword":return ae.CompletionItemKind.Keyword;case"datatype":return ae.CompletionItemKind.TypeParameter;case"variable":return ae.CompletionItemKind.Variable;case"call-target":return ae.CompletionItemKind.Method;default:return ae.CompletionItemKind.Function}}function cT(e){switch(e){case"error":return ae.DiagnosticSeverity.Error;case"information":return ae.DiagnosticSeverity.Information;case"hint":return ae.DiagnosticSeverity.Hint;default:return ae.DiagnosticSeverity.Warning}}function aT(e,t,n={}){let r=(0,xe.analyzeQuickScript)(e.getText(),{knownFunctionNames:t});return[...r.diagnostics,...(0,xe.qualityDiagnostics)(r,n.qualityDiagnostics)].map(o=>({code:o.code,message:o.message,range:o.range,severity:cT(o.severity),source:o.source??"intouch-language"}))}function uT(e,t){let n=(0,xe.formatQuickScript)(e.getText(),t);return n.changed?[ae.TextEdit.replace(ae.Range.create(ae.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function lT(e){let t=n=>ae.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ae.SymbolKind.Variable:ae.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,xe.documentSymbols)((0,xe.analyzeQuickScript)(e.getText())).map(t)}function dT(e,t){let n=(0,xe.definitionAt)((0,xe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ae.Location.create(e.uri,n)}function fT(e,t,n){return(0,xe.referencesAt)((0,xe.analyzeQuickScript)(e.getText()),t,n).map(r=>ae.Location.create(e.uri,r))}function mT(e){return(0,xe.completions)((0,xe.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:sT(t.kind),detail:t.detail}))}function hT(e,t){let n=(0,xe.hoverAt)((0,xe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** -${n.detail}`},range:n.range}}});var Dm=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.readSettings=Yy;So.formattingSettings=Jy;function Gt(e){return typeof e=="object"&&e!==null?e:{}}function Im(e){return typeof e=="number"?e:void 0}function fa(e){return typeof e=="boolean"?e:void 0}function gn(e){return typeof e=="string"?e:void 0}function Yy(e){let t=Gt(e),n=t.VBI===void 0?t:Gt(t.VBI),r=Gt(n.formatter),o=Gt(r.EmptyLine),i=Gt(r.BC),s=Gt(r.Region),a=Gt(r.Misc);return{allowedNumberOfEmptyLines:Im(o.allowedNumberOfEmptyLines),removeEmptyLines:fa(o.RemoveEmptyLines),removeEmptyLinesInComments:fa(o.EmptyLinesAlsoInComment),blockCodeBegin:gn(i.BlockCodeBegin),blockCodeEnd:gn(i.BlockCodeEnd),blockCodeExclude:gn(i.BlockCodeExclude),regionBlockCodeBegin:gn(s.BlockCodeBegin),regionBlockCodeEnd:gn(s.BlockCodeEnd),regionBlockCodeExclude:gn(s.BlockCodeExclude),insertSpaces:fa(a.ReplaceTabToSpaces),indentSize:Im(a.IndentSize)}}function Jy(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var km=S(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.WorkspaceFunctionIndex=void 0;var wm=da(),ma=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,wm.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,wm.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};Io.WorkspaceFunctionIndex=ma});var eT=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),tT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),nT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ha=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,sT.fileURLToPath)(n)),xm(ha),(0,It.serverCapabilities)()));_e.onInitialized(async()=>{let e=await _e.workspace.getConfiguration({section:"VBI"});pa=(0,ga.readSettings)({VBI:e}),Do()});_e.onDidChangeConfiguration(e=>{pa=(0,ga.readSettings)(e.settings),Do()});_e.onDidChangeWatchedFiles(()=>{xm(ha)});Ue.onDidOpen(e=>{Xn.updateDocument(e.document),ya(e.document)});Ue.onDidChangeContent(e=>{Xn.updateDocument(e.document),ya(e.document)});Ue.onDidClose(e=>{Xn.removeDocument(e.document.uri),_e.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Do()});_e.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.formattingEdits)(t,(0,ga.formattingSettings)(pa,e.options))});_e.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.symbolsFor)(t)});_e.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.definitionFor)(t,e.position)});_e.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.referencesFor)(t,e.position,e.context.includeDeclaration)});_e.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,It.completionsFor)(t)});_e.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,It.hoverFor)(t,e.position)});_e.onShutdown(()=>{});Ue.listen(_e);_e.listen(); +${n.detail}`},range:n.range}}});var Mm=S(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.readSettings=gT;wo.formattingSettings=pT;function ct(e){return typeof e=="object"&&e!==null?e:{}}function xm(e){return typeof e=="number"?e:void 0}function ya(e){return typeof e=="boolean"?e:void 0}function jt(e){return typeof e=="string"?e:void 0}function Ta(e){let t=jt(e)?.toLowerCase();return t!==void 0&&["off","hint","information","warning","error"].includes(t)?t:void 0}function gT(e){let t=ct(e),n=t.VBI===void 0?t:ct(t.VBI),r=ct(n.formatter),o=ct(r.EmptyLine),i=ct(r.BC),s=ct(r.Region),a=ct(r.Misc),p=ct(n.diagnostics),m=ct(p.naming);return{allowedNumberOfEmptyLines:xm(o.allowedNumberOfEmptyLines),removeEmptyLines:ya(o.RemoveEmptyLines),removeEmptyLinesInComments:ya(o.EmptyLinesAlsoInComment),blockCodeBegin:jt(i.BlockCodeBegin),blockCodeEnd:jt(i.BlockCodeEnd),blockCodeExclude:jt(i.BlockCodeExclude),regionBlockCodeBegin:jt(s.BlockCodeBegin),regionBlockCodeEnd:jt(s.BlockCodeEnd),regionBlockCodeExclude:jt(s.BlockCodeExclude),insertSpaces:ya(a.ReplaceTabToSpaces),indentSize:xm(a.IndentSize),qualityDiagnostics:{nonAsciiIdentifiers:Ta(m.nonAsciiIdentifiers),windowWhitespace:Ta(m.windowWhitespace),windowNonAscii:Ta(m.windowNonAscii)}}}function pT(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var Am=S(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.WorkspaceFunctionIndex=void 0;var Em=pa(),_a=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,Em.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,Em.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};ko.WorkspaceFunctionIndex=_a});var yT=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),TT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_T=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ba=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,ST.fileURLToPath)(n)),Hm(ba),(0,Pt.serverCapabilities)()));be.onInitialized(async()=>{let e=await be.workspace.getConfiguration({section:"VBI"});Po=(0,Ca.readSettings)({VBI:e}),Oo()});be.onDidChangeConfiguration(e=>{Po=(0,Ca.readSettings)(e.settings),Oo()});be.onDidChangeWatchedFiles(()=>{Hm(ba)});Ue.onDidOpen(e=>{Yn.updateDocument(e.document),va(e.document)});Ue.onDidChangeContent(e=>{Yn.updateDocument(e.document),va(e.document)});Ue.onDidClose(e=>{Yn.removeDocument(e.document.uri),be.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Oo()});be.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.formattingEdits)(t,(0,Ca.formattingSettings)(Po,e.options))});be.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.symbolsFor)(t)});be.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Pt.definitionFor)(t,e.position)});be.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.referencesFor)(t,e.position,e.context.includeDeclaration)});be.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.completionsFor)(t)});be.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Pt.hoverFor)(t,e.position)});be.onShutdown(()=>{});Ue.listen(be);be.listen(); //# sourceMappingURL=server.js.map diff --git a/package.json b/package.json index ede9dcd..a0e8d57 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,24 @@ "minimum": 1, "maximum": 10, "markdownDescription": "Number of spaces to use for each indentation level (1-10)." + }, + "VBI.diagnostics.naming.nonAsciiIdentifiers": { + "type": "string", + "enum": ["off", "hint", "information", "warning", "error"], + "default": "warning", + "markdownDescription": "Severity for non-ASCII identifier quality diagnostics." + }, + "VBI.diagnostics.naming.windowWhitespace": { + "type": "string", + "enum": ["off", "hint", "information", "warning", "error"], + "default": "warning", + "markdownDescription": "Severity for whitespace in literal InTouch window names." + }, + "VBI.diagnostics.naming.windowNonAscii": { + "type": "string", + "enum": ["off", "hint", "information", "warning", "error"], + "default": "warning", + "markdownDescription": "Severity for non-ASCII characters in literal InTouch window names." } } } diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 65f2293..72ee4ac 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -3,6 +3,7 @@ export * from './formatter'; export * from './generatedFunctionCatalog'; export * from './languageService'; export * from './parser'; +export * from './quality'; export * from './semantics'; export * from './source'; export * from './token'; diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts index e4b4465..3309698 100644 --- a/packages/core/src/parser.ts +++ b/packages/core/src/parser.ts @@ -19,13 +19,14 @@ export type StatementKind = | 'exit-for' | 'return' | 'unknown'; -export type DiagnosticSeverity = 'error' | 'warning'; +export type DiagnosticSeverity = 'error' | 'warning' | 'information' | 'hint'; export interface CoreDiagnostic { code: string; message: string; severity: DiagnosticSeverity; range: Range; + source?: string; } export interface StatementNode { diff --git a/packages/core/src/quality.ts b/packages/core/src/quality.ts new file mode 100644 index 0000000..048e40c --- /dev/null +++ b/packages/core/src/quality.ts @@ -0,0 +1,121 @@ +import { CoreDiagnostic, DiagnosticSeverity } from './parser'; +import { SemanticModel } from './semantics'; +import { Token, TokenKind } from './token'; + +export const QUALITY_DIAGNOSTIC_CODES = { + nonAsciiIdentifier: 'quickscript.naming.nonAsciiIdentifier', + windowWhitespace: 'quickscript.naming.windowWhitespace', + windowNonAscii: 'quickscript.naming.windowNonAscii', +} as const; + +export type QualityDiagnosticSeverity = DiagnosticSeverity | 'off'; + +export interface QualityDiagnosticSettings { + nonAsciiIdentifiers?: QualityDiagnosticSeverity; + windowWhitespace?: QualityDiagnosticSeverity; + windowNonAscii?: QualityDiagnosticSeverity; +} + +const ASCII_IDENTIFIER = /^[A-Za-z0-9_$#-]+$/; +const WINDOW_COMMANDS = new Set(['HIDE', 'SHOW']); +const WINDOW_FUNCTIONS = new Set([ + 'HIDE', + 'INFOAPPSTATUS', + 'INFOAPPTITLEEXPAND', + 'MOVEWINDOW', + 'PRINTWINDOW', + 'SHOW', + 'SHOWAT', + 'SHOWTOPLEFTAT', + 'WINDOWSTATE', +]); + +function significantTokens(model: SemanticModel): Token[] { + return model.document.tokens.filter(token => ![ + TokenKind.Whitespace, + TokenKind.Newline, + TokenKind.Comment, + TokenKind.EOF, + ].includes(token.kind)); +} + +function stringContent(token: Token): string { + return token.lexeme.startsWith('"') && token.lexeme.endsWith('"') + ? token.lexeme.slice(1, -1) + : token.lexeme.slice(1); +} + +function windowNameTokens(model: SemanticModel): Token[] { + const tokens = significantTokens(model); + const windows: Token[] = []; + for (let index = 0; index < tokens.length; index += 1) { + const name = tokens[index].lexeme.toUpperCase(); + const previous = tokens[index - 1]; + if (previous?.lexeme === '.' || previous?.lexeme === '->') continue; + if (WINDOW_COMMANDS.has(name) && tokens[index + 1]?.kind === TokenKind.String) { + windows.push(tokens[index + 1]); + continue; + } + if (WINDOW_FUNCTIONS.has(name) + && tokens[index + 1]?.lexeme === '(' + && tokens[index + 2]?.kind === TokenKind.String) { + windows.push(tokens[index + 2]); + } + } + return windows; +} + +function qualityDiagnostic( + code: string, + message: string, + severity: QualityDiagnosticSeverity, + tokenOrRange: Pick, +): CoreDiagnostic | undefined { + if (severity === 'off') return undefined; + return { code, message, severity, range: tokenOrRange.range, source: 'intouch-quality' }; +} + +/** Analyze maintainability conventions without changing QuickScript validity or symbols. */ +export function qualityDiagnostics( + model: SemanticModel, + settings: QualityDiagnosticSettings = {}, +): CoreDiagnostic[] { + const diagnostics: CoreDiagnostic[] = []; + const diagnosedIdentifiers = new Set(); + const identifierSeverity = settings.nonAsciiIdentifiers ?? 'warning'; + for (const identifier of model.identifiers) { + const normalized = identifier.name.toUpperCase(); + if (ASCII_IDENTIFIER.test(identifier.name) || diagnosedIdentifiers.has(normalized)) continue; + diagnosedIdentifiers.add(normalized); + const diagnostic = qualityDiagnostic( + QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier, + `Avoid non-ASCII characters in identifier '${identifier.name}'.`, + identifierSeverity, + identifier, + ); + if (diagnostic !== undefined) diagnostics.push(diagnostic); + } + + for (const token of windowNameTokens(model)) { + const content = stringContent(token); + if (/\s/u.test(content)) { + const diagnostic = qualityDiagnostic( + QUALITY_DIAGNOSTIC_CODES.windowWhitespace, + 'Avoid whitespace in window names.', + settings.windowWhitespace ?? 'warning', + token, + ); + if (diagnostic !== undefined) diagnostics.push(diagnostic); + } + if (/[^\x00-\x7f]/u.test(content)) { + const diagnostic = qualityDiagnostic( + QUALITY_DIAGNOSTIC_CODES.windowNonAscii, + 'Avoid non-ASCII characters in window names.', + settings.windowNonAscii ?? 'warning', + token, + ); + if (diagnostic !== undefined) diagnostics.push(diagnostic); + } + } + return diagnostics; +} diff --git a/packages/core/src/semantics.ts b/packages/core/src/semantics.ts index cebfb8f..4f29787 100644 --- a/packages/core/src/semantics.ts +++ b/packages/core/src/semantics.ts @@ -1,10 +1,12 @@ import { CoreDiagnostic, QuickScriptDocument, parseQuickScript } from './parser'; import { KNOWN_FUNCTIONS } from './generatedFunctionCatalog'; -import { Position, Range, offsetAt } from './source'; +import { Position, Range, offsetAt, sourceRange } from './source'; import { Token, TokenKind } from './token'; +import { tokenize } from './tokenizer'; export type SymbolKind = 'variable' | 'call-target'; export type ReferenceKind = 'declaration' | 'read' | 'write' | 'call'; +export type SemanticIdentifierKind = 'function' | 'parameter' | 'local' | 'global' | 'member'; export interface QuickSymbol { id: number; @@ -23,6 +25,18 @@ export interface QuickReference { declarationId?: number; } +export interface SemanticIdentifier { + name: string; + kind: SemanticIdentifierKind; + range: Range; +} + +export interface QuickFunctionDeclaration { + name: string; + nameRange: Range; + parameters: SemanticIdentifier[]; +} + export interface Scope { id: number; kind: 'document'; @@ -35,6 +49,8 @@ export interface SemanticModel { scopes: Scope[]; symbols: QuickSymbol[]; references: QuickReference[]; + identifiers: SemanticIdentifier[]; + quickFunctions: QuickFunctionDeclaration[]; diagnostics: CoreDiagnostic[]; } @@ -66,14 +82,54 @@ function nextSignificant(tokens: readonly Token[], index: number): Token | undef return undefined; } +const METADATA_IDENTIFIER = '[\\p{L}_$#][\\p{L}\\p{N}_$#-]*'; + +function quickFunctionDeclarationsFromTokens(source: string, tokens: readonly Token[]): QuickFunctionDeclaration[] { + const declarations: QuickFunctionDeclaration[] = []; + const metadata = new RegExp(`\\bType\\s*:\\s*QuickFunction\\b[\\s\\S]{0,1000}?\\bName\\s*:\\s*(${METADATA_IDENTIFIER})`, 'giu'); + const parameterLine = new RegExp(`^[ \\t]*(?:DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${METADATA_IDENTIFIER})\\b`, 'gimu'); + + for (const token of tokens.filter(candidate => candidate.kind === TokenKind.Comment)) { + for (const match of token.lexeme.matchAll(metadata)) { + const name = match[1]; + const matchStart = match.index ?? 0; + const nameStart = matchStart + match[0].lastIndexOf(name); + const nameRange = sourceRange(source, { + start: token.span.start + nameStart, + end: token.span.start + nameStart + name.length, + }).range; + const parameters: SemanticIdentifier[] = []; + const parameterSection = token.lexeme.slice(matchStart).match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu); + if (parameterSection !== null) { + const sectionStart = matchStart + (parameterSection.index ?? 0) + parameterSection[0].indexOf(parameterSection[1]); + for (const parameter of parameterSection[1].matchAll(parameterLine)) { + const parameterName = parameter[1]; + const relativeStart = sectionStart + (parameter.index ?? 0) + parameter[0].lastIndexOf(parameterName); + parameters.push({ + name: parameterName, + kind: 'parameter', + range: sourceRange(source, { + start: token.span.start + relativeStart, + end: token.span.start + relativeStart + parameterName.length, + }).range, + }); + } + } + declarations.push({ name, nameRange, parameters }); + } + } + return declarations; +} + +/** Extract QuickFunction declarations only from canonical comment tokens. */ +export function quickFunctionDeclarations(source: string): QuickFunctionDeclaration[] { + return quickFunctionDeclarationsFromTokens(source, tokenize(source)); +} + /** Extract documented QuickFunction names from established Script metadata blocks. */ export function quickFunctionNames(source: string): string[] { const names = new Map(); - const metadata = /\bType\s*:\s*QuickFunction\b[\s\S]{0,1000}?\bName\s*:\s*([A-Za-z_$][A-Za-z0-9_$-]*)\b/gi; - for (const match of source.matchAll(metadata)) { - const name = match[1]; - names.set(name.toUpperCase(), name); - } + for (const declaration of quickFunctionDeclarations(source)) names.set(declaration.name.toUpperCase(), declaration.name); return [...names.values()]; } @@ -82,10 +138,11 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) const document = parseQuickScript(source); const diagnostics = [...document.diagnostics]; const symbols: QuickSymbol[] = []; + const quickFunctions = quickFunctionDeclarationsFromTokens(source, document.tokens); const declarationsByName = new Map(); const knownCallableNames = new Set(KNOWN_FUNCTIONS.map(item => item.name.toUpperCase())); - for (const name of quickFunctionNames(source)) { - knownCallableNames.add(name.toUpperCase()); + for (const declaration of quickFunctions) { + knownCallableNames.add(declaration.name.toUpperCase()); } for (const name of options.knownFunctionNames ?? []) { knownCallableNames.add(name.toUpperCase()); @@ -126,6 +183,11 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) } const references: QuickReference[] = []; + const identifiers: SemanticIdentifier[] = quickFunctions.flatMap(declaration => [ + { name: declaration.name, kind: 'function' as const, range: declaration.nameRange }, + ...declaration.parameters, + ]); + for (const symbol of symbols) identifiers.push({ name: symbol.name, kind: 'local', range: symbol.selectionRange }); for (let index = 0; index < document.tokens.length; index += 1) { const token = document.tokens[index]; if (token.kind !== TokenKind.Identifier) { @@ -138,11 +200,17 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) } const previous = precedingSignificant(document.tokens, index); if (previous?.lexeme === '.' || previous?.lexeme === '->') { + identifiers.push({ name: token.lexeme, kind: 'member', range: token.range }); continue; } const resolved = declarationsByName.get(token.lexeme.toUpperCase()); const next = nextSignificant(document.tokens, index); const isFunctionCall = statementCallTargets.has(token.span.start) || next?.lexeme === '('; + identifiers.push({ + name: token.lexeme, + kind: isFunctionCall ? 'function' : resolved === undefined ? 'global' : 'local', + range: token.range, + }); if (isFunctionCall && !knownCallableNames.has(token.lexeme.toUpperCase())) { diagnostics.push({ code: 'unknown-function', @@ -162,6 +230,8 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) scopes: [{ id: 0, kind: 'document', range: document.range, symbolIds: symbols.map(symbol => symbol.id) }], symbols, references, + identifiers, + quickFunctions, diagnostics, }; } diff --git a/packages/language-server/src/features.ts b/packages/language-server/src/features.ts index 3b95ea0..7ecad2a 100644 --- a/packages/language-server/src/features.ts +++ b/packages/language-server/src/features.ts @@ -16,16 +16,20 @@ import { import { TextDocument } from 'vscode-languageserver-textdocument'; import { FormatOptions, + QualityDiagnosticSettings, analyzeQuickScript, completions, definitionAt, documentSymbols, formatQuickScript, hoverAt, + qualityDiagnostics, referencesAt, } from '@intouch-language/core'; -export type ServerSettings = FormatOptions; +export interface ServerSettings extends FormatOptions { + qualityDiagnostics?: QualityDiagnosticSettings; +} export function serverCapabilities(): InitializeResult { return { @@ -51,13 +55,27 @@ function completionKind(kind: string): CompletionItemKind { } } -export function diagnosticsFor(document: TextDocument, knownFunctionNames?: Iterable): Diagnostic[] { - return analyzeQuickScript(document.getText(), { knownFunctionNames }).diagnostics.map(item => ({ +function lspDiagnosticSeverity(severity: 'error' | 'warning' | 'information' | 'hint'): DiagnosticSeverity { + switch (severity) { + case 'error': return DiagnosticSeverity.Error; + case 'information': return DiagnosticSeverity.Information; + case 'hint': return DiagnosticSeverity.Hint; + default: return DiagnosticSeverity.Warning; + } +} + +export function diagnosticsFor( + document: TextDocument, + knownFunctionNames?: Iterable, + settings: ServerSettings = {}, +): Diagnostic[] { + const model = analyzeQuickScript(document.getText(), { knownFunctionNames }); + return [...model.diagnostics, ...qualityDiagnostics(model, settings.qualityDiagnostics)].map(item => ({ code: item.code, message: item.message, range: item.range, - severity: item.severity === 'error' ? DiagnosticSeverity.Error : DiagnosticSeverity.Warning, - source: 'intouch-language', + severity: lspDiagnosticSeverity(item.severity), + source: item.source ?? 'intouch-language', })); } diff --git a/packages/language-server/src/server.ts b/packages/language-server/src/server.ts index 75cb231..7e38e6c 100644 --- a/packages/language-server/src/server.ts +++ b/packages/language-server/src/server.ts @@ -31,7 +31,7 @@ let workspaceFolders: string[] = []; function publishDiagnostics(document: TextDocument): void { connection.sendDiagnostics({ uri: document.uri, - diagnostics: diagnosticsFor(document, workspaceFunctions.knownFunctionNames()), + diagnostics: diagnosticsFor(document, workspaceFunctions.knownFunctionNames(), settings), }); } diff --git a/packages/language-server/src/settings.ts b/packages/language-server/src/settings.ts index 3b545ef..4538eee 100644 --- a/packages/language-server/src/settings.ts +++ b/packages/language-server/src/settings.ts @@ -17,6 +17,13 @@ function stringValue(candidate: unknown): string | undefined { return typeof candidate === 'string' ? candidate : undefined; } +function severityValue(candidate: unknown): 'off' | 'hint' | 'information' | 'warning' | 'error' | undefined { + const value = stringValue(candidate)?.toLowerCase(); + return value !== undefined && ['off', 'hint', 'information', 'warning', 'error'].includes(value) + ? value as 'off' | 'hint' | 'information' | 'warning' | 'error' + : undefined; +} + export function readSettings(value: unknown): ServerSettings { const root = asRecord(value); const vbi = root.VBI === undefined ? root : asRecord(root.VBI); @@ -25,6 +32,8 @@ export function readSettings(value: unknown): ServerSettings { const block = asRecord(formatter.BC); const region = asRecord(formatter.Region); const misc = asRecord(formatter.Misc); + const diagnostics = asRecord(vbi.diagnostics); + const naming = asRecord(diagnostics.naming); return { allowedNumberOfEmptyLines: numberValue(emptyLine.allowedNumberOfEmptyLines), removeEmptyLines: booleanValue(emptyLine.RemoveEmptyLines), @@ -37,6 +46,11 @@ export function readSettings(value: unknown): ServerSettings { regionBlockCodeExclude: stringValue(region.BlockCodeExclude), insertSpaces: booleanValue(misc.ReplaceTabToSpaces), indentSize: numberValue(misc.IndentSize), + qualityDiagnostics: { + nonAsciiIdentifiers: severityValue(naming.nonAsciiIdentifiers), + windowWhitespace: severityValue(naming.windowWhitespace), + windowNonAscii: severityValue(naming.windowNonAscii), + }, }; } From 2da7cfd36164f02fcb70b07c5deaef6624a51e7d Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 19:29:02 +0200 Subject: [PATCH 27/40] test(language): cover naming quality rules --- packages/core/test/quality.test.ts | 110 ++++++++++++++++++ .../language-server/test/features.test.ts | 67 +++++++++-- .../language-server/test/protocol.test.ts | 70 ++++++++++- src/test/suite/extension.test.ts | 81 +++++++++++-- 4 files changed, 310 insertions(+), 18 deletions(-) create mode 100644 packages/core/test/quality.test.ts diff --git a/packages/core/test/quality.test.ts b/packages/core/test/quality.test.ts new file mode 100644 index 0000000..278e7dc --- /dev/null +++ b/packages/core/test/quality.test.ts @@ -0,0 +1,110 @@ +import * as assert from 'assert'; + +import { + QUALITY_DIAGNOSTIC_CODES, + analyzeQuickScript, + definitionAt, + qualityDiagnostics, + referencesAt, +} from '../src'; + +suite('QuickScript quality diagnostics', () => { + test('warns once per non-ASCII identifier without changing language validity', () => { + const source = [ + 'DIM Größe AS INTEGER;', + 'DIM Lüfter1 AS DISCRETE;', + 'Größe = Größe + 1;', + ].join('\n'); + const model = analyzeQuickScript(source); + const diagnostics = qualityDiagnostics(model); + + assert.deepStrictEqual(model.diagnostics, []); + assert.deepStrictEqual(diagnostics.map(item => [item.code, item.severity, item.range.start]), [ + [QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier, 'warning', { line: 0, character: 4 }], + [QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier, 'warning', { line: 1, character: 4 }], + ]); + assert.ok(diagnostics.every(item => item.source === 'intouch-quality')); + }); + + test('keeps ASCII identifier forms clean', () => { + const model = analyzeQuickScript([ + 'DIM Groesse AS INTEGER;', + 'DIM TABINDEX AS INTEGER;', + 'DIM _Temp AS INTEGER;', + 'SYS_Tag-Name = $Second + #Trend;', + ].join('\n')); + + assert.deepStrictEqual(qualityDiagnostics(model), []); + }); + + test('checks QuickFunction and parameter declarations from metadata comment tokens', () => { + const source = [ + '{>', + 'Type: QuickFunction', + 'Name: Fünktion', + '', + 'Parameters:', + 'Integer Größe', + '', + 'Usage:', + 'CALL Fünktion(Größe);', + '{<}', + ].join('\n'); + const model = analyzeQuickScript(source); + + assert.deepStrictEqual(model.quickFunctions.map(item => item.name), ['Fünktion']); + assert.deepStrictEqual(model.quickFunctions[0].parameters.map(item => item.name), ['Größe']); + assert.deepStrictEqual(qualityDiagnostics(model).map(item => item.range.start), [ + { line: 2, character: 6 }, + { line: 5, character: 8 }, + ]); + }); + + test('checks only literal names in documented window-operation contexts', () => { + const source = [ + 'Show "Anlage1";', + 'Show "Anlage 1";', + 'Hide "Übersicht";', + 'ShowAt("Anlage Übersicht", 10, 20);', + 'MoveWindow("Fenster Zwei", 0, 0, 10, 10);', + 'PrintWindow("FensterÜ", 0, 0, 10, 10, 0);', + 'StatusMessage = "Störung Lüftung Süd";', + 'LogMessage("Störung Lüftung");', + ].join('\n'); + const diagnostics = qualityDiagnostics(analyzeQuickScript(source)); + + assert.deepStrictEqual(diagnostics.map(item => [item.code, item.range.start.line]), [ + [QUALITY_DIAGNOSTIC_CODES.windowWhitespace, 1], + [QUALITY_DIAGNOSTIC_CODES.windowNonAscii, 2], + [QUALITY_DIAGNOSTIC_CODES.windowWhitespace, 3], + [QUALITY_DIAGNOSTIC_CODES.windowNonAscii, 3], + [QUALITY_DIAGNOSTIC_CODES.windowWhitespace, 4], + [QUALITY_DIAGNOSTIC_CODES.windowNonAscii, 5], + ]); + }); + + test('keeps strings, brace comments, and apostrophe comments isolated', () => { + const source = [ + 'StatusMessage = "Störung Lüftung Süd";', + '{', + 'DIM Größe AS INTEGER;', + 'Show "Übersicht Anlage";', + '}', + '\' Show "Übersicht Anlage";', + ].join('\n'); + + assert.deepStrictEqual(qualityDiagnostics(analyzeQuickScript(source)), []); + }); + + test('supports configurable severity and off without changing navigation', () => { + const source = 'DIM Größe AS INTEGER;\nGröße = Größe + 1;'; + const model = analyzeQuickScript(source); + + assert.strictEqual(qualityDiagnostics(model, { nonAsciiIdentifiers: 'off' }).length, 0); + for (const severity of ['hint', 'information', 'warning', 'error'] as const) { + assert.strictEqual(qualityDiagnostics(model, { nonAsciiIdentifiers: severity })[0].severity, severity); + } + assert.deepStrictEqual(definitionAt(model, { line: 1, character: 1 }), { start: { line: 0, character: 4 }, end: { line: 0, character: 9 } }); + assert.strictEqual(referencesAt(model, { line: 0, character: 5 }).length, 3); + }); +}); diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index 32373f3..086d8ac 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -3,6 +3,7 @@ import * as assert from 'assert'; import * as fs from 'fs'; import * as path from 'path'; +import { DiagnosticSeverity } from 'vscode-languageserver/node'; import { TextDocument } from 'vscode-languageserver-textdocument'; import { @@ -62,12 +63,19 @@ suite('QuickScript language server features', () => { }); test('maps nested VS Code formatter settings to core options', () => { - const settings = readSettings({ VBI: { formatter: { - EmptyLine: { allowedNumberOfEmptyLines: 2, RemoveEmptyLines: true, EmptyLinesAlsoInComment: true }, - BC: { BlockCodeBegin: '{begin', BlockCodeEnd: '{end', BlockCodeExclude: '{back' }, - Region: { BlockCodeBegin: '{r', BlockCodeEnd: '{/r', BlockCodeExclude: '{rb' }, - Misc: { ReplaceTabToSpaces: false, IndentSize: 3 }, - } } }); + const settings = readSettings({ VBI: { + formatter: { + EmptyLine: { allowedNumberOfEmptyLines: 2, RemoveEmptyLines: true, EmptyLinesAlsoInComment: true }, + BC: { BlockCodeBegin: '{begin', BlockCodeEnd: '{end', BlockCodeExclude: '{back' }, + Region: { BlockCodeBegin: '{r', BlockCodeEnd: '{/r', BlockCodeExclude: '{rb' }, + Misc: { ReplaceTabToSpaces: false, IndentSize: 3 }, + }, + diagnostics: { naming: { + nonAsciiIdentifiers: 'information', + windowWhitespace: 'off', + windowNonAscii: 'error', + } }, + } }); assert.deepStrictEqual(settings, { allowedNumberOfEmptyLines: 2, @@ -81,10 +89,55 @@ suite('QuickScript language server features', () => { regionBlockCodeExclude: '{rb', insertSpaces: false, indentSize: 3, + qualityDiagnostics: { + nonAsciiIdentifiers: 'information', + windowWhitespace: 'off', + windowNonAscii: 'error', + }, }); assert.deepStrictEqual(formattingSettings(settings, { insertSpaces: true, tabSize: 8 }), settings); }); + test('maps quality settings to LSP severity and source without changing syntax validity', () => { + const source = [ + 'DIM Größe AS INTEGER;', + 'Show "Anlage Übersicht";', + 'StatusMessage = "Störung Lüftung";', + ].join('\n'); + const document = TextDocument.create('file:///quality.vbi', 'intouch', 1, source); + const defaults = diagnosticsFor(document); + + assert.deepStrictEqual(defaults.map(item => [item.code, item.severity, item.source]), [ + ['quickscript.naming.nonAsciiIdentifier', DiagnosticSeverity.Warning, 'intouch-quality'], + ['quickscript.naming.windowWhitespace', DiagnosticSeverity.Warning, 'intouch-quality'], + ['quickscript.naming.windowNonAscii', DiagnosticSeverity.Warning, 'intouch-quality'], + ]); + assert.ok(!defaults.some(item => item.range.start.line === 2)); + + for (const [setting, severity] of [ + ['hint', DiagnosticSeverity.Hint], + ['information', DiagnosticSeverity.Information], + ['warning', DiagnosticSeverity.Warning], + ['error', DiagnosticSeverity.Error], + ] as const) { + const diagnostics = diagnosticsFor(document, undefined, { + qualityDiagnostics: { + nonAsciiIdentifiers: setting, + windowWhitespace: 'off', + windowNonAscii: 'off', + }, + }); + assert.deepStrictEqual(diagnostics.map(item => item.severity), [severity]); + } + assert.deepStrictEqual(diagnosticsFor(document, undefined, { + qualityDiagnostics: { + nonAsciiIdentifiers: 'off', + windowWhitespace: 'off', + windowNonAscii: 'off', + }, + }), []); + }); + test('formats the established comment nesting fixture through the language-server formatter entrypoint', () => { const fixtureDirectory = path.resolve(__dirname, '../../../src/test/suite/testfiles'); const source = fs.readFileSync(path.join(fixtureDirectory, '05.comment_rules.nesting.test.vbi'), 'utf8'); @@ -253,7 +306,7 @@ suite('QuickScript language server features', () => { }); test('resolves project functions only when the workspace declares them', () => { - const definitions = TextDocument.create('file:///definitions.vi', 'intouch', 1, 'Type: QuickFunction\nName: WorkspaceFunction'); + const definitions = TextDocument.create('file:///definitions.vi', 'intouch', 1, '{>\nType: QuickFunction\nName: WorkspaceFunction\n{<}'); const caller = TextDocument.create('file:///caller.vbi', 'intouch', 1, 'CALL workspacefunction();\nCALL WorkspaceFunctio();'); const workspace = new WorkspaceFunctionIndex(); const isolated = diagnosticsFor(caller).filter(diagnostic => diagnostic.code === 'unknown-function'); diff --git a/packages/language-server/test/protocol.test.ts b/packages/language-server/test/protocol.test.ts index e027084..a4dafeb 100644 --- a/packages/language-server/test/protocol.test.ts +++ b/packages/language-server/test/protocol.test.ts @@ -4,7 +4,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from 'vscode-jsonrpc/node'; -import { CompletionItem, InitializeResult, TextEdit } from 'vscode-languageserver/node'; +import { CompletionItem, Diagnostic, DiagnosticSeverity, InitializeResult, TextEdit } from 'vscode-languageserver/node'; function applyFormattingEdits(source: string, edits: readonly TextEdit[]): string { if (edits.length === 0) { @@ -28,6 +28,25 @@ suite('QuickScript language server protocol', () => { let stderr = ''; child.stderr.on('data', chunk => { stderr += chunk.toString(); }); const connection = createMessageConnection(new StreamMessageReader(child.stdout), new StreamMessageWriter(child.stdin)); + const diagnosticWaiters: Array<{ + uri: string; + predicate: (diagnostics: Diagnostic[]) => boolean; + resolve: (diagnostics: Diagnostic[]) => void; + }> = []; + const nextDiagnostics = ( + uri: string, + predicate: (diagnostics: Diagnostic[]) => boolean = () => true, + ): Promise => new Promise(resolve => { + diagnosticWaiters.push({ uri, predicate, resolve }); + }); + connection.onNotification('textDocument/publishDiagnostics', params => { + const published = params as { uri: string; diagnostics: Diagnostic[] }; + const index = diagnosticWaiters.findIndex(waiter => + waiter.uri === published.uri && waiter.predicate(published.diagnostics)); + if (index < 0) return; + const [waiter] = diagnosticWaiters.splice(index, 1); + waiter.resolve(published.diagnostics); + }); let configurationRequested: (() => void) | undefined; const configurationRequest = new Promise(resolve => { configurationRequested = resolve; }); connection.onRequest('workspace/configuration', () => { @@ -38,6 +57,11 @@ suite('QuickScript language server protocol', () => { Region: { BlockCodeBegin: '{region', BlockCodeEnd: '{endregion', BlockCodeExclude: '{#' }, Misc: { ReplaceTabToSpaces: true, IndentSize: 4 }, }, + diagnostics: { naming: { + nonAsciiIdentifiers: 'information', + windowWhitespace: 'information', + windowNonAscii: 'information', + } }, }]; }); connection.listen(); @@ -52,6 +76,18 @@ suite('QuickScript language server protocol', () => { assert.strictEqual((initialize as InitializeResult).capabilities.documentFormattingProvider, true); connection.sendNotification('initialized', {}); await configurationRequest; + connection.sendNotification('workspace/didChangeConfiguration', { settings: { VBI: { + formatter: { + BC: { BlockCodeBegin: '{>', BlockCodeEnd: '{<', BlockCodeExclude: '{#' }, + Region: { BlockCodeBegin: '{region', BlockCodeEnd: '{endregion', BlockCodeExclude: '{#' }, + Misc: { ReplaceTabToSpaces: true, IndentSize: 4 }, + }, + diagnostics: { naming: { + nonAsciiIdentifiers: 'information', + windowWhitespace: 'information', + windowNonAscii: 'information', + } }, + } } }); const uri = 'file:///protocol-smoke.vbi'; connection.sendNotification('textDocument/didOpen', { @@ -69,6 +105,38 @@ suite('QuickScript language server protocol', () => { }], }); + const qualityUri = 'file:///protocol-quality.vbi'; + const initialQualityDiagnostics = nextDiagnostics(qualityUri); + connection.sendNotification('textDocument/didOpen', { + textDocument: { + uri: qualityUri, + languageId: 'intouch', + version: 1, + text: 'DIM Größe AS INTEGER;\nShow "Übersicht Anlage";\nStatusMessage = "Übersicht Anlage";', + }, + }); + const qualityDiagnostics = await initialQualityDiagnostics; + assert.deepStrictEqual(qualityDiagnostics.map(item => [item.code, item.severity, item.source]), [ + ['quickscript.naming.nonAsciiIdentifier', DiagnosticSeverity.Information, 'intouch-quality'], + ['quickscript.naming.windowWhitespace', DiagnosticSeverity.Information, 'intouch-quality'], + ['quickscript.naming.windowNonAscii', DiagnosticSeverity.Information, 'intouch-quality'], + ]); + + const disabledQualityDiagnostics = nextDiagnostics(qualityUri, diagnostics => diagnostics.length === 0); + connection.sendNotification('workspace/didChangeConfiguration', { settings: { VBI: { + formatter: { + BC: { BlockCodeBegin: '{>', BlockCodeEnd: '{<', BlockCodeExclude: '{#' }, + Region: { BlockCodeBegin: '{region', BlockCodeEnd: '{endregion', BlockCodeExclude: '{#' }, + Misc: { ReplaceTabToSpaces: true, IndentSize: 4 }, + }, + diagnostics: { naming: { + nonAsciiIdentifiers: 'off', + windowWhitespace: 'off', + windowNonAscii: 'off', + } }, + } } }); + assert.deepStrictEqual(await disabledQualityDiagnostics, []); + const edits = await connection.sendRequest('textDocument/formatting', { textDocument: { uri }, options: { tabSize: 4, insertSpaces: true }, diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts index 96c7f33..e8c7a46 100644 --- a/src/test/suite/extension.test.ts +++ b/src/test/suite/extension.test.ts @@ -3,23 +3,23 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; -async function waitForDiagnosticCode(uri: vscode.Uri, code: string): Promise { - const find = (): readonly vscode.Diagnostic[] | undefined => { - const diagnostics = vscode.languages.getDiagnostics(uri); - return diagnostics.some(diagnostic => diagnostic.code === code) ? diagnostics : undefined; - }; - const current = find(); - if (current !== undefined) return current; +async function waitForDiagnostics( + uri: vscode.Uri, + predicate: (diagnostics: readonly vscode.Diagnostic[]) => boolean, + description: string, +): Promise { + const current = vscode.languages.getDiagnostics(uri); + if (predicate(current)) return current; return new Promise((resolve, reject) => { let subscription: vscode.Disposable | undefined; const timeout = setTimeout(() => { subscription?.dispose(); - reject(new Error(`Timed out waiting for diagnostic '${code}'.`)); + reject(new Error(`Timed out waiting for diagnostics: ${description}.`)); }, 10000); subscription = vscode.languages.onDidChangeDiagnostics(event => { if (!event.uris.some(changed => changed.toString() === uri.toString())) return; - const diagnostics = find(); - if (diagnostics === undefined) return; + const diagnostics = vscode.languages.getDiagnostics(uri); + if (!predicate(diagnostics)) return; clearTimeout(timeout); subscription?.dispose(); resolve(diagnostics); @@ -27,6 +27,10 @@ async function waitForDiagnosticCode(uri: vscode.Uri, code: string): Promise { + return waitForDiagnostics(uri, diagnostics => diagnostics.some(diagnostic => diagnostic.code === code), code); +} + suite('Extension Test Suite', () => { vscode.window.showInformationMessage('Start all tests.'); @@ -113,4 +117,61 @@ suite('Extension Test Suite', () => { ['unknown-datatype', 11], ]); }); + + test('routes naming quality settings and window context through the production language client', async () => { + const extension = vscode.extensions.getExtension('Vitaly-ruhl.intouch-language'); + assert.ok(extension); + await extension.activate(); + const configuration = vscode.workspace.getConfiguration('VBI'); + const keys = [ + 'diagnostics.naming.nonAsciiIdentifiers', + 'diagnostics.naming.windowWhitespace', + 'diagnostics.naming.windowNonAscii', + ] as const; + const previous = new Map(keys.map(key => [key, configuration.inspect(key)?.globalValue])); + + try { + for (const key of keys) await configuration.update(key, 'warning', vscode.ConfigurationTarget.Global); + const source = [ + 'DIM Größe AS INTEGER;', + 'Show "Übersicht Anlage";', + 'StatusMessage = "Übersicht Anlage";', + ].join('\n'); + const document = await vscode.workspace.openTextDocument({ language: 'intouch', content: source }); + const initial = await waitForDiagnostics(document.uri, diagnostics => + diagnostics.filter(item => item.source === 'intouch-quality').length === 3, + 'initial quality warnings'); + assert.deepStrictEqual(initial.filter(item => item.source === 'intouch-quality').map(item => [item.code, item.severity, item.range.start.line]), [ + ['quickscript.naming.nonAsciiIdentifier', vscode.DiagnosticSeverity.Warning, 0], + ['quickscript.naming.windowWhitespace', vscode.DiagnosticSeverity.Warning, 1], + ['quickscript.naming.windowNonAscii', vscode.DiagnosticSeverity.Warning, 1], + ]); + + for (const [setting, severity] of [ + ['information', vscode.DiagnosticSeverity.Information], + ['warning', vscode.DiagnosticSeverity.Warning], + ['error', vscode.DiagnosticSeverity.Error], + ] as const) { + const changed = waitForDiagnostics(document.uri, diagnostics => diagnostics.some(item => + item.code === 'quickscript.naming.nonAsciiIdentifier' && item.severity === severity), setting); + await configuration.update(keys[0], setting, vscode.ConfigurationTarget.Global); + await changed; + } + + const identifierDisabled = waitForDiagnostics(document.uri, diagnostics => + !diagnostics.some(item => item.code === 'quickscript.naming.nonAsciiIdentifier'), 'non-ASCII identifier off'); + await configuration.update(keys[0], 'off', vscode.ConfigurationTarget.Global); + await identifierDisabled; + + const allDisabled = waitForDiagnostics(document.uri, diagnostics => + !diagnostics.some(item => item.source === 'intouch-quality'), 'all naming quality diagnostics off'); + await configuration.update(keys[1], 'off', vscode.ConfigurationTarget.Global); + await configuration.update(keys[2], 'off', vscode.ConfigurationTarget.Global); + assert.deepStrictEqual(await allDisabled, []); + } finally { + for (const key of keys) { + await configuration.update(key, previous.get(key), vscode.ConfigurationTarget.Global); + } + } + }); }); From 7d480a29ab5a6e9930d5cca85f8878565dc9ee0f Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 19:29:11 +0200 Subject: [PATCH 28/40] docs(language): document quality diagnostics --- CHANGELOG.md | 2 ++ docs/architecture/intouch-core-preparation.md | 28 ++++++++++++----- docs/language/quickscript.md | 30 +++++++++++++++++++ 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a907b92..b23b0c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ QuickFunctions without reclassifying project helpers as native InTouch built-ins. - Accept corpus-evidenced Unicode and digit-prefixed identifiers, numeric dotfields, and multiline `IF` continuation forms. +- Add configurable QuickScript quality diagnostics for non-ASCII identifiers + and problematic literal window names without changing language validity. ### V1.4.0 diff --git a/docs/architecture/intouch-core-preparation.md b/docs/architecture/intouch-core-preparation.md index 38ad3bf..111e9fc 100644 --- a/docs/architecture/intouch-core-preparation.md +++ b/docs/architecture/intouch-core-preparation.md @@ -7,7 +7,8 @@ QuickScript source | v packages/core - tokenizer -> parser -> symbols/diagnostics/language features + tokenizer -> parser -> semantics -> quality diagnostics + -> language features | | | +-> structural formatter | | @@ -58,7 +59,21 @@ Core diagnostics currently cover: - missing `ENDIF` and `NEXT`; - invalid block nesting and duplicate `ELSE`; - duplicate local `DIM` declarations; -- unknown `DIM` datatypes. +- unknown `DIM` datatypes; +- unresolved function calls. + +Quality diagnostics are a separate post-semantic layer. They report technically +valid but less portable or maintainable names and never change parser validity, +symbols, navigation, or formatter output. Quality diagnostics use +`intouch-quality` as their LSP source, while syntax and semantic diagnostics +continue to use `intouch-language`. + +The initial quality rules cover non-ASCII identifiers and literal InTouch +window names containing whitespace or non-ASCII characters. Identifier +candidates come from the semantic model, including local and external uses plus +QuickFunction and parameter declarations extracted from metadata comment +tokens. Window strings are inspected only as arguments of documented window +commands/functions. The language service provides document symbols, local definition and reference results, completion, and hover. Completion includes QuickScript keywords and @@ -87,11 +102,10 @@ snippets and the theme remain declarative VS Code assets. - Formatting is document-wide; selection/range formatting is not advertised. - Definition and references are document-local and require a proven `DIM` declaration. -- QuickScript function declarations are not invented because repository - evidence models each file as a script/function body rather than declaring a - function in source syntax. -- Project-wide symbol indexing and cross-file call-target resolution are not - implemented. +- QuickFunction metadata supports workspace call-target resolution but does not + invent executable declaration syntax or cross-file navigation ranges. +- Project-wide variable symbol indexing and cross-file variable navigation are + not implemented. - `.vbi` and `.vi` remain excluded from Serena semantic indexing; the native language server provides their semantics. diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index d551580..807d8a0 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -85,3 +85,33 @@ document and workspace. The generated entries retain their catalog category; workspace declarations remain a separate source. Configurable activation of additional project-specific catalogs is planned rather than inferred from individual call sites. + +## Diagnostic layers + +Diagnostics retain three separate responsibilities: + +- syntax diagnostics report invalid QuickScript structure or expressions; +- semantic diagnostics report invalid language facts such as unknown datatypes + or unresolved call targets; +- quality diagnostics report technically valid names that are less portable or + maintainable. + +The initial quality codes are: + +- `quickscript.naming.nonAsciiIdentifier` for non-ASCII characters in semantic + identifiers, including QuickFunction and parameter metadata; +- `quickscript.naming.windowWhitespace` for whitespace in a literal window name; +- `quickscript.naming.windowNonAscii` for non-ASCII characters in a literal + window name. + +Window rules apply only when the literal is the window argument of a documented +InTouch window operation. Ordinary strings and all comments remain isolated. +The rules do not rename symbols or affect formatting, hover, completion, +definition, or references. + +Each rule defaults to `warning` and accepts `off`, `hint`, `information`, +`warning`, or `error` through these existing `VBI` settings: + +- `VBI.diagnostics.naming.nonAsciiIdentifiers`; +- `VBI.diagnostics.naming.windowWhitespace`; +- `VBI.diagnostics.naming.windowNonAscii`. From aabfa1da99bce27830b4a065c434c354b3af775b Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 19:29:28 +0200 Subject: [PATCH 29/40] chore(release): prepare quality HIL version 1.5.6 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7264792..3ccfb27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.5", + "version": "1.5.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.5", + "version": "1.5.6", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index a0e8d57..0f7e52c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.5", + "version": "1.5.6", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { From e16a3f84e50dd07df5fe915d5c935ac1b4e966fd Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:01:16 +0200 Subject: [PATCH 30/40] feat(core): add QuickScript document metadata model --- packages/core/src/documentMetadata.ts | 373 ++++++++++++++++++++++++++ packages/core/src/index.ts | 1 + packages/core/src/languageService.ts | 53 +++- packages/core/src/semantics.ts | 76 +++--- 4 files changed, 457 insertions(+), 46 deletions(-) create mode 100644 packages/core/src/documentMetadata.ts diff --git a/packages/core/src/documentMetadata.ts b/packages/core/src/documentMetadata.ts new file mode 100644 index 0000000..a9c1715 --- /dev/null +++ b/packages/core/src/documentMetadata.ts @@ -0,0 +1,373 @@ +import { CoreDiagnostic } from './parser'; +import { Range, SourceSpan, sourceRange } from './source'; +import { Token, TokenKind } from './token'; +import { tokenize } from './tokenizer'; + +export type QuickScriptScriptType = + | 'QuickFunction' + | 'DataChange' + | 'Condition' + | 'Application' + | 'Window' + | 'KeyScript' + | 'Generic' + | 'Unknown'; + +export type WindowEvent = 'OnShow' | 'WhileRunning' | 'OnClose'; +export type MetadataSourceKind = 'explicit' | 'legacy' | 'export' | 'filename' | 'none'; + +export interface QuickScriptParameterMetadata { + name: string; + datatype: string; + description?: string; + range: Range; + nameRange: Range; + datatypeRange: Range; +} + +export interface QuickScriptDocumentMetadata { + scriptType: QuickScriptScriptType; + name?: string; + nameRange?: Range; + event?: string; + eventRange?: Range; + trigger?: string; + triggerRange?: Range; + shortcut?: string; + shortcutRange?: Range; + description?: string; + descriptionRange?: Range; + parameters: QuickScriptParameterMetadata[]; + returnType?: string; + returnTypeRange?: Range; + metadataSource: MetadataSourceKind; + legacyScriptType?: string; + diagnostics: CoreDiagnostic[]; +} + +export interface MetadataExtractionOptions { + fileName?: string; + /** Reuse the canonical token stream when extraction is part of semantic analysis. */ + tokens?: readonly Token[]; +} + +interface LocatedValue { + value: T; + raw: string; + range: Range; + span: SourceSpan; + source: Exclude; +} + +interface MetadataCandidates { + scriptTypes: LocatedValue[]; + names: LocatedValue[]; + events: LocatedValue[]; + triggers: LocatedValue[]; + shortcuts: LocatedValue[]; + descriptions: LocatedValue[]; + returnTypes: LocatedValue[]; + explicitParameters: QuickScriptParameterMetadata[]; + legacyParameters: QuickScriptParameterMetadata[]; + legacyScriptType?: string; +} + +const IDENTIFIER = '[\\p{L}_$#][\\p{L}\\p{N}_$#-]*'; +const EXPLICIT_FIELD = /^[ \t]*@([A-Za-z]+)(?:[ \t]+([^\r\n]*?))?[ \t]*$/gmu; +const LEGACY_FIELD = /^[ \t]*(Type|Name|Description|Trigger|Event|Shortcut|Returns?|Tagname\[\.field\]|Condition|Condition Type)[ \t]*:[ \t]*([^\r\n]*?)[ \t]*$/gimu; +const LEGACY_PARAMETER = new RegExp(`^[ \\t]*(DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${IDENTIFIER})(?:[ \\t]+([^\\r\\n]*?))?[ \\t]*$`, 'gimu'); +const SCRIPT_TYPE_NAMES: Readonly> = { + quickfunction: 'QuickFunction', + datachange: 'DataChange', + condition: 'Condition', + conditionalscript: 'Condition', + application: 'Application', + applicationscript: 'Application', + window: 'Window', + windowscript: 'Window', + keyscript: 'KeyScript', + generic: 'Generic', +}; +const WINDOW_EVENTS: Readonly> = { + onshow: 'OnShow', + whilerunning: 'WhileRunning', + onclose: 'OnClose', +}; +const KNOWN_FIELDS = new Set(['scripttype', 'name', 'description', 'event', 'trigger', 'shortcut', 'param', 'returns']); + +function metadataDiagnostic(code: string, message: string, range: Range, severity: CoreDiagnostic['severity'] = 'warning'): CoreDiagnostic { + return { code, message, severity, range, source: 'intouch-metadata' }; +} + +function locatedValue(source: string, token: Token, match: RegExpMatchArray, raw: string, value: T, sourceKind: 'explicit' | 'legacy'): LocatedValue { + const matchStart = match.index ?? 0; + const valueStart = matchStart + match[0].lastIndexOf(raw); + const located = sourceRange(source, { + start: token.span.start + valueStart, + end: token.span.start + valueStart + raw.length, + }); + return { value, raw, ...located, source: sourceKind }; +} + +function normalizeScriptType(raw: string): QuickScriptScriptType | undefined { + return SCRIPT_TYPE_NAMES[raw.replace(/[ \t_-]+/g, '').toLowerCase()]; +} + +function normalizeWindowEvent(raw: string): WindowEvent | undefined { + return WINDOW_EVENTS[raw.replace(/[ \t_-]+/g, '').toLowerCase()]; +} + +function valueEquals(left: unknown, right: unknown): boolean { + return typeof left === 'string' && typeof right === 'string' + ? left.localeCompare(right, 'en', { sensitivity: 'base' }) === 0 + : left === right; +} + +function selectValue( + label: string, + explicit: readonly LocatedValue[], + legacy: readonly LocatedValue[], + diagnostics: CoreDiagnostic[], +): LocatedValue | undefined { + const preferred = explicit[0] ?? legacy[0]; + if (preferred === undefined) return undefined; + for (const duplicate of [...explicit.slice(1), ...legacy]) { + if (!valueEquals(preferred.value, duplicate.value)) { + diagnostics.push(metadataDiagnostic( + 'metadata-conflict', + `${label} '${duplicate.raw}' conflicts with higher-priority ${preferred.source} metadata '${preferred.raw}'.`, + duplicate.range, + )); + } + } + return preferred; +} + +function parseExplicitFields(source: string, token: Token, candidates: MetadataCandidates, diagnostics: CoreDiagnostic[]): void { + for (const match of token.lexeme.matchAll(EXPLICIT_FIELD)) { + const field = match[1]; + const raw = (match[2] ?? '').trim(); + const normalizedField = field.toLowerCase(); + const fieldStart = token.span.start + (match.index ?? 0) + match[0].indexOf(`@${field}`) + 1; + const fieldRange = sourceRange(source, { start: fieldStart, end: fieldStart + field.length }).range; + if (!KNOWN_FIELDS.has(normalizedField)) { + diagnostics.push(metadataDiagnostic( + 'unknown-metadata-field', + `Unknown QuickScript metadata field '@${field}'.`, + fieldRange, + 'information', + )); + continue; + } + if (raw.length === 0) { + diagnostics.push(metadataDiagnostic('invalid-metadata-value', `Metadata field '@${field}' requires a value.`, fieldRange)); + continue; + } + if (normalizedField === 'scripttype') { + const scriptType = normalizeScriptType(raw); + const value = locatedValue(source, token, match, raw, scriptType ?? 'Unknown', 'explicit'); + if (scriptType === undefined) { + diagnostics.push(metadataDiagnostic('invalid-script-type', `Unknown QuickScript script type '${raw}'.`, value.range)); + } else { + candidates.scriptTypes.push(value); + } + continue; + } + if (normalizedField === 'param') { + const parameter = raw.match(new RegExp(`^(${IDENTIFIER})[ \\t]+(DISCRETE|INTEGER|MESSAGE|REAL)(?:[ \\t]+([\\s\\S]*))?$`, 'iu')); + const value = locatedValue(source, token, match, raw, raw, 'explicit'); + if (parameter === null) { + diagnostics.push(metadataDiagnostic('invalid-metadata-value', `Metadata field '@Param' must use '@Param Name TYPE Description...'.`, value.range)); + continue; + } + const nameOffset = value.span.start + raw.indexOf(parameter[1]); + const datatypeOffset = value.span.start + raw.indexOf(parameter[2], parameter[1].length); + candidates.explicitParameters.push({ + name: parameter[1], + datatype: parameter[2].toUpperCase(), + description: parameter[3]?.trim() || undefined, + range: value.range, + nameRange: sourceRange(source, { start: nameOffset, end: nameOffset + parameter[1].length }).range, + datatypeRange: sourceRange(source, { start: datatypeOffset, end: datatypeOffset + parameter[2].length }).range, + }); + continue; + } + const value = locatedValue(source, token, match, raw, raw, 'explicit'); + switch (normalizedField) { + case 'name': candidates.names.push(value); break; + case 'description': candidates.descriptions.push(value); break; + case 'event': candidates.events.push(value); break; + case 'trigger': candidates.triggers.push(value); break; + case 'shortcut': candidates.shortcuts.push(value); break; + case 'returns': candidates.returnTypes.push({ ...value, value: raw.toUpperCase() }); break; + } + } +} + +function legacyParameterSection(token: Token): { text: string; start: number } | undefined { + const section = token.lexeme.match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu); + if (section === null) return undefined; + const start = (section.index ?? 0) + section[0].indexOf(section[1]); + return { text: section[1], start }; +} + +function parseLegacyFields(source: string, token: Token, candidates: MetadataCandidates): void { + for (const match of token.lexeme.matchAll(LEGACY_FIELD)) { + const label = match[1].toLowerCase(); + const raw = match[2].trim(); + if (raw.length === 0) continue; + if (label === 'type') { + candidates.legacyScriptType ??= raw; + const scriptType = normalizeScriptType(raw); + candidates.scriptTypes.push(locatedValue(source, token, match, raw, scriptType ?? 'Unknown', 'legacy')); + continue; + } + const value = locatedValue(source, token, match, raw, raw, 'legacy'); + switch (label) { + case 'name': candidates.names.push(value); break; + case 'description': candidates.descriptions.push(value); break; + case 'event': candidates.events.push(value); break; + case 'trigger': candidates.triggers.push(value); break; + case 'shortcut': candidates.shortcuts.push(value); break; + case 'tagname[.field]': candidates.triggers.push(value); break; + case 'condition': candidates.triggers.push(value); break; + case 'condition type': candidates.events.push(value); break; + case 'return': + case 'returns': candidates.returnTypes.push({ ...value, value: raw.toUpperCase() }); break; + } + } + const section = legacyParameterSection(token); + if (section === undefined) return; + for (const match of section.text.matchAll(LEGACY_PARAMETER)) { + const datatype = match[1]; + const name = match[2]; + const lineStart = section.start + (match.index ?? 0); + const datatypeStart = token.span.start + lineStart + match[0].indexOf(datatype); + const nameStart = token.span.start + lineStart + match[0].indexOf(name, match[0].indexOf(datatype) + datatype.length); + candidates.legacyParameters.push({ + name, + datatype: datatype.toUpperCase(), + description: match[3]?.trim() || undefined, + range: sourceRange(source, { start: datatypeStart, end: token.span.start + lineStart + match[0].trimEnd().length }).range, + nameRange: sourceRange(source, { start: nameStart, end: nameStart + name.length }).range, + datatypeRange: sourceRange(source, { start: datatypeStart, end: datatypeStart + datatype.length }).range, + }); + } +} + +function isStructuredLegacyComment(text: string): boolean { + if (/^[ \t]*Script[ \t]*:[ \t]*$/imu.test(text)) return true; + const hasType = /^[ \t]*Type[ \t]*:[ \t]*[^\r\n]+$/imu.test(text); + const hasIdentity = /^[ \t]*(?:Name|Tagname\[\.field\]|Condition)[ \t]*:[ \t]*[^\r\n]+$/imu.test(text); + return hasType && hasIdentity; +} + +function filenameFallback(fileName: string | undefined): { scriptType: QuickScriptScriptType; name: string } | undefined { + if (fileName === undefined) return undefined; + const stem = fileName.replace(/^.*[\\/]/, '').replace(/\.(?:vbi|vi)$/i, '').replace(/_\d+(?:\.\d+){1,3}$/i, ''); + for (const [prefix, scriptType] of [ + ['QF_', 'QuickFunction'], + ['DCH_', 'DataChange'], + ['CS_', 'Condition'], + ['APP_', 'Application'], + ['KEY_', 'KeyScript'], + ] as const) { + if (stem.toUpperCase().startsWith(prefix)) { + return { scriptType, name: stem.slice(prefix.length) }; + } + } + return undefined; +} + +/** Extract canonical document metadata exclusively from comment tokens plus an optional filename fallback. */ +export function extractDocumentMetadata(source: string, options: MetadataExtractionOptions = {}): QuickScriptDocumentMetadata { + const diagnostics: CoreDiagnostic[] = []; + const candidates: MetadataCandidates = { + scriptTypes: [], + names: [], + events: [], + triggers: [], + shortcuts: [], + descriptions: [], + returnTypes: [], + explicitParameters: [], + legacyParameters: [], + }; + const comments = (options.tokens ?? tokenize(source)).filter(token => token.kind === TokenKind.Comment); + for (const token of comments) { + parseExplicitFields(source, token, candidates, diagnostics); + if (isStructuredLegacyComment(token.lexeme)) parseLegacyFields(source, token, candidates); + } + + const explicit = (values: readonly LocatedValue[]): LocatedValue[] => values.filter(value => value.source === 'explicit'); + const legacy = (values: readonly LocatedValue[]): LocatedValue[] => values.filter(value => value.source === 'legacy'); + const scriptType = selectValue('Script type', explicit(candidates.scriptTypes), legacy(candidates.scriptTypes), diagnostics); + const name = selectValue('Name', explicit(candidates.names), legacy(candidates.names), diagnostics); + const event = selectValue('Event', explicit(candidates.events), legacy(candidates.events), diagnostics); + const trigger = selectValue('Trigger', explicit(candidates.triggers), legacy(candidates.triggers), diagnostics); + const shortcut = selectValue('Shortcut', explicit(candidates.shortcuts), legacy(candidates.shortcuts), diagnostics); + const description = selectValue('Description', explicit(candidates.descriptions), legacy(candidates.descriptions), diagnostics); + const returnType = selectValue('Return type', explicit(candidates.returnTypes), legacy(candidates.returnTypes), diagnostics); + const parameters = candidates.explicitParameters.length > 0 ? candidates.explicitParameters : candidates.legacyParameters; + if (candidates.explicitParameters.length > 0 && candidates.legacyParameters.length > 0) { + const signature = (items: readonly QuickScriptParameterMetadata[]): string => items + .map(parameter => `${parameter.name.toUpperCase()}:${parameter.datatype.toUpperCase()}`) + .join(','); + if (signature(candidates.explicitParameters) !== signature(candidates.legacyParameters)) { + diagnostics.push(metadataDiagnostic( + 'metadata-conflict', + 'Legacy parameter metadata conflicts with higher-priority explicit @Param metadata.', + candidates.legacyParameters[0].range, + )); + } + } + const fallback = filenameFallback(options.fileName); + const resolvedScriptType = scriptType?.value ?? fallback?.scriptType ?? 'Generic'; + const resolvedName = name?.value ?? fallback?.name; + + let resolvedEvent = event?.value; + if (resolvedScriptType === 'Window' && event !== undefined) { + const normalized = normalizeWindowEvent(event.value); + if (normalized === undefined) { + diagnostics.push(metadataDiagnostic('invalid-window-event', `Unknown Window script event '${event.value}'.`, event.range)); + resolvedEvent = undefined; + } else { + resolvedEvent = normalized; + } + } else if (event !== undefined && !['Application', 'Condition'].includes(resolvedScriptType)) { + diagnostics.push(metadataDiagnostic('metadata-conflict', `Event metadata is not supported for ${resolvedScriptType} scripts.`, event.range)); + } + if (resolvedScriptType === 'Window' && returnType !== undefined) { + diagnostics.push(metadataDiagnostic('metadata-conflict', 'Window scripts cannot declare a return type.', returnType.range)); + } + + const metadataSources: MetadataSourceKind[] = [scriptType, name, event, trigger, shortcut, description, returnType] + .flatMap(value => value === undefined ? [] : [value.source]); + if (candidates.explicitParameters.length > 0) metadataSources.push('explicit'); + else if (candidates.legacyParameters.length > 0) metadataSources.push('legacy'); + const metadataSource: MetadataSourceKind = metadataSources.includes('explicit') + ? 'explicit' + : metadataSources.includes('legacy') + ? 'legacy' + : fallback === undefined ? 'none' : 'filename'; + + return { + scriptType: resolvedScriptType, + name: resolvedName, + nameRange: name?.range, + event: resolvedEvent, + eventRange: event?.range, + trigger: trigger?.value, + triggerRange: trigger?.range, + shortcut: shortcut?.value, + shortcutRange: shortcut?.range, + description: description?.value, + descriptionRange: description?.range, + parameters, + returnType: returnType?.value, + returnTypeRange: returnType?.range, + metadataSource, + legacyScriptType: candidates.legacyScriptType, + diagnostics, + }; +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 72ee4ac..724c3be 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,4 +1,5 @@ export * from './languageData'; +export * from './documentMetadata'; export * from './formatter'; export * from './generatedFunctionCatalog'; export * from './languageService'; diff --git a/packages/core/src/languageService.ts b/packages/core/src/languageService.ts index 445fcd7..5617c36 100644 --- a/packages/core/src/languageService.ts +++ b/packages/core/src/languageService.ts @@ -20,7 +20,7 @@ export interface HoverEntry { export interface DocumentSymbolEntry { name: string; - kind: 'variable' | 'if' | 'for' | 'while'; + kind: 'variable' | 'if' | 'for' | 'while' | 'function' | 'window' | 'event' | 'application' | 'data-change' | 'condition' | 'key-script'; range: Range; selectionRange: Range; children: DocumentSymbolEntry[]; @@ -90,7 +90,7 @@ export function documentSymbols(model: SemanticModel): DocumentSymbolEntry[] { if (block.parentId === undefined) roots.push(blocks[block.id]); else blocks[block.parentId].children.push(blocks[block.id]); } - return [ + const body = [ ...model.symbols.map(symbol => ({ name: symbol.name, kind: 'variable' as const, @@ -100,4 +100,53 @@ export function documentSymbols(model: SemanticModel): DocumentSymbolEntry[] { })), ...roots, ]; + const metadata = model.metadata; + const selectionRange = metadata.nameRange ?? metadata.triggerRange ?? model.document.range; + if (metadata.scriptType === 'QuickFunction' && metadata.name !== undefined) { + return [{ + name: metadata.name, + kind: 'function', + range: model.document.range, + selectionRange, + children: body, + }]; + } + if (metadata.scriptType === 'Window' && metadata.name !== undefined) { + const eventChildren = metadata.event === undefined ? body : [{ + name: metadata.event, + kind: 'event' as const, + range: model.document.range, + selectionRange: metadata.eventRange ?? selectionRange, + children: body, + }]; + return [{ name: metadata.name, kind: 'window', range: model.document.range, selectionRange, children: eventChildren }]; + } + if (metadata.scriptType === 'Application') { + const name = metadata.name ?? 'Application'; + const children = metadata.event === undefined ? body : [{ + name: metadata.event, + kind: 'event' as const, + range: model.document.range, + selectionRange: metadata.eventRange ?? selectionRange, + children: body, + }]; + return [{ name, kind: 'application', range: model.document.range, selectionRange, children }]; + } + if (metadata.scriptType === 'DataChange' || metadata.scriptType === 'Condition') { + const kind = metadata.scriptType === 'DataChange' ? 'data-change' as const : 'condition' as const; + const name = metadata.name ?? metadata.trigger ?? metadata.scriptType; + return [{ name, kind, range: model.document.range, selectionRange, children: body }]; + } + if (metadata.scriptType === 'KeyScript') { + const name = metadata.name ?? 'KeyScript'; + const children = metadata.shortcut === undefined ? body : [{ + name: metadata.shortcut, + kind: 'event' as const, + range: model.document.range, + selectionRange: metadata.shortcutRange ?? selectionRange, + children: body, + }]; + return [{ name, kind: 'key-script', range: model.document.range, selectionRange, children }]; + } + return body; } diff --git a/packages/core/src/semantics.ts b/packages/core/src/semantics.ts index 4f29787..6115858 100644 --- a/packages/core/src/semantics.ts +++ b/packages/core/src/semantics.ts @@ -1,11 +1,11 @@ import { CoreDiagnostic, QuickScriptDocument, parseQuickScript } from './parser'; +import { MetadataExtractionOptions, QuickScriptDocumentMetadata, extractDocumentMetadata } from './documentMetadata'; import { KNOWN_FUNCTIONS } from './generatedFunctionCatalog'; import { Position, Range, offsetAt, sourceRange } from './source'; import { Token, TokenKind } from './token'; -import { tokenize } from './tokenizer'; export type SymbolKind = 'variable' | 'call-target'; -export type ReferenceKind = 'declaration' | 'read' | 'write' | 'call'; +export type ReferenceKind = 'declaration' | 'read' | 'write' | 'call' | 'trigger'; export type SemanticIdentifierKind = 'function' | 'parameter' | 'local' | 'global' | 'member'; export interface QuickSymbol { @@ -35,6 +35,7 @@ export interface QuickFunctionDeclaration { name: string; nameRange: Range; parameters: SemanticIdentifier[]; + metadata: QuickScriptDocumentMetadata; } export interface Scope { @@ -51,12 +52,15 @@ export interface SemanticModel { references: QuickReference[]; identifiers: SemanticIdentifier[]; quickFunctions: QuickFunctionDeclaration[]; + metadata: QuickScriptDocumentMetadata; diagnostics: CoreDiagnostic[]; } export interface AnalyzeOptions { /** Additional QuickFunctions resolved by the language-server workspace index. */ knownFunctionNames?: Iterable; + /** Optional filename used only after structured metadata sources are exhausted. */ + fileName?: string; } function contains(range: Range, position: Position): boolean { @@ -82,48 +86,23 @@ function nextSignificant(tokens: readonly Token[], index: number): Token | undef return undefined; } -const METADATA_IDENTIFIER = '[\\p{L}_$#][\\p{L}\\p{N}_$#-]*'; - -function quickFunctionDeclarationsFromTokens(source: string, tokens: readonly Token[]): QuickFunctionDeclaration[] { - const declarations: QuickFunctionDeclaration[] = []; - const metadata = new RegExp(`\\bType\\s*:\\s*QuickFunction\\b[\\s\\S]{0,1000}?\\bName\\s*:\\s*(${METADATA_IDENTIFIER})`, 'giu'); - const parameterLine = new RegExp(`^[ \\t]*(?:DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${METADATA_IDENTIFIER})\\b`, 'gimu'); - - for (const token of tokens.filter(candidate => candidate.kind === TokenKind.Comment)) { - for (const match of token.lexeme.matchAll(metadata)) { - const name = match[1]; - const matchStart = match.index ?? 0; - const nameStart = matchStart + match[0].lastIndexOf(name); - const nameRange = sourceRange(source, { - start: token.span.start + nameStart, - end: token.span.start + nameStart + name.length, - }).range; - const parameters: SemanticIdentifier[] = []; - const parameterSection = token.lexeme.slice(matchStart).match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu); - if (parameterSection !== null) { - const sectionStart = matchStart + (parameterSection.index ?? 0) + parameterSection[0].indexOf(parameterSection[1]); - for (const parameter of parameterSection[1].matchAll(parameterLine)) { - const parameterName = parameter[1]; - const relativeStart = sectionStart + (parameter.index ?? 0) + parameter[0].lastIndexOf(parameterName); - parameters.push({ - name: parameterName, - kind: 'parameter', - range: sourceRange(source, { - start: token.span.start + relativeStart, - end: token.span.start + relativeStart + parameterName.length, - }).range, - }); - } - } - declarations.push({ name, nameRange, parameters }); - } - } - return declarations; +function quickFunctionDeclarationFromMetadata(source: string, metadata: QuickScriptDocumentMetadata): QuickFunctionDeclaration[] { + if (metadata.scriptType !== 'QuickFunction' || metadata.name === undefined) return []; + return [{ + name: metadata.name, + nameRange: metadata.nameRange ?? sourceRange(source, { start: 0, end: 0 }).range, + parameters: metadata.parameters.map(parameter => ({ + name: parameter.name, + kind: 'parameter', + range: parameter.nameRange, + })), + metadata, + }]; } /** Extract QuickFunction declarations only from canonical comment tokens. */ -export function quickFunctionDeclarations(source: string): QuickFunctionDeclaration[] { - return quickFunctionDeclarationsFromTokens(source, tokenize(source)); +export function quickFunctionDeclarations(source: string, options: MetadataExtractionOptions = {}): QuickFunctionDeclaration[] { + return quickFunctionDeclarationFromMetadata(source, extractDocumentMetadata(source, options)); } /** Extract documented QuickFunction names from established Script metadata blocks. */ @@ -136,9 +115,10 @@ export function quickFunctionNames(source: string): string[] { /** Build document-local QuickScript declarations, uses, scopes, and semantic diagnostics. */ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}): SemanticModel { const document = parseQuickScript(source); - const diagnostics = [...document.diagnostics]; + const metadata = extractDocumentMetadata(source, { fileName: options.fileName, tokens: document.tokens }); + const diagnostics = [...document.diagnostics, ...metadata.diagnostics]; const symbols: QuickSymbol[] = []; - const quickFunctions = quickFunctionDeclarationsFromTokens(source, document.tokens); + const quickFunctions = quickFunctionDeclarationFromMetadata(source, metadata); const declarationsByName = new Map(); const knownCallableNames = new Set(KNOWN_FUNCTIONS.map(item => item.name.toUpperCase())); for (const declaration of quickFunctions) { @@ -182,11 +162,18 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) statementCallTargets.add(offsetAt(source, call.nameRange!.start)); } - const references: QuickReference[] = []; + const references: QuickReference[] = metadata.trigger === undefined || metadata.triggerRange === undefined ? [] : [{ + name: metadata.trigger, + kind: 'trigger', + range: metadata.triggerRange, + }]; const identifiers: SemanticIdentifier[] = quickFunctions.flatMap(declaration => [ { name: declaration.name, kind: 'function' as const, range: declaration.nameRange }, ...declaration.parameters, ]); + if (metadata.trigger !== undefined && metadata.triggerRange !== undefined) { + identifiers.push({ name: metadata.trigger, kind: 'global', range: metadata.triggerRange }); + } for (const symbol of symbols) identifiers.push({ name: symbol.name, kind: 'local', range: symbol.selectionRange }); for (let index = 0; index < document.tokens.length; index += 1) { const token = document.tokens[index]; @@ -232,6 +219,7 @@ export function analyzeQuickScript(source: string, options: AnalyzeOptions = {}) references, identifiers, quickFunctions, + metadata, diagnostics, }; } From a2766c8bda629d1d8d2177fedc9f4f206e9ef2d5 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:01:27 +0200 Subject: [PATCH 31/40] feat(language): add cross-file workspace symbols --- dist/server.js | 54 ++-- packages/language-server/src/features.ts | 124 +++++++-- packages/language-server/src/server.ts | 64 +++-- .../language-server/src/workspaceFunctions.ts | 42 +--- .../language-server/src/workspaceSymbols.ts | 238 ++++++++++++++++++ 5 files changed, 424 insertions(+), 98 deletions(-) create mode 100644 packages/language-server/src/workspaceSymbols.ts diff --git a/dist/server.js b/dist/server.js index f6858f8..313dc59 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,28 +1,36 @@ -"use strict";var Ao=Object.defineProperty;var nh=Object.getOwnPropertyDescriptor;var rh=Object.getOwnPropertyNames;var oh=Object.prototype.hasOwnProperty;var Na=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ga=(e,t)=>{for(var n in t)Ao(e,n,{get:t[n],enumerable:!0})},ih=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rh(t))!oh.call(e,o)&&o!==n&&Ao(e,o,{get:()=>t[o],enumerable:!(r=nh(t,o))||r.enumerable});return e};var Jn=e=>ih(Ao({},"__esModule",{value:!0}),e);var er=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=sh;Ge.string=Ha;Ge.number=ch;Ge.error=ah;Ge.func=Fa;Ge.array=ja;Ge.stringArray=uh;Ge.typedArray=lh;Ge.thenable=dh;function sh(e){return e===!0||e===!1}function Ha(e){return typeof e=="string"||e instanceof String}function ch(e){return typeof e=="number"||e instanceof Number}function ah(e){return e instanceof Error}function Fa(e){return typeof e=="function"}function ja(e){return Array.isArray(e)}function uh(e){return ja(e)&&e.every(t=>Ha(t))}function lh(e,t){return Array.isArray(e)&&e.every(t)}function dh(e){return e&&Fa(e.then)}});var Ut=S(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.boolean=fh;Je.string=La;Je.number=mh;Je.error=hh;Je.func=gh;Je.array=Wa;Je.stringArray=ph;function fh(e){return e===!0||e===!1}function La(e){return typeof e=="string"||e instanceof String}function mh(e){return typeof e=="number"||e instanceof Number}function hh(e){return e instanceof Error}function gh(e){return typeof e=="function"}function Wa(e){return Array.isArray(e)}function ph(e){return Wa(e)&&e.every(t=>La(t))}});var ii=S(w=>{"use strict";var yh=w&&w.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Th=w&&w.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_h=w&&w.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.LRUCache=dt.LinkedMap=dt.Touch=void 0;var le;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(le||(dt.Touch=le={}));var tr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=le.None){let r=this._map.get(t);if(r)return n!==le.None&&this.touch(r,n),r.value}set(t,n,r=le.None){let o=this._map.get(t);if(o)o.value=n,r!==le.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case le.None:this.addItemLast(o);break;case le.First:this.addItemFirst(o);break;case le.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==le.First&&n!==le.Last)){if(n===le.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===le.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};dt.LinkedMap=tr;var si=class extends tr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=le.AsNew){return super.get(t,n)}peek(t){return super.get(t,le.None)}set(t,n){return super.set(t,n,le.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};dt.LRUCache=si});var Qa=S(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.Disposable=void 0;var Ba;(function(e){function t(n){return{dispose:n}}e.create=t})(Ba||(nr.Disposable=Ba={}))});var ft=S(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});var ai;function ui(){if(ai===void 0)throw new Error("No runtime abstraction layer installed");return ai}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ai=n}e.install=t})(ui||(ui={}));li.default=ui});var Bt=S(mt=>{"use strict";var bh=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mt,"__esModule",{value:!0});mt.Emitter=mt.Event=void 0;var Ch=bh(ft()),$a;(function(e){let t={dispose(){}};e.None=function(){return t}})($a||(mt.Event=$a={}));var di=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new di),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};mt.Emitter=fi});var ir=S(Ie=>{"use strict";var vh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sh=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ih=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.SharedArrayReceiverStrategy=Qt.SharedArraySenderStrategy=void 0;var Oh=ir(),Cn;(function(e){e.Continue=0,e.Cancelled=1})(Cn||(Cn={}));var gi=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Cn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Cn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Qt.SharedArraySenderStrategy=gi;var pi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Cn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},yi=class{token;constructor(t){this.token=new pi(t)}cancel(){}dispose(){}},Ti=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Oh.CancellationTokenSource:new yi(n)}};Qt.SharedArrayReceiverStrategy=Ti});var bi=S($t=>{"use strict";var Rh=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($t,"__esModule",{value:!0});$t.Semaphore=void 0;var xh=Rh(ft()),_i=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,xh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};$t.Semaphore=_i});var Ka=S(de=>{"use strict";var Mh=de&&de.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eh=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ah=de&&de.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,vi.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};de.ReadableStreamMessageReader=Ii});var eu=S(fe=>{"use strict";var Gh=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hh=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(Wh,r.byteLength.toString(),Ya),o.push(Ya),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};fe.WriteableStreamMessageWriter=wi});var tu=S(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.AbstractMessageBuffer=void 0;var Uh=13,Bh=10,Qh=`\r -`,ki=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};ar.AbstractMessageBuffer=ki});var iu=S(O=>{"use strict";var $h=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),zh=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vh=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},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||(O.Trace=F={}));var Mi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Mi||(O.TraceValue=Mi={}));O.TraceValues=Mi;(function(e){function t(r){if(!X.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(O.Trace=F={}));var Pe;(function(e){e.Text="text",e.JSON="json"})(Pe||(O.TraceFormat=Pe={}));(function(e){function t(n){return X.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Pe||(O.TraceFormat=Pe={}));var Ei;(function(e){e.type=new x.NotificationType("$/setTrace")})(Ei||(O.SetTraceNotification=Ei={}));var ur;(function(e){e.type=new x.NotificationType("$/logTrace")})(ur||(O.LogTraceNotification=ur={}));var Dn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Dn||(O.ConnectionErrors=Dn={}));var Vt=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=Vt;var Ai;(function(e){function t(n){let r=n;return r&&X.func(r.cancelUndispatched)}e.is=t})(Ai||(O.ConnectionStrategy=Ai={}));var lr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(lr||(O.IdCancellationReceiverStrategy=lr={}));var qi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&X.func(r.createCancellationTokenSource)&&(r.dispose===void 0||X.func(r.dispose))}e.is=t})(qi||(O.RequestCancellationReceiverStrategy=qi={}));var dr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Pi.CancellationTokenSource}});function t(n){return lr.is(n)||qi.is(n)}e.is=t})(dr||(O.CancellationReceiverStrategy=dr={}));var fr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(wn.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&X.func(r.sendCancellation)&&X.func(r.cleanup)}e.is=t})(fr||(O.CancellationSenderStrategy=fr={}));var mr;(function(e){e.Message=Object.freeze({receiver:dr.Message,sender:fr.Message});function t(n){let r=n;return r&&dr.is(r.receiver)&&fr.is(r.sender)}e.is=t})(mr||(O.CancellationStrategy=mr={}));var hr;(function(e){function t(n){let r=n;return r&&X.func(r.handleMessage)}e.is=t})(hr||(O.MessageStrategy=hr={}));var ou;(function(e){function t(n){let r=n;return r&&(mr.is(r.cancellationStrategy)||Ai.is(r.connectionStrategy)||hr.is(r.messageStrategy)||X.number(r.maxParallelism))}e.is=t})(ou||(O.ConnectionOptions=ou={}));var He;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(He||(He={}));function Xh(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,a=0,p="2.0",m=r?.maxParallelism??-1,h=0,C,l=new Map,b,P=new Map,E=new Map,G,R=new ru.LinkedMap,g=new Map,d=new Set,I=new Map,A=F.Off,q=Pe.Text,B,V=He.New,Ze=new Sn.Emitter,Sa=new Sn.Emitter,Ia=new Sn.Emitter,Da=new Sn.Emitter,wa=new Sn.Emitter,at=r&&r.cancellationStrategy?r.cancellationStrategy:mr.Message;function Fm(u){}function ka(){return V===He.Listening}function Pa(){return V===He.Closed}function Lt(){return V===He.Disposed}function Oa(){(V===He.New||V===He.Listening)&&(V=He.Closed,Sa.fire(void 0))}function jm(u){Ze.fire([u,void 0,void 0])}function Lm(u){Ze.fire(u)}e.onClose(Oa),e.onError(jm),t.onClose(Oa),t.onError(Lm);function Ra(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function Wm(u){return u===null?"res-unknown-"+(++a).toString():"res-"+u.toString()}function Um(){return"not-"+(++s).toString()}function Bm(u,_){x.Message.isRequest(_)?u.set(Ra(_.id),_):x.Message.isResponse(_)?m===-1?u.set(Wm(_.id),_):Ma(_):u.set(Um(),_)}function Ro(){G||R.size===0||m!==-1&&h>=m||(G=(0,nu.default)().timer.setImmediate(async()=>{if(G=void 0,R.size===0||m!==-1&&h>=m)return;let u=R.shift(),_;try{h++;let v=r?.messageStrategy;hr.is(v)?_=v.handleMessage(u,xa):_=xa(u)}catch(v){o.error(`Processing message queue failed: ${v.toString()}`)}finally{_ instanceof Promise?_.then(()=>{h--,Ro()}).catch(v=>{o.error(`Processing message queue failed: ${v.toString()}`)}):h--,Ro()}}))}async function xa(u){return x.Message.isRequest(u)?$m(u):x.Message.isNotification(u)?zm(u):x.Message.isResponse(u)?Ma(u):Vm(u)}let Qm=u=>{try{if(x.Message.isNotification(u)&&u.method===wn.type.method){let _=u.params.id,v=Ra(_),k=R.get(v);if(x.Message.isRequest(k)){let K=r?.connectionStrategy,L=K&&K.cancelUndispatched?K.cancelUndispatched(k,Fm):void 0;if(L&&(L.error!==void 0||L.result!==void 0)){R.delete(v),I.delete(_),L.id=k.id,xo(L,u.method,Date.now()),t.write(L).catch(()=>o.error("Sending response for canceled message failed."));return}}let H=I.get(_);if(H!==void 0){H.cancel(),Mo(u);return}else d.add(_)}Bm(R,u)}finally{Ro()}};async function $m(u){if(Lt())return Promise.resolve();function _(re,ue,Y){let J={jsonrpc:p,id:u.id};return re instanceof x.ResponseError?J.error=re.toJson():J.result=re===void 0?null:re,xo(J,ue,Y),t.write(J)}function v(re,ue,Y){let J={jsonrpc:p,id:u.id,error:re.toJson()};return xo(J,ue,Y),t.write(J)}Zm(u);let k=l.get(u.method),H,K;k&&(H=k.type,K=k.handler);let L=Date.now();if(K||C){let re=u.id??String(Date.now()),ue=lr.is(at.receiver)?at.receiver.createCancellationTokenSource(re):at.receiver.createCancellationTokenSource(u);u.id!==null&&d.has(u.id)&&ue.cancel(),u.id!==null&&I.set(re,ue);try{let Y;if(K)if(u.params===void 0){if(H!==void 0&&H.numberOfParams!==0)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines ${H.numberOfParams} params but received none.`),u.method,L);Y=K(ue.token)}else if(Array.isArray(u.params)){if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byName)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,L);Y=K(...u.params,ue.token)}else{if(H!==void 0&&H.parameterStructures===x.ParameterStructures.byPosition)return v(new x.ResponseError(x.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,L);Y=K(u.params,ue.token)}else C&&(Y=C(u.method,u.params,ue.token));let J=await Y;await _(J,u.method,L)}catch(Y){Y instanceof x.ResponseError?await _(Y,u.method,L):Y&&X.string(Y.message)?await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${Y.message}`),u.method,L):await v(new x.ResponseError(x.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,L)}finally{I.delete(re)}}else await v(new x.ResponseError(x.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,L)}function Ma(u){if(!Lt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let _=u.id,v=g.get(_);if(Ym(u,v),v!==void 0){g.delete(_);try{if(u.error){let k=u.error;v.reject(new x.ResponseError(k.code,k.message,k.data))}else if(u.result!==void 0)v.resolve(u.result);else throw new Error("Should never happen.")}catch(k){k.message?o.error(`Response handler '${v.method}' failed with message: ${k.message}`):o.error(`Response handler '${v.method}' failed unexpectedly.`)}}}}async function zm(u){if(Lt())return;let _,v;if(u.method===wn.type.method){let k=u.params.id;d.delete(k),Mo(u);return}else{let k=P.get(u.method);k&&(v=k.handler,_=k.type)}if(v||b)try{if(Mo(u),v)if(u.params===void 0)_!==void 0&&_.numberOfParams!==0&&_.parameterStructures!==x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received none.`),await v();else if(Array.isArray(u.params)){let k=u.params;u.method===In.type.method&&k.length===2&&Oi.is(k[0])?await v({token:k[0],value:k[1]}):(_!==void 0&&(_.parameterStructures===x.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),_.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${_.numberOfParams} params but received ${k.length} arguments`)),await v(...k))}else _!==void 0&&_.parameterStructures===x.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await v(u.params);else b&&await b(u.method,u.params)}catch(k){k.message?o.error(`Notification handler '${u.method}' failed with message: ${k.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Ia.fire(u)}function Vm(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let _=u;if(X.string(_.id)||X.number(_.id)){let v=_.id,k=g.get(v);k&&k.reject(new Error("The received response has neither a result nor an error property."))}}function ut(u){if(u!=null)switch(A){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function Km(u){if(!(A===F.Off||!B))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&u.params&&(_=`Params: ${ut(u.params)}`),B.log(`Sending request '${u.method} - (${u.id})'.`,_)}else Wt("send-request",u)}function Xm(u){if(!(A===F.Off||!B))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&(u.params?_=`Params: ${ut(u.params)}`:_="No parameters provided."),B.log(`Sending notification '${u.method}'.`,_)}else Wt("send-notification",u)}function xo(u,_,v){if(!(A===F.Off||!B))if(q===Pe.Text){let k;(A===F.Verbose||A===F.Compact)&&(u.error&&u.error.data?k=`Error data: ${ut(u.error.data)}`:u.result?k=`Result: ${ut(u.result)}`:u.error===void 0&&(k="No result returned.")),B.log(`Sending response '${_} - (${u.id})'. Processing request took ${Date.now()-v}ms`,k)}else Wt("send-response",u)}function Zm(u){if(!(A===F.Off||!B))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&u.params&&(_=`Params: ${ut(u.params)}`),B.log(`Received request '${u.method} - (${u.id})'.`,_)}else Wt("receive-request",u)}function Mo(u){if(!(A===F.Off||!B||u.method===ur.type.method))if(q===Pe.Text){let _;(A===F.Verbose||A===F.Compact)&&(u.params?_=`Params: ${ut(u.params)}`:_="No parameters provided."),B.log(`Received notification '${u.method}'.`,_)}else Wt("receive-notification",u)}function Ym(u,_){if(!(A===F.Off||!B))if(q===Pe.Text){let v;if((A===F.Verbose||A===F.Compact)&&(u.error&&u.error.data?v=`Error data: ${ut(u.error.data)}`:u.result?v=`Result: ${ut(u.result)}`:u.error===void 0&&(v="No result returned.")),_){let k=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";B.log(`Received response '${_.method} - (${u.id})' in ${Date.now()-_.timerStart}ms.${k}`,v)}else B.log(`Received response ${u.id} without active response promise.`,v)}else Wt("receive-response",u)}function Wt(u,_){if(!B||A===F.Off)return;let v={isLSPMessage:!0,type:u,message:_,timestamp:Date.now()};B.log(v)}function Tn(){if(Pa())throw new Vt(Dn.Closed,"Connection is closed.");if(Lt())throw new Vt(Dn.Disposed,"Connection is disposed.")}function Jm(){if(ka())throw new Vt(Dn.AlreadyListening,"Connection is already listening")}function eh(){if(!ka())throw new Error("Call listen() first.")}function _n(u){return u===void 0?null:u}function Ea(u){if(u!==null)return u}function Aa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Eo(u,_){switch(u){case x.ParameterStructures.auto:return Aa(_)?Ea(_):[_n(_)];case x.ParameterStructures.byName:if(!Aa(_))throw new Error("Received parameters by name but param is not an object literal.");return Ea(_);case x.ParameterStructures.byPosition:return[_n(_)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function qa(u,_){let v,k=u.numberOfParams;switch(k){case 0:v=void 0;break;case 1:v=Eo(u.parameterStructures,_[0]);break;default:v=[];for(let H=0;H<_.length&&H{Tn();let v,k;if(X.string(u)){v=u;let K=_[0],L=0,re=x.ParameterStructures.auto;x.ParameterStructures.is(K)&&(L=1,re=K);let ue=_.length,Y=ue-L;switch(Y){case 0:k=void 0;break;case 1:k=Eo(re,_[L]);break;default:if(re===x.ParameterStructures.byName)throw new Error(`Received ${Y} parameters for 'by Name' notification parameter structure.`);k=_.slice(L,ue).map(J=>_n(J));break}}else{let K=_;v=u.method,k=qa(u,K)}let H={jsonrpc:p,method:v,params:k};return Xm(H),t.write(H).catch(K=>{throw o.error("Sending notification failed."),K})},onNotification:(u,_)=>{Tn();let v;return X.func(u)?b=u:_&&(X.string(u)?(v=u,P.set(u,{type:void 0,handler:_})):(v=u.method,P.set(u.method,{type:u,handler:_}))),{dispose:()=>{v!==void 0?P.get(v)?.handler===_&&P.delete(v):b===u&&(b=void 0)}}},onProgress:(u,_,v)=>{if(E.has(_))throw new Error(`Progress handler for token ${_} already registered`);return E.set(_,v),{dispose:()=>{E.get(_)===v&&E.delete(_)}}},sendProgress:(u,_,v)=>Ot.sendNotification(In.type,{token:_,value:v}),onUnhandledProgress:Da.event,sendRequest:(u,..._)=>{Tn(),eh();function v(J,Ne){let Ye=at.sender.sendCancellation(J,Ne);Ye===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ne}`):Ye.catch(()=>{o.log(`Sending cancellation messages for id ${Ne} failed.`)})}let k,H,K;if(X.string(u)){k=u;let J=_[0],Ne=_[_.length-1],Ye=0,bn=x.ParameterStructures.auto;x.ParameterStructures.is(J)&&(Ye=1,bn=J);let Rt=_.length;Pi.CancellationToken.is(Ne)&&(Rt=Rt-1,K=Ne);let Be=Rt-Ye;switch(Be){case 0:H=void 0;break;case 1:H=Eo(bn,_[Ye]);break;default:if(bn===x.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);H=_.slice(Ye,Rt).map(th=>_n(th));break}}else{let J=_;k=u.method,H=qa(u,J);let Ne=u.numberOfParams;K=Pi.CancellationToken.is(J[Ne])?J[Ne]:void 0}let L=i++,re,ue=!1;K!==void 0&&(K.isCancellationRequested?ue=!0:re=K.onCancellationRequested(()=>{v(Ot,L)}));let Y={jsonrpc:p,id:L,method:k,params:H};return Km(Y),typeof at.sender.enableCancellation=="function"&&at.sender.enableCancellation(Y),new Promise(async(J,Ne)=>{let Ye=Be=>{J(Be),at.sender.cleanup(L),re?.dispose()},bn=Be=>{Ne(Be),at.sender.cleanup(L),re?.dispose()},Rt={method:k,timerStart:Date.now(),resolve:Ye,reject:bn};try{g.set(L,Rt),await t.write(Y),ue&&v(Ot,L)}catch(Be){throw g.delete(L),Rt.reject(new x.ResponseError(x.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,_)=>{Tn();let v=null;return xi.is(u)?(v=void 0,C=u):X.string(u)?(v=null,_!==void 0&&(v=u,l.set(u,{handler:_,type:void 0}))):_!==void 0&&(v=u.method,l.set(u.method,{type:u,handler:_})),{dispose:()=>{v!==null&&(v!==void 0?l.get(v)?.handler===_&&l.delete(v):C===u&&(C=void 0))}}},hasPendingResponse:()=>g.size>0,trace:async(u,_,v)=>{let k=!1,H=Pe.Text;v!==void 0&&(X.boolean(v)?k=v:(k=v.sendNotification||!1,H=v.traceFormat||Pe.Text)),A=u,q=H,A===F.Off?B=void 0:B=_,k&&!Pa()&&!Lt()&&await Ot.sendNotification(Ei.type,{value:F.toString(u)})},onError:Ze.event,onClose:Sa.event,onUnhandledNotification:Ia.event,onDispose:wa.event,end:()=>{t.end()},dispose:()=>{if(Lt())return;V=He.Disposed,wa.fire(void 0);let u=new x.ResponseError(x.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let _ of g.values())_.reject(u);g=new Map,I=new Map,d=new Set,R=new ru.LinkedMap,X.func(t.dispose)&&t.dispose(),X.func(e.dispose)&&e.dispose()},listen:()=>{Tn(),Jm(),V=He.Listening,e.listen(Qm)},inspect:()=>{(0,nu.default)().console.log("inspect")}};return Ot.onNotification(ur.type,u=>{if(A===F.Off||!B)return;let _=A===F.Verbose||A===F.Compact;B.log(u.message,_?u.verbose:void 0)}),Ot.onNotification(In.type,async u=>{let _=E.get(u.token);_?await _(u.value):Da.fire(u)}),Ot}});var et=S(y=>{"use strict";var Zh=y&&y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y,"__esModule",{value:!0});y.ProgressType=y.ProgressToken=y.createMessageConnection=y.NullLogger=y.ConnectionOptions=y.ConnectionStrategy=y.AbstractMessageBuffer=y.WriteableStreamMessageWriter=y.AbstractMessageWriter=y.MessageWriter=y.ReadableStreamMessageReader=y.AbstractMessageReader=y.MessageReader=y.SharedArrayReceiverStrategy=y.SharedArraySenderStrategy=y.CancellationToken=y.CancellationTokenSource=y.Emitter=y.Event=y.Disposable=y.LRUCache=y.Touch=y.LinkedMap=y.ParameterStructures=y.NotificationType9=y.NotificationType8=y.NotificationType7=y.NotificationType6=y.NotificationType5=y.NotificationType4=y.NotificationType3=y.NotificationType2=y.NotificationType1=y.NotificationType0=y.NotificationType=y.ErrorCodes=y.ResponseError=y.RequestType9=y.RequestType8=y.RequestType7=y.RequestType6=y.RequestType5=y.RequestType4=y.RequestType3=y.RequestType2=y.RequestType1=y.RequestType0=y.RequestType=y.Message=y.RAL=void 0;y.MessageStrategy=y.CancellationStrategy=y.CancellationSenderStrategy=y.RequestCancellationReceiverStrategy=y.IdCancellationReceiverStrategy=y.CancellationReceiverStrategy=y.ConnectionError=y.ConnectionErrors=y.LogTraceNotification=y.SetTraceNotification=y.TraceFormat=y.TraceValues=y.TraceValue=y.Trace=void 0;var Q=ii();Object.defineProperty(y,"Message",{enumerable:!0,get:function(){return Q.Message}});Object.defineProperty(y,"RequestType",{enumerable:!0,get:function(){return Q.RequestType}});Object.defineProperty(y,"RequestType0",{enumerable:!0,get:function(){return Q.RequestType0}});Object.defineProperty(y,"RequestType1",{enumerable:!0,get:function(){return Q.RequestType1}});Object.defineProperty(y,"RequestType2",{enumerable:!0,get:function(){return Q.RequestType2}});Object.defineProperty(y,"RequestType3",{enumerable:!0,get:function(){return Q.RequestType3}});Object.defineProperty(y,"RequestType4",{enumerable:!0,get:function(){return Q.RequestType4}});Object.defineProperty(y,"RequestType5",{enumerable:!0,get:function(){return Q.RequestType5}});Object.defineProperty(y,"RequestType6",{enumerable:!0,get:function(){return Q.RequestType6}});Object.defineProperty(y,"RequestType7",{enumerable:!0,get:function(){return Q.RequestType7}});Object.defineProperty(y,"RequestType8",{enumerable:!0,get:function(){return Q.RequestType8}});Object.defineProperty(y,"RequestType9",{enumerable:!0,get:function(){return Q.RequestType9}});Object.defineProperty(y,"ResponseError",{enumerable:!0,get:function(){return Q.ResponseError}});Object.defineProperty(y,"ErrorCodes",{enumerable:!0,get:function(){return Q.ErrorCodes}});Object.defineProperty(y,"NotificationType",{enumerable:!0,get:function(){return Q.NotificationType}});Object.defineProperty(y,"NotificationType0",{enumerable:!0,get:function(){return Q.NotificationType0}});Object.defineProperty(y,"NotificationType1",{enumerable:!0,get:function(){return Q.NotificationType1}});Object.defineProperty(y,"NotificationType2",{enumerable:!0,get:function(){return Q.NotificationType2}});Object.defineProperty(y,"NotificationType3",{enumerable:!0,get:function(){return Q.NotificationType3}});Object.defineProperty(y,"NotificationType4",{enumerable:!0,get:function(){return Q.NotificationType4}});Object.defineProperty(y,"NotificationType5",{enumerable:!0,get:function(){return Q.NotificationType5}});Object.defineProperty(y,"NotificationType6",{enumerable:!0,get:function(){return Q.NotificationType6}});Object.defineProperty(y,"NotificationType7",{enumerable:!0,get:function(){return Q.NotificationType7}});Object.defineProperty(y,"NotificationType8",{enumerable:!0,get:function(){return Q.NotificationType8}});Object.defineProperty(y,"NotificationType9",{enumerable:!0,get:function(){return Q.NotificationType9}});Object.defineProperty(y,"ParameterStructures",{enumerable:!0,get:function(){return Q.ParameterStructures}});var Ni=ci();Object.defineProperty(y,"LinkedMap",{enumerable:!0,get:function(){return Ni.LinkedMap}});Object.defineProperty(y,"LRUCache",{enumerable:!0,get:function(){return Ni.LRUCache}});Object.defineProperty(y,"Touch",{enumerable:!0,get:function(){return Ni.Touch}});var Yh=Qa();Object.defineProperty(y,"Disposable",{enumerable:!0,get:function(){return Yh.Disposable}});var su=Bt();Object.defineProperty(y,"Event",{enumerable:!0,get:function(){return su.Event}});Object.defineProperty(y,"Emitter",{enumerable:!0,get:function(){return su.Emitter}});var cu=ir();Object.defineProperty(y,"CancellationTokenSource",{enumerable:!0,get:function(){return cu.CancellationTokenSource}});Object.defineProperty(y,"CancellationToken",{enumerable:!0,get:function(){return cu.CancellationToken}});var au=za();Object.defineProperty(y,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return au.SharedArraySenderStrategy}});Object.defineProperty(y,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return au.SharedArrayReceiverStrategy}});var Gi=Ka();Object.defineProperty(y,"MessageReader",{enumerable:!0,get:function(){return Gi.MessageReader}});Object.defineProperty(y,"AbstractMessageReader",{enumerable:!0,get:function(){return Gi.AbstractMessageReader}});Object.defineProperty(y,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Gi.ReadableStreamMessageReader}});var Hi=eu();Object.defineProperty(y,"MessageWriter",{enumerable:!0,get:function(){return Hi.MessageWriter}});Object.defineProperty(y,"AbstractMessageWriter",{enumerable:!0,get:function(){return Hi.AbstractMessageWriter}});Object.defineProperty(y,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Hi.WriteableStreamMessageWriter}});var Jh=tu();Object.defineProperty(y,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Jh.AbstractMessageBuffer}});var ne=iu();Object.defineProperty(y,"ConnectionStrategy",{enumerable:!0,get:function(){return ne.ConnectionStrategy}});Object.defineProperty(y,"ConnectionOptions",{enumerable:!0,get:function(){return ne.ConnectionOptions}});Object.defineProperty(y,"NullLogger",{enumerable:!0,get:function(){return ne.NullLogger}});Object.defineProperty(y,"createMessageConnection",{enumerable:!0,get:function(){return ne.createMessageConnection}});Object.defineProperty(y,"ProgressToken",{enumerable:!0,get:function(){return ne.ProgressToken}});Object.defineProperty(y,"ProgressType",{enumerable:!0,get:function(){return ne.ProgressType}});Object.defineProperty(y,"Trace",{enumerable:!0,get:function(){return ne.Trace}});Object.defineProperty(y,"TraceValue",{enumerable:!0,get:function(){return ne.TraceValue}});Object.defineProperty(y,"TraceFormat",{enumerable:!0,get:function(){return ne.TraceFormat}});Object.defineProperty(y,"SetTraceNotification",{enumerable:!0,get:function(){return ne.SetTraceNotification}});Object.defineProperty(y,"LogTraceNotification",{enumerable:!0,get:function(){return ne.LogTraceNotification}});Object.defineProperty(y,"ConnectionErrors",{enumerable:!0,get:function(){return ne.ConnectionErrors}});Object.defineProperty(y,"ConnectionError",{enumerable:!0,get:function(){return ne.ConnectionError}});Object.defineProperty(y,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.CancellationReceiverStrategy}});Object.defineProperty(y,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.IdCancellationReceiverStrategy}});Object.defineProperty(y,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ne.RequestCancellationReceiverStrategy}});Object.defineProperty(y,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ne.CancellationSenderStrategy}});Object.defineProperty(y,"CancellationStrategy",{enumerable:!0,get:function(){return ne.CancellationStrategy}});Object.defineProperty(y,"MessageStrategy",{enumerable:!0,get:function(){return ne.MessageStrategy}});Object.defineProperty(y,"TraceValues",{enumerable:!0,get:function(){return ne.TraceValues}});var eg=Zh(ft());y.RAL=eg.default});var Dr={};Ga(Dr,{AnnotatedTextEdit:()=>tt,ApplyKind:()=>ss,ChangeAnnotation:()=>ht,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>vs,CodeActionContext:()=>Cs,CodeActionKind:()=>bs,CodeActionTag:()=>Cr,CodeActionTriggerKind:()=>En,CodeDescription:()=>Vi,CodeLens:()=>Ss,Color:()=>pr,ColorInformation:()=>Wi,ColorPresentation:()=>Ui,Command:()=>Mt,CompletionItem:()=>as,CompletionItemKind:()=>ts,CompletionItemLabelDetails:()=>cs,CompletionItemTag:()=>rs,CompletionList:()=>us,CreateFile:()=>Xt,DeleteFile:()=>Yt,Diagnostic:()=>On,DiagnosticRelatedInformation:()=>yr,DiagnosticSeverity:()=>$i,DiagnosticTag:()=>zi,DocumentHighlight:()=>hs,DocumentHighlightKind:()=>ms,DocumentLink:()=>Ds,DocumentSymbol:()=>_s,DocumentUri:()=>Fi,EOL:()=>tg,FoldingRange:()=>Qi,FoldingRangeKind:()=>Bi,FormattingOptions:()=>Is,Hover:()=>ls,InlayHint:()=>As,InlayHintKind:()=>vr,InlayHintLabelPart:()=>Sr,InlineCompletionContext:()=>Fs,InlineCompletionItem:()=>qs,InlineCompletionList:()=>Ns,InlineCompletionTriggerKind:()=>Gs,InlineValueContext:()=>Es,InlineValueEvaluatableExpression:()=>Ms,InlineValueText:()=>Rs,InlineValueVariableLookup:()=>xs,InsertReplaceEdit:()=>os,InsertTextFormat:()=>ns,InsertTextMode:()=>is,LanguageKind:()=>Ji,Location:()=>Pn,LocationLink:()=>Li,MarkedString:()=>Mn,MarkupContent:()=>gt,MarkupKind:()=>br,OptionalVersionedTextDocumentIdentifier:()=>xn,ParameterInformation:()=>ds,Position:()=>Me,Range:()=>Z,RenameFile:()=>Zt,SelectedCompletionInfo:()=>Hs,SelectionRange:()=>ws,SemanticTokenModifiers:()=>Ps,SemanticTokenTypes:()=>ks,SemanticTokens:()=>Os,SignatureInformation:()=>fs,SnippetTextEdit:()=>Ki,StringValue:()=>Ir,SymbolInformation:()=>ys,SymbolKind:()=>gs,SymbolTag:()=>ps,TextDocument:()=>Ls,TextDocumentEdit:()=>Rn,TextDocumentIdentifier:()=>Zi,TextDocumentItem:()=>es,TextEdit:()=>Qe,URI:()=>gr,VersionedTextDocumentIdentifier:()=>Yi,WorkspaceChange:()=>Xi,WorkspaceEdit:()=>Tr,WorkspaceFolder:()=>js,WorkspaceSymbol:()=>Ts,integer:()=>ji,uinteger:()=>kn});var Fi,gr,ji,kn,Me,Z,Pn,Li,pr,Wi,Ui,Bi,Qi,yr,$i,zi,Vi,On,Mt,Qe,ht,oe,tt,Rn,Xt,Zt,Yt,Tr,Kt,Ki,_r,Xi,Zi,Yi,xn,Ji,es,br,gt,ts,ns,rs,os,is,ss,cs,as,us,Mn,ls,ds,fs,ms,hs,gs,ps,ys,Ts,_s,bs,En,Cs,Cr,vs,Ss,Is,Ds,ws,ks,Ps,Os,Rs,xs,Ms,Es,vr,Sr,As,Ir,qs,Ns,Gs,Hs,Fs,js,tg,Ls,Ws,f,wr=Na(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Fi||(Fi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(gr||(gr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(ji||(ji={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(kn||(kn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=kn.MAX_VALUE),o===Number.MAX_VALUE&&(o=kn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(Me||(Me={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:Me.create(r,o),end:Me.create(i,s)};if(Me.is(r)&&Me.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.start)&&Me.is(o.end)}e.is=n})(Z||(Z={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(Pn||(Pn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.targetRange)&&f.string(o.targetUri)&&Z.is(o.targetSelectionRange)&&(Z.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})(Li||(Li={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(pr||(pr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&pr.is(o.color)}e.is=n})(Wi||(Wi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||Qe.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,Qe.is))}e.is=n})(Ui||(Ui={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Bi||(Bi={}));(function(e){function t(r,o,i,s,a,p){let m={startLine:r,endLine:o};return f.defined(i)&&(m.startCharacter=i),f.defined(s)&&(m.endCharacter=s),f.defined(a)&&(m.kind=a),f.defined(p)&&(m.collapsedText=p),m}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Qi||(Qi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Pn.is(o.location)&&f.string(o.message)}e.is=n})(yr||(yr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})($i||($i={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(zi||(zi={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(Vi||(Vi={}));(function(e){function t(i,s,a,p,m,h){let C={range:i,message:s};return f.defined(a)&&(C.severity=a),f.defined(p)&&(C.code=p),f.defined(m)&&(C.source=m),f.defined(h)&&(C.relatedInformation=h),C}e.create=t;function n(i){var s;let a=i;return f.defined(a)&&Z.is(a.range)&&(f.string(a.message)||gt.is(a.message))&&(f.number(a.severity)||f.undefined(a.severity))&&(f.integer(a.code)||f.string(a.code)||f.undefined(a.code))&&(f.undefined(a.codeDescription)||f.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(a.source)||f.undefined(a.source))&&(f.undefined(a.relatedInformation)||f.typedArray(a.relatedInformation,yr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(gt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(On||(On={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(Mt||(Mt={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Z.is(s.range)}e.is=o})(Qe||(Qe={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(ht||(ht={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(i,s,a){return{range:i,newText:s,annotationId:a}}e.replace=t;function n(i,s,a){return{range:{start:i,end:i},newText:s,annotationId:a}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return Qe.is(s)&&(ht.is(s.annotationId)||oe.is(s.annotationId))}e.is=o})(tt||(tt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&xn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Rn||(Rn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Xt||(Xt={}));(function(e){function t(r,o,i,s){let a={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Zt||(Zt={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||oe.is(o.annotationId))}e.is=n})(Yt||(Yt={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?Xt.is(o)||Zt.is(o)||Yt.is(o):Rn.is(o)))}e.is=t})(Tr||(Tr={}));Kt=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=Qe.insert(t,n):oe.is(r)?(i=r,o=tt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=Qe.replace(t,n):oe.is(r)?(i=r,o=tt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=Qe.del(t):oe.is(n)?(o=n,r=tt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=tt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Z.is(r.range)&&Ir.isSnippet(r.snippet)&&(r.annotationId===void 0||ht.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(Ki||(Ki={}));_r=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Xi=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new _r(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Rn.is(n)){let r=new Kt(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Kt(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(xn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new Kt(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Kt(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new _r,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ht.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Xt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Xt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;ht.is(r)||oe.is(r)?i=r:o=r;let s,a;if(i===void 0?s=Zt.create(t,n,o):(a=oe.is(i)?i:this._changeAnnotations.manage(i),s=Zt.create(t,n,o,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;ht.is(n)||oe.is(n)?o=n:r=n;let i,s;if(o===void 0?i=Yt.create(t,r):(s=oe.is(o)?o:this._changeAnnotations.manage(o),i=Yt.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(Zi||(Zi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(Yi||(Yi={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(xn||(xn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(Ji||(Ji={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(es||(es={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(br||(br={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&br.is(r.kind)&&f.string(r.value)}e.is=t})(gt||(gt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ts||(ts={}));(function(e){e.PlainText=1,e.Snippet=2})(ns||(ns={}));(function(e){e.Deprecated=1})(rs||(rs={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Z.is(o.insert)&&Z.is(o.replace)}e.is=n})(os||(os={}));(function(e){e.asIs=1,e.adjustIndentation=2})(is||(is={}));(function(e){e.Replace=1,e.Merge=2})(ss||(ss={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(cs||(cs={}));(function(e){function t(n){return{label:n}}e.create=t})(as||(as={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(us||(us={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(Mn||(Mn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(gt.is(r.contents)||Mn.is(r.contents)||f.typedArray(r.contents,Mn.is))&&(n.range===void 0||Z.is(n.range))}e.is=t})(ls||(ls={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ds||(ds={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(fs||(fs={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(ms||(ms={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(hs||(hs={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(gs||(gs={}));(function(e){e.Deprecated=1})(ps||(ps={}));(function(e){function t(n,r,o,i,s){let a={name:n,kind:r,location:{uri:i,range:o}};return s&&(a.containerName=s),a}e.create=t})(ys||(ys={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(Ts||(Ts={}));(function(e){function t(r,o,i,s,a,p){let m={name:r,detail:o,kind:i,range:s,selectionRange:a};return p!==void 0&&(m.children=p),m}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Z.is(o.range)&&Z.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(_s||(_s={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(bs||(bs={}));(function(e){e.Invoked=1,e.Automatic=2})(En||(En={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,On.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===En.Invoked||o.triggerKind===En.Automatic)}e.is=n})(Cs||(Cs={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Cr||(Cr={}));(function(e){function t(r,o,i){let s={title:r},a=!0;return typeof o=="string"?(a=!1,s.kind=o):Mt.is(o)?s.command=o:s.edit=o,a&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,On.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Mt.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||Tr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Cr.is))}e.is=n})(vs||(vs={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.command)||Mt.is(o.command))}e.is=n})(Ss||(Ss={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(Is||(Is={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Ds||(Ds={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Z.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(ws||(ws={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(ks||(ks={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ps||(Ps={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Os||(Os={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.string(o.text)}e.is=n})(Rs||(Rs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(xs||(xs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Z.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Ms||(Ms={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Z.is(r.stoppedLocation)}e.is=n})(Es||(Es={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(vr||(vr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||gt.is(o.tooltip))&&(o.location===void 0||Pn.is(o.location))&&(o.command===void 0||Mt.is(o.command))}e.is=n})(Sr||(Sr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,Sr.is))&&(o.kind===void 0||vr.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,Qe.is)&&(o.tooltip===void 0||f.string(o.tooltip)||gt.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(As||(As={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Ir||(Ir={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(qs||(qs={}));(function(e){function t(n){return{items:n}}e.create=t})(Ns||(Ns={}));(function(e){e.Invoked=1,e.Automatic=2})(Gs||(Gs={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Hs||(Hs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Fs||(Fs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&gr.is(r.uri)&&f.string(r.name)}e.is=t})(js||(js={}));tg=[` +"use strict";var Ho=Object.defineProperty;var gh=Object.getOwnPropertyDescriptor;var ph=Object.getOwnPropertyNames;var yh=Object.prototype.hasOwnProperty;var za=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Va=(e,t)=>{for(var n in t)Ho(e,n,{get:t[n],enumerable:!0})},Th=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ph(t))!yh.call(e,o)&&o!==n&&Ho(e,o,{get:()=>t[o],enumerable:!(r=gh(t,o))||r.enumerable});return e};var cr=e=>Th(Ho({},"__esModule",{value:!0}),e);var ar=I(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=_h;Fe.string=Ka;Fe.number=bh;Fe.error=vh;Fe.func=Xa;Fe.array=Za;Fe.stringArray=Ch;Fe.typedArray=Sh;Fe.thenable=Ih;function _h(e){return e===!0||e===!1}function Ka(e){return typeof e=="string"||e instanceof String}function bh(e){return typeof e=="number"||e instanceof Number}function vh(e){return e instanceof Error}function Xa(e){return typeof e=="function"}function Za(e){return Array.isArray(e)}function Ch(e){return Za(e)&&e.every(t=>Ka(t))}function Sh(e,t){return Array.isArray(e)&&e.every(t)}function Ih(e){return e&&Xa(e.then)}});var Kt=I(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.boolean=Dh;Je.string=Ya;Je.number=wh;Je.error=kh;Je.func=Ph;Je.array=Ja;Je.stringArray=Rh;function Dh(e){return e===!0||e===!1}function Ya(e){return typeof e=="string"||e instanceof String}function wh(e){return typeof e=="number"||e instanceof Number}function kh(e){return e instanceof Error}function Ph(e){return typeof e=="function"}function Ja(e){return Array.isArray(e)}function Rh(e){return Ja(e)&&e.every(t=>Ya(t))}});var li=I(P=>{"use strict";var Oh=P&&P.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xh=P&&P.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mh=P&&P.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.LRUCache=mt.LinkedMap=mt.Touch=void 0;var de;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(de||(mt.Touch=de={}));var ur=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=de.None){let r=this._map.get(t);if(r)return n!==de.None&&this.touch(r,n),r.value}set(t,n,r=de.None){let o=this._map.get(t);if(o)o.value=n,r!==de.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case de.None:this.addItemLast(o);break;case de.First:this.addItemFirst(o);break;case de.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==de.First&&n!==de.Last)){if(n===de.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===de.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};mt.LinkedMap=ur;var di=class extends ur{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=de.AsNew){return super.get(t,n)}peek(t){return super.get(t,de.None)}set(t,n){return super.set(t,n,de.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};mt.LRUCache=di});var nu=I(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.Disposable=void 0;var tu;(function(e){function t(n){return{dispose:n}}e.create=t})(tu||(lr.Disposable=tu={}))});var ht=I(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});var mi;function hi(){if(mi===void 0)throw new Error("No runtime abstraction layer installed");return mi}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");mi=n}e.install=t})(hi||(hi={}));gi.default=hi});var Xt=I(gt=>{"use strict";var Eh=gt&>.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gt,"__esModule",{value:!0});gt.Emitter=gt.Event=void 0;var Ah=Eh(ht()),ru;(function(e){let t={dispose(){}};e.None=function(){return t}})(ru||(gt.Event=ru={}));var pi=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new pi),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};gt.Emitter=yi});var mr=I(Ie=>{"use strict";var qh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Nh=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fh=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.SharedArrayReceiverStrategy=Zt.SharedArraySenderStrategy=void 0;var Wh=mr(),Pn;(function(e){e.Continue=0,e.Cancelled=1})(Pn||(Pn={}));var bi=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Pn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Pn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Zt.SharedArraySenderStrategy=bi;var vi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Pn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ci=class{token;constructor(t){this.token=new vi(t)}cancel(){}dispose(){}},Si=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Wh.CancellationTokenSource:new Ci(n)}};Zt.SharedArrayReceiverStrategy=Si});var Di=I(Yt=>{"use strict";var Uh=Yt&&Yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.Semaphore=void 0;var Qh=Uh(ht()),Ii=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Qh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Yt.Semaphore=Ii});var su=I(fe=>{"use strict";var Bh=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$h=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),zh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,ki.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};fe.ReadableStreamMessageReader=Ri});var du=I(me=>{"use strict";var Xh=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zh=me&&me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yh=me&&me.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(tg,r.byteLength.toString(),uu),o.push(uu),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};me.WriteableStreamMessageWriter=xi});var fu=I(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.AbstractMessageBuffer=void 0;var ng=13,rg=10,og=`\r +`,Mi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};pr.AbstractMessageBuffer=Mi});var pu=I(O=>{"use strict";var ig=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),sg=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cg=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},log:()=>{}});var H;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(H||(O.Trace=H={}));var Fi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Fi||(O.TraceValue=Fi={}));O.TraceValues=Fi;(function(e){function t(r){if(!Z.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(H||(O.Trace=H={}));var Pe;(function(e){e.Text="text",e.JSON="json"})(Pe||(O.TraceFormat=Pe={}));(function(e){function t(n){return Z.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Pe||(O.TraceFormat=Pe={}));var Gi;(function(e){e.type=new E.NotificationType("$/setTrace")})(Gi||(O.SetTraceNotification=Gi={}));var yr;(function(e){e.type=new E.NotificationType("$/logTrace")})(yr||(O.LogTraceNotification=yr={}));var Mn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Mn||(O.ConnectionErrors=Mn={}));var en=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=en;var Hi;(function(e){function t(n){let r=n;return r&&Z.func(r.cancelUndispatched)}e.is=t})(Hi||(O.ConnectionStrategy=Hi={}));var Tr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(Tr||(O.IdCancellationReceiverStrategy=Tr={}));var ji;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(ji||(O.RequestCancellationReceiverStrategy=ji={}));var _r;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ei.CancellationTokenSource}});function t(n){return Tr.is(n)||ji.is(n)}e.is=t})(_r||(O.CancellationReceiverStrategy=_r={}));var br;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(En.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&Z.func(r.sendCancellation)&&Z.func(r.cleanup)}e.is=t})(br||(O.CancellationSenderStrategy=br={}));var vr;(function(e){e.Message=Object.freeze({receiver:_r.Message,sender:br.Message});function t(n){let r=n;return r&&_r.is(r.receiver)&&br.is(r.sender)}e.is=t})(vr||(O.CancellationStrategy=vr={}));var Cr;(function(e){function t(n){let r=n;return r&&Z.func(r.handleMessage)}e.is=t})(Cr||(O.MessageStrategy=Cr={}));var gu;(function(e){function t(n){let r=n;return r&&(vr.is(r.cancellationStrategy)||Hi.is(r.connectionStrategy)||Cr.is(r.messageStrategy)||Z.number(r.maxParallelism))}e.is=t})(gu||(O.ConnectionOptions=gu={}));var Ge;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Ge||(Ge={}));function ug(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,c=0,g="2.0",d=r?.maxParallelism??-1,h=0,b,m=new Map,T,D=new Map,q=new Map,N,x=new hu.LinkedMap,p=new Map,l=new Set,C=new Map,k=H.Off,M=Pe.Text,L,K=Ge.New,Ze=new On.Emitter,Aa=new On.Emitter,qa=new On.Emitter,Na=new On.Emitter,Fa=new On.Emitter,lt=r&&r.cancellationStrategy?r.cancellationStrategy:vr.Message;function Ym(u){}function Ga(){return K===Ge.Listening}function Ha(){return K===Ge.Closed}function zt(){return K===Ge.Disposed}function ja(){(K===Ge.New||K===Ge.Listening)&&(K=Ge.Closed,Aa.fire(void 0))}function Jm(u){Ze.fire([u,void 0,void 0])}function eh(u){Ze.fire(u)}e.onClose(ja),e.onError(Jm),t.onClose(ja),t.onError(eh);function La(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function th(u){return u===null?"res-unknown-"+(++c).toString():"res-"+u.toString()}function nh(){return"not-"+(++s).toString()}function rh(u,v){E.Message.isRequest(v)?u.set(La(v.id),v):E.Message.isResponse(v)?d===-1?u.set(th(v.id),v):Ua(v):u.set(nh(),v)}function qo(){N||x.size===0||d!==-1&&h>=d||(N=(0,mu.default)().timer.setImmediate(async()=>{if(N=void 0,x.size===0||d!==-1&&h>=d)return;let u=x.shift(),v;try{h++;let S=r?.messageStrategy;Cr.is(S)?v=S.handleMessage(u,Wa):v=Wa(u)}catch(S){o.error(`Processing message queue failed: ${S.toString()}`)}finally{v instanceof Promise?v.then(()=>{h--,qo()}).catch(S=>{o.error(`Processing message queue failed: ${S.toString()}`)}):h--,qo()}}))}async function Wa(u){return E.Message.isRequest(u)?ih(u):E.Message.isNotification(u)?sh(u):E.Message.isResponse(u)?Ua(u):ch(u)}let oh=u=>{try{if(E.Message.isNotification(u)&&u.method===En.type.method){let v=u.params.id,S=La(v),R=x.get(S);if(E.Message.isRequest(R)){let X=r?.connectionStrategy,W=X&&X.cancelUndispatched?X.cancelUndispatched(R,Ym):void 0;if(W&&(W.error!==void 0||W.result!==void 0)){x.delete(S),C.delete(v),W.id=R.id,No(W,u.method,Date.now()),t.write(W).catch(()=>o.error("Sending response for canceled message failed."));return}}let G=C.get(v);if(G!==void 0){G.cancel(),Fo(u);return}else l.add(v)}rh(x,u)}finally{qo()}};async function ih(u){if(zt())return Promise.resolve();function v(oe,le,J){let ee={jsonrpc:g,id:u.id};return oe instanceof E.ResponseError?ee.error=oe.toJson():ee.result=oe===void 0?null:oe,No(ee,le,J),t.write(ee)}function S(oe,le,J){let ee={jsonrpc:g,id:u.id,error:oe.toJson()};return No(ee,le,J),t.write(ee)}lh(u);let R=m.get(u.method),G,X;R&&(G=R.type,X=R.handler);let W=Date.now();if(X||b){let oe=u.id??String(Date.now()),le=Tr.is(lt.receiver)?lt.receiver.createCancellationTokenSource(oe):lt.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&le.cancel(),u.id!==null&&C.set(oe,le);try{let J;if(X)if(u.params===void 0){if(G!==void 0&&G.numberOfParams!==0)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines ${G.numberOfParams} params but received none.`),u.method,W);J=X(le.token)}else if(Array.isArray(u.params)){if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byName)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,W);J=X(...u.params,le.token)}else{if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byPosition)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,W);J=X(u.params,le.token)}else b&&(J=b(u.method,u.params,le.token));let ee=await J;await v(ee,u.method,W)}catch(J){J instanceof E.ResponseError?await v(J,u.method,W):J&&Z.string(J.message)?await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,W):await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,W)}finally{C.delete(oe)}}else await S(new E.ResponseError(E.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,W)}function Ua(u){if(!zt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let v=u.id,S=p.get(v);if(dh(u,S),S!==void 0){p.delete(v);try{if(u.error){let R=u.error;S.reject(new E.ResponseError(R.code,R.message,R.data))}else if(u.result!==void 0)S.resolve(u.result);else throw new Error("Should never happen.")}catch(R){R.message?o.error(`Response handler '${S.method}' failed with message: ${R.message}`):o.error(`Response handler '${S.method}' failed unexpectedly.`)}}}}async function sh(u){if(zt())return;let v,S;if(u.method===En.type.method){let R=u.params.id;l.delete(R),Fo(u);return}else{let R=D.get(u.method);R&&(S=R.handler,v=R.type)}if(S||T)try{if(Fo(u),S)if(u.params===void 0)v!==void 0&&v.numberOfParams!==0&&v.parameterStructures!==E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received none.`),await S();else if(Array.isArray(u.params)){let R=u.params;u.method===xn.type.method&&R.length===2&&Ai.is(R[0])?await S({token:R[0],value:R[1]}):(v!==void 0&&(v.parameterStructures===E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),v.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received ${R.length} arguments`)),await S(...R))}else v!==void 0&&v.parameterStructures===E.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await S(u.params);else T&&await T(u.method,u.params)}catch(R){R.message?o.error(`Notification handler '${u.method}' failed with message: ${R.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else qa.fire(u)}function ch(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let v=u;if(Z.string(v.id)||Z.number(v.id)){let S=v.id,R=p.get(S);R&&R.reject(new Error("The received response has neither a result nor an error property."))}}function dt(u){if(u!=null)switch(k){case H.Verbose:return JSON.stringify(u,null,4);case H.Compact:return JSON.stringify(u);default:return}}function ah(u){if(!(k===H.Off||!L))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${dt(u.params)}`),L.log(`Sending request '${u.method} - (${u.id})'.`,v)}else Vt("send-request",u)}function uh(u){if(!(k===H.Off||!L))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${dt(u.params)}`:v="No parameters provided."),L.log(`Sending notification '${u.method}'.`,v)}else Vt("send-notification",u)}function No(u,v,S){if(!(k===H.Off||!L))if(M===Pe.Text){let R;(k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?R=`Error data: ${dt(u.error.data)}`:u.result?R=`Result: ${dt(u.result)}`:u.error===void 0&&(R="No result returned.")),L.log(`Sending response '${v} - (${u.id})'. Processing request took ${Date.now()-S}ms`,R)}else Vt("send-response",u)}function lh(u){if(!(k===H.Off||!L))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${dt(u.params)}`),L.log(`Received request '${u.method} - (${u.id})'.`,v)}else Vt("receive-request",u)}function Fo(u){if(!(k===H.Off||!L||u.method===yr.type.method))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${dt(u.params)}`:v="No parameters provided."),L.log(`Received notification '${u.method}'.`,v)}else Vt("receive-notification",u)}function dh(u,v){if(!(k===H.Off||!L))if(M===Pe.Text){let S;if((k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?S=`Error data: ${dt(u.error.data)}`:u.result?S=`Result: ${dt(u.result)}`:u.error===void 0&&(S="No result returned.")),v){let R=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";L.log(`Received response '${v.method} - (${u.id})' in ${Date.now()-v.timerStart}ms.${R}`,S)}else L.log(`Received response ${u.id} without active response promise.`,S)}else Vt("receive-response",u)}function Vt(u,v){if(!L||k===H.Off)return;let S={isLSPMessage:!0,type:u,message:v,timestamp:Date.now()};L.log(S)}function Dn(){if(Ha())throw new en(Mn.Closed,"Connection is closed.");if(zt())throw new en(Mn.Disposed,"Connection is disposed.")}function fh(){if(Ga())throw new en(Mn.AlreadyListening,"Connection is already listening")}function mh(){if(!Ga())throw new Error("Call listen() first.")}function wn(u){return u===void 0?null:u}function Qa(u){if(u!==null)return u}function Ba(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Go(u,v){switch(u){case E.ParameterStructures.auto:return Ba(v)?Qa(v):[wn(v)];case E.ParameterStructures.byName:if(!Ba(v))throw new Error("Received parameters by name but param is not an object literal.");return Qa(v);case E.ParameterStructures.byPosition:return[wn(v)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function $a(u,v){let S,R=u.numberOfParams;switch(R){case 0:S=void 0;break;case 1:S=Go(u.parameterStructures,v[0]);break;default:S=[];for(let G=0;G{Dn();let S,R;if(Z.string(u)){S=u;let X=v[0],W=0,oe=E.ParameterStructures.auto;E.ParameterStructures.is(X)&&(W=1,oe=X);let le=v.length,J=le-W;switch(J){case 0:R=void 0;break;case 1:R=Go(oe,v[W]);break;default:if(oe===E.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);R=v.slice(W,le).map(ee=>wn(ee));break}}else{let X=v;S=u.method,R=$a(u,X)}let G={jsonrpc:g,method:S,params:R};return uh(G),t.write(G).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,v)=>{Dn();let S;return Z.func(u)?T=u:v&&(Z.string(u)?(S=u,D.set(u,{type:void 0,handler:v})):(S=u.method,D.set(u.method,{type:u,handler:v}))),{dispose:()=>{S!==void 0?D.get(S)?.handler===v&&D.delete(S):T===u&&(T=void 0)}}},onProgress:(u,v,S)=>{if(q.has(v))throw new Error(`Progress handler for token ${v} already registered`);return q.set(v,S),{dispose:()=>{q.get(v)===S&&q.delete(v)}}},sendProgress:(u,v,S)=>Ot.sendNotification(xn.type,{token:v,value:S}),onUnhandledProgress:Na.event,sendRequest:(u,...v)=>{Dn(),mh();function S(ee,Ne){let Ye=lt.sender.sendCancellation(ee,Ne);Ye===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ne}`):Ye.catch(()=>{o.log(`Sending cancellation messages for id ${Ne} failed.`)})}let R,G,X;if(Z.string(u)){R=u;let ee=v[0],Ne=v[v.length-1],Ye=0,kn=E.ParameterStructures.auto;E.ParameterStructures.is(ee)&&(Ye=1,kn=ee);let xt=v.length;Ei.CancellationToken.is(Ne)&&(xt=xt-1,X=Ne);let Be=xt-Ye;switch(Be){case 0:G=void 0;break;case 1:G=Go(kn,v[Ye]);break;default:if(kn===E.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);G=v.slice(Ye,xt).map(hh=>wn(hh));break}}else{let ee=v;R=u.method,G=$a(u,ee);let Ne=u.numberOfParams;X=Ei.CancellationToken.is(ee[Ne])?ee[Ne]:void 0}let W=i++,oe,le=!1;X!==void 0&&(X.isCancellationRequested?le=!0:oe=X.onCancellationRequested(()=>{S(Ot,W)}));let J={jsonrpc:g,id:W,method:R,params:G};return ah(J),typeof lt.sender.enableCancellation=="function"&<.sender.enableCancellation(J),new Promise(async(ee,Ne)=>{let Ye=Be=>{ee(Be),lt.sender.cleanup(W),oe?.dispose()},kn=Be=>{Ne(Be),lt.sender.cleanup(W),oe?.dispose()},xt={method:R,timerStart:Date.now(),resolve:Ye,reject:kn};try{p.set(W,xt),await t.write(J),le&&S(Ot,W)}catch(Be){throw p.delete(W),xt.reject(new E.ResponseError(E.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,v)=>{Dn();let S=null;return Ni.is(u)?(S=void 0,b=u):Z.string(u)?(S=null,v!==void 0&&(S=u,m.set(u,{handler:v,type:void 0}))):v!==void 0&&(S=u.method,m.set(u.method,{type:u,handler:v})),{dispose:()=>{S!==null&&(S!==void 0?m.get(S)?.handler===v&&m.delete(S):b===u&&(b=void 0))}}},hasPendingResponse:()=>p.size>0,trace:async(u,v,S)=>{let R=!1,G=Pe.Text;S!==void 0&&(Z.boolean(S)?R=S:(R=S.sendNotification||!1,G=S.traceFormat||Pe.Text)),k=u,M=G,k===H.Off?L=void 0:L=v,R&&!Ha()&&!zt()&&await Ot.sendNotification(Gi.type,{value:H.toString(u)})},onError:Ze.event,onClose:Aa.event,onUnhandledNotification:qa.event,onDispose:Fa.event,end:()=>{t.end()},dispose:()=>{if(zt())return;K=Ge.Disposed,Fa.fire(void 0);let u=new E.ResponseError(E.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let v of p.values())v.reject(u);p=new Map,C=new Map,l=new Set,x=new hu.LinkedMap,Z.func(t.dispose)&&t.dispose(),Z.func(e.dispose)&&e.dispose()},listen:()=>{Dn(),fh(),K=Ge.Listening,e.listen(oh)},inspect:()=>{(0,mu.default)().console.log("inspect")}};return Ot.onNotification(yr.type,u=>{if(k===H.Off||!L)return;let v=k===H.Verbose||k===H.Compact;L.log(u.message,v?u.verbose:void 0)}),Ot.onNotification(xn.type,async u=>{let v=q.get(u.token);v?await v(u.value):Na.fire(u)}),Ot}});var et=I(y=>{"use strict";var lg=y&&y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y,"__esModule",{value:!0});y.ProgressType=y.ProgressToken=y.createMessageConnection=y.NullLogger=y.ConnectionOptions=y.ConnectionStrategy=y.AbstractMessageBuffer=y.WriteableStreamMessageWriter=y.AbstractMessageWriter=y.MessageWriter=y.ReadableStreamMessageReader=y.AbstractMessageReader=y.MessageReader=y.SharedArrayReceiverStrategy=y.SharedArraySenderStrategy=y.CancellationToken=y.CancellationTokenSource=y.Emitter=y.Event=y.Disposable=y.LRUCache=y.Touch=y.LinkedMap=y.ParameterStructures=y.NotificationType9=y.NotificationType8=y.NotificationType7=y.NotificationType6=y.NotificationType5=y.NotificationType4=y.NotificationType3=y.NotificationType2=y.NotificationType1=y.NotificationType0=y.NotificationType=y.ErrorCodes=y.ResponseError=y.RequestType9=y.RequestType8=y.RequestType7=y.RequestType6=y.RequestType5=y.RequestType4=y.RequestType3=y.RequestType2=y.RequestType1=y.RequestType0=y.RequestType=y.Message=y.RAL=void 0;y.MessageStrategy=y.CancellationStrategy=y.CancellationSenderStrategy=y.RequestCancellationReceiverStrategy=y.IdCancellationReceiverStrategy=y.CancellationReceiverStrategy=y.ConnectionError=y.ConnectionErrors=y.LogTraceNotification=y.SetTraceNotification=y.TraceFormat=y.TraceValues=y.TraceValue=y.Trace=void 0;var $=li();Object.defineProperty(y,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(y,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(y,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(y,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(y,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(y,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(y,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(y,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(y,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(y,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(y,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(y,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(y,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(y,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(y,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(y,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(y,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(y,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(y,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(y,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(y,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(y,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(y,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(y,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(y,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(y,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var Li=fi();Object.defineProperty(y,"LinkedMap",{enumerable:!0,get:function(){return Li.LinkedMap}});Object.defineProperty(y,"LRUCache",{enumerable:!0,get:function(){return Li.LRUCache}});Object.defineProperty(y,"Touch",{enumerable:!0,get:function(){return Li.Touch}});var dg=nu();Object.defineProperty(y,"Disposable",{enumerable:!0,get:function(){return dg.Disposable}});var yu=Xt();Object.defineProperty(y,"Event",{enumerable:!0,get:function(){return yu.Event}});Object.defineProperty(y,"Emitter",{enumerable:!0,get:function(){return yu.Emitter}});var Tu=mr();Object.defineProperty(y,"CancellationTokenSource",{enumerable:!0,get:function(){return Tu.CancellationTokenSource}});Object.defineProperty(y,"CancellationToken",{enumerable:!0,get:function(){return Tu.CancellationToken}});var _u=ou();Object.defineProperty(y,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return _u.SharedArraySenderStrategy}});Object.defineProperty(y,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return _u.SharedArrayReceiverStrategy}});var Wi=su();Object.defineProperty(y,"MessageReader",{enumerable:!0,get:function(){return Wi.MessageReader}});Object.defineProperty(y,"AbstractMessageReader",{enumerable:!0,get:function(){return Wi.AbstractMessageReader}});Object.defineProperty(y,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Wi.ReadableStreamMessageReader}});var Ui=du();Object.defineProperty(y,"MessageWriter",{enumerable:!0,get:function(){return Ui.MessageWriter}});Object.defineProperty(y,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ui.AbstractMessageWriter}});Object.defineProperty(y,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ui.WriteableStreamMessageWriter}});var fg=fu();Object.defineProperty(y,"AbstractMessageBuffer",{enumerable:!0,get:function(){return fg.AbstractMessageBuffer}});var re=pu();Object.defineProperty(y,"ConnectionStrategy",{enumerable:!0,get:function(){return re.ConnectionStrategy}});Object.defineProperty(y,"ConnectionOptions",{enumerable:!0,get:function(){return re.ConnectionOptions}});Object.defineProperty(y,"NullLogger",{enumerable:!0,get:function(){return re.NullLogger}});Object.defineProperty(y,"createMessageConnection",{enumerable:!0,get:function(){return re.createMessageConnection}});Object.defineProperty(y,"ProgressToken",{enumerable:!0,get:function(){return re.ProgressToken}});Object.defineProperty(y,"ProgressType",{enumerable:!0,get:function(){return re.ProgressType}});Object.defineProperty(y,"Trace",{enumerable:!0,get:function(){return re.Trace}});Object.defineProperty(y,"TraceValue",{enumerable:!0,get:function(){return re.TraceValue}});Object.defineProperty(y,"TraceFormat",{enumerable:!0,get:function(){return re.TraceFormat}});Object.defineProperty(y,"SetTraceNotification",{enumerable:!0,get:function(){return re.SetTraceNotification}});Object.defineProperty(y,"LogTraceNotification",{enumerable:!0,get:function(){return re.LogTraceNotification}});Object.defineProperty(y,"ConnectionErrors",{enumerable:!0,get:function(){return re.ConnectionErrors}});Object.defineProperty(y,"ConnectionError",{enumerable:!0,get:function(){return re.ConnectionError}});Object.defineProperty(y,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return re.CancellationReceiverStrategy}});Object.defineProperty(y,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.IdCancellationReceiverStrategy}});Object.defineProperty(y,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.RequestCancellationReceiverStrategy}});Object.defineProperty(y,"CancellationSenderStrategy",{enumerable:!0,get:function(){return re.CancellationSenderStrategy}});Object.defineProperty(y,"CancellationStrategy",{enumerable:!0,get:function(){return re.CancellationStrategy}});Object.defineProperty(y,"MessageStrategy",{enumerable:!0,get:function(){return re.MessageStrategy}});Object.defineProperty(y,"TraceValues",{enumerable:!0,get:function(){return re.TraceValues}});var mg=lg(ht());y.RAL=mg.default});var Er={};Va(Er,{AnnotatedTextEdit:()=>tt,ApplyKind:()=>ds,ChangeAnnotation:()=>pt,ChangeAnnotationIdentifier:()=>ie,CodeAction:()=>ks,CodeActionContext:()=>ws,CodeActionKind:()=>Ds,CodeActionTag:()=>Rr,CodeActionTriggerKind:()=>jn,CodeDescription:()=>Ji,CodeLens:()=>Ps,Color:()=>Ir,ColorInformation:()=>zi,ColorPresentation:()=>Vi,Command:()=>Et,CompletionItem:()=>ms,CompletionItemKind:()=>ss,CompletionItemLabelDetails:()=>fs,CompletionItemTag:()=>as,CompletionList:()=>hs,CreateFile:()=>nn,DeleteFile:()=>on,Diagnostic:()=>Nn,DiagnosticRelatedInformation:()=>Dr,DiagnosticSeverity:()=>Zi,DiagnosticTag:()=>Yi,DocumentHighlight:()=>_s,DocumentHighlightKind:()=>Ts,DocumentLink:()=>Os,DocumentSymbol:()=>Is,DocumentUri:()=>Qi,EOL:()=>hg,FoldingRange:()=>Xi,FoldingRangeKind:()=>Ki,FormattingOptions:()=>Rs,Hover:()=>gs,InlayHint:()=>Hs,InlayHintKind:()=>Or,InlayHintLabelPart:()=>xr,InlineCompletionContext:()=>Qs,InlineCompletionItem:()=>js,InlineCompletionList:()=>Ls,InlineCompletionTriggerKind:()=>Ws,InlineValueContext:()=>Gs,InlineValueEvaluatableExpression:()=>Fs,InlineValueText:()=>qs,InlineValueVariableLookup:()=>Ns,InsertReplaceEdit:()=>us,InsertTextFormat:()=>cs,InsertTextMode:()=>ls,LanguageKind:()=>os,Location:()=>qn,LocationLink:()=>$i,MarkedString:()=>Hn,MarkupContent:()=>yt,MarkupKind:()=>Pr,OptionalVersionedTextDocumentIdentifier:()=>Gn,ParameterInformation:()=>ps,Position:()=>xe,Range:()=>Y,RenameFile:()=>rn,SelectedCompletionInfo:()=>Us,SelectionRange:()=>xs,SemanticTokenModifiers:()=>Es,SemanticTokenTypes:()=>Ms,SemanticTokens:()=>As,SignatureInformation:()=>ys,SnippetTextEdit:()=>es,StringValue:()=>Mr,SymbolInformation:()=>Cs,SymbolKind:()=>bs,SymbolTag:()=>vs,TextDocument:()=>$s,TextDocumentEdit:()=>Fn,TextDocumentIdentifier:()=>ns,TextDocumentItem:()=>is,TextEdit:()=>$e,URI:()=>Sr,VersionedTextDocumentIdentifier:()=>rs,WorkspaceChange:()=>ts,WorkspaceEdit:()=>wr,WorkspaceFolder:()=>Bs,WorkspaceSymbol:()=>Ss,integer:()=>Bi,uinteger:()=>An});var Qi,Sr,Bi,An,xe,Y,qn,$i,Ir,zi,Vi,Ki,Xi,Dr,Zi,Yi,Ji,Nn,Et,$e,pt,ie,tt,Fn,nn,rn,on,wr,tn,es,kr,ts,ns,rs,Gn,os,is,Pr,yt,ss,cs,as,us,ls,ds,fs,ms,hs,Hn,gs,ps,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,jn,ws,Rr,ks,Ps,Rs,Os,xs,Ms,Es,As,qs,Ns,Fs,Gs,Or,xr,Hs,Mr,js,Ls,Ws,Us,Qs,Bs,hg,$s,zs,f,Ar=za(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Qi||(Qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(Sr||(Sr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Bi||(Bi={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(An||(An={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=An.MAX_VALUE),o===Number.MAX_VALUE&&(o=An.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(xe||(xe={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:xe.create(r,o),end:xe.create(i,s)};if(xe.is(r)&&xe.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.start)&&xe.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(qn||(qn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.targetRange)&&f.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})($i||($i={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(Ir||(Ir={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&Ir.is(o.color)}e.is=n})(zi||(zi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||$e.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(Vi||(Vi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ki||(Ki={}));(function(e){function t(r,o,i,s,c,g){let d={startLine:r,endLine:o};return f.defined(i)&&(d.startCharacter=i),f.defined(s)&&(d.endCharacter=s),f.defined(c)&&(d.kind=c),f.defined(g)&&(d.collapsedText=g),d}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Xi||(Xi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&qn.is(o.location)&&f.string(o.message)}e.is=n})(Dr||(Dr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Zi||(Zi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Yi||(Yi={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(Ji||(Ji={}));(function(e){function t(i,s,c,g,d,h){let b={range:i,message:s};return f.defined(c)&&(b.severity=c),f.defined(g)&&(b.code=g),f.defined(d)&&(b.source=d),f.defined(h)&&(b.relatedInformation=h),b}e.create=t;function n(i){var s;let c=i;return f.defined(c)&&Y.is(c.range)&&(f.string(c.message)||yt.is(c.message))&&(f.number(c.severity)||f.undefined(c.severity))&&(f.integer(c.code)||f.string(c.code)||f.undefined(c.code))&&(f.undefined(c.codeDescription)||f.string((s=c.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(c.source)||f.undefined(c.source))&&(f.undefined(c.relatedInformation)||f.typedArray(c.relatedInformation,Dr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(yt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Nn||(Nn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(Et||(Et={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(pt||(pt={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(ie||(ie={}));(function(e){function t(i,s,c){return{range:i,newText:s,annotationId:c}}e.replace=t;function n(i,s,c){return{range:{start:i,end:i},newText:s,annotationId:c}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(pt.is(s.annotationId)||ie.is(s.annotationId))}e.is=o})(tt||(tt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Gn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Fn||(Fn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(nn||(nn={}));(function(e){function t(r,o,i,s){let c={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(c.options=i),s!==void 0&&(c.annotationId=s),c}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(rn||(rn={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(on||(on={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?nn.is(o)||rn.is(o)||on.is(o):Fn.is(o)))}e.is=t})(wr||(wr={}));tn=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):ie.is(r)?(i=r,o=tt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):ie.is(r)?(i=r,o=tt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):ie.is(n)?(o=n,r=tt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=tt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Y.is(r.range)&&Mr.isSnippet(r.snippet)&&(r.annotationId===void 0||pt.is(r.annotationId)||ie.is(r.annotationId))}e.is=t})(es||(es={}));kr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ie.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},ts=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new kr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Fn.is(n)){let r=new tn(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new tn(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Gn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new tn(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new tn(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;pt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=nn.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=nn.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;pt.is(r)||ie.is(r)?i=r:o=r;let s,c;if(i===void 0?s=rn.create(t,n,o):(c=ie.is(i)?i:this._changeAnnotations.manage(i),s=rn.create(t,n,o,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;pt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=on.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=on.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(ns||(ns={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(rs||(rs={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(Gn||(Gn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(os||(os={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(is||(is={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Pr||(Pr={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&Pr.is(r.kind)&&f.string(r.value)}e.is=t})(yt||(yt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ss||(ss={}));(function(e){e.PlainText=1,e.Snippet=2})(cs||(cs={}));(function(e){e.Deprecated=1})(as||(as={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(us||(us={}));(function(e){e.asIs=1,e.adjustIndentation=2})(ls||(ls={}));(function(e){e.Replace=1,e.Merge=2})(ds||(ds={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(fs||(fs={}));(function(e){function t(n){return{label:n}}e.create=t})(ms||(ms={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(hs||(hs={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(Hn||(Hn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(yt.is(r.contents)||Hn.is(r.contents)||f.typedArray(r.contents,Hn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(gs||(gs={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ps||(ps={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ys||(ys={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(Ts||(Ts={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(_s||(_s={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(bs||(bs={}));(function(e){e.Deprecated=1})(vs||(vs={}));(function(e){function t(n,r,o,i,s){let c={name:n,kind:r,location:{uri:i,range:o}};return s&&(c.containerName=s),c}e.create=t})(Cs||(Cs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(Ss||(Ss={}));(function(e){function t(r,o,i,s,c,g){let d={name:r,detail:o,kind:i,range:s,selectionRange:c};return g!==void 0&&(d.children=g),d}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(Is||(Is={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(Ds||(Ds={}));(function(e){e.Invoked=1,e.Automatic=2})(jn||(jn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,Nn.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===jn.Invoked||o.triggerKind===jn.Automatic)}e.is=n})(ws||(ws={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Rr||(Rr={}));(function(e){function t(r,o,i){let s={title:r},c=!0;return typeof o=="string"?(c=!1,s.kind=o):Et.is(o)?s.command=o:s.edit=o,c&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,Nn.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Et.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||wr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Rr.is))}e.is=n})(ks||(ks={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.command)||Et.is(o.command))}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(Rs||(Rs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Os||(Os={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(xs||(xs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Ms||(Ms={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Es||(Es={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(As||(As={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.string(o.text)}e.is=n})(qs||(qs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(Ns||(Ns={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Fs||(Fs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Gs||(Gs={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Or||(Or={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||yt.is(o.tooltip))&&(o.location===void 0||qn.is(o.location))&&(o.command===void 0||Et.is(o.command))}e.is=n})(xr||(xr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,xr.is))&&(o.kind===void 0||Or.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||f.string(o.tooltip)||yt.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(Hs||(Hs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Mr||(Mr={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(js||(js={}));(function(e){function t(n){return{items:n}}e.create=t})(Ls||(Ls={}));(function(e){e.Invoked=1,e.Automatic=2})(Ws||(Ws={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Us||(Us={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Qs||(Qs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Sr.is(r.uri)&&f.string(r.name)}e.is=t})(Bs||(Bs={}));hg=[` `,`\r -`,"\r"];(function(e){function t(i,s,a,p){return new Ws(i,s,a,p)}e.create=t;function n(i){let s=i;return!!(f.defined(s)&&f.string(s.uri)&&(f.undefined(s.languageId)||f.string(s.languageId))&&f.uinteger(s.lineCount)&&f.func(s.getText)&&f.func(s.positionAt)&&f.func(s.offsetAt))}e.is=n;function r(i,s){let a=i.getText(),p=o(s,(h,C)=>{let l=h.range.start.line-C.range.start.line;return l===0?h.range.start.character-C.range.start.character:l}),m=a.length;for(let h=p.length-1;h>=0;h--){let C=p[h],l=i.offsetAt(C.range.start),b=i.offsetAt(C.range.end);if(b<=m)a=a.substring(0,l)+C.newText+a.substring(b,a.length);else throw new Error("Overlapping edit");m=l}return a}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let a=i.length/2|0,p=i.slice(0,a),m=i.slice(a);o(p,s),o(m,s);let h=0,C=0,l=0;for(;h{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),d=c.length;for(let h=g.length-1;h>=0;h--){let b=g[h],m=i.offsetAt(b.range.start),T=i.offsetAt(b.range.end);if(T<=d)c=c.substring(0,m)+b.newText+c.substring(T,c.length);else throw new Error("Overlapping edit");d=m}return c}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let c=i.length/2|0,g=i.slice(0,c),d=i.slice(c);o(g,s),o(d,s);let h=0,b=0,m=0;for(;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Me.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Me.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(b){return b===!0||b===!1}e.boolean=o;function i(b){return t.call(b)==="[object String]"}e.string=i;function s(b){return t.call(b)==="[object Number]"}e.number=s;function a(b,P,E){return t.call(b)==="[object Number]"&&P<=b&&b<=E}e.numberRange=a;function p(b){return t.call(b)==="[object Number]"&&-2147483648<=b&&b<=2147483647}e.integer=p;function m(b){return t.call(b)==="[object Number]"&&0<=b&&b<=2147483647}e.uinteger=m;function h(b){return t.call(b)==="[object Function]"}e.func=h;function C(b){return b!==null&&typeof b=="object"}e.objectLiteral=C;function l(b,P){return Array.isArray(b)&&b.every(P)}e.typedArray=l})(f||(f={}))});var z=S(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CM=me.ProtocolNotificationType=me.ProtocolNotificationType0=me.ProtocolRequestType=me.ProtocolRequestType0=me.RegistrationType=me.MessageDirection=void 0;var Jt=et(),uu;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(uu||(me.MessageDirection=uu={}));var Us=class{____;method;constructor(t){this.method=t}};me.RegistrationType=Us;var Bs=class extends Jt.RequestType0{__;___;____;_pr;constructor(t){super(t)}};me.ProtocolRequestType0=Bs;var Qs=class extends Jt.RequestType{__;___;____;_pr;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolRequestType=Qs;var $s=class extends Jt.NotificationType0{___;____;constructor(t){super(t)}};me.ProtocolNotificationType0=$s;var zs=class extends Jt.NotificationType{___;____;constructor(t){super(t,Jt.ParameterStructures.byName)}};me.ProtocolNotificationType=zs;var lu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(lu||(me.CM=lu={}))});var kr=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=ng;Fe.string=du;Fe.number=rg;Fe.error=og;Fe.func=ig;Fe.array=fu;Fe.stringArray=sg;Fe.typedArray=cg;Fe.objectLiteral=ag;function ng(e){return e===!0||e===!1}function du(e){return typeof e=="string"||e instanceof String}function rg(e){return typeof e=="number"||e instanceof Number}function og(e){return e instanceof Error}function ig(e){return typeof e=="function"}function fu(e){return Array.isArray(e)}function sg(e){return fu(e)&&e.every(t=>du(t))}function cg(e,t){return Array.isArray(e)&&e.every(t)}function ag(e){return e!==null&&typeof e=="object"}});var hu=S(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.ImplementationRequest=void 0;var Vs=z(),mu;(function(e){e.method="textDocument/implementation",e.messageDirection=Vs.MessageDirection.clientToServer,e.type=new Vs.ProtocolRequestType(e.method),e.capabilities=Vs.CM.create("textDocument.implementation","implementationProvider")})(mu||(Pr.ImplementationRequest=mu={}))});var pu=S(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.TypeDefinitionRequest=void 0;var Ks=z(),gu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Ks.MessageDirection.clientToServer,e.type=new Ks.ProtocolRequestType(e.method),e.capabilities=Ks.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(gu||(Or.TypeDefinitionRequest=gu={}))});var _u=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.DidChangeWorkspaceFoldersNotification=tn.WorkspaceFoldersRequest=void 0;var en=z(),yu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=en.MessageDirection.serverToClient,e.type=new en.ProtocolRequestType0(e.method),e.capabilities=en.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(yu||(tn.WorkspaceFoldersRequest=yu={}));var Tu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=en.MessageDirection.clientToServer,e.type=new en.ProtocolNotificationType(e.method),e.capabilities=en.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Tu||(tn.DidChangeWorkspaceFoldersNotification=Tu={}))});var Cu=S(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ConfigurationRequest=void 0;var Xs=z(),bu;(function(e){e.method="workspace/configuration",e.messageDirection=Xs.MessageDirection.serverToClient,e.type=new Xs.ProtocolRequestType(e.method),e.capabilities=Xs.CM.create("workspace.configuration",void 0)})(bu||(Rr.ConfigurationRequest=bu={}))});var Iu=S(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.ColorPresentationRequest=rn.DocumentColorRequest=void 0;var nn=z(),vu;(function(e){e.method="textDocument/documentColor",e.messageDirection=nn.MessageDirection.clientToServer,e.type=new nn.ProtocolRequestType(e.method),e.capabilities=nn.CM.create("textDocument.colorProvider","colorProvider")})(vu||(rn.DocumentColorRequest=vu={}));var Su;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=nn.MessageDirection.clientToServer,e.type=new nn.ProtocolRequestType(e.method),e.capabilities=nn.CM.create("textDocument.colorProvider","colorProvider")})(Su||(rn.ColorPresentationRequest=Su={}))});var ku=S(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.FoldingRangeRefreshRequest=sn.FoldingRangeRequest=void 0;var on=z(),Du;(function(e){e.method="textDocument/foldingRange",e.messageDirection=on.MessageDirection.clientToServer,e.type=new on.ProtocolRequestType(e.method),e.capabilities=on.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Du||(sn.FoldingRangeRequest=Du={}));var wu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=on.MessageDirection.serverToClient,e.type=new on.ProtocolRequestType0(e.method),e.capabilities=on.CM.create("workspace.foldingRange.refreshSupport",void 0)})(wu||(sn.FoldingRangeRefreshRequest=wu={}))});var Ou=S(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.DeclarationRequest=void 0;var Zs=z(),Pu;(function(e){e.method="textDocument/declaration",e.messageDirection=Zs.MessageDirection.clientToServer,e.type=new Zs.ProtocolRequestType(e.method),e.capabilities=Zs.CM.create("textDocument.declaration","declarationProvider")})(Pu||(xr.DeclarationRequest=Pu={}))});var xu=S(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.SelectionRangeRequest=void 0;var Ys=z(),Ru;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Ys.MessageDirection.clientToServer,e.type=new Ys.ProtocolRequestType(e.method),e.capabilities=Ys.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Ru||(Mr.SelectionRangeRequest=Ru={}))});var qu=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.WorkDoneProgressCancelNotification=pt.WorkDoneProgressCreateRequest=pt.WorkDoneProgress=void 0;var ug=et(),An=z(),Mu;(function(e){e.type=new ug.ProgressType;function t(n){return n===e.type}e.is=t})(Mu||(pt.WorkDoneProgress=Mu={}));var Eu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=An.MessageDirection.serverToClient,e.type=new An.ProtocolRequestType(e.method),e.capabilities=An.CM.create("window.workDoneProgress",void 0)})(Eu||(pt.WorkDoneProgressCreateRequest=Eu={}));var Au;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=An.MessageDirection.clientToServer,e.type=new An.ProtocolNotificationType(e.method)})(Au||(pt.WorkDoneProgressCancelNotification=Au={}))});var Fu=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.CallHierarchyOutgoingCallsRequest=yt.CallHierarchyIncomingCallsRequest=yt.CallHierarchyPrepareRequest=void 0;var nt=z(),Nu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Nu||(yt.CallHierarchyPrepareRequest=Nu={}));var Gu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Gu||(yt.CallHierarchyIncomingCallsRequest=Gu={}));var Hu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Hu||(yt.CallHierarchyOutgoingCallsRequest=Hu={}))});var Qu=S(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Oe=z(),ju;(function(e){e.Relative="relative"})(ju||(De.TokenFormat=ju={}));var qn;(function(e){e.method="textDocument/semanticTokens",e.type=new Oe.RegistrationType(e.method)})(qn||(De.SemanticTokensRegistrationType=qn={}));var Lu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Lu||(De.SemanticTokensRequest=Lu={}));var Wu;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Wu||(De.SemanticTokensDeltaRequest=Wu={}));var Uu;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=qn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Uu||(De.SemanticTokensRangeRequest=Uu={}));var Bu;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Oe.MessageDirection.serverToClient,e.type=new Oe.ProtocolRequestType0(e.method),e.capabilities=Oe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Bu||(De.SemanticTokensRefreshRequest=Bu={}))});var zu=S(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.ShowDocumentRequest=void 0;var Js=z(),$u;(function(e){e.method="window/showDocument",e.messageDirection=Js.MessageDirection.serverToClient,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("window.showDocument.support",void 0)})($u||(Er.ShowDocumentRequest=$u={}))});var Ku=S(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.LinkedEditingRangeRequest=void 0;var ec=z(),Vu;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=ec.MessageDirection.clientToServer,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(Vu||(Ar.LinkedEditingRangeRequest=Vu={}))});var rl=S(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.WillDeleteFilesRequest=he.DidDeleteFilesNotification=he.DidRenameFilesNotification=he.WillRenameFilesRequest=he.DidCreateFilesNotification=he.WillCreateFilesRequest=he.FileOperationPatternKind=void 0;var ie=z(),Xu;(function(e){e.file="file",e.folder="folder"})(Xu||(he.FileOperationPatternKind=Xu={}));var Zu;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(Zu||(he.WillCreateFilesRequest=Zu={}));var Yu;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(Yu||(he.DidCreateFilesNotification=Yu={}));var Ju;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(Ju||(he.WillRenameFilesRequest=Ju={}));var el;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(el||(he.DidRenameFilesNotification=el={}));var tl;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolNotificationType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(tl||(he.DidDeleteFilesNotification=tl={}));var nl;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ie.MessageDirection.clientToServer,e.type=new ie.ProtocolRequestType(e.method),e.capabilities=ie.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(nl||(he.WillDeleteFilesRequest=nl={}))});var cl=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.MonikerRequest=Tt.MonikerKind=Tt.UniquenessLevel=void 0;var tc=z(),ol;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(ol||(Tt.UniquenessLevel=ol={}));var il;(function(e){e.$import="import",e.$export="export",e.local="local"})(il||(Tt.MonikerKind=il={}));var sl;(function(e){e.method="textDocument/moniker",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.moniker","monikerProvider")})(sl||(Tt.MonikerRequest=sl={}))});var dl=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.TypeHierarchySubtypesRequest=_t.TypeHierarchySupertypesRequest=_t.TypeHierarchyPrepareRequest=void 0;var Et=z(),al;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method),e.capabilities=Et.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(al||(_t.TypeHierarchyPrepareRequest=al={}));var ul;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method)})(ul||(_t.TypeHierarchySupertypesRequest=ul={}));var ll;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method)})(ll||(_t.TypeHierarchySubtypesRequest=ll={}))});var hl=S(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.InlineValueRefreshRequest=an.InlineValueRequest=void 0;var cn=z(),fl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=cn.MessageDirection.clientToServer,e.type=new cn.ProtocolRequestType(e.method),e.capabilities=cn.CM.create("textDocument.inlineValue","inlineValueProvider")})(fl||(an.InlineValueRequest=fl={}));var ml;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=cn.MessageDirection.serverToClient,e.type=new cn.ProtocolRequestType0(e.method),e.capabilities=cn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(ml||(an.InlineValueRefreshRequest=ml={}))});var Tl=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.InlayHintRefreshRequest=bt.InlayHintResolveRequest=bt.InlayHintRequest=void 0;var rt=z(),gl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint","inlayHintProvider")})(gl||(bt.InlayHintRequest=gl={}));var pl;(function(e){e.method="inlayHint/resolve",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(pl||(bt.InlayHintResolveRequest=pl={}));var yl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=rt.MessageDirection.serverToClient,e.type=new rt.ProtocolRequestType0(e.method),e.capabilities=rt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(yl||(bt.InlayHintRefreshRequest=yl={}))});var Dl=S(se=>{"use strict";var lg=se&&se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dg=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fg=se&&se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var hg=W&&W.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gg=W&&W.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pg=W&&W.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.InlineCompletionRequest=void 0;var oc=z(),El;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=oc.MessageDirection.clientToServer,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(El||(Nr.InlineCompletionRequest=El={}))});var Gl=S(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.TextDocumentContentRefreshRequest=ln.TextDocumentContentRequest=void 0;var Gn=z(),ql;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Gn.MessageDirection.clientToServer,e.type=new Gn.ProtocolRequestType(e.method),e.capabilities=Gn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(ql||(ln.TextDocumentContentRequest=ql={}));var Nl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Gn.MessageDirection.serverToClient,e.type=new Gn.ProtocolRequestType(e.method)})(Nl||(ln.TextDocumentContentRefreshRequest=Nl={}))});var Zd=S(c=>{"use strict";var yg=c&&c.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Tg=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_g=c&&c.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(Ql||(c.StaticRegistrationOptions=Ql={}));var $l;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||ac.is(r.documentSelector))}e.is=t})($l||(c.TextDocumentRegistrationOptions=$l={}));var zl;(function(e){function t(r){let o=r;return ce.objectLiteral(o)&&(o.workDoneProgress===void 0||ce.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ce.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(zl||(c.WorkDoneProgressOptions=zl={}));var Vl;(function(e){e.method="initialize",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method)})(Vl||(c.InitializeRequest=Vl={}));var Kl;(function(e){e.unknownProtocolVersion=1})(Kl||(c.InitializeErrorCodes=Kl={}));var Xl;(function(e){e.method="initialized",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method)})(Xl||(c.InitializedNotification=Xl={}));var Zl;(function(e){e.method="shutdown",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType0(e.method)})(Zl||(c.ShutdownRequest=Zl={}));var Yl;(function(e){e.method="exit",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType0(e.method)})(Yl||(c.ExitNotification=Yl={}));var Jl;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(Jl||(c.DidChangeConfigurationNotification=Jl={}));var ed;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ed||(c.MessageType=ed={}));var td;(function(e){e.method="window/showMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(td||(c.ShowMessageNotification=td={}));var nd;(function(e){e.method="window/showMessageRequest",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("window.showMessage",void 0)})(nd||(c.ShowMessageRequest=nd={}));var rd;(function(e){e.method="window/logMessage",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(rd||(c.LogMessageNotification=rd={}));var od;(function(e){e.method="telemetry/event",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method)})(od||(c.TelemetryEventNotification=od={}));var id;(function(e){e.None=0,e.Full=1,e.Incremental=2})(id||(c.TextDocumentSyncKind=id={}));var sd;(function(e){e.method="textDocument/didOpen",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(sd||(c.DidOpenTextDocumentNotification=sd={}));var cd;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(cd||(c.TextDocumentContentChangeEvent=cd={}));var ad;(function(e){e.method="textDocument/didChange",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(ad||(c.DidChangeTextDocumentNotification=ad={}));var ud;(function(e){e.method="textDocument/didClose",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ud||(c.DidCloseTextDocumentNotification=ud={}));var ld;(function(e){e.method="textDocument/didSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(ld||(c.DidSaveTextDocumentNotification=ld={}));var dd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(dd||(c.TextDocumentSaveReason=dd={}));var fd;(function(e){e.method="textDocument/willSave",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(fd||(c.WillSaveTextDocumentNotification=fd={}));var md;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(md||(c.WillSaveTextDocumentWaitUntilRequest=md={}));var hd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(hd||(c.DidChangeWatchedFilesNotification=hd={}));var gd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(gd||(c.FileChangeType=gd={}));var uc;(function(e){function t(n){let r=n;return ce.objectLiteral(r)&&(Hl.URI.is(r.baseUri)||Hl.WorkspaceFolder.is(r.baseUri))&&ce.string(r.pattern)}e.is=t})(uc||(c.RelativePattern=uc={}));var lc;(function(e){function t(n){let r=n;return ce.string(r)||uc.is(r)}e.is=t})(lc||(c.GlobPattern=lc={}));var pd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(pd||(c.WatchKind=pd={}));var yd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolNotificationType(e.method),e.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(yd||(c.PublishDiagnosticsNotification=yd={}));var Td;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Td||(c.CompletionTriggerKind=Td={}));var _d;(function(e){e.method="textDocument/completion",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion","completionProvider")})(_d||(c.CompletionRequest=_d={}));var bd;(function(e){e.method="completionItem/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(bd||(c.CompletionResolveRequest=bd={}));var Cd;(function(e){e.method="textDocument/hover",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(Cd||(c.HoverRequest=Cd={}));var vd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(vd||(c.SignatureHelpTriggerKind=vd={}));var Sd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Sd||(c.SignatureHelpRequest=Sd={}));var Id;(function(e){e.method="textDocument/definition",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(Id||(c.DefinitionRequest=Id={}));var Dd;(function(e){e.method="textDocument/references",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.references","referencesProvider")})(Dd||(c.ReferencesRequest=Dd={}));var wd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(wd||(c.DocumentHighlightRequest=wd={}));var kd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(kd||(c.DocumentSymbolRequest=kd={}));var Pd;(function(e){e.method="textDocument/codeAction",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Pd||(c.CodeActionRequest=Pd={}));var Od;(function(e){e.method="codeAction/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Od||(c.CodeActionResolveRequest=Od={}));var Rd;(function(e){e.method="workspace/symbol",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Rd||(c.WorkspaceSymbolRequest=Rd={}));var xd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(xd||(c.WorkspaceSymbolResolveRequest=xd={}));var Md;(function(e){e.method="textDocument/codeLens",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(Md||(c.CodeLensRequest=Md={}));var Ed;(function(e){e.method="codeLens/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Ed||(c.CodeLensResolveRequest=Ed={}));var Ad;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType0(e.method),e.capabilities=T.CM.create("workspace.codeLens",void 0)})(Ad||(c.CodeLensRefreshRequest=Ad={}));var qd;(function(e){e.method="textDocument/documentLink",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})(qd||(c.DocumentLinkRequest=qd={}));var Nd;(function(e){e.method="documentLink/resolve",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Nd||(c.DocumentLinkResolveRequest=Nd={}));var Gd;(function(e){e.method="textDocument/formatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(Gd||(c.DocumentFormattingRequest=Gd={}));var Hd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Hd||(c.DocumentRangeFormattingRequest=Hd={}));var Fd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Fd||(c.DocumentRangesFormattingRequest=Fd={}));var jd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(jd||(c.DocumentOnTypeFormattingRequest=jd={}));var Ld;(function(e){e.Identifier=1})(Ld||(c.PrepareSupportDefaultBehavior=Ld={}));var Wd;(function(e){e.method="textDocument/rename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Wd||(c.RenameRequest=Wd={}));var Ud;(function(e){e.method="textDocument/prepareRename",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Ud||(c.PrepareRenameRequest=Ud={}));var Bd;(function(e){e.method="workspace/executeCommand",e.messageDirection=T.MessageDirection.clientToServer,e.type=new T.ProtocolRequestType(e.method),e.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(Bd||(c.ExecuteCommandRequest=Bd={}));var Qd;(function(e){e.method="workspace/applyEdit",e.messageDirection=T.MessageDirection.serverToClient,e.type=new T.ProtocolRequestType("workspace/applyEdit"),e.capabilities=T.CM.create("workspace.applyEdit",void 0)})(Qd||(c.ApplyWorkspaceEditRequest=Qd={}))});var Jd=S(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.createProtocolConnection=Pg;var Yd=et();function Pg(e,t,n,r){return Yd.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Yd.createMessageConnection)(e,t,n,r)}});var ee=S(we=>{"use strict";var Og=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gr=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Og(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;Gr(et(),we);Gr((wr(),Jn(Dr)),we);Gr(z(),we);Gr(Zd(),we);var Rg=Jd();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Rg.createProtocolConnection}});var ef;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(ef||(we.LSPErrorCodes=ef={}))});var Tc=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.empty=void 0;Ct.v4=tf;Ct.isUUID=nf;Ct.parse=Mg;Ct.generateUuid=Eg;var Fn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},yc=class e extends Fn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};Ct.empty=new Fn("00000000-0000-0000-0000-000000000000");function tf(){return new yc}var xg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function nf(e){return xg.test(e)}function Mg(e){if(!nf(e))throw new Error("invalid uuid");return new Fn(e)}function Eg(){return tf().asHex()}});var rf=S(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.ProgressFeature=void 0;mn.attachWorkDone=qg;mn.attachPartialResult=Gg;var vt=ee(),Ag=Tc(),fn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(vt.WorkDoneProgress.type,this._token,{kind:"end"})}},Hr=class extends fn{_source;constructor(t,n){super(t,n),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},jn=class{constructor(){}begin(){}report(){}done(){}},Fr=class extends jn{_source;constructor(){super(),this._source=new vt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function qg(e,t){if(t===void 0||t.workDoneToken===void 0)return new jn;let n=t.workDoneToken;return delete t.workDoneToken,new fn(e,n)}var Ng=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(vt.WorkDoneProgressCancelNotification.type,n=>{let r=fn.Instances.get(n.token);(r instanceof Hr||r instanceof Fr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new jn:new fn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,Ag.generateUuid)();return this.connection.sendRequest(vt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new Hr(this.connection,t))}else return Promise.resolve(new Fr)}};mn.ProgressFeature=Ng;var _c;(function(e){e.type=new vt.ProgressType})(_c||(_c={}));var bc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(_c.type,this._token,t)}};function Gg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new bc(e,n)}});var of=S(Ve=>{"use strict";var Hg=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fg=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jg=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?Wg.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Lg.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ve.ConfigurationFeature=Ug});var sf=S(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.WorkspaceFoldersFeature=void 0;var jr=ee(),Bg=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new jr.Emitter,this.connection.onNotification(jr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(jr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(jr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Lr.WorkspaceFoldersFeature=Bg});var cf=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.CallHierarchyFeature=void 0;var Cc=ee(),Qg=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Cc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Cc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Cc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Wr.CallHierarchyFeature=Qg});var Sc=S(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.SemanticTokensBuilder=St.SemanticTokensDiff=St.SemanticTokensFeature=void 0;var Ur=ee(),$g=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Ur.SemanticTokensRefreshRequest.type),on:t=>{let n=Ur.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Ur.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Ur.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};St.SemanticTokensFeature=$g;var Br=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let p=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;p[this._dataLen++]=s,p[this._dataLen++]=a,p[this._dataLen++]=r,p[this._dataLen++]=o,p[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let m=t[5*a],h=t[5*p];if(m===h){let C=t[5*a+1],l=t[5*p+1];return C-l}return m-h});let o=[],i=0,s=0;for(let a=0;a{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.ShowDocumentFeature=void 0;var zg=ee(),Vg=e=>class extends e{showDocument(t){return this.connection.sendRequest(zg.ShowDocumentRequest.type,t)}};Qr.ShowDocumentFeature=Vg});var uf=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.FileOperationsFeature=void 0;var hn=ee(),Kg=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(hn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(hn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(hn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(hn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(hn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(hn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};$r.FileOperationsFeature=Kg});var lf=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.LinkedEditingRangeFeature=void 0;var Xg=ee(),Zg=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Xg.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};zr.LinkedEditingRangeFeature=Zg});var df=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.TypeHierarchyFeature=void 0;var Ic=ee(),Yg=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ic.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Ic.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Ic.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Vr.TypeHierarchyFeature=Yg});var mf=S(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.InlineValueFeature=void 0;var ff=ee(),Jg=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(ff.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(ff.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Kr.InlineValueFeature=Jg});var gf=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.FoldingRangeFeature=void 0;var hf=ee(),ep=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(hf.FoldingRangeRefreshRequest.type),on:t=>{let n=hf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Xr.FoldingRangeFeature=ep});var pf=S(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.InlayHintFeature=void 0;var Dc=ee(),tp=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Dc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Dc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Dc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Zr.InlayHintFeature=tp});var yf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.DiagnosticFeature=void 0;var Ln=ee(),np=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Ln.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Ln.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ln.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Ln.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ln.WorkspaceDiagnosticRequest.partialResult,n)))}}};Yr.DiagnosticFeature=np});var kc=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.TextDocuments=void 0;var qt=ee(),wc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new qt.Emitter,this._onDidOpen=new qt.Emitter,this._onDidClose=new qt.Emitter,this._onDidSave=new qt.Emitter,this._onWillSave=new qt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=qt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let a=this._syncedDocuments.get(o.uri);a!==void 0&&(a=this._configuration.update(a,i,s),this._syncedDocuments.set(o.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),qt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Jr.TextDocuments=wc});var Rc=S(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.NotebookDocuments=gn.NotebookSyncFeature=void 0;var Ee=ee(),Tf=kc(),rp=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Ee.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Ee.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Ee.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Ee.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};gn.NotebookSyncFeature=rp;var Pc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Ee.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Ee.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Ee.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Oc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof Tf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Tf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Ee.Emitter,this._onDidChange=new Ee.Emitter,this._onDidSave=new Ee.Emitter,this._onDidClose=new Ee.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Pc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,a=!1,p=o.change;p.metadata!==void 0&&(a=!0,i.metadata=p.metadata);let m=[],h=[],C=[],l=[];if(p.cells!==void 0){let R=p.cells;if(R.structure!==void 0){let g=R.structure.array;if(i.cells.splice(g.start,g.deleteCount,...g.cells!==void 0?g.cells:[]),R.structure.didOpen!==void 0)for(let d of R.structure.didOpen)await n.openTextDocument({textDocument:d}),m.push(d.uri);if(R.structure.didClose)for(let d of R.structure.didClose)await n.closeTextDocument({textDocument:d}),h.push(d.uri)}if(R.data!==void 0){let g=new Map(R.data.map(d=>[d.document,d]));for(let d=0;d<=i.cells.length;d++){let I=g.get(i.cells[d].document);if(I!==void 0){let A=i.cells.splice(d,1,I);if(C.push({old:A[0],new:I}),g.delete(I.document),g.size===0)break}}}if(R.textContent!==void 0)for(let g of R.textContent)await n.changeTextDocument({textDocument:g.document,contentChanges:g.changes}),l.push(g.document.uri)}this.updateCellMap(i);let b={notebookDocument:i};a&&(b.metadata={old:s,new:i.metadata});let P=[];for(let R of m)P.push(this.getNotebookCell(R));let E=[];for(let R of h)E.push(this.getNotebookCell(R));let G=[];for(let R of l)G.push(this.getNotebookCell(R));(P.length>0||E.length>0||C.length>0||G.length>0)&&(b.cells={added:P,removed:E,changed:{data:C,textContent:G}}),(b.metadata!==void 0||b.cells!==void 0)&&this._onDidChange.fire(b)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Ee.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};gn.NotebookDocuments=Oc});var _f=S(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.MonikerFeature=void 0;var op=ee(),ip=e=>class extends e{get moniker(){return{on:t=>{let n=op.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};eo.MonikerFeature=ip});var bf=S(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.InlineCompletionFeature=void 0;var sp=ee(),cp=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(sp.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};to.InlineCompletionFeature=cp});var vf=S(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.TextDocumentContentFeature=void 0;var Cf=ee(),ap=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Cf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Cf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};no.TextDocumentContentFeature=ap});var Nc=S(U=>{"use strict";var up=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lp=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Of=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};U.ErrorMessageTracker=Ec;var ro=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(D.MessageType.Error,t)}warn(t){this.send(D.MessageType.Warning,t)}info(t){this.send(D.MessageType.Info,t)}log(t){this.send(D.MessageType.Log,t)}debug(t){this.send(D.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(D.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,D.RAL)().console.error("Sending log message failed")})}},Ac=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:D.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showWarningMessage(t,...n){let r={type:D.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}showInformationMessage(t,...n){let r={type:D.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(D.ShowMessageRequest.type,r).then(xc)}},Sf=(0,gp.ShowDocumentFeature)((0,M.ProgressFeature)(Ac)),If;(function(e){function t(){return new oo}e.create=t})(If||(U.BulkRegistration=If={}));var oo=class{_registrations=[];_registered=new Set;add(t,n){let r=Ae.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Mc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Df;(function(e){function t(){return new Wn(void 0,[])}e.create=t})(Df||(U.BulkUnregistration=Df={}));var Wn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(D.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ae.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(D.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},io=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof oo?this.registerMany(t):t instanceof Wn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ae.string(n)?n:n.method,i=Mc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(D.RegistrationRequest.type,s).then(a=>(t.add({id:i,method:o}),t),a=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=Ae.string(t)?t:t.method,o=Mc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(D.RegistrationRequest.type,i).then(s=>D.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(D.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(D.RegistrationRequest.type,n).then(()=>new Wn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},qc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(D.ApplyWorkspaceEditRequest.type,r)}},wf=(0,wp.TextDocumentContentFeature)((0,pp.FileOperationsFeature)((0,fp.WorkspaceFoldersFeature)((0,dp.ConfigurationFeature)(qc)))),so=class{_trace;_connection;constructor(){this._trace=D.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==D.Trace.Off&&this.connection.sendNotification(D.LogTraceNotification.type,{message:t,verbose:this._trace===D.Trace.Verbose?n:void 0}).catch(()=>{})}},co=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(D.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},ao=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._LanguagesImpl=ao;var kf=(0,Dp.InlineCompletionFeature)((0,bp.FoldingRangeFeature)((0,Ip.MonikerFeature)((0,vp.DiagnosticFeature)((0,Cp.InlayHintFeature)((0,_p.InlineValueFeature)((0,Tp.TypeHierarchyFeature)((0,yp.LinkedEditingRangeFeature)((0,hp.SemanticTokensFeature)((0,mp.CallHierarchyFeature)(ao)))))))))),uo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,M.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,M.attachPartialResult)(this.connection,n)}};U._NotebooksImpl=uo;var Pf=(0,Sp.NotebookSyncFeature)(uo);function Rf(e,t){return function(n){return t(e(n))}}function xf(e,t){return function(n){return t(e(n))}}function Mf(e,t){return function(n){return t(e(n))}}function Ef(e,t){return function(n){return t(e(n))}}function Af(e,t){return function(n){return t(e(n))}}function qf(e,t){return function(n){return t(e(n))}}function Nf(e,t){return function(n){return t(e(n))}}function Gf(e,t){return function(n){return t(e(n))}}function kp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Rf),tracer:n(e.tracer,t.tracer,Mf),telemetry:n(e.telemetry,t.telemetry,xf),client:n(e.client,t.client,Ef),window:n(e.window,t.window,Af),workspace:n(e.workspace,t.workspace,qf),languages:n(e.languages,t.languages,Nf),notebooks:n(e.notebooks,t.notebooks,Gf)}}function Pp(e,t,n){let r=n&&n.console?new(n.console(ro)):new ro,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(so)):new so,s=n&&n.telemetry?new(n.telemetry(co)):new co,a=n&&n.client?new(n.client(io)):new io,p=n&&n.window?new(n.window(Sf)):new Sf,m=n&&n.workspace?new(n.workspace(wf)):new wf,h=n&&n.languages?new(n.languages(kf)):new kf,C=n&&n.notebooks?new(n.notebooks(Pf)):new Pf,l=[r,i,s,a,p,m,h,C];function b(g){return g instanceof Promise?g:Ae.thenable(g)?new Promise((d,I)=>{g.then(A=>d(A),A=>I(A))}):Promise.resolve(g)}let P,E,G,R={listen:()=>o.listen(),sendRequest:(g,...d)=>o.sendRequest(Ae.string(g)?g:g.method,...d),onRequest:(g,d)=>o.onRequest(g,d),sendNotification:(g,d)=>{let I=Ae.string(g)?g:g.method;return o.sendNotification(I,d)},onNotification:(g,d)=>o.onNotification(g,d),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:g=>(E=g,{dispose:()=>{E=void 0}}),onInitialized:g=>o.onNotification(D.InitializedNotification.type,g),onShutdown:g=>(P=g,{dispose:()=>{P=void 0}}),onExit:g=>(G=g,{dispose:()=>{G=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return a},get window(){return p},get workspace(){return m},get languages(){return h},get notebooks(){return C},onDidChangeConfiguration:g=>o.onNotification(D.DidChangeConfigurationNotification.type,g),onDidChangeWatchedFiles:g=>o.onNotification(D.DidChangeWatchedFilesNotification.type,g),__textDocumentSync:void 0,onDidOpenTextDocument:g=>o.onNotification(D.DidOpenTextDocumentNotification.type,g),onDidChangeTextDocument:g=>o.onNotification(D.DidChangeTextDocumentNotification.type,g),onDidCloseTextDocument:g=>o.onNotification(D.DidCloseTextDocumentNotification.type,g),onWillSaveTextDocument:g=>o.onNotification(D.WillSaveTextDocumentNotification.type,g),onWillSaveTextDocumentWaitUntil:g=>o.onRequest(D.WillSaveTextDocumentWaitUntilRequest.type,g),onDidSaveTextDocument:g=>o.onNotification(D.DidSaveTextDocumentNotification.type,g),sendDiagnostics:g=>o.sendNotification(D.PublishDiagnosticsNotification.type,g),onHover:g=>o.onRequest(D.HoverRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onCompletion:g=>o.onRequest(D.CompletionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onCompletionResolve:g=>o.onRequest(D.CompletionResolveRequest.type,g),onSignatureHelp:g=>o.onRequest(D.SignatureHelpRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onDeclaration:g=>o.onRequest(D.DeclarationRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDefinition:g=>o.onRequest(D.DefinitionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onTypeDefinition:g=>o.onRequest(D.TypeDefinitionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onImplementation:g=>o.onRequest(D.ImplementationRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onReferences:g=>o.onRequest(D.ReferencesRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDocumentHighlight:g=>o.onRequest(D.DocumentHighlightRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDocumentSymbol:g=>o.onRequest(D.DocumentSymbolRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onWorkspaceSymbol:g=>o.onRequest(D.WorkspaceSymbolRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onWorkspaceSymbolResolve:g=>o.onRequest(D.WorkspaceSymbolResolveRequest.type,g),onCodeAction:g=>o.onRequest(D.CodeActionRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onCodeActionResolve:g=>o.onRequest(D.CodeActionResolveRequest.type,(d,I)=>g(d,I)),onCodeLens:g=>o.onRequest(D.CodeLensRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onCodeLensResolve:g=>o.onRequest(D.CodeLensResolveRequest.type,(d,I)=>g(d,I)),onDocumentFormatting:g=>o.onRequest(D.DocumentFormattingRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onDocumentRangeFormatting:g=>o.onRequest(D.DocumentRangeFormattingRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onDocumentOnTypeFormatting:g=>o.onRequest(D.DocumentOnTypeFormattingRequest.type,(d,I)=>g(d,I)),onRenameRequest:g=>o.onRequest(D.RenameRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),onPrepareRename:g=>o.onRequest(D.PrepareRenameRequest.type,(d,I)=>g(d,I)),onDocumentLinks:g=>o.onRequest(D.DocumentLinkRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onDocumentLinkResolve:g=>o.onRequest(D.DocumentLinkResolveRequest.type,(d,I)=>g(d,I)),onDocumentColor:g=>o.onRequest(D.DocumentColorRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onColorPresentation:g=>o.onRequest(D.ColorPresentationRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onFoldingRanges:g=>o.onRequest(D.FoldingRangeRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onSelectionRanges:g=>o.onRequest(D.SelectionRangeRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),(0,M.attachPartialResult)(o,d))),onExecuteCommand:g=>o.onRequest(D.ExecuteCommandRequest.type,(d,I)=>g(d,I,(0,M.attachWorkDone)(o,d),void 0)),dispose:()=>o.dispose()};for(let g of l)g.attach(R);return o.onRequest(D.InitializeRequest.type,g=>{t.initialize(g),Ae.string(g.trace)&&(i.trace=D.Trace.fromString(g.trace));for(let d of l)d.initialize(g.capabilities);if(E){let d=E(g,new D.CancellationTokenSource().token,(0,M.attachWorkDone)(o,g),void 0);return b(d).then(I=>{if(I instanceof D.ResponseError)return I;let A=I;A||(A={capabilities:{}});let q=A.capabilities;q||(q={},A.capabilities=q),q.textDocumentSync===void 0||q.textDocumentSync===null?q.textDocumentSync=Ae.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None:!Ae.number(q.textDocumentSync)&&!Ae.number(q.textDocumentSync.change)&&(q.textDocumentSync.change=Ae.number(R.__textDocumentSync)?R.__textDocumentSync:D.TextDocumentSyncKind.None);for(let B of l)B.fillServerCapabilities(q);return A})}else{let d={capabilities:{textDocumentSync:D.TextDocumentSyncKind.None}};for(let I of l)I.fillServerCapabilities(d.capabilities);return d}}),o.onRequest(D.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,P)return P(new D.CancellationTokenSource().token)}),o.onNotification(D.ExitNotification.type,()=>{try{if(G)return G()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(D.SetTraceNotification.type,g=>{i.trace=D.Trace.fromString(g.value)}),R}});var Hf=S(Ce=>{"use strict";var Op=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Rp=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lc=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Le.normalize(n.join("/"))}function Hc(){return process.platform==="win32"}function lo(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let p=process.env,m=Object.create(null);Object.keys(p).forEach(h=>m[h]=p[h]),t&&Gc.existsSync(t)&&(m[o]?m[o]=t+Le.delimiter+m[o]:m[o]=t,r&&r(`NODE_PATH value is: ${m[o]}`)),m.ELECTRON_RUN_AS_NODE="1";try{let h=(0,Wc.fork)("",[],{cwd:n,env:m,execArgv:["-e",i]});if(h.pid===void 0){a(new Error(`Starting process to resolve node module ${e} failed`));return}h.on("error",l=>{a(l)}),h.on("message",l=>{l.c==="r"&&(h.send({c:"e"}),l.s?s(l.r):a(new Error(`Failed to resolve module: ${e}`)))});let C={c:"rs",a:e};h.send(C)}catch(h){a(h)}})}function Fc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Hc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Wc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Hc()?Le.join(s,"node_modules"):Le.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Ep(e){let t="yarn",n={encoding:"utf8"};Hc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Wc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let a of s)try{let p=JSON.parse(a);if(p.type==="log")return Le.join(p.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var jc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Gc.existsSync(__filename.toUpperCase())||!Gc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Le.normalize(i).indexOf(Le.normalize(o))===0:Le.normalize(i).toLowerCase().indexOf(Le.normalize(o).toLowerCase())===0}e.isParent=r})(jc||(Ce.FileSystem=jc={}));function Ap(e,t,n,r){return n?(Le.isAbsolute(n)||(n=Le.join(e,n)),lo(t,n,n,r).then(o=>jc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>lo(t,Fc(r),e,r))):lo(t,Fc(r),e,r)}});var Lf=S(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var Ff=require("util"),it=et(),Uc=class e extends it.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Ff.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Bc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),it.Disposable.create(()=>this.stream.off("data",t))}},Qc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},jf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Uc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Ff.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Bc(e),asWritableStream:e=>new Qc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function $c(){return jf}(function(e){function t(){it.RAL.install(jf)}e.install=t})($c||($c={}));zc.default=$c});var Jc=S(N=>{"use strict";var Uf=N&&N.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),qp=N&&N.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yc=N&&N.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Re.Disposable.create(()=>this.process.off("message",t))}};N.IPCMessageReader=Vc;var Kc=class extends Re.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.IPCMessageWriter=Kc;var Xc=class extends Re.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Re.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};N.PortMessageReader=Xc;var Zc=class extends Re.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};N.PortMessageWriter=Zc;var Nt=class extends Re.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Un.default)().stream.asReadableStream(t),n)}};N.SocketMessageReader=Nt;var Gt=class extends Re.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Un.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};N.SocketMessageWriter=Gt;var fo=class extends Re.ReadableStreamMessageReader{constructor(t,n){super((0,Un.default)().stream.asReadableStream(t),n)}};N.StreamMessageReader=fo;var mo=class extends Re.WriteableStreamMessageWriter{constructor(t,n){super((0,Un.default)().stream.asWritableStream(t),n)}};N.StreamMessageWriter=mo;var Lp=process.env.XDG_RUNTIME_DIR,Wp=new Map([["linux",107],["darwin",102]]);function Up(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Wf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=jp.realpathSync(Lp??Fp.tmpdir()),r=Wp.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Wf.randomBytes)(Math.floor(e/2)).toString("hex");return Hp.join(n,`lsp-${o}.sock`)}function Bp(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ho.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function Qp(e,t="utf-8"){let n=(0,ho.createConnection)(e);return[new Nt(n,t),new Gt(n,t)]}function $p(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,ho.createServer)(a=>{s.close(),n([new Nt(a,t),new Gt(a,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function zp(e,t="utf-8"){let n=(0,ho.createConnection)(e,"127.0.0.1");return[new Nt(n,t),new Gt(n,t)]}function Vp(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function Kp(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function Xp(e,t,n,r){n||(n=Re.NullLogger);let o=Vp(e)?new fo(e):e,i=Kp(t)?new mo(t):t;return Re.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Re.createMessageConnection)(o,i,n,r)}});var ea=S(st=>{"use strict";var Zp=st&&st.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Bf=st&&st.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Zp(t,e,n)};Object.defineProperty(st,"__esModule",{value:!0});st.createProtocolConnection=Jp;var Yp=Jc();Bf(Jc(),st);Bf(ee(),st);function Jp(e,t,n,r){return(0,Yp.createMessageConnection)(e,t,n,r)}});var ta=S(ge=>{"use strict";var ey=ge&&ge.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$f=ge&&ge.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ey(t,e,n)};Object.defineProperty(ge,"__esModule",{value:!0});ge.ProposedFeatures=ge.NotebookDocuments=ge.TextDocuments=ge.SemanticTokensBuilder=void 0;var ty=Sc();Object.defineProperty(ge,"SemanticTokensBuilder",{enumerable:!0,get:function(){return ty.SemanticTokensBuilder}});$f(ee(),ge);var ny=kc();Object.defineProperty(ge,"TextDocuments",{enumerable:!0,get:function(){return ny.TextDocuments}});var ry=Rc();Object.defineProperty(ge,"NotebookDocuments",{enumerable:!0,get:function(){return ry.NotebookDocuments}});$f(Nc(),ge);var Qf;(function(e){e.all={__brand:"features"}})(Qf||(ge.ProposedFeatures=Qf={}))});var ra=S(ve=>{"use strict";var Xf=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oy=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Zf=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{go(),process.exit(pn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;na.number(t)&&Jf===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(pn?0:1)}},3e3)},get shutdownReceived(){return pn},set shutdownReceived(e){pn=e},exit:e=>{go(),process.exit(e)}};function ay(e,t,n,r){let o,i,s,a;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),Ht.ConnectionStrategy.is(e)||Ht.ConnectionOptions.is(e)?a=e:(i=e,s=t,a=n),uy(i,s,a,o)}function uy(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let a,p,m=process.argv.slice(2);for(let h=0;h{go(),process.exit(pn?0:1)}),a.on("close",()=>{go(),process.exit(pn?0:1)})}let s=a=>{let p=(0,Ht.createProtocolConnection)(e,t,a,n);return o&&ly(a),p};return(0,iy.createConnection)(s,cy,r)}function ly(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,zf.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...a]=i;e.error(`Assertion failed: ${s} ${t(a)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,zf.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var rm={};Ga(rm,{TextDocument:()=>oa});function ia(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);ia(r,t),ia(o,t);let i=0,s=0,a=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function dy(e){let t=nm(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var po,oa,om=Na(()=>{"use strict";po=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=nm(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let a=Math.max(o.start.line,0),p=Math.max(o.end.line,0),m=this._lineOffsets,h=em(r.text,!1,i);if(p-a===h.length)for(let l=0,b=h.length;lt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&tm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,a){return new po(o,i,s,a)}e.create=t;function n(o,i,s){if(o instanceof po)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),a=ia(i.map(dy),(h,C)=>{let l=h.range.start.line-C.range.start.line;return l===0?h.range.start.character-C.range.start.character:l}),p=0,m=[];for(let h of a){let C=o.offsetAt(h.range.start);if(Cp&&m.push(s.substring(p,C)),h.newText.length&&m.push(h.newText),p=o.offsetAt(h.range.end)}return m.push(s.substr(p)),m.join("")}e.applyEdits=r})(oa||(oa={}))});var Qn=S(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.DATATYPE_SET=pe.KEYWORD_SET=pe.PUNCTUATION=pe.OPERATORS=pe.DATATYPES=pe.KEYWORDS=void 0;pe.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];pe.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];pe.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];pe.PUNCTUATION=["(",")","[","]",";",",",":","."];pe.KEYWORD_SET=new Set(pe.KEYWORDS);pe.DATATYPE_SET=new Set(pe.DATATYPES)});var It=S(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.TokenKind=void 0;var im;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(im||(yo.TokenKind=im={}))});var zn=S(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.tokenize=my;var _o=Qn(),ke=It();function sm(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function $n(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function To(e){return e!==void 0&&/[0-9]/.test(e)}function fy(e){let t=e.toUpperCase();return _o.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:_o.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function my(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=m=>{for(;n{let C=n,l=i();s(h),t.push({kind:m,lexeme:e.slice(C,h),span:{start:C,end:h},range:{start:l,end:i()}})};for(;ne.startsWith(l,n));if(h!==void 0){a(ke.TokenKind.Operator,n+h.length);continue}if(_o.PUNCTUATION.includes(m)){a(ke.TokenKind.Punctuation,n+1);continue}let C=e.codePointAt(n);a(ke.TokenKind.Unknown,n+(C!==void 0&&C>65535?2:1))}let p=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:p,end:{...p}}}),t}});var bo=S(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.positionAt=aa;Vn.offsetAt=gy;Vn.sourceRange=py;function ca(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function cm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function am(e){let t=[0];for(let n=0;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return xe.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return xe.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(T){return T===!0||T===!1}e.boolean=o;function i(T){return t.call(T)==="[object String]"}e.string=i;function s(T){return t.call(T)==="[object Number]"}e.number=s;function c(T,D,q){return t.call(T)==="[object Number]"&&D<=T&&T<=q}e.numberRange=c;function g(T){return t.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}e.integer=g;function d(T){return t.call(T)==="[object Number]"&&0<=T&&T<=2147483647}e.uinteger=d;function h(T){return t.call(T)==="[object Function]"}e.func=h;function b(T){return T!==null&&typeof T=="object"}e.objectLiteral=b;function m(T,D){return Array.isArray(T)&&T.every(D)}e.typedArray=m})(f||(f={}))});var V=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CM=he.ProtocolNotificationType=he.ProtocolNotificationType0=he.ProtocolRequestType=he.ProtocolRequestType0=he.RegistrationType=he.MessageDirection=void 0;var sn=et(),bu;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(bu||(he.MessageDirection=bu={}));var Vs=class{____;method;constructor(t){this.method=t}};he.RegistrationType=Vs;var Ks=class extends sn.RequestType0{__;___;____;_pr;constructor(t){super(t)}};he.ProtocolRequestType0=Ks;var Xs=class extends sn.RequestType{__;___;____;_pr;constructor(t){super(t,sn.ParameterStructures.byName)}};he.ProtocolRequestType=Xs;var Zs=class extends sn.NotificationType0{___;____;constructor(t){super(t)}};he.ProtocolNotificationType0=Zs;var Ys=class extends sn.NotificationType{___;____;constructor(t){super(t,sn.ParameterStructures.byName)}};he.ProtocolNotificationType=Ys;var vu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(vu||(he.CM=vu={}))});var qr=I(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.boolean=gg;He.string=Cu;He.number=pg;He.error=yg;He.func=Tg;He.array=Su;He.stringArray=_g;He.typedArray=bg;He.objectLiteral=vg;function gg(e){return e===!0||e===!1}function Cu(e){return typeof e=="string"||e instanceof String}function pg(e){return typeof e=="number"||e instanceof Number}function yg(e){return e instanceof Error}function Tg(e){return typeof e=="function"}function Su(e){return Array.isArray(e)}function _g(e){return Su(e)&&e.every(t=>Cu(t))}function bg(e,t){return Array.isArray(e)&&e.every(t)}function vg(e){return e!==null&&typeof e=="object"}});var Du=I(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ImplementationRequest=void 0;var Js=V(),Iu;(function(e){e.method="textDocument/implementation",e.messageDirection=Js.MessageDirection.clientToServer,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("textDocument.implementation","implementationProvider")})(Iu||(Nr.ImplementationRequest=Iu={}))});var ku=I(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.TypeDefinitionRequest=void 0;var ec=V(),wu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=ec.MessageDirection.clientToServer,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(wu||(Fr.TypeDefinitionRequest=wu={}))});var Ou=I(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.DidChangeWorkspaceFoldersNotification=an.WorkspaceFoldersRequest=void 0;var cn=V(),Pu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=cn.MessageDirection.serverToClient,e.type=new cn.ProtocolRequestType0(e.method),e.capabilities=cn.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Pu||(an.WorkspaceFoldersRequest=Pu={}));var Ru;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=cn.MessageDirection.clientToServer,e.type=new cn.ProtocolNotificationType(e.method),e.capabilities=cn.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Ru||(an.DidChangeWorkspaceFoldersNotification=Ru={}))});var Mu=I(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.ConfigurationRequest=void 0;var tc=V(),xu;(function(e){e.method="workspace/configuration",e.messageDirection=tc.MessageDirection.serverToClient,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("workspace.configuration",void 0)})(xu||(Gr.ConfigurationRequest=xu={}))});var qu=I(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ColorPresentationRequest=ln.DocumentColorRequest=void 0;var un=V(),Eu;(function(e){e.method="textDocument/documentColor",e.messageDirection=un.MessageDirection.clientToServer,e.type=new un.ProtocolRequestType(e.method),e.capabilities=un.CM.create("textDocument.colorProvider","colorProvider")})(Eu||(ln.DocumentColorRequest=Eu={}));var Au;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=un.MessageDirection.clientToServer,e.type=new un.ProtocolRequestType(e.method),e.capabilities=un.CM.create("textDocument.colorProvider","colorProvider")})(Au||(ln.ColorPresentationRequest=Au={}))});var Gu=I(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.FoldingRangeRefreshRequest=fn.FoldingRangeRequest=void 0;var dn=V(),Nu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=dn.MessageDirection.clientToServer,e.type=new dn.ProtocolRequestType(e.method),e.capabilities=dn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Nu||(fn.FoldingRangeRequest=Nu={}));var Fu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=dn.MessageDirection.serverToClient,e.type=new dn.ProtocolRequestType0(e.method),e.capabilities=dn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Fu||(fn.FoldingRangeRefreshRequest=Fu={}))});var ju=I(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.DeclarationRequest=void 0;var nc=V(),Hu;(function(e){e.method="textDocument/declaration",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.declaration","declarationProvider")})(Hu||(Hr.DeclarationRequest=Hu={}))});var Wu=I(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.SelectionRangeRequest=void 0;var rc=V(),Lu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=rc.MessageDirection.clientToServer,e.type=new rc.ProtocolRequestType(e.method),e.capabilities=rc.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Lu||(jr.SelectionRangeRequest=Lu={}))});var $u=I(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.WorkDoneProgressCancelNotification=Tt.WorkDoneProgressCreateRequest=Tt.WorkDoneProgress=void 0;var Cg=et(),Ln=V(),Uu;(function(e){e.type=new Cg.ProgressType;function t(n){return n===e.type}e.is=t})(Uu||(Tt.WorkDoneProgress=Uu={}));var Qu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Ln.MessageDirection.serverToClient,e.type=new Ln.ProtocolRequestType(e.method),e.capabilities=Ln.CM.create("window.workDoneProgress",void 0)})(Qu||(Tt.WorkDoneProgressCreateRequest=Qu={}));var Bu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Ln.MessageDirection.clientToServer,e.type=new Ln.ProtocolNotificationType(e.method)})(Bu||(Tt.WorkDoneProgressCancelNotification=Bu={}))});var Xu=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.CallHierarchyOutgoingCallsRequest=_t.CallHierarchyIncomingCallsRequest=_t.CallHierarchyPrepareRequest=void 0;var nt=V(),zu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(zu||(_t.CallHierarchyPrepareRequest=zu={}));var Vu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Vu||(_t.CallHierarchyIncomingCallsRequest=Vu={}));var Ku;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ku||(_t.CallHierarchyOutgoingCallsRequest=Ku={}))});var nl=I(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Re=V(),Zu;(function(e){e.Relative="relative"})(Zu||(De.TokenFormat=Zu={}));var Wn;(function(e){e.method="textDocument/semanticTokens",e.type=new Re.RegistrationType(e.method)})(Wn||(De.SemanticTokensRegistrationType=Wn={}));var Yu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Re.MessageDirection.clientToServer,e.type=new Re.ProtocolRequestType(e.method),e.registrationMethod=Wn.method,e.capabilities=Re.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Yu||(De.SemanticTokensRequest=Yu={}));var Ju;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Re.MessageDirection.clientToServer,e.type=new Re.ProtocolRequestType(e.method),e.registrationMethod=Wn.method,e.capabilities=Re.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Ju||(De.SemanticTokensDeltaRequest=Ju={}));var el;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Re.MessageDirection.clientToServer,e.type=new Re.ProtocolRequestType(e.method),e.registrationMethod=Wn.method,e.capabilities=Re.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(el||(De.SemanticTokensRangeRequest=el={}));var tl;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Re.MessageDirection.serverToClient,e.type=new Re.ProtocolRequestType0(e.method),e.capabilities=Re.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(tl||(De.SemanticTokensRefreshRequest=tl={}))});var ol=I(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ShowDocumentRequest=void 0;var oc=V(),rl;(function(e){e.method="window/showDocument",e.messageDirection=oc.MessageDirection.serverToClient,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("window.showDocument.support",void 0)})(rl||(Lr.ShowDocumentRequest=rl={}))});var sl=I(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.LinkedEditingRangeRequest=void 0;var ic=V(),il;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(il||(Wr.LinkedEditingRangeRequest=il={}))});var hl=I(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.WillDeleteFilesRequest=ge.DidDeleteFilesNotification=ge.DidRenameFilesNotification=ge.WillRenameFilesRequest=ge.DidCreateFilesNotification=ge.WillCreateFilesRequest=ge.FileOperationPatternKind=void 0;var se=V(),cl;(function(e){e.file="file",e.folder="folder"})(cl||(ge.FileOperationPatternKind=cl={}));var al;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(al||(ge.WillCreateFilesRequest=al={}));var ul;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(ul||(ge.DidCreateFilesNotification=ul={}));var ll;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(ll||(ge.WillRenameFilesRequest=ll={}));var dl;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(dl||(ge.DidRenameFilesNotification=dl={}));var fl;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(fl||(ge.DidDeleteFilesNotification=fl={}));var ml;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(ml||(ge.WillDeleteFilesRequest=ml={}))});var Tl=I(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.MonikerRequest=bt.MonikerKind=bt.UniquenessLevel=void 0;var sc=V(),gl;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(gl||(bt.UniquenessLevel=gl={}));var pl;(function(e){e.$import="import",e.$export="export",e.local="local"})(pl||(bt.MonikerKind=pl={}));var yl;(function(e){e.method="textDocument/moniker",e.messageDirection=sc.MessageDirection.clientToServer,e.type=new sc.ProtocolRequestType(e.method),e.capabilities=sc.CM.create("textDocument.moniker","monikerProvider")})(yl||(bt.MonikerRequest=yl={}))});var Cl=I(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.TypeHierarchySubtypesRequest=vt.TypeHierarchySupertypesRequest=vt.TypeHierarchyPrepareRequest=void 0;var At=V(),_l;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method),e.capabilities=At.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(_l||(vt.TypeHierarchyPrepareRequest=_l={}));var bl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method)})(bl||(vt.TypeHierarchySupertypesRequest=bl={}));var vl;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method)})(vl||(vt.TypeHierarchySubtypesRequest=vl={}))});var Dl=I(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.InlineValueRefreshRequest=hn.InlineValueRequest=void 0;var mn=V(),Sl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=mn.MessageDirection.clientToServer,e.type=new mn.ProtocolRequestType(e.method),e.capabilities=mn.CM.create("textDocument.inlineValue","inlineValueProvider")})(Sl||(hn.InlineValueRequest=Sl={}));var Il;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=mn.MessageDirection.serverToClient,e.type=new mn.ProtocolRequestType0(e.method),e.capabilities=mn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(Il||(hn.InlineValueRefreshRequest=Il={}))});var Rl=I(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.InlayHintRefreshRequest=Ct.InlayHintResolveRequest=Ct.InlayHintRequest=void 0;var rt=V(),wl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint","inlayHintProvider")})(wl||(Ct.InlayHintRequest=wl={}));var kl;(function(e){e.method="inlayHint/resolve",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(kl||(Ct.InlayHintResolveRequest=kl={}));var Pl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=rt.MessageDirection.serverToClient,e.type=new rt.ProtocolRequestType0(e.method),e.capabilities=rt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Pl||(Ct.InlayHintRefreshRequest=Pl={}))});var Nl=I(ce=>{"use strict";var Sg=ce&&ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ig=ce&&ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dg=ce&&ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var kg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pg=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Rg=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlineCompletionRequest=void 0;var uc=V(),Ql;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=uc.MessageDirection.clientToServer,e.type=new uc.ProtocolRequestType(e.method),e.capabilities=uc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Ql||(Qr.InlineCompletionRequest=Ql={}))});var Vl=I(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.TextDocumentContentRefreshRequest=pn.TextDocumentContentRequest=void 0;var Qn=V(),$l;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType(e.method),e.capabilities=Qn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})($l||(pn.TextDocumentContentRequest=$l={}));var zl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Qn.MessageDirection.serverToClient,e.type=new Qn.ProtocolRequestType(e.method)})(zl||(pn.TextDocumentContentRefreshRequest=zl={}))});var uf=I(a=>{"use strict";var Og=a&&a.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xg=a&&a.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mg=a&&a.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(nd||(a.StaticRegistrationOptions=nd={}));var rd;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||mc.is(r.documentSelector))}e.is=t})(rd||(a.TextDocumentRegistrationOptions=rd={}));var od;(function(e){function t(r){let o=r;return ae.objectLiteral(o)&&(o.workDoneProgress===void 0||ae.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ae.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(od||(a.WorkDoneProgressOptions=od={}));var id;(function(e){e.method="initialize",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method)})(id||(a.InitializeRequest=id={}));var sd;(function(e){e.unknownProtocolVersion=1})(sd||(a.InitializeErrorCodes=sd={}));var cd;(function(e){e.method="initialized",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method)})(cd||(a.InitializedNotification=cd={}));var ad;(function(e){e.method="shutdown",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType0(e.method)})(ad||(a.ShutdownRequest=ad={}));var ud;(function(e){e.method="exit",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType0(e.method)})(ud||(a.ExitNotification=ud={}));var ld;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeConfiguration",void 0)})(ld||(a.DidChangeConfigurationNotification=ld={}));var dd;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(dd||(a.MessageType=dd={}));var fd;(function(e){e.method="window/showMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(fd||(a.ShowMessageNotification=fd={}));var md;(function(e){e.method="window/showMessageRequest",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(md||(a.ShowMessageRequest=md={}));var hd;(function(e){e.method="window/logMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(hd||(a.LogMessageNotification=hd={}));var gd;(function(e){e.method="telemetry/event",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(gd||(a.TelemetryEventNotification=gd={}));var pd;(function(e){e.None=0,e.Full=1,e.Incremental=2})(pd||(a.TextDocumentSyncKind=pd={}));var yd;(function(e){e.method="textDocument/didOpen",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(yd||(a.DidOpenTextDocumentNotification=yd={}));var Td;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Td||(a.TextDocumentContentChangeEvent=Td={}));var _d;(function(e){e.method="textDocument/didChange",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync")})(_d||(a.DidChangeTextDocumentNotification=_d={}));var bd;(function(e){e.method="textDocument/didClose",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(bd||(a.DidCloseTextDocumentNotification=bd={}));var vd;(function(e){e.method="textDocument/didSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(vd||(a.DidSaveTextDocumentNotification=vd={}));var Cd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Cd||(a.TextDocumentSaveReason=Cd={}));var Sd;(function(e){e.method="textDocument/willSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Sd||(a.WillSaveTextDocumentNotification=Sd={}));var Id;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(Id||(a.WillSaveTextDocumentWaitUntilRequest=Id={}));var Dd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeWatchedFiles",void 0)})(Dd||(a.DidChangeWatchedFilesNotification=Dd={}));var wd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(wd||(a.FileChangeType=wd={}));var hc;(function(e){function t(n){let r=n;return ae.objectLiteral(r)&&(Kl.URI.is(r.baseUri)||Kl.WorkspaceFolder.is(r.baseUri))&&ae.string(r.pattern)}e.is=t})(hc||(a.RelativePattern=hc={}));var gc;(function(e){function t(n){let r=n;return ae.string(r)||hc.is(r)}e.is=t})(gc||(a.GlobPattern=gc={}));var kd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(kd||(a.WatchKind=kd={}));var Pd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.publishDiagnostics",void 0)})(Pd||(a.PublishDiagnosticsNotification=Pd={}));var Rd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Rd||(a.CompletionTriggerKind=Rd={}));var Od;(function(e){e.method="textDocument/completion",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion","completionProvider")})(Od||(a.CompletionRequest=Od={}));var xd;(function(e){e.method="completionItem/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(xd||(a.CompletionResolveRequest=xd={}));var Md;(function(e){e.method="textDocument/hover",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.hover","hoverProvider")})(Md||(a.HoverRequest=Md={}));var Ed;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Ed||(a.SignatureHelpTriggerKind=Ed={}));var Ad;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Ad||(a.SignatureHelpRequest=Ad={}));var qd;(function(e){e.method="textDocument/definition",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.definition","definitionProvider")})(qd||(a.DefinitionRequest=qd={}));var Nd;(function(e){e.method="textDocument/references",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.references","referencesProvider")})(Nd||(a.ReferencesRequest=Nd={}));var Fd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Fd||(a.DocumentHighlightRequest=Fd={}));var Gd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Gd||(a.DocumentSymbolRequest=Gd={}));var Hd;(function(e){e.method="textDocument/codeAction",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction","codeActionProvider")})(Hd||(a.CodeActionRequest=Hd={}));var jd;(function(e){e.method="codeAction/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(jd||(a.CodeActionResolveRequest=jd={}));var Ld;(function(e){e.method="workspace/symbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol","workspaceSymbolProvider")})(Ld||(a.WorkspaceSymbolRequest=Ld={}));var Wd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Wd||(a.WorkspaceSymbolResolveRequest=Wd={}));var Ud;(function(e){e.method="textDocument/codeLens",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens","codeLensProvider")})(Ud||(a.CodeLensRequest=Ud={}));var Qd;(function(e){e.method="codeLens/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Qd||(a.CodeLensResolveRequest=Qd={}));var Bd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType0(e.method),e.capabilities=_.CM.create("workspace.codeLens",void 0)})(Bd||(a.CodeLensRefreshRequest=Bd={}));var $d;(function(e){e.method="textDocument/documentLink",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider")})($d||(a.DocumentLinkRequest=$d={}));var zd;(function(e){e.method="documentLink/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(zd||(a.DocumentLinkResolveRequest=zd={}));var Vd;(function(e){e.method="textDocument/formatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.formatting","documentFormattingProvider")})(Vd||(a.DocumentFormattingRequest=Vd={}));var Kd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Kd||(a.DocumentRangeFormattingRequest=Kd={}));var Xd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Xd||(a.DocumentRangesFormattingRequest=Xd={}));var Zd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Zd||(a.DocumentOnTypeFormattingRequest=Zd={}));var Yd;(function(e){e.Identifier=1})(Yd||(a.PrepareSupportDefaultBehavior=Yd={}));var Jd;(function(e){e.method="textDocument/rename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename","renameProvider")})(Jd||(a.RenameRequest=Jd={}));var ef;(function(e){e.method="textDocument/prepareRename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(ef||(a.PrepareRenameRequest=ef={}));var tf;(function(e){e.method="workspace/executeCommand",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.executeCommand","executeCommandProvider")})(tf||(a.ExecuteCommandRequest=tf={}));var nf;(function(e){e.method="workspace/applyEdit",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType("workspace/applyEdit"),e.capabilities=_.CM.create("workspace.applyEdit",void 0)})(nf||(a.ApplyWorkspaceEditRequest=nf={}))});var df=I(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.createProtocolConnection=Lg;var lf=et();function Lg(e,t,n,r){return lf.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,lf.createMessageConnection)(e,t,n,r)}});var te=I(we=>{"use strict";var Wg=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Br=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Wg(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;Br(et(),we);Br((Ar(),cr(Er)),we);Br(V(),we);Br(uf(),we);var Ug=df();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Ug.createProtocolConnection}});var ff;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(ff||(we.LSPErrorCodes=ff={}))});var Sc=I(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.empty=void 0;St.v4=mf;St.isUUID=hf;St.parse=Bg;St.generateUuid=$g;var $n=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Cc=class e extends $n{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};St.empty=new $n("00000000-0000-0000-0000-000000000000");function mf(){return new Cc}var Qg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function hf(e){return Qg.test(e)}function Bg(e){if(!hf(e))throw new Error("invalid uuid");return new $n(e)}function $g(){return mf().asHex()}});var gf=I(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.ProgressFeature=void 0;_n.attachWorkDone=Vg;_n.attachPartialResult=Xg;var It=te(),zg=Sc(),Tn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(It.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,{kind:"end"})}},$r=class extends Tn{_source;constructor(t,n){super(t,n),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},zn=class{constructor(){}begin(){}report(){}done(){}},zr=class extends zn{_source;constructor(){super(),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Vg(e,t){if(t===void 0||t.workDoneToken===void 0)return new zn;let n=t.workDoneToken;return delete t.workDoneToken,new Tn(e,n)}var Kg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(It.WorkDoneProgressCancelNotification.type,n=>{let r=Tn.Instances.get(n.token);(r instanceof $r||r instanceof zr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new zn:new Tn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,zg.generateUuid)();return this.connection.sendRequest(It.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new $r(this.connection,t))}else return Promise.resolve(new zr)}};_n.ProgressFeature=Kg;var Ic;(function(e){e.type=new It.ProgressType})(Ic||(Ic={}));var Dc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Ic.type,this._token,t)}};function Xg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Dc(e,n)}});var pf=I(Ke=>{"use strict";var Zg=Ke&&Ke.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Yg=Ke&&Ke.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jg=Ke&&Ke.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?tp.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(ep.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ke.ConfigurationFeature=np});var yf=I(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.WorkspaceFoldersFeature=void 0;var Vr=te(),rp=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Vr.Emitter,this.connection.onNotification(Vr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Vr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Vr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Kr.WorkspaceFoldersFeature=rp});var Tf=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.CallHierarchyFeature=void 0;var wc=te(),op=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(wc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=wc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=wc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Xr.CallHierarchyFeature=op});var Pc=I(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.SemanticTokensBuilder=Dt.SemanticTokensDiff=Dt.SemanticTokensFeature=void 0;var Zr=te(),ip=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Zr.SemanticTokensRefreshRequest.type),on:t=>{let n=Zr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Zr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Zr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Dt.SemanticTokensFeature=ip;var Yr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(c-=this._prevChar));let g=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;g[this._dataLen++]=s,g[this._dataLen++]=c,g[this._dataLen++]=r,g[this._dataLen++]=o,g[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let d=t[5*c],h=t[5*g];if(d===h){let b=t[5*c+1],m=t[5*g+1];return b-m}return d-h});let o=[],i=0,s=0;for(let c=0;c{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.ShowDocumentFeature=void 0;var sp=te(),cp=e=>class extends e{showDocument(t){return this.connection.sendRequest(sp.ShowDocumentRequest.type,t)}};Jr.ShowDocumentFeature=cp});var bf=I(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.FileOperationsFeature=void 0;var bn=te(),ap=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(bn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(bn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(bn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(bn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(bn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(bn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};eo.FileOperationsFeature=ap});var vf=I(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.LinkedEditingRangeFeature=void 0;var up=te(),lp=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(up.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};to.LinkedEditingRangeFeature=lp});var Cf=I(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.TypeHierarchyFeature=void 0;var Rc=te(),dp=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Rc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Rc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Rc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};no.TypeHierarchyFeature=dp});var If=I(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.InlineValueFeature=void 0;var Sf=te(),fp=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Sf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Sf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};ro.InlineValueFeature=fp});var wf=I(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.FoldingRangeFeature=void 0;var Df=te(),mp=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(Df.FoldingRangeRefreshRequest.type),on:t=>{let n=Df.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};oo.FoldingRangeFeature=mp});var kf=I(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.InlayHintFeature=void 0;var Oc=te(),hp=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Oc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Oc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Oc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};io.InlayHintFeature=hp});var Pf=I(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.DiagnosticFeature=void 0;var Vn=te(),gp=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Vn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Vn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Vn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Vn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Vn.WorkspaceDiagnosticRequest.partialResult,n)))}}};so.DiagnosticFeature=gp});var Mc=I(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.TextDocuments=void 0;var Nt=te(),xc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Nt.Emitter,this._onDidOpen=new Nt.Emitter,this._onDidClose=new Nt.Emitter,this._onDidSave=new Nt.Emitter,this._onWillSave=new Nt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Nt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let c=this._syncedDocuments.get(o.uri);c!==void 0&&(c=this._configuration.update(c,i,s),this._syncedDocuments.set(o.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Nt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};co.TextDocuments=xc});var qc=I(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.NotebookDocuments=vn.NotebookSyncFeature=void 0;var Me=te(),Rf=Mc(),pp=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Me.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Me.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Me.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Me.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};vn.NotebookSyncFeature=pp;var Ec=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Me.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Me.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Me.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ac=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof Rf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Rf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Me.Emitter,this._onDidChange=new Me.Emitter,this._onDidSave=new Me.Emitter,this._onDidClose=new Me.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Ec,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,c=!1,g=o.change;g.metadata!==void 0&&(c=!0,i.metadata=g.metadata);let d=[],h=[],b=[],m=[];if(g.cells!==void 0){let x=g.cells;if(x.structure!==void 0){let p=x.structure.array;if(i.cells.splice(p.start,p.deleteCount,...p.cells!==void 0?p.cells:[]),x.structure.didOpen!==void 0)for(let l of x.structure.didOpen)await n.openTextDocument({textDocument:l}),d.push(l.uri);if(x.structure.didClose)for(let l of x.structure.didClose)await n.closeTextDocument({textDocument:l}),h.push(l.uri)}if(x.data!==void 0){let p=new Map(x.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let C=p.get(i.cells[l].document);if(C!==void 0){let k=i.cells.splice(l,1,C);if(b.push({old:k[0],new:C}),p.delete(C.document),p.size===0)break}}}if(x.textContent!==void 0)for(let p of x.textContent)await n.changeTextDocument({textDocument:p.document,contentChanges:p.changes}),m.push(p.document.uri)}this.updateCellMap(i);let T={notebookDocument:i};c&&(T.metadata={old:s,new:i.metadata});let D=[];for(let x of d)D.push(this.getNotebookCell(x));let q=[];for(let x of h)q.push(this.getNotebookCell(x));let N=[];for(let x of m)N.push(this.getNotebookCell(x));(D.length>0||q.length>0||b.length>0||N.length>0)&&(T.cells={added:D,removed:q,changed:{data:b,textContent:N}}),(T.metadata!==void 0||T.cells!==void 0)&&this._onDidChange.fire(T)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Me.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};vn.NotebookDocuments=Ac});var Of=I(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.MonikerFeature=void 0;var yp=te(),Tp=e=>class extends e{get moniker(){return{on:t=>{let n=yp.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ao.MonikerFeature=Tp});var xf=I(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.InlineCompletionFeature=void 0;var _p=te(),bp=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(_p.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};uo.InlineCompletionFeature=bp});var Ef=I(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.TextDocumentContentFeature=void 0;var Mf=te(),vp=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Mf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Mf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};lo.TextDocumentContentFeature=vp});var Lc=I(Q=>{"use strict";var Cp=Q&&Q.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sp=Q&&Q.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jf=Q&&Q.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};Q.ErrorMessageTracker=Gc;var fo=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(w.MessageType.Error,t)}warn(t){this.send(w.MessageType.Warning,t)}info(t){this.send(w.MessageType.Info,t)}log(t){this.send(w.MessageType.Log,t)}debug(t){this.send(w.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(w.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,w.RAL)().console.error("Sending log message failed")})}},Hc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:w.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Nc)}showWarningMessage(t,...n){let r={type:w.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Nc)}showInformationMessage(t,...n){let r={type:w.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Nc)}},Af=(0,Pp.ShowDocumentFeature)((0,A.ProgressFeature)(Hc)),qf;(function(e){function t(){return new mo}e.create=t})(qf||(Q.BulkRegistration=qf={}));var mo=class{_registrations=[];_registered=new Set;add(t,n){let r=Ee.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Fc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Nf;(function(e){function t(){return new Kn(void 0,[])}e.create=t})(Nf||(Q.BulkUnregistration=Nf={}));var Kn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(w.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ee.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(w.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},ho=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof mo?this.registerMany(t):t instanceof Kn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ee.string(n)?n:n.method,i=Fc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(w.RegistrationRequest.type,s).then(c=>(t.add({id:i,method:o}),t),c=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(c)))}registerSingle2(t,n){let r=Ee.string(t)?t:t.method,o=Fc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(w.RegistrationRequest.type,i).then(s=>w.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(w.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(w.RegistrationRequest.type,n).then(()=>new Kn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},jc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(w.ApplyWorkspaceEditRequest.type,r)}},Ff=(0,Hp.TextDocumentContentFeature)((0,Rp.FileOperationsFeature)((0,Dp.WorkspaceFoldersFeature)((0,Ip.ConfigurationFeature)(jc)))),go=class{_trace;_connection;constructor(){this._trace=w.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==w.Trace.Off&&this.connection.sendNotification(w.LogTraceNotification.type,{message:t,verbose:this._trace===w.Trace.Verbose?n:void 0}).catch(()=>{})}},po=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(w.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},yo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._LanguagesImpl=yo;var Gf=(0,Gp.InlineCompletionFeature)((0,Ep.FoldingRangeFeature)((0,Fp.MonikerFeature)((0,qp.DiagnosticFeature)((0,Ap.InlayHintFeature)((0,Mp.InlineValueFeature)((0,xp.TypeHierarchyFeature)((0,Op.LinkedEditingRangeFeature)((0,kp.SemanticTokensFeature)((0,wp.CallHierarchyFeature)(yo)))))))))),To=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._NotebooksImpl=To;var Hf=(0,Np.NotebookSyncFeature)(To);function Lf(e,t){return function(n){return t(e(n))}}function Wf(e,t){return function(n){return t(e(n))}}function Uf(e,t){return function(n){return t(e(n))}}function Qf(e,t){return function(n){return t(e(n))}}function Bf(e,t){return function(n){return t(e(n))}}function $f(e,t){return function(n){return t(e(n))}}function zf(e,t){return function(n){return t(e(n))}}function Vf(e,t){return function(n){return t(e(n))}}function jp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Lf),tracer:n(e.tracer,t.tracer,Uf),telemetry:n(e.telemetry,t.telemetry,Wf),client:n(e.client,t.client,Qf),window:n(e.window,t.window,Bf),workspace:n(e.workspace,t.workspace,$f),languages:n(e.languages,t.languages,zf),notebooks:n(e.notebooks,t.notebooks,Vf)}}function Lp(e,t,n){let r=n&&n.console?new(n.console(fo)):new fo,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(go)):new go,s=n&&n.telemetry?new(n.telemetry(po)):new po,c=n&&n.client?new(n.client(ho)):new ho,g=n&&n.window?new(n.window(Af)):new Af,d=n&&n.workspace?new(n.workspace(Ff)):new Ff,h=n&&n.languages?new(n.languages(Gf)):new Gf,b=n&&n.notebooks?new(n.notebooks(Hf)):new Hf,m=[r,i,s,c,g,d,h,b];function T(p){return p instanceof Promise?p:Ee.thenable(p)?new Promise((l,C)=>{p.then(k=>l(k),k=>C(k))}):Promise.resolve(p)}let D,q,N,x={listen:()=>o.listen(),sendRequest:(p,...l)=>o.sendRequest(Ee.string(p)?p:p.method,...l),onRequest:(p,l)=>o.onRequest(p,l),sendNotification:(p,l)=>{let C=Ee.string(p)?p:p.method;return o.sendNotification(C,l)},onNotification:(p,l)=>o.onNotification(p,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:p=>(q=p,{dispose:()=>{q=void 0}}),onInitialized:p=>o.onNotification(w.InitializedNotification.type,p),onShutdown:p=>(D=p,{dispose:()=>{D=void 0}}),onExit:p=>(N=p,{dispose:()=>{N=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return c},get window(){return g},get workspace(){return d},get languages(){return h},get notebooks(){return b},onDidChangeConfiguration:p=>o.onNotification(w.DidChangeConfigurationNotification.type,p),onDidChangeWatchedFiles:p=>o.onNotification(w.DidChangeWatchedFilesNotification.type,p),__textDocumentSync:void 0,onDidOpenTextDocument:p=>o.onNotification(w.DidOpenTextDocumentNotification.type,p),onDidChangeTextDocument:p=>o.onNotification(w.DidChangeTextDocumentNotification.type,p),onDidCloseTextDocument:p=>o.onNotification(w.DidCloseTextDocumentNotification.type,p),onWillSaveTextDocument:p=>o.onNotification(w.WillSaveTextDocumentNotification.type,p),onWillSaveTextDocumentWaitUntil:p=>o.onRequest(w.WillSaveTextDocumentWaitUntilRequest.type,p),onDidSaveTextDocument:p=>o.onNotification(w.DidSaveTextDocumentNotification.type,p),sendDiagnostics:p=>o.sendNotification(w.PublishDiagnosticsNotification.type,p),onHover:p=>o.onRequest(w.HoverRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onCompletion:p=>o.onRequest(w.CompletionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCompletionResolve:p=>o.onRequest(w.CompletionResolveRequest.type,p),onSignatureHelp:p=>o.onRequest(w.SignatureHelpRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDeclaration:p=>o.onRequest(w.DeclarationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDefinition:p=>o.onRequest(w.DefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onTypeDefinition:p=>o.onRequest(w.TypeDefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onImplementation:p=>o.onRequest(w.ImplementationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onReferences:p=>o.onRequest(w.ReferencesRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentHighlight:p=>o.onRequest(w.DocumentHighlightRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentSymbol:p=>o.onRequest(w.DocumentSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbol:p=>o.onRequest(w.WorkspaceSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:p=>o.onRequest(w.WorkspaceSymbolResolveRequest.type,p),onCodeAction:p=>o.onRequest(w.CodeActionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeActionResolve:p=>o.onRequest(w.CodeActionResolveRequest.type,(l,C)=>p(l,C)),onCodeLens:p=>o.onRequest(w.CodeLensRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeLensResolve:p=>o.onRequest(w.CodeLensResolveRequest.type,(l,C)=>p(l,C)),onDocumentFormatting:p=>o.onRequest(w.DocumentFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:p=>o.onRequest(w.DocumentRangeFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:p=>o.onRequest(w.DocumentOnTypeFormattingRequest.type,(l,C)=>p(l,C)),onRenameRequest:p=>o.onRequest(w.RenameRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onPrepareRename:p=>o.onRequest(w.PrepareRenameRequest.type,(l,C)=>p(l,C)),onDocumentLinks:p=>o.onRequest(w.DocumentLinkRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentLinkResolve:p=>o.onRequest(w.DocumentLinkResolveRequest.type,(l,C)=>p(l,C)),onDocumentColor:p=>o.onRequest(w.DocumentColorRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onColorPresentation:p=>o.onRequest(w.ColorPresentationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onFoldingRanges:p=>o.onRequest(w.FoldingRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onSelectionRanges:p=>o.onRequest(w.SelectionRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onExecuteCommand:p=>o.onRequest(w.ExecuteCommandRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let p of m)p.attach(x);return o.onRequest(w.InitializeRequest.type,p=>{t.initialize(p),Ee.string(p.trace)&&(i.trace=w.Trace.fromString(p.trace));for(let l of m)l.initialize(p.capabilities);if(q){let l=q(p,new w.CancellationTokenSource().token,(0,A.attachWorkDone)(o,p),void 0);return T(l).then(C=>{if(C instanceof w.ResponseError)return C;let k=C;k||(k={capabilities:{}});let M=k.capabilities;M||(M={},k.capabilities=M),M.textDocumentSync===void 0||M.textDocumentSync===null?M.textDocumentSync=Ee.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None:!Ee.number(M.textDocumentSync)&&!Ee.number(M.textDocumentSync.change)&&(M.textDocumentSync.change=Ee.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None);for(let L of m)L.fillServerCapabilities(M);return k})}else{let l={capabilities:{textDocumentSync:w.TextDocumentSyncKind.None}};for(let C of m)C.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(w.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,D)return D(new w.CancellationTokenSource().token)}),o.onNotification(w.ExitNotification.type,()=>{try{if(N)return N()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(w.SetTraceNotification.type,p=>{i.trace=w.Trace.fromString(p.value)}),x}});var Kf=I(ve=>{"use strict";var Wp=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Up=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$c=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Le.normalize(n.join("/"))}function Uc(){return process.platform==="win32"}function _o(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,c)=>{let g=process.env,d=Object.create(null);Object.keys(g).forEach(h=>d[h]=g[h]),t&&Wc.existsSync(t)&&(d[o]?d[o]=t+Le.delimiter+d[o]:d[o]=t,r&&r(`NODE_PATH value is: ${d[o]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let h=(0,zc.fork)("",[],{cwd:n,env:d,execArgv:["-e",i]});if(h.pid===void 0){c(new Error(`Starting process to resolve node module ${e} failed`));return}h.on("error",m=>{c(m)}),h.on("message",m=>{m.c==="r"&&(h.send({c:"e"}),m.s?s(m.r):c(new Error(`Failed to resolve module: ${e}`)))});let b={c:"rs",a:e};h.send(b)}catch(h){c(h)}})}function Qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Uc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,zc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Uc()?Le.join(s,"node_modules"):Le.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function $p(e){let t="yarn",n={encoding:"utf8"};Uc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,zc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let c of s)try{let g=JSON.parse(c);if(g.type==="log")return Le.join(g.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Bc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Wc.existsSync(__filename.toUpperCase())||!Wc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Le.normalize(i).indexOf(Le.normalize(o))===0:Le.normalize(i).toLowerCase().indexOf(Le.normalize(o).toLowerCase())===0}e.isParent=r})(Bc||(ve.FileSystem=Bc={}));function zp(e,t,n,r){return n?(Le.isAbsolute(n)||(n=Le.join(e,n)),_o(t,n,n,r).then(o=>Bc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>_o(t,Qc(r),e,r))):_o(t,Qc(r),e,r)}});var Yf=I(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var Xf=require("util"),it=et(),Vc=class e extends it.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Xf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Kc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),it.Disposable.create(()=>this.stream.off("data",t))}},Xc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},Zf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Vc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Xf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Kc(e),asWritableStream:e=>new Xc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Zc(){return Zf}(function(e){function t(){it.RAL.install(Zf)}e.install=t})(Zc||(Zc={}));Yc.default=Zc});var oa=I(F=>{"use strict";var em=F&&F.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Vp=F&&F.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ra=F&&F.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};F.IPCMessageReader=Jc;var ea=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.IPCMessageWriter=ea;var ta=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};F.PortMessageReader=ta;var na=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.PortMessageWriter=na;var Ft=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Xn.default)().stream.asReadableStream(t),n)}};F.SocketMessageReader=Ft;var Gt=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Xn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};F.SocketMessageWriter=Gt;var bo=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,Xn.default)().stream.asReadableStream(t),n)}};F.StreamMessageReader=bo;var vo=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,Xn.default)().stream.asWritableStream(t),n)}};F.StreamMessageWriter=vo;var ey=process.env.XDG_RUNTIME_DIR,ty=new Map([["linux",107],["darwin",102]]);function ny(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Jf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Jp.realpathSync(ey??Yp.tmpdir()),r=ty.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Jf.randomBytes)(Math.floor(e/2)).toString("hex");return Zp.join(n,`lsp-${o}.sock`)}function ry(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,Co.createServer)(c=>{s.close(),n([new Ft(c,t),new Gt(c,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function oy(e,t="utf-8"){let n=(0,Co.createConnection)(e);return[new Ft(n,t),new Gt(n,t)]}function iy(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,Co.createServer)(c=>{s.close(),n([new Ft(c,t),new Gt(c,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function sy(e,t="utf-8"){let n=(0,Co.createConnection)(e,"127.0.0.1");return[new Ft(n,t),new Gt(n,t)]}function cy(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function ay(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function uy(e,t,n,r){n||(n=Oe.NullLogger);let o=cy(e)?new bo(e):e,i=ay(t)?new vo(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var ia=I(st=>{"use strict";var ly=st&&st.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),tm=st&&st.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ly(t,e,n)};Object.defineProperty(st,"__esModule",{value:!0});st.createProtocolConnection=fy;var dy=oa();tm(oa(),st);tm(te(),st);function fy(e,t,n,r){return(0,dy.createMessageConnection)(e,t,n,r)}});var sa=I(pe=>{"use strict";var my=pe&&pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rm=pe&&pe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&my(t,e,n)};Object.defineProperty(pe,"__esModule",{value:!0});pe.ProposedFeatures=pe.NotebookDocuments=pe.TextDocuments=pe.SemanticTokensBuilder=void 0;var hy=Pc();Object.defineProperty(pe,"SemanticTokensBuilder",{enumerable:!0,get:function(){return hy.SemanticTokensBuilder}});rm(te(),pe);var gy=Mc();Object.defineProperty(pe,"TextDocuments",{enumerable:!0,get:function(){return gy.TextDocuments}});var py=qc();Object.defineProperty(pe,"NotebookDocuments",{enumerable:!0,get:function(){return py.NotebookDocuments}});rm(Lc(),pe);var nm;(function(e){e.all={__brand:"features"}})(nm||(pe.ProposedFeatures=nm={}))});var aa=I(Ce=>{"use strict";var cm=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),yy=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),am=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{So(),process.exit(Cn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;ca.number(t)&&lm===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(Cn?0:1)}},3e3)},get shutdownReceived(){return Cn},set shutdownReceived(e){Cn=e},exit:e=>{So(),process.exit(e)}};function vy(e,t,n,r){let o,i,s,c;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),Ht.ConnectionStrategy.is(e)||Ht.ConnectionOptions.is(e)?c=e:(i=e,s=t,c=n),Cy(i,s,c,o)}function Cy(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let c,g,d=process.argv.slice(2);for(let h=0;h{So(),process.exit(Cn?0:1)}),c.on("close",()=>{So(),process.exit(Cn?0:1)})}let s=c=>{let g=(0,Ht.createProtocolConnection)(e,t,c,n);return o&&Sy(c),g};return(0,Ty.createConnection)(s,by,r)}function Sy(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,om.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...c]=i;e.error(`Assertion failed: ${s} ${t(c)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,om.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var hm={};Va(hm,{TextDocument:()=>ua});function la(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);la(r,t),la(o,t);let i=0,s=0,c=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Iy(e){let t=mm(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Io,ua,gm=za(()=>{"use strict";Io=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=mm(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let c=Math.max(o.start.line,0),g=Math.max(o.end.line,0),d=this._lineOffsets,h=dm(r.text,!1,i);if(g-c===h.length)for(let m=0,T=h.length;mt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&fm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,c){return new Io(o,i,s,c)}e.create=t;function n(o,i,s){if(o instanceof Io)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),c=la(i.map(Iy),(h,b)=>{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),g=0,d=[];for(let h of c){let b=o.offsetAt(h.range.start);if(bg&&d.push(s.substring(g,b)),h.newText.length&&d.push(h.newText),g=o.offsetAt(h.range.end)}return d.push(s.substr(g)),d.join("")}e.applyEdits=r})(ua||(ua={}))});var Yn=I(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.DATATYPE_SET=ye.KEYWORD_SET=ye.PUNCTUATION=ye.OPERATORS=ye.DATATYPES=ye.KEYWORDS=void 0;ye.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ye.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ye.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ye.PUNCTUATION=["(",")","[","]",";",",",":","."];ye.KEYWORD_SET=new Set(ye.KEYWORDS);ye.DATATYPE_SET=new Set(ye.DATATYPES)});var er=I(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.positionAt=fa;Jn.offsetAt=wy;Jn.sourceRange=ky;function da(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function pm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function ym(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function aa(e,t){ca(e,t);let n=am(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=hy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function py(e,t){if(ca(e,t.start),ca(e,t.end),t.end{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.parseQuickScript=Py;var yy=Qn(),Co=bo(),te=It(),Ty=zn(),um=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),lm=new Set(["+","-","NOT","!","~"]),_y=new Set(["TRUE","FALSE","NULL","EOF"]),by=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),Cy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function vy(e){return e.kind===te.TokenKind.Whitespace||e.kind===te.TokenKind.Newline||e.kind===te.TokenKind.Comment||e.kind===te.TokenKind.EOF}function Dt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function Se(e){return e?.kind===te.TokenKind.Keyword?Dt(e):void 0}function dm(e,t,n=t){return(0,Co.sourceRange)(e,{start:t.span.start,end:n.span.end})}function Sy(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,Co.sourceRange)(e,{start:n,end:n}).range}function ye(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:Sy(e,r)}}function Iy(e,t){return e.filter(n=>n.range.start.line===t&&!vy(n))}function fm(e,t){return e.some(n=>n.kind===te.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function mm(e){return e===void 0?void 0:e.kind===te.TokenKind.Keyword?Dt(e):e.lexeme}var ua=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;lm.has(mm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(Dt(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===te.TokenKind.Identifier||t.kind===te.TokenKind.Number||t.kind===te.TokenKind.String||this.isCallableKeyword(t)||_y.has(Dt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===te.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===te.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===te.TokenKind.Keyword&&!by.has(Dt(t)??"")&&!um.has(Dt(t)??"")&&!lm.has(Dt(t)??"")}};function Dy(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):ye(n.code,n.message,n.token)}function qe(e,t,n){let r=new ua(t).parse();return r===void 0?!0:(n.push(Dy(e,t,r)),!1)}var la=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positiona.lexeme==="(")&&this.diagnostics.push(ye("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else qe(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(ye("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(ye("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==te.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):ye("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):ye("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{qe(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),a=i>=0&&i=0&&i0&&qe(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&oC.lexeme==="=")&&r.some(C=>Se(C)==="TO");this.statements.push({kind:a,first:t,last:m,name:a==="direct-call"?t:void 0,recoveredLoop:h})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[te.TokenKind.Identifier,te.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!qe(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==te.TokenKind.Identifier&&t[0].kind!==te.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function wy(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function ky(e,t){let n=wy(e,t);if(n>t)return n;let r=e[t],o=Se(r[0])==="IF",i=Se(r[0])==="ELSE"&&Se(r[1])==="IF";if(!o&&!i||r.some(m=>Se(m)==="THEN"))return t;let s=o&&r.length===1,a=["AND","OR","NOT"].includes(Se(r[r.length-1])??""),p=["AND","OR"].includes(Se(e[t+1]?.[0])??"");if(!s&&!a&&!p)return t;for(let m=t+1;mSe(h)==="THEN"))return m;return t}function Py(e){let t=(0,Ty.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(l,b)=>Iy(t,b)),o=[],i=[],s=[],a=new Array(n),p=[],m=[];for(let l=0;lb.kind==="dim"&&b.datatype!==void 0))if(!yy.DATATYPE_SET.has(l.datatype.toUpperCase())){let b=l.datatypeRange??l.range,P=`${b.start.line}:${b.start.character}`;if(h.has(P))continue;h.add(P),s.push({code:"unknown-datatype",message:`Unknown datatype '${l.datatype}'.`,severity:"error",range:b})}let C=(0,Co.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:a,...C}}});var _m=S(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.formatQuickScriptLexically=ym;Xn.formatQuickScriptStructure=Tm;Xn.formatQuickScript=Gy;var j=It(),ha=zn(),Oy=vo();function hm(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function ma(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function pm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function fa(e){Kn(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function Ry(e,t){if(e[t].lexeme!=="-"||pm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=ma(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function xy(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function ym(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,ha.tokenize)(r);if(o.some(m=>m.kind===j.TokenKind.String&&!m.lexeme.endsWith('"'))||o.some(m=>m.kind===j.TokenKind.Unknown&&m.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,a=!1;for(let m=0;m")||Te(C,t.regionBlockCodeBegin??"{region"))&&(a=!0),b!==void 0&&(b.kind===j.TokenKind.Identifier||b.kind===j.TokenKind.Keyword||b.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(h.lexeme)}let p=xy(i.join(""),n);return{text:p,changed:p!==e}}function My(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function Ey(e){let t=(0,ha.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function Te(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function Ay(e,t){return Te(e,t.blockCodeBegin??"{>")||Te(e,t.blockCodeEnd??"{<")||Te(e,t.blockCodeExclude??"{#")||Te(e,t.regionBlockCodeBegin??"{region")||Te(e,t.regionBlockCodeEnd??"{endregion")||Te(e,t.regionBlockCodeExclude??"{#")}function qy(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function Ny(e,t){let n=new Map;for(let r of(0,ha.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` -`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:Ay(s,t),contentIndent:qy(r.lexeme)})}return n}function gm(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function Tm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Oy.parseQuickScript)(r),i=r.split(n),s=Ny(r,t),a=[],p=My(t),m=0,h=0,C,l=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let P=0;P")||Te(R,t.regionBlockCodeBegin??"{region"))&&q?.directive!==!0&&(m+=1)}let b=a.join(n);return{text:b,changed:b!==e,diagnostics:o.diagnostics}}function Gy(e,t={}){let n=ym(e,t),r=Tm(n.text,t);return{...r,changed:r.text!==e}}});var Io=S(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.KNOWN_FUNCTIONS=void 0;So.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Sm=S(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.completions=Fy;Zn.hoverAt=jy;Zn.documentSymbols=Ly;var vm=Io(),bm=Qn(),Cm=It();function Hy(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of bm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of bm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of vm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function jy(e,t){let n=e.document.tokens.find(i=>Hy(i.range,t));if(n===void 0)return;if(n.kind===Cm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Cm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=vm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function Ly(e){let t=e.document.blocks.map(r=>({name:r.kind.toUpperCase(),kind:r.kind,range:r.range,selectionRange:r.opener,children:[]})),n=[];for(let r of e.document.blocks)r.parentId===void 0?n.push(t[r.id]):t[r.parentId].children.push(t[r.id]);return[...e.symbols.map(r=>({name:r.name,kind:"variable",range:r.range,selectionRange:r.selectionRange,children:[]})),...n]}});var Im=S(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.QUALITY_DIAGNOSTIC_CODES=void 0;wt.qualityDiagnostics=Vy;var yn=It();wt.QUALITY_DIAGNOSTIC_CODES={nonAsciiIdentifier:"quickscript.naming.nonAsciiIdentifier",windowWhitespace:"quickscript.naming.windowWhitespace",windowNonAscii:"quickscript.naming.windowNonAscii"};var Wy=/^[A-Za-z0-9_$#-]+$/,Uy=new Set(["HIDE","SHOW"]),By=new Set(["HIDE","INFOAPPSTATUS","INFOAPPTITLEEXPAND","MOVEWINDOW","PRINTWINDOW","SHOW","SHOWAT","SHOWTOPLEFTAT","WINDOWSTATE"]);function Qy(e){return e.document.tokens.filter(t=>![yn.TokenKind.Whitespace,yn.TokenKind.Newline,yn.TokenKind.Comment,yn.TokenKind.EOF].includes(t.kind))}function $y(e){return e.lexeme.startsWith('"')&&e.lexeme.endsWith('"')?e.lexeme.slice(1,-1):e.lexeme.slice(1)}function zy(e){let t=Qy(e),n=[];for(let r=0;r")){if(Uy.has(o)&&t[r+1]?.kind===yn.TokenKind.String){n.push(t[r+1]);continue}By.has(o)&&t[r+1]?.lexeme==="("&&t[r+2]?.kind===yn.TokenKind.String&&n.push(t[r+2])}}return n}function ga(e,t,n,r){if(n!=="off")return{code:e,message:t,severity:n,range:r.range,source:"intouch-quality"}}function Vy(e,t={}){let n=[],r=new Set,o=t.nonAsciiIdentifiers??"warning";for(let i of e.identifiers){let s=i.name.toUpperCase();if(Wy.test(i.name)||r.has(s))continue;r.add(s);let a=ga(wt.QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier,`Avoid non-ASCII characters in identifier '${i.name}'.`,o,i);a!==void 0&&n.push(a)}for(let i of zy(e)){let s=$y(i);if(/\s/u.test(s)){let a=ga(wt.QUALITY_DIAGNOSTIC_CODES.windowWhitespace,"Avoid whitespace in window names.",t.windowWhitespace??"warning",i);a!==void 0&&n.push(a)}if(/[^\x00-\x7f]/u.test(s)){let a=ga(wt.QUALITY_DIAGNOSTIC_CODES.windowNonAscii,"Avoid non-ASCII characters in window names.",t.windowNonAscii??"warning",i);a!==void 0&&n.push(a)}}return n}});var Om=S(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.quickFunctionDeclarations=Pm;Ft.quickFunctionNames=eT;Ft.analyzeQuickScript=tT;Ft.definitionAt=nT;Ft.referencesAt=rT;var Ky=vo(),Xy=Io(),Do=bo(),kt=It(),Zy=zn();function wm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![kt.TokenKind.Whitespace,kt.TokenKind.Newline,kt.TokenKind.Comment].includes(e[n].kind))return e[n]}function Jy(e,t){for(let n=t+1;ns.kind===kt.TokenKind.Comment))for(let s of i.lexeme.matchAll(r)){let a=s[1],p=s.index??0,m=p+s[0].lastIndexOf(a),h=(0,Do.sourceRange)(e,{start:i.span.start+m,end:i.span.start+m+a.length}).range,C=[],l=i.lexeme.slice(p).match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu);if(l!==null){let b=p+(l.index??0)+l[0].indexOf(l[1]);for(let P of l[1].matchAll(o)){let E=P[1],G=b+(P.index??0)+P[0].lastIndexOf(E);C.push({name:E,kind:"parameter",range:(0,Do.sourceRange)(e,{start:i.span.start+G,end:i.span.start+G+E.length}).range})}}n.push({name:a,nameRange:h,parameters:C})}return n}function Pm(e){return km(e,(0,Zy.tokenize)(e))}function eT(e){let t=new Map;for(let n of Pm(e))t.set(n.name.toUpperCase(),n.name);return[...t.values()]}function tT(e,t={}){let n=(0,Ky.parseQuickScript)(e),r=[...n.diagnostics],o=[],i=km(e,n.tokens),s=new Map,a=new Set(Xy.KNOWN_FUNCTIONS.map(l=>l.name.toUpperCase()));for(let l of i)a.add(l.name.toUpperCase());for(let l of t.knownFunctionNames??[])a.add(l.toUpperCase());for(let l of n.statements.filter(b=>b.kind==="dim"&&b.name!==void 0&&b.nameRange!==void 0)){let b=l.name.toUpperCase();if(s.get(b)!==void 0){r.push({code:"duplicate-local",message:`Local variable '${l.name}' is already declared.`,severity:"error",range:l.nameRange});continue}let E={id:o.length,name:l.name,kind:"variable",range:l.range,selectionRange:l.nameRange,datatype:l.datatype,scopeId:0};o.push(E),s.set(b,E)}let p=new Map;for(let l of o)p.set((0,Do.offsetAt)(e,l.selectionRange.start),l);let m=new Set;for(let l of n.statements.filter(b=>b.kind==="call"&&b.name!==void 0&&b.nameRange!==void 0))m.add((0,Do.offsetAt)(e,l.nameRange.start));let h=[],C=i.flatMap(l=>[{name:l.name,kind:"function",range:l.nameRange},...l.parameters]);for(let l of o)C.push({name:l.name,kind:"local",range:l.selectionRange});for(let l=0;l"){C.push({name:b.lexeme,kind:"member",range:b.range});continue}let G=s.get(b.lexeme.toUpperCase()),R=Jy(n.tokens,l),g=m.has(b.span.start)||R?.lexeme==="(";if(C.push({name:b.lexeme,kind:g?"function":G===void 0?"global":"local",range:b.range}),g&&!a.has(b.lexeme.toUpperCase())&&r.push({code:"unknown-function",message:`Unknown QuickScript function '${b.lexeme}'.`,severity:"warning",range:b.range}),G!==void 0||g){let d=g?"call":R?.lexeme==="="?"write":"read";h.push({name:b.lexeme,kind:d,range:b.range,declarationId:G?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(l=>l.id)}],symbols:o,references:h,identifiers:C,quickFunctions:i,diagnostics:r}}function nT(e,t){let n=e.references.find(r=>wm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function rT(e,t,n=!0){let r=e.references.find(o=>wm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var pa=S(_e=>{"use strict";var oT=_e&&_e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ke=_e&&_e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&oT(t,e,n)};Object.defineProperty(_e,"__esModule",{value:!0});Ke(Qn(),_e);Ke(_m(),_e);Ke(Io(),_e);Ke(Sm(),_e);Ke(vo(),_e);Ke(Im(),_e);Ke(Om(),_e);Ke(bo(),_e);Ke(It(),_e);Ke(zn(),_e)});var Rm=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=iT;Xe.diagnosticsFor=aT;Xe.formattingEdits=uT;Xe.symbolsFor=lT;Xe.definitionFor=dT;Xe.referencesFor=fT;Xe.completionsFor=mT;Xe.hoverFor=hT;var ae=ra(),xe=pa();function iT(){return{capabilities:{textDocumentSync:ae.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function sT(e){switch(e){case"keyword":return ae.CompletionItemKind.Keyword;case"datatype":return ae.CompletionItemKind.TypeParameter;case"variable":return ae.CompletionItemKind.Variable;case"call-target":return ae.CompletionItemKind.Method;default:return ae.CompletionItemKind.Function}}function cT(e){switch(e){case"error":return ae.DiagnosticSeverity.Error;case"information":return ae.DiagnosticSeverity.Information;case"hint":return ae.DiagnosticSeverity.Hint;default:return ae.DiagnosticSeverity.Warning}}function aT(e,t,n={}){let r=(0,xe.analyzeQuickScript)(e.getText(),{knownFunctionNames:t});return[...r.diagnostics,...(0,xe.qualityDiagnostics)(r,n.qualityDiagnostics)].map(o=>({code:o.code,message:o.message,range:o.range,severity:cT(o.severity),source:o.source??"intouch-language"}))}function uT(e,t){let n=(0,xe.formatQuickScript)(e.getText(),t);return n.changed?[ae.TextEdit.replace(ae.Range.create(ae.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function lT(e){let t=n=>ae.DocumentSymbol.create(n.name,void 0,n.kind==="variable"?ae.SymbolKind.Variable:ae.SymbolKind.Struct,n.range,n.selectionRange,n.children.map(t));return(0,xe.documentSymbols)((0,xe.analyzeQuickScript)(e.getText())).map(t)}function dT(e,t){let n=(0,xe.definitionAt)((0,xe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:ae.Location.create(e.uri,n)}function fT(e,t,n){return(0,xe.referencesAt)((0,xe.analyzeQuickScript)(e.getText()),t,n).map(r=>ae.Location.create(e.uri,r))}function mT(e){return(0,xe.completions)((0,xe.analyzeQuickScript)(e.getText())).map(t=>({label:t.label,kind:sT(t.kind),detail:t.detail}))}function hT(e,t){let n=(0,xe.hoverAt)((0,xe.analyzeQuickScript)(e.getText()),t);return n===void 0?void 0:{contents:{kind:"markdown",value:`**${n.label}** +`)&&t.push(n+1);return t}function Dy(e,t,n){if(n+1>=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function fa(e,t){da(e,t);let n=ym(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=Dy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function ky(e,t){if(da(e,t.start),da(e,t.end),t.end{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TokenKind=void 0;var Tm;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Tm||(Do.TokenKind=Tm={}))});var nr=I(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.tokenize=Ry;var ko=Yn(),ke=ct();function _m(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function tr(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function wo(e){return e!==void 0&&/[0-9]/.test(e)}function Py(e){let t=e.toUpperCase();return ko.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:ko.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function Ry(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=d=>{for(;n{let b=n,m=i();s(h),t.push({kind:d,lexeme:e.slice(b,h),span:{start:b,end:h},range:{start:m,end:i()}})};for(;ne.startsWith(m,n));if(h!==void 0){c(ke.TokenKind.Operator,n+h.length);continue}if(ko.PUNCTUATION.includes(d)){c(ke.TokenKind.Punctuation,n+1);continue}let b=e.codePointAt(n);c(ke.TokenKind.Unknown,n+(b!==void 0&&b>65535?2:1))}let g=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:g,end:{...g}}}),t}});var ga=I(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.extractDocumentMetadata=By;var Lt=er(),Oy=ct(),xy=nr(),bm="[\\p{L}_$#][\\p{L}\\p{N}_$#-]*",My=/^[ \t]*@([A-Za-z]+)(?:[ \t]+([^\r\n]*?))?[ \t]*$/gmu,Ey=/^[ \t]*(Type|Name|Description|Trigger|Event|Shortcut|Returns?|Tagname\[\.field\]|Condition|Condition Type)[ \t]*:[ \t]*([^\r\n]*?)[ \t]*$/gimu,Ay=new RegExp(`^[ \\t]*(DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${bm})(?:[ \\t]+([^\\r\\n]*?))?[ \\t]*$`,"gimu"),qy={quickfunction:"QuickFunction",datachange:"DataChange",condition:"Condition",conditionalscript:"Condition",application:"Application",applicationscript:"Application",window:"Window",windowscript:"Window",keyscript:"KeyScript",generic:"Generic"},Ny={onshow:"OnShow",whilerunning:"WhileRunning",onclose:"OnClose"},Fy=new Set(["scripttype","name","description","event","trigger","shortcut","param","returns"]);function at(e,t,n,r="warning"){return{code:e,message:t,severity:r,range:n,source:"intouch-metadata"}}function rr(e,t,n,r,o,i){let c=(n.index??0)+n[0].lastIndexOf(r),g=(0,Lt.sourceRange)(e,{start:t.span.start+c,end:t.span.start+c+r.length});return{value:o,raw:r,...g,source:i}}function vm(e){return qy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Gy(e){return Ny[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Hy(e,t){return typeof e=="string"&&typeof t=="string"?e.localeCompare(t,"en",{sensitivity:"base"})===0:e===t}function jt(e,t,n,r){let o=t[0]??n[0];if(o!==void 0){for(let i of[...t.slice(1),...n])Hy(o.value,i.value)||r.push(at("metadata-conflict",`${e} '${i.raw}' conflicts with higher-priority ${o.source} metadata '${o.raw}'.`,i.range));return o}}function jy(e,t,n,r){for(let o of t.lexeme.matchAll(My)){let i=o[1],s=(o[2]??"").trim(),c=i.toLowerCase(),g=t.span.start+(o.index??0)+o[0].indexOf(`@${i}`)+1,d=(0,Lt.sourceRange)(e,{start:g,end:g+i.length}).range;if(!Fy.has(c)){r.push(at("unknown-metadata-field",`Unknown QuickScript metadata field '@${i}'.`,d,"information"));continue}if(s.length===0){r.push(at("invalid-metadata-value",`Metadata field '@${i}' requires a value.`,d));continue}if(c==="scripttype"){let b=vm(s),m=rr(e,t,o,s,b??"Unknown","explicit");b===void 0?r.push(at("invalid-script-type",`Unknown QuickScript script type '${s}'.`,m.range)):n.scriptTypes.push(m);continue}if(c==="param"){let b=s.match(new RegExp(`^(${bm})[ \\t]+(DISCRETE|INTEGER|MESSAGE|REAL)(?:[ \\t]+([\\s\\S]*))?$`,"iu")),m=rr(e,t,o,s,s,"explicit");if(b===null){r.push(at("invalid-metadata-value","Metadata field '@Param' must use '@Param Name TYPE Description...'.",m.range));continue}let T=m.span.start+s.indexOf(b[1]),D=m.span.start+s.indexOf(b[2],b[1].length);n.explicitParameters.push({name:b[1],datatype:b[2].toUpperCase(),description:b[3]?.trim()||void 0,range:m.range,nameRange:(0,Lt.sourceRange)(e,{start:T,end:T+b[1].length}).range,datatypeRange:(0,Lt.sourceRange)(e,{start:D,end:D+b[2].length}).range});continue}let h=rr(e,t,o,s,s,"explicit");switch(c){case"name":n.names.push(h);break;case"description":n.descriptions.push(h);break;case"event":n.events.push(h);break;case"trigger":n.triggers.push(h);break;case"shortcut":n.shortcuts.push(h);break;case"returns":n.returnTypes.push({...h,value:s.toUpperCase()});break}}}function Ly(e){let t=e.lexeme.match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu);if(t===null)return;let n=(t.index??0)+t[0].indexOf(t[1]);return{text:t[1],start:n}}function Wy(e,t,n){for(let o of t.lexeme.matchAll(Ey)){let i=o[1].toLowerCase(),s=o[2].trim();if(s.length===0)continue;if(i==="type"){n.legacyScriptType??=s;let g=vm(s);n.scriptTypes.push(rr(e,t,o,s,g??"Unknown","legacy"));continue}let c=rr(e,t,o,s,s,"legacy");switch(i){case"name":n.names.push(c);break;case"description":n.descriptions.push(c);break;case"event":n.events.push(c);break;case"trigger":n.triggers.push(c);break;case"shortcut":n.shortcuts.push(c);break;case"tagname[.field]":n.triggers.push(c);break;case"condition":n.triggers.push(c);break;case"condition type":n.events.push(c);break;case"return":case"returns":n.returnTypes.push({...c,value:s.toUpperCase()});break}}let r=Ly(t);if(r!==void 0)for(let o of r.text.matchAll(Ay)){let i=o[1],s=o[2],c=r.start+(o.index??0),g=t.span.start+c+o[0].indexOf(i),d=t.span.start+c+o[0].indexOf(s,o[0].indexOf(i)+i.length);n.legacyParameters.push({name:s,datatype:i.toUpperCase(),description:o[3]?.trim()||void 0,range:(0,Lt.sourceRange)(e,{start:g,end:t.span.start+c+o[0].trimEnd().length}).range,nameRange:(0,Lt.sourceRange)(e,{start:d,end:d+s.length}).range,datatypeRange:(0,Lt.sourceRange)(e,{start:g,end:g+i.length}).range})}}function Uy(e){if(/^[ \t]*Script[ \t]*:[ \t]*$/imu.test(e))return!0;let t=/^[ \t]*Type[ \t]*:[ \t]*[^\r\n]+$/imu.test(e),n=/^[ \t]*(?:Name|Tagname\[\.field\]|Condition)[ \t]*:[ \t]*[^\r\n]+$/imu.test(e);return t&&n}function Qy(e){if(e===void 0)return;let t=e.replace(/^.*[\\/]/,"").replace(/\.(?:vbi|vi)$/i,"").replace(/_\d+(?:\.\d+){1,3}$/i,"");for(let[n,r]of[["QF_","QuickFunction"],["DCH_","DataChange"],["CS_","Condition"],["APP_","Application"],["KEY_","KeyScript"]])if(t.toUpperCase().startsWith(n))return{scriptType:r,name:t.slice(n.length)}}function By(e,t={}){let n=[],r={scriptTypes:[],names:[],events:[],triggers:[],shortcuts:[],descriptions:[],returnTypes:[],explicitParameters:[],legacyParameters:[]},o=(t.tokens??(0,xy.tokenize)(e)).filter(k=>k.kind===Oy.TokenKind.Comment);for(let k of o)jy(e,k,r,n),Uy(k.lexeme)&&Wy(e,k,r);let i=k=>k.filter(M=>M.source==="explicit"),s=k=>k.filter(M=>M.source==="legacy"),c=jt("Script type",i(r.scriptTypes),s(r.scriptTypes),n),g=jt("Name",i(r.names),s(r.names),n),d=jt("Event",i(r.events),s(r.events),n),h=jt("Trigger",i(r.triggers),s(r.triggers),n),b=jt("Shortcut",i(r.shortcuts),s(r.shortcuts),n),m=jt("Description",i(r.descriptions),s(r.descriptions),n),T=jt("Return type",i(r.returnTypes),s(r.returnTypes),n),D=r.explicitParameters.length>0?r.explicitParameters:r.legacyParameters;if(r.explicitParameters.length>0&&r.legacyParameters.length>0){let k=M=>M.map(L=>`${L.name.toUpperCase()}:${L.datatype.toUpperCase()}`).join(",");k(r.explicitParameters)!==k(r.legacyParameters)&&n.push(at("metadata-conflict","Legacy parameter metadata conflicts with higher-priority explicit @Param metadata.",r.legacyParameters[0].range))}let q=Qy(t.fileName),N=c?.value??q?.scriptType??"Generic",x=g?.value??q?.name,p=d?.value;if(N==="Window"&&d!==void 0){let k=Gy(d.value);k===void 0?(n.push(at("invalid-window-event",`Unknown Window script event '${d.value}'.`,d.range)),p=void 0):p=k}else d!==void 0&&!["Application","Condition"].includes(N)&&n.push(at("metadata-conflict",`Event metadata is not supported for ${N} scripts.`,d.range));N==="Window"&&T!==void 0&&n.push(at("metadata-conflict","Window scripts cannot declare a return type.",T.range));let l=[c,g,d,h,b,m,T].flatMap(k=>k===void 0?[]:[k.source]);r.explicitParameters.length>0?l.push("explicit"):r.legacyParameters.length>0&&l.push("legacy");let C=l.includes("explicit")?"explicit":l.includes("legacy")?"legacy":q===void 0?"none":"filename";return{scriptType:N,name:x,nameRange:g?.range,event:p,eventRange:d?.range,trigger:h?.value,triggerRange:h?.range,shortcut:b?.value,shortcutRange:b?.range,description:m?.value,descriptionRange:m?.range,parameters:D,returnType:T?.value,returnTypeRange:T?.range,metadataSource:C,legacyScriptType:r.legacyScriptType,diagnostics:n}}});var Ro=I(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.parseQuickScript=rT;var $y=Yn(),Po=er(),ne=ct(),zy=nr(),Cm=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),Sm=new Set(["+","-","NOT","!","~"]),Vy=new Set(["TRUE","FALSE","NULL","EOF"]),Ky=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),Xy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function Zy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function wt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function Se(e){return e?.kind===ne.TokenKind.Keyword?wt(e):void 0}function Im(e,t,n=t){return(0,Po.sourceRange)(e,{start:t.span.start,end:n.span.end})}function Yy(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,Po.sourceRange)(e,{start:n,end:n}).range}function Te(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:Yy(e,r)}}function Jy(e,t){return e.filter(n=>n.range.start.line===t&&!Zy(n))}function Dm(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function wm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?wt(e):e.lexeme}var pa=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;Sm.has(wm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(wt(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||Vy.has(wt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===ne.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!Ky.has(wt(t)??"")&&!Cm.has(wt(t)??"")&&!Sm.has(wt(t)??"")}};function eT(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):Te(n.code,n.message,n.token)}function Ae(e,t,n){let r=new pa(t).parse();return r===void 0?!0:(n.push(eT(e,t,r)),!1)}var ya=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positionc.lexeme==="(")&&this.diagnostics.push(Te("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ae(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):Te("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):Te("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ae(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),c=i>=0&&i=0&&i0&&Ae(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&ob.lexeme==="=")&&r.some(b=>Se(b)==="TO");this.statements.push({kind:c,first:t,last:d,name:c==="direct-call"?t:void 0,recoveredLoop:h})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[ne.TokenKind.Identifier,ne.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ae(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function tT(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function nT(e,t){let n=tT(e,t);if(n>t)return n;let r=e[t],o=Se(r[0])==="IF",i=Se(r[0])==="ELSE"&&Se(r[1])==="IF";if(!o&&!i||r.some(d=>Se(d)==="THEN"))return t;let s=o&&r.length===1,c=["AND","OR","NOT"].includes(Se(r[r.length-1])??""),g=["AND","OR"].includes(Se(e[t+1]?.[0])??"");if(!s&&!c&&!g)return t;for(let d=t+1;dSe(h)==="THEN"))return d;return t}function rT(e){let t=(0,zy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(m,T)=>Jy(t,T)),o=[],i=[],s=[],c=new Array(n),g=[],d=[];for(let m=0;mT.kind==="dim"&&T.datatype!==void 0))if(!$y.DATATYPE_SET.has(m.datatype.toUpperCase())){let T=m.datatypeRange??m.range,D=`${T.start.line}:${T.start.character}`;if(h.has(D))continue;h.add(D),s.push({code:"unknown-datatype",message:`Unknown datatype '${m.datatype}'.`,severity:"error",range:T})}let b=(0,Po.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:c,...b}}});var Mm=I(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.formatQuickScriptLexically=Om;ir.formatQuickScriptStructure=xm;ir.formatQuickScript=fT;var j=ct(),va=nr(),oT=Ro();function km(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function ba(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function Rm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function _a(e){or(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function iT(e,t){if(e[t].lexeme!=="-"||Rm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=ba(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function sT(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function Om(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,va.tokenize)(r);if(o.some(d=>d.kind===j.TokenKind.String&&!d.lexeme.endsWith('"'))||o.some(d=>d.kind===j.TokenKind.Unknown&&d.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,c=!1;for(let d=0;d")||_e(b,t.regionBlockCodeBegin??"{region"))&&(c=!0),T!==void 0&&(T.kind===j.TokenKind.Identifier||T.kind===j.TokenKind.Keyword||T.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(h.lexeme)}let g=sT(i.join(""),n);return{text:g,changed:g!==e}}function cT(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function aT(e){let t=(0,va.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function _e(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function uT(e,t){return _e(e,t.blockCodeBegin??"{>")||_e(e,t.blockCodeEnd??"{<")||_e(e,t.blockCodeExclude??"{#")||_e(e,t.regionBlockCodeBegin??"{region")||_e(e,t.regionBlockCodeEnd??"{endregion")||_e(e,t.regionBlockCodeExclude??"{#")}function lT(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function dT(e,t){let n=new Map;for(let r of(0,va.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` +`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:uT(s,t),contentIndent:lT(r.lexeme)})}return n}function Pm(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function xm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,oT.parseQuickScript)(r),i=r.split(n),s=dT(r,t),c=[],g=cT(t),d=0,h=0,b,m=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let D=0;D")||_e(x,t.regionBlockCodeBegin??"{region"))&&M?.directive!==!0&&(d+=1)}let T=c.join(n);return{text:T,changed:T!==e,diagnostics:o.diagnostics}}function fT(e,t={}){let n=Om(e,t),r=xm(n.text,t);return{...r,changed:r.text!==e}}});var xo=I(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.KNOWN_FUNCTIONS=void 0;Oo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Nm=I(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.completions=hT;sr.hoverAt=gT;sr.documentSymbols=pT;var qm=xo(),Em=Yn(),Am=ct();function mT(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of Em.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of Em.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of qm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function gT(e,t){let n=e.document.tokens.find(i=>mT(i.range,t));if(n===void 0)return;if(n.kind===Am.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Am.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=qm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function pT(e){let t=e.document.blocks.map(s=>({name:s.kind.toUpperCase(),kind:s.kind,range:s.range,selectionRange:s.opener,children:[]})),n=[];for(let s of e.document.blocks)s.parentId===void 0?n.push(t[s.id]):t[s.parentId].children.push(t[s.id]);let r=[...e.symbols.map(s=>({name:s.name,kind:"variable",range:s.range,selectionRange:s.selectionRange,children:[]})),...n],o=e.metadata,i=o.nameRange??o.triggerRange??e.document.range;if(o.scriptType==="QuickFunction"&&o.name!==void 0)return[{name:o.name,kind:"function",range:e.document.range,selectionRange:i,children:r}];if(o.scriptType==="Window"&&o.name!==void 0){let s=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:o.name,kind:"window",range:e.document.range,selectionRange:i,children:s}]}if(o.scriptType==="Application"){let s=o.name??"Application",c=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:s,kind:"application",range:e.document.range,selectionRange:i,children:c}]}if(o.scriptType==="DataChange"||o.scriptType==="Condition"){let s=o.scriptType==="DataChange"?"data-change":"condition";return[{name:o.name??o.trigger??o.scriptType,kind:s,range:e.document.range,selectionRange:i,children:r}]}if(o.scriptType==="KeyScript"){let s=o.name??"KeyScript",c=o.shortcut===void 0?r:[{name:o.shortcut,kind:"event",range:e.document.range,selectionRange:o.shortcutRange??i,children:r}];return[{name:s,kind:"key-script",range:e.document.range,selectionRange:i,children:c}]}return r}});var Fm=I(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.QUALITY_DIAGNOSTIC_CODES=void 0;kt.qualityDiagnostics=ST;var Sn=ct();kt.QUALITY_DIAGNOSTIC_CODES={nonAsciiIdentifier:"quickscript.naming.nonAsciiIdentifier",windowWhitespace:"quickscript.naming.windowWhitespace",windowNonAscii:"quickscript.naming.windowNonAscii"};var yT=/^[A-Za-z0-9_$#-]+$/,TT=new Set(["HIDE","SHOW"]),_T=new Set(["HIDE","INFOAPPSTATUS","INFOAPPTITLEEXPAND","MOVEWINDOW","PRINTWINDOW","SHOW","SHOWAT","SHOWTOPLEFTAT","WINDOWSTATE"]);function bT(e){return e.document.tokens.filter(t=>![Sn.TokenKind.Whitespace,Sn.TokenKind.Newline,Sn.TokenKind.Comment,Sn.TokenKind.EOF].includes(t.kind))}function vT(e){return e.lexeme.startsWith('"')&&e.lexeme.endsWith('"')?e.lexeme.slice(1,-1):e.lexeme.slice(1)}function CT(e){let t=bT(e),n=[];for(let r=0;r")){if(TT.has(o)&&t[r+1]?.kind===Sn.TokenKind.String){n.push(t[r+1]);continue}_T.has(o)&&t[r+1]?.lexeme==="("&&t[r+2]?.kind===Sn.TokenKind.String&&n.push(t[r+2])}}return n}function Ca(e,t,n,r){if(n!=="off")return{code:e,message:t,severity:n,range:r.range,source:"intouch-quality"}}function ST(e,t={}){let n=[],r=new Set,o=t.nonAsciiIdentifiers??"warning";for(let i of e.identifiers){let s=i.name.toUpperCase();if(yT.test(i.name)||r.has(s))continue;r.add(s);let c=Ca(kt.QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier,`Avoid non-ASCII characters in identifier '${i.name}'.`,o,i);c!==void 0&&n.push(c)}for(let i of CT(e)){let s=vT(i);if(/\s/u.test(s)){let c=Ca(kt.QUALITY_DIAGNOSTIC_CODES.windowWhitespace,"Avoid whitespace in window names.",t.windowWhitespace??"warning",i);c!==void 0&&n.push(c)}if(/[^\x00-\x7f]/u.test(s)){let c=Ca(kt.QUALITY_DIAGNOSTIC_CODES.windowNonAscii,"Avoid non-ASCII characters in window names.",t.windowNonAscii??"warning",i);c!==void 0&&n.push(c)}}return n}});var Wm=I(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.quickFunctionDeclarations=Lm;Ut.quickFunctionNames=PT;Ut.analyzeQuickScript=RT;Ut.definitionAt=OT;Ut.referencesAt=xT;var IT=Ro(),Gm=ga(),DT=xo(),Sa=er(),Wt=ct();function Hm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Wt.TokenKind.Whitespace,Wt.TokenKind.Newline,Wt.TokenKind.Comment].includes(e[n].kind))return e[n]}function kT(e,t){for(let n=t+1;n({name:n.name,kind:"parameter",range:n.nameRange})),metadata:t}]}function Lm(e,t={}){return jm(e,(0,Gm.extractDocumentMetadata)(e,t))}function PT(e){let t=new Map;for(let n of Lm(e))t.set(n.name.toUpperCase(),n.name);return[...t.values()]}function RT(e,t={}){let n=(0,IT.parseQuickScript)(e),r=(0,Gm.extractDocumentMetadata)(e,{fileName:t.fileName,tokens:n.tokens}),o=[...n.diagnostics,...r.diagnostics],i=[],s=jm(e,r),c=new Map,g=new Set(DT.KNOWN_FUNCTIONS.map(T=>T.name.toUpperCase()));for(let T of s)g.add(T.name.toUpperCase());for(let T of t.knownFunctionNames??[])g.add(T.toUpperCase());for(let T of n.statements.filter(D=>D.kind==="dim"&&D.name!==void 0&&D.nameRange!==void 0)){let D=T.name.toUpperCase();if(c.get(D)!==void 0){o.push({code:"duplicate-local",message:`Local variable '${T.name}' is already declared.`,severity:"error",range:T.nameRange});continue}let N={id:i.length,name:T.name,kind:"variable",range:T.range,selectionRange:T.nameRange,datatype:T.datatype,scopeId:0};i.push(N),c.set(D,N)}let d=new Map;for(let T of i)d.set((0,Sa.offsetAt)(e,T.selectionRange.start),T);let h=new Set;for(let T of n.statements.filter(D=>D.kind==="call"&&D.name!==void 0&&D.nameRange!==void 0))h.add((0,Sa.offsetAt)(e,T.nameRange.start));let b=r.trigger===void 0||r.triggerRange===void 0?[]:[{name:r.trigger,kind:"trigger",range:r.triggerRange}],m=s.flatMap(T=>[{name:T.name,kind:"function",range:T.nameRange},...T.parameters]);r.trigger!==void 0&&r.triggerRange!==void 0&&m.push({name:r.trigger,kind:"global",range:r.triggerRange});for(let T of i)m.push({name:T.name,kind:"local",range:T.selectionRange});for(let T=0;T"){m.push({name:D.lexeme,kind:"member",range:D.range});continue}let x=c.get(D.lexeme.toUpperCase()),p=kT(n.tokens,T),l=h.has(D.span.start)||p?.lexeme==="(";if(m.push({name:D.lexeme,kind:l?"function":x===void 0?"global":"local",range:D.range}),l&&!g.has(D.lexeme.toUpperCase())&&o.push({code:"unknown-function",message:`Unknown QuickScript function '${D.lexeme}'.`,severity:"warning",range:D.range}),x!==void 0||l){let C=l?"call":p?.lexeme==="="?"write":"read";b.push({name:D.lexeme,kind:C,range:D.range,declarationId:x?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:i.map(T=>T.id)}],symbols:i,references:b,identifiers:m,quickFunctions:s,metadata:r,diagnostics:o}}function OT(e,t){let n=e.references.find(r=>Hm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function xT(e,t,n=!0){let r=e.references.find(o=>Hm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var Ia=I(ue=>{"use strict";var MT=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ue=ue&&ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&MT(t,e,n)};Object.defineProperty(ue,"__esModule",{value:!0});Ue(Yn(),ue);Ue(ga(),ue);Ue(Mm(),ue);Ue(xo(),ue);Ue(Nm(),ue);Ue(Ro(),ue);Ue(Fm(),ue);Ue(Wm(),ue);Ue(er(),ue);Ue(ct(),ue);Ue(nr(),ue)});var ka=I(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.WorkspaceFunctionIndex=Qt.WorkspaceSymbolIndex=void 0;Qt.documentFileName=Um;var ET=Ia();function Da(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.linen.kind==="call"),symbols:qT(e.uri,t.metadata)}}var Mo=class{constructor(){this.workspaceDocuments=new Map,this.openDocuments=new Map}replaceWorkspaceDocuments(t){this.workspaceDocuments.clear();for(let n of t)this.workspaceDocuments.set(n.uri,wa(n))}updateWorkspaceDocument(t){this.workspaceDocuments.set(t.uri,wa(t))}removeWorkspaceDocument(t){this.workspaceDocuments.delete(t)}updateDocument(t){this.openDocuments.set(t.uri,wa({uri:t.uri,text:t.getText()}))}removeDocument(t){this.openDocuments.delete(t)}entries(){let t=new Map(this.workspaceDocuments);for(let[n,r]of this.openDocuments)t.set(n,r);return[...t.values()].sort((n,r)=>n.uri.localeCompare(r.uri,"en"))}entry(t){return this.openDocuments.get(t)??this.workspaceDocuments.get(t)}symbols(){return this.entries().flatMap(t=>t.symbols)}quickFunctions(t){let n=t?.toUpperCase();return this.symbols().filter(r=>r.kind==="QuickFunction"&&(n===void 0||r.name.toUpperCase()===n))}knownFunctionNames(){let t=new Map;for(let n of this.quickFunctions())t.set(n.name.toUpperCase(),n.name);return[...t.values()].sort((n,r)=>n.localeCompare(r,"en",{sensitivity:"base"}))}uniqueQuickFunction(t){let n=this.quickFunctions(t);return n.length===1?n[0]:void 0}symbolAt(t,n){return this.entry(t)?.symbols.find(r=>Da(r.definitionRange,n))}symbolNameAt(t,n){let r=this.entry(t),o=this.symbolAt(t,n);return o?.kind!=="QuickFunction"?r?.calls.find(i=>Da(i.range,n))?.name:o!==void 0?o.name:r?.calls.find(i=>Da(i.range,n))?.name}references(t,n){let r=t.toUpperCase(),o=n?this.quickFunctions(t).map(s=>({name:s.name,kind:"declaration",uri:s.uri,range:s.definitionRange})):[],i=this.entries().flatMap(s=>s.calls.filter(c=>c.name.toUpperCase()===r).map(c=>({name:c.name,kind:"call",uri:s.uri,range:c.range})));return[...o,...i].sort((s,c)=>s.uri.localeCompare(c.uri,"en")||s.range.start.line-c.range.start.line||s.range.start.character-c.range.start.character)}diagnostics(t){let n=this.entry(t);if(n===void 0)return[];let r=[];for(let o of n.symbols.filter(i=>i.kind==="QuickFunction"))this.quickFunctions(o.name).length>1&&r.push({code:"duplicate-quickfunction",message:`QuickFunction '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.definitionRange,source:"intouch-metadata"});for(let o of n.calls)this.quickFunctions(o.name).length>1&&r.push({code:"ambiguous-quickfunction",message:`QuickFunction call '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.range,source:"intouch-metadata"});return r}};Qt.WorkspaceSymbolIndex=Mo;Qt.WorkspaceFunctionIndex=Mo});var zm=I(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=NT;Xe.diagnosticsFor=LT;Xe.formattingEdits=WT;Xe.symbolsFor=UT;Xe.definitionFor=QT;Xe.referencesFor=BT;Xe.completionsFor=$T;Xe.hoverFor=zT;var B=aa(),Pt=Ia(),Qm=ka();function NT(){return{capabilities:{textDocumentSync:B.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function FT(e){switch(e){case"keyword":return B.CompletionItemKind.Keyword;case"datatype":return B.CompletionItemKind.TypeParameter;case"variable":return B.CompletionItemKind.Variable;case"call-target":return B.CompletionItemKind.Method;default:return B.CompletionItemKind.Function}}function GT(e){switch(e){case"error":return B.DiagnosticSeverity.Error;case"information":return B.DiagnosticSeverity.Information;case"hint":return B.DiagnosticSeverity.Hint;default:return B.DiagnosticSeverity.Warning}}function Bm(e){return e instanceof Qm.WorkspaceSymbolIndex?e:void 0}function HT(e){let t=Bm(e);return t===void 0?e:t.knownFunctionNames()}function In(e,t){return(0,Pt.analyzeQuickScript)(e.getText(),{knownFunctionNames:HT(t),fileName:(0,Qm.documentFileName)(e.uri)})}function jT(e){let t=e.metadata.parameters.map(r=>`${r.name}: ${r.datatype}`).join(", "),n=e.metadata.returnType===void 0?"":`: ${e.metadata.returnType}`;return`${e.name}(${t})${n}`}function $m(e){let t=jT(e);return e.metadata.description===void 0?t:`${t} -${n.detail}`},range:n.range}}});var Mm=S(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.readSettings=gT;wo.formattingSettings=pT;function ct(e){return typeof e=="object"&&e!==null?e:{}}function xm(e){return typeof e=="number"?e:void 0}function ya(e){return typeof e=="boolean"?e:void 0}function jt(e){return typeof e=="string"?e:void 0}function Ta(e){let t=jt(e)?.toLowerCase();return t!==void 0&&["off","hint","information","warning","error"].includes(t)?t:void 0}function gT(e){let t=ct(e),n=t.VBI===void 0?t:ct(t.VBI),r=ct(n.formatter),o=ct(r.EmptyLine),i=ct(r.BC),s=ct(r.Region),a=ct(r.Misc),p=ct(n.diagnostics),m=ct(p.naming);return{allowedNumberOfEmptyLines:xm(o.allowedNumberOfEmptyLines),removeEmptyLines:ya(o.RemoveEmptyLines),removeEmptyLinesInComments:ya(o.EmptyLinesAlsoInComment),blockCodeBegin:jt(i.BlockCodeBegin),blockCodeEnd:jt(i.BlockCodeEnd),blockCodeExclude:jt(i.BlockCodeExclude),regionBlockCodeBegin:jt(s.BlockCodeBegin),regionBlockCodeEnd:jt(s.BlockCodeEnd),regionBlockCodeExclude:jt(s.BlockCodeExclude),insertSpaces:ya(a.ReplaceTabToSpaces),indentSize:xm(a.IndentSize),qualityDiagnostics:{nonAsciiIdentifiers:Ta(m.nonAsciiIdentifiers),windowWhitespace:Ta(m.windowWhitespace),windowNonAscii:Ta(m.windowNonAscii)}}}function pT(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var Am=S(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.WorkspaceFunctionIndex=void 0;var Em=pa(),_a=class{constructor(){this.workspaceNames=new Set,this.openDocuments=new Map}replaceWorkspaceSources(t){this.workspaceNames.clear();for(let n of t)for(let r of(0,Em.quickFunctionNames)(n))this.workspaceNames.add(r)}updateDocument(t){this.openDocuments.set(t.uri,(0,Em.quickFunctionNames)(t.getText()))}removeDocument(t){this.openDocuments.delete(t)}knownFunctionNames(){let t=new Map;for(let n of this.workspaceNames)t.set(n.toUpperCase(),n);for(let n of this.openDocuments.values())for(let r of n)t.set(r.toUpperCase(),r);return[...t.values()]}};ko.WorkspaceFunctionIndex=_a});var yT=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),TT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_T=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(ba=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,ST.fileURLToPath)(n)),Hm(ba),(0,Pt.serverCapabilities)()));be.onInitialized(async()=>{let e=await be.workspace.getConfiguration({section:"VBI"});Po=(0,Ca.readSettings)({VBI:e}),Oo()});be.onDidChangeConfiguration(e=>{Po=(0,Ca.readSettings)(e.settings),Oo()});be.onDidChangeWatchedFiles(()=>{Hm(ba)});Ue.onDidOpen(e=>{Yn.updateDocument(e.document),va(e.document)});Ue.onDidChangeContent(e=>{Yn.updateDocument(e.document),va(e.document)});Ue.onDidClose(e=>{Yn.removeDocument(e.document.uri),be.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Oo()});be.onDocumentFormatting(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.formattingEdits)(t,(0,Ca.formattingSettings)(Po,e.options))});be.onDocumentSymbol(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.symbolsFor)(t)});be.onDefinition(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Pt.definitionFor)(t,e.position)});be.onReferences(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.referencesFor)(t,e.position,e.context.includeDeclaration)});be.onCompletion(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?[]:(0,Pt.completionsFor)(t)});be.onHover(e=>{let t=Ue.get(e.textDocument.uri);return t===void 0?void 0:(0,Pt.hoverFor)(t,e.position)});be.onShutdown(()=>{});Ue.listen(be);be.listen(); +${e.metadata.description}`}function LT(e,t,n={}){let r=In(e,t),o=Bm(t)?.diagnostics(e.uri)??[];return[...r.diagnostics,...o,...(0,Pt.qualityDiagnostics)(r,n.qualityDiagnostics)].map(i=>({code:i.code,message:i.message,range:i.range,severity:GT(i.severity),source:i.source??"intouch-language"}))}function WT(e,t){let n=(0,Pt.formatQuickScript)(e.getText(),t);return n.changed?[B.TextEdit.replace(B.Range.create(B.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function UT(e){let t=r=>{switch(r){case"variable":return B.SymbolKind.Variable;case"function":return B.SymbolKind.Function;case"window":return B.SymbolKind.Namespace;case"event":return B.SymbolKind.Event;case"application":return B.SymbolKind.Module;case"data-change":return B.SymbolKind.Event;case"condition":return B.SymbolKind.Event;case"key-script":return B.SymbolKind.Event;default:return B.SymbolKind.Struct}},n=r=>B.DocumentSymbol.create(r.name,void 0,t(r.kind),r.range,r.selectionRange,r.children.map(n));return(0,Pt.documentSymbols)(In(e)).map(n)}function QT(e,t,n){let r=(0,Pt.definitionAt)(In(e,n),t);if(r!==void 0)return B.Location.create(e.uri,r);if(n===void 0)return;let o=n.symbolNameAt(e.uri,t);if(o===void 0)return;let i=n.uniqueQuickFunction(o);return i===void 0?void 0:B.Location.create(i.uri,i.definitionRange)}function BT(e,t,n,r){let o=(0,Pt.referencesAt)(In(e,r),t,n);if(o.length>0)return o.map(s=>B.Location.create(e.uri,s));if(r===void 0)return[];let i=r.symbolNameAt(e.uri,t);return i===void 0?[]:r.references(i,n).map(s=>B.Location.create(s.uri,s.range))}function $T(e,t){let n=new Set((t?.symbols()??[]).filter(i=>!i.callable).map(i=>i.name.toUpperCase())),r=(0,Pt.completions)(In(e,t)).filter(i=>i.kind!=="call-target"||!n.has(i.label.toUpperCase())),o=new Map(r.map(i=>[i.label.toUpperCase(),{label:i.label,kind:FT(i.kind),detail:i.detail}]));for(let i of t?.quickFunctions()??[]){let s=t?.quickFunctions(i.name).length??0;o.set(i.name.toUpperCase(),{label:i.name,kind:B.CompletionItemKind.Function,detail:s>1?`Ambiguous workspace QuickFunction (${s} definitions)`:$m(i)})}return[...o.values()].sort((i,s)=>i.label.localeCompare(s.label,"en",{sensitivity:"base"}))}function zT(e,t,n){let r=n?.symbolAt(e.uri,t);if(r!==void 0&&r.kind!=="QuickFunction"){let s=r.metadata.event??r.metadata.shortcut??r.metadata.trigger,c=s===void 0?r.kind:`${r.kind}: ${s}`;return{contents:{kind:"markdown",value:`**${r.name}** + +${c}`},range:r.definitionRange}}let o=n?.symbolNameAt(e.uri,t);if(o!==void 0){let s=n.quickFunctions(o);if(s.length>1)return{contents:{kind:"markdown",value:`**${o}** + +Ambiguous workspace QuickFunction (${s.length} definitions).`}};if(s.length===1)return{contents:{kind:"markdown",value:`**${s[0].name}** + +${$m(s[0])}`},range:n?.entry(e.uri)?.calls.find(c=>c.name.toUpperCase()===o.toUpperCase()&&c.range.start.line===t.line&&c.range.start.character<=t.character&&c.range.end.character>t.character)?.range}}let i=(0,Pt.hoverAt)(In(e,n),t);return i===void 0?void 0:{contents:{kind:"markdown",value:`**${i.label}** + +${i.detail}`},range:i.range}}});var Km=I(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.readSettings=VT;Eo.formattingSettings=KT;function ut(e){return typeof e=="object"&&e!==null?e:{}}function Vm(e){return typeof e=="number"?e:void 0}function Pa(e){return typeof e=="boolean"?e:void 0}function Bt(e){return typeof e=="string"?e:void 0}function Ra(e){let t=Bt(e)?.toLowerCase();return t!==void 0&&["off","hint","information","warning","error"].includes(t)?t:void 0}function VT(e){let t=ut(e),n=t.VBI===void 0?t:ut(t.VBI),r=ut(n.formatter),o=ut(r.EmptyLine),i=ut(r.BC),s=ut(r.Region),c=ut(r.Misc),g=ut(n.diagnostics),d=ut(g.naming);return{allowedNumberOfEmptyLines:Vm(o.allowedNumberOfEmptyLines),removeEmptyLines:Pa(o.RemoveEmptyLines),removeEmptyLinesInComments:Pa(o.EmptyLinesAlsoInComment),blockCodeBegin:Bt(i.BlockCodeBegin),blockCodeEnd:Bt(i.BlockCodeEnd),blockCodeExclude:Bt(i.BlockCodeExclude),regionBlockCodeBegin:Bt(s.BlockCodeBegin),regionBlockCodeEnd:Bt(s.BlockCodeEnd),regionBlockCodeExclude:Bt(s.BlockCodeExclude),insertSpaces:Pa(c.ReplaceTabToSpaces),indentSize:Vm(c.IndentSize),qualityDiagnostics:{nonAsciiIdentifiers:Ra(d.nonAsciiIdentifiers),windowWhitespace:Ra(d.windowWhitespace),windowNonAscii:Ra(d.windowNonAscii)}}}function KT(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var XT=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ZT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),YT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(Xm=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,Ma.fileURLToPath)(n)),await o_(Xm),(0,Rt.serverCapabilities)()));be.onInitialized(async()=>{let e=await be.workspace.getConfiguration({section:"VBI"});Ao=(0,Ea.readSettings)({VBI:e}),$t()});be.onDidChangeConfiguration(e=>{Ao=(0,Ea.readSettings)(e.settings),$t()});be.onDidChangeWatchedFiles(e=>{(async()=>{for(let t of e.changes.filter(n=>/\.(?:vbi|vi)$/i.test(n.uri))){if(t.type===Oa.FileChangeType.Deleted){qe.removeWorkspaceDocument(t.uri);continue}try{qe.updateWorkspaceDocument({uri:t.uri,text:await xa.promises.readFile((0,Ma.fileURLToPath)(t.uri),"utf8")})}catch{qe.removeWorkspaceDocument(t.uri)}}$t()})()});Qe.onDidOpen(e=>{qe.updateDocument(e.document),$t()});Qe.onDidChangeContent(e=>{qe.updateDocument(e.document),$t()});Qe.onDidClose(e=>{qe.removeDocument(e.document.uri),be.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),$t()});be.onDocumentFormatting(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.formattingEdits)(t,(0,Ea.formattingSettings)(Ao,e.options))});be.onDocumentSymbol(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.symbolsFor)(t)});be.onDefinition(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?void 0:(0,Rt.definitionFor)(t,e.position,qe)});be.onReferences(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.referencesFor)(t,e.position,e.context.includeDeclaration,qe)});be.onCompletion(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.completionsFor)(t,qe)});be.onHover(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?void 0:(0,Rt.hoverFor)(t,e.position,qe)});be.onShutdown(()=>{});Qe.listen(be);be.listen(); //# sourceMappingURL=server.js.map diff --git a/packages/language-server/src/features.ts b/packages/language-server/src/features.ts index 7ecad2a..0452677 100644 --- a/packages/language-server/src/features.ts +++ b/packages/language-server/src/features.ts @@ -26,6 +26,7 @@ import { qualityDiagnostics, referencesAt, } from '@intouch-language/core'; +import { WorkspaceSymbol, WorkspaceSymbolIndex, documentFileName } from './workspaceSymbols'; export interface ServerSettings extends FormatOptions { qualityDiagnostics?: QualityDiagnosticSettings; @@ -64,13 +65,43 @@ function lspDiagnosticSeverity(severity: 'error' | 'warning' | 'information' | ' } } +function workspaceIndex(value: WorkspaceSymbolIndex | Iterable | undefined): WorkspaceSymbolIndex | undefined { + return value instanceof WorkspaceSymbolIndex ? value : undefined; +} + +function knownFunctionNames(value: WorkspaceSymbolIndex | Iterable | undefined): Iterable | undefined { + const index = workspaceIndex(value); + return index === undefined ? value as Iterable | undefined : index.knownFunctionNames(); +} + +function analyzeDocument(document: TextDocument, workspace?: WorkspaceSymbolIndex | Iterable) { + return analyzeQuickScript(document.getText(), { + knownFunctionNames: knownFunctionNames(workspace), + fileName: documentFileName(document.uri), + }); +} + +function quickFunctionSignature(symbol: WorkspaceSymbol): string { + const parameters = symbol.metadata.parameters + .map(parameter => `${parameter.name}: ${parameter.datatype}`) + .join(', '); + const returns = symbol.metadata.returnType === undefined ? '' : `: ${symbol.metadata.returnType}`; + return `${symbol.name}(${parameters})${returns}`; +} + +function workspaceFunctionDetail(symbol: WorkspaceSymbol): string { + const signature = quickFunctionSignature(symbol); + return symbol.metadata.description === undefined ? signature : `${signature}\n\n${symbol.metadata.description}`; +} + export function diagnosticsFor( document: TextDocument, - knownFunctionNames?: Iterable, + workspace?: WorkspaceSymbolIndex | Iterable, settings: ServerSettings = {}, ): Diagnostic[] { - const model = analyzeQuickScript(document.getText(), { knownFunctionNames }); - return [...model.diagnostics, ...qualityDiagnostics(model, settings.qualityDiagnostics)].map(item => ({ + const model = analyzeDocument(document, workspace); + const workspaceDiagnostics = workspaceIndex(workspace)?.diagnostics(document.uri) ?? []; + return [...model.diagnostics, ...workspaceDiagnostics, ...qualityDiagnostics(model, settings.qualityDiagnostics)].map(item => ({ code: item.code, message: item.message, range: item.range, @@ -88,37 +119,98 @@ export function formattingEdits(document: TextDocument, settings: ServerSettings } export function symbolsFor(document: TextDocument): DocumentSymbol[] { + const symbolKind = (kind: ReturnType[number]['kind']): SymbolKind => { + switch (kind) { + case 'variable': return SymbolKind.Variable; + case 'function': return SymbolKind.Function; + case 'window': return SymbolKind.Namespace; + case 'event': return SymbolKind.Event; + case 'application': return SymbolKind.Module; + case 'data-change': return SymbolKind.Event; + case 'condition': return SymbolKind.Event; + case 'key-script': return SymbolKind.Event; + default: return SymbolKind.Struct; + } + }; const convert = (entry: ReturnType[number]): DocumentSymbol => DocumentSymbol.create( entry.name, undefined, - entry.kind === 'variable' ? SymbolKind.Variable : SymbolKind.Struct, + symbolKind(entry.kind), entry.range, entry.selectionRange, entry.children.map(convert), ); - return documentSymbols(analyzeQuickScript(document.getText())).map(convert); + return documentSymbols(analyzeDocument(document)).map(convert); } -export function definitionFor(document: TextDocument, position: Position): Location | undefined { - const range = definitionAt(analyzeQuickScript(document.getText()), position); - return range === undefined ? undefined : Location.create(document.uri, range); +export function definitionFor(document: TextDocument, position: Position, workspace?: WorkspaceSymbolIndex): Location | undefined { + const range = definitionAt(analyzeDocument(document, workspace), position); + if (range !== undefined) return Location.create(document.uri, range); + if (workspace === undefined) return undefined; + const name = workspace.symbolNameAt(document.uri, position); + if (name === undefined) return undefined; + const symbol = workspace.uniqueQuickFunction(name); + return symbol === undefined ? undefined : Location.create(symbol.uri, symbol.definitionRange); } -export function referencesFor(document: TextDocument, position: Position, includeDeclaration: boolean): Location[] { - return referencesAt(analyzeQuickScript(document.getText()), position, includeDeclaration) - .map(range => Location.create(document.uri, range)); +export function referencesFor(document: TextDocument, position: Position, includeDeclaration: boolean, workspace?: WorkspaceSymbolIndex): Location[] { + const local = referencesAt(analyzeDocument(document, workspace), position, includeDeclaration); + if (local.length > 0) return local.map(range => Location.create(document.uri, range)); + if (workspace === undefined) return []; + const name = workspace.symbolNameAt(document.uri, position); + return name === undefined ? [] : workspace.references(name, includeDeclaration) + .map(reference => Location.create(reference.uri, reference.range)); } -export function completionsFor(document: TextDocument): CompletionItem[] { - return completions(analyzeQuickScript(document.getText())).map(entry => ({ +export function completionsFor(document: TextDocument, workspace?: WorkspaceSymbolIndex): CompletionItem[] { + const nonCallableNames = new Set((workspace?.symbols() ?? []) + .filter(symbol => !symbol.callable) + .map(symbol => symbol.name.toUpperCase())); + const coreEntries = completions(analyzeDocument(document, workspace)) + .filter(entry => entry.kind !== 'call-target' || !nonCallableNames.has(entry.label.toUpperCase())); + const entries = new Map(coreEntries.map(entry => [entry.label.toUpperCase(), { label: entry.label, kind: completionKind(entry.kind), detail: entry.detail, - })); + }])); + for (const symbol of workspace?.quickFunctions() ?? []) { + const duplicates = workspace?.quickFunctions(symbol.name).length ?? 0; + entries.set(symbol.name.toUpperCase(), { + label: symbol.name, + kind: CompletionItemKind.Function, + detail: duplicates > 1 ? `Ambiguous workspace QuickFunction (${duplicates} definitions)` : workspaceFunctionDetail(symbol), + }); + } + return [...entries.values()].sort((left, right) => left.label.localeCompare(right.label, 'en', { sensitivity: 'base' })); } -export function hoverFor(document: TextDocument, position: Position): Hover | undefined { - const hover = hoverAt(analyzeQuickScript(document.getText()), position); +export function hoverFor(document: TextDocument, position: Position, workspace?: WorkspaceSymbolIndex): Hover | undefined { + const documentSymbol = workspace?.symbolAt(document.uri, position); + if (documentSymbol !== undefined && documentSymbol.kind !== 'QuickFunction') { + const context = documentSymbol.metadata.event ?? documentSymbol.metadata.shortcut ?? documentSymbol.metadata.trigger; + const detail = context === undefined ? documentSymbol.kind : `${documentSymbol.kind}: ${context}`; + return { + contents: { kind: 'markdown', value: `**${documentSymbol.name}**\n\n${detail}` }, + range: documentSymbol.definitionRange, + }; + } + const workspaceName = workspace?.symbolNameAt(document.uri, position); + if (workspaceName !== undefined) { + const candidates = workspace!.quickFunctions(workspaceName); + if (candidates.length > 1) { + return { contents: { kind: 'markdown', value: `**${workspaceName}**\n\nAmbiguous workspace QuickFunction (${candidates.length} definitions).` } }; + } + if (candidates.length === 1) { + return { + contents: { kind: 'markdown', value: `**${candidates[0].name}**\n\n${workspaceFunctionDetail(candidates[0])}` }, + range: workspace?.entry(document.uri)?.calls.find(reference => reference.name.toUpperCase() === workspaceName.toUpperCase() + && reference.range.start.line === position.line + && reference.range.start.character <= position.character + && reference.range.end.character > position.character)?.range, + }; + } + } + const hover = hoverAt(analyzeDocument(document, workspace), position); return hover === undefined ? undefined : { contents: { kind: 'markdown', value: `**${hover.label}**\n\n${hover.detail}` }, range: hover.range, diff --git a/packages/language-server/src/server.ts b/packages/language-server/src/server.ts index 7e38e6c..9e9d101 100644 --- a/packages/language-server/src/server.ts +++ b/packages/language-server/src/server.ts @@ -1,4 +1,5 @@ import { + FileChangeType, ProposedFeatures, createConnection, } from 'vscode-languageserver/node'; @@ -6,7 +7,7 @@ import { TextDocument } from 'vscode-languageserver-textdocument'; import { TextDocuments } from 'vscode-languageserver'; import { promises as fs } from 'node:fs'; import * as path from 'node:path'; -import { fileURLToPath } from 'node:url'; +import { fileURLToPath, pathToFileURL } from 'node:url'; import { ServerSettings, @@ -20,18 +21,18 @@ import { symbolsFor, } from './features'; import { formattingSettings, readSettings } from './settings'; -import { WorkspaceFunctionIndex } from './workspaceFunctions'; +import { WorkspaceDocumentSource, WorkspaceSymbolIndex } from './workspaceSymbols'; const connection = createConnection(ProposedFeatures.all); const documents = new TextDocuments(TextDocument); -const workspaceFunctions = new WorkspaceFunctionIndex(); +const workspaceSymbols = new WorkspaceSymbolIndex(); let settings: ServerSettings = {}; let workspaceFolders: string[] = []; function publishDiagnostics(document: TextDocument): void { connection.sendDiagnostics({ uri: document.uri, - diagnostics: diagnosticsFor(document, workspaceFunctions.knownFunctionNames(), settings), + diagnostics: diagnosticsFor(document, workspaceSymbols, settings), }); } @@ -41,8 +42,8 @@ function republishOpenDocuments(): void { } } -async function quickFunctionSources(folder: string): Promise { - const sources: string[] = []; +async function quickScriptSources(folder: string): Promise { + const sources: WorkspaceDocumentSource[] = []; const entries = await fs.readdir(folder, { withFileTypes: true }); for (const entry of entries) { if (entry.name === '.git' || entry.name === 'node_modules') { @@ -50,31 +51,31 @@ async function quickFunctionSources(folder: string): Promise { } const candidate = path.join(folder, entry.name); if (entry.isDirectory()) { - sources.push(...await quickFunctionSources(candidate)); - } else if (entry.isFile() && /\.vbi?$/i.test(entry.name)) { - sources.push(await fs.readFile(candidate, 'utf8')); + sources.push(...await quickScriptSources(candidate)); + } else if (entry.isFile() && /\.(?:vbi|vi)$/i.test(entry.name)) { + sources.push({ uri: pathToFileURL(candidate).toString(), text: await fs.readFile(candidate, 'utf8') }); } } return sources; } -async function refreshWorkspaceFunctions(folders: readonly string[]): Promise { +async function refreshWorkspaceSymbols(folders: readonly string[]): Promise { try { - const sources = (await Promise.all(folders.map(quickFunctionSources))).flat(); - workspaceFunctions.replaceWorkspaceSources(sources); + const sources = (await Promise.all(folders.map(quickScriptSources))).flat(); + workspaceSymbols.replaceWorkspaceDocuments(sources); republishOpenDocuments(); } catch { // Keep diagnostics available for open documents when a workspace file cannot be read. } } -connection.onInitialize(params => { +connection.onInitialize(async params => { const folders = params.workspaceFolders?.map(folder => folder.uri) ?? (params.rootUri === null || params.rootUri === undefined ? [] : [params.rootUri]); workspaceFolders = folders .filter(uri => uri.startsWith('file:')) .map(uri => fileURLToPath(uri)); - void refreshWorkspaceFunctions(workspaceFolders); + await refreshWorkspaceSymbols(workspaceFolders); return serverCapabilities(); }); connection.onInitialized(async () => { @@ -86,19 +87,32 @@ connection.onDidChangeConfiguration(change => { settings = readSettings(change.settings); republishOpenDocuments(); }); -connection.onDidChangeWatchedFiles(() => { - void refreshWorkspaceFunctions(workspaceFolders); +connection.onDidChangeWatchedFiles(change => { + void (async () => { + for (const file of change.changes.filter(candidate => /\.(?:vbi|vi)$/i.test(candidate.uri))) { + if (file.type === FileChangeType.Deleted) { + workspaceSymbols.removeWorkspaceDocument(file.uri); + continue; + } + try { + workspaceSymbols.updateWorkspaceDocument({ uri: file.uri, text: await fs.readFile(fileURLToPath(file.uri), 'utf8') }); + } catch { + workspaceSymbols.removeWorkspaceDocument(file.uri); + } + } + republishOpenDocuments(); + })(); }); documents.onDidOpen(change => { - workspaceFunctions.updateDocument(change.document); - publishDiagnostics(change.document); + workspaceSymbols.updateDocument(change.document); + republishOpenDocuments(); }); documents.onDidChangeContent(change => { - workspaceFunctions.updateDocument(change.document); - publishDiagnostics(change.document); + workspaceSymbols.updateDocument(change.document); + republishOpenDocuments(); }); documents.onDidClose(change => { - workspaceFunctions.removeDocument(change.document.uri); + workspaceSymbols.removeDocument(change.document.uri); connection.sendDiagnostics({ uri: change.document.uri, diagnostics: [] }); republishOpenDocuments(); }); @@ -113,19 +127,19 @@ connection.onDocumentSymbol(params => { }); connection.onDefinition(params => { const document = documents.get(params.textDocument.uri); - return document === undefined ? undefined : definitionFor(document, params.position); + return document === undefined ? undefined : definitionFor(document, params.position, workspaceSymbols); }); connection.onReferences(params => { const document = documents.get(params.textDocument.uri); - return document === undefined ? [] : referencesFor(document, params.position, params.context.includeDeclaration); + return document === undefined ? [] : referencesFor(document, params.position, params.context.includeDeclaration, workspaceSymbols); }); connection.onCompletion(params => { const document = documents.get(params.textDocument.uri); - return document === undefined ? [] : completionsFor(document); + return document === undefined ? [] : completionsFor(document, workspaceSymbols); }); connection.onHover(params => { const document = documents.get(params.textDocument.uri); - return document === undefined ? undefined : hoverFor(document, params.position); + return document === undefined ? undefined : hoverFor(document, params.position, workspaceSymbols); }); connection.onShutdown(() => undefined); diff --git a/packages/language-server/src/workspaceFunctions.ts b/packages/language-server/src/workspaceFunctions.ts index 9d623dc..17ff68e 100644 --- a/packages/language-server/src/workspaceFunctions.ts +++ b/packages/language-server/src/workspaceFunctions.ts @@ -1,34 +1,8 @@ -import { quickFunctionNames } from '@intouch-language/core'; -import { TextDocument } from 'vscode-languageserver-textdocument'; - -/** Tracks QuickFunctions from workspace files and the language server's open documents. */ -export class WorkspaceFunctionIndex { - private readonly workspaceNames = new Set(); - private readonly openDocuments = new Map(); - - public replaceWorkspaceSources(sources: Iterable): void { - this.workspaceNames.clear(); - for (const source of sources) { - for (const name of quickFunctionNames(source)) { - this.workspaceNames.add(name); - } - } - } - - public updateDocument(document: TextDocument): void { - this.openDocuments.set(document.uri, quickFunctionNames(document.getText())); - } - - public removeDocument(uri: string): void { - this.openDocuments.delete(uri); - } - - public knownFunctionNames(): string[] { - const names = new Map(); - for (const name of this.workspaceNames) names.set(name.toUpperCase(), name); - for (const documentNames of this.openDocuments.values()) { - for (const name of documentNames) names.set(name.toUpperCase(), name); - } - return [...names.values()]; - } -} +export { WorkspaceFunctionIndex, WorkspaceSymbolIndex } from './workspaceSymbols'; +export type { + WorkspaceDocumentEntry, + WorkspaceDocumentSource, + WorkspaceReference, + WorkspaceSymbol, + WorkspaceSymbolKind, +} from './workspaceSymbols'; diff --git a/packages/language-server/src/workspaceSymbols.ts b/packages/language-server/src/workspaceSymbols.ts new file mode 100644 index 0000000..8c37042 --- /dev/null +++ b/packages/language-server/src/workspaceSymbols.ts @@ -0,0 +1,238 @@ +import { + CoreDiagnostic, + Position, + QuickReference, + QuickScriptDocumentMetadata, + Range, + analyzeQuickScript, +} from '@intouch-language/core'; +import { TextDocument } from 'vscode-languageserver-textdocument'; + +export type WorkspaceSymbolKind = + | 'QuickFunction' + | 'Window' + | 'WindowEvent' + | 'ApplicationScript' + | 'DataChangeScript' + | 'ConditionScript' + | 'KeyScript'; + +export interface WorkspaceDocumentSource { + uri: string; + text: string; +} + +export interface WorkspaceSymbol { + name: string; + kind: WorkspaceSymbolKind; + callable: boolean; + uri: string; + definitionRange: Range; + metadata: QuickScriptDocumentMetadata; +} + +export interface WorkspaceReference { + name: string; + kind: 'declaration' | 'call'; + uri: string; + range: Range; +} + +export interface WorkspaceDocumentEntry { + uri: string; + metadata: QuickScriptDocumentMetadata; + calls: QuickReference[]; + symbols: WorkspaceSymbol[]; +} + +function contains(range: Range, position: Position): boolean { + return (position.line > range.start.line || (position.line === range.start.line && position.character >= range.start.character)) + && (position.line < range.end.line || (position.line === range.end.line && position.character < range.end.character)); +} + +function zeroRange(): Range { + return { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } }; +} + +export function documentFileName(uri: string): string | undefined { + try { + const parsed = new URL(uri); + const segments = parsed.pathname.split('/'); + return decodeURIComponent(segments[segments.length - 1] || '') || undefined; + } catch { + const segments = uri.split(/[\\/]/); + return segments[segments.length - 1] || undefined; + } +} + +function documentSymbols(uri: string, metadata: QuickScriptDocumentMetadata): WorkspaceSymbol[] { + const name = metadata.name ?? metadata.trigger; + const definitionRange = metadata.nameRange ?? metadata.triggerRange ?? zeroRange(); + if (metadata.scriptType === 'QuickFunction' && name !== undefined) { + return [{ name, kind: 'QuickFunction', callable: true, uri, definitionRange, metadata }]; + } + if (metadata.scriptType === 'Window' && metadata.name !== undefined) { + const symbols: WorkspaceSymbol[] = [{ + name: metadata.name, + kind: 'Window', + callable: false, + uri, + definitionRange, + metadata, + }]; + if (metadata.event !== undefined) { + symbols.push({ + name: `${metadata.name}.${metadata.event}`, + kind: 'WindowEvent', + callable: false, + uri, + definitionRange: metadata.eventRange ?? definitionRange, + metadata, + }); + } + return symbols; + } + if (metadata.scriptType === 'Application') { + return [{ name: name ?? 'Application', kind: 'ApplicationScript', callable: false, uri, definitionRange, metadata }]; + } + if (metadata.scriptType === 'DataChange') { + return [{ name: name ?? 'DataChange', kind: 'DataChangeScript', callable: false, uri, definitionRange, metadata }]; + } + if (metadata.scriptType === 'Condition') { + return [{ name: name ?? 'Condition', kind: 'ConditionScript', callable: false, uri, definitionRange, metadata }]; + } + if (metadata.scriptType === 'KeyScript') { + return [{ name: name ?? metadata.shortcut ?? 'KeyScript', kind: 'KeyScript', callable: false, uri, definitionRange, metadata }]; + } + return []; +} + +function indexDocument(source: WorkspaceDocumentSource): WorkspaceDocumentEntry { + const model = analyzeQuickScript(source.text, { fileName: documentFileName(source.uri) }); + return { + uri: source.uri, + metadata: model.metadata, + calls: model.references.filter(reference => reference.kind === 'call'), + symbols: documentSymbols(source.uri, model.metadata), + }; +} + +/** URI-aware incremental index for callable and non-callable QuickScript workspace symbols. */ +export class WorkspaceSymbolIndex { + private readonly workspaceDocuments = new Map(); + private readonly openDocuments = new Map(); + + public replaceWorkspaceDocuments(sources: Iterable): void { + this.workspaceDocuments.clear(); + for (const source of sources) this.workspaceDocuments.set(source.uri, indexDocument(source)); + } + + public updateWorkspaceDocument(source: WorkspaceDocumentSource): void { + this.workspaceDocuments.set(source.uri, indexDocument(source)); + } + + public removeWorkspaceDocument(uri: string): void { + this.workspaceDocuments.delete(uri); + } + + public updateDocument(document: TextDocument): void { + this.openDocuments.set(document.uri, indexDocument({ uri: document.uri, text: document.getText() })); + } + + public removeDocument(uri: string): void { + this.openDocuments.delete(uri); + } + + public entries(): WorkspaceDocumentEntry[] { + const documents = new Map(this.workspaceDocuments); + for (const [uri, entry] of this.openDocuments) documents.set(uri, entry); + return [...documents.values()].sort((left, right) => left.uri.localeCompare(right.uri, 'en')); + } + + public entry(uri: string): WorkspaceDocumentEntry | undefined { + return this.openDocuments.get(uri) ?? this.workspaceDocuments.get(uri); + } + + public symbols(): WorkspaceSymbol[] { + return this.entries().flatMap(entry => entry.symbols); + } + + public quickFunctions(name?: string): WorkspaceSymbol[] { + const normalized = name?.toUpperCase(); + return this.symbols().filter(symbol => symbol.kind === 'QuickFunction' + && (normalized === undefined || symbol.name.toUpperCase() === normalized)); + } + + public knownFunctionNames(): string[] { + const names = new Map(); + for (const symbol of this.quickFunctions()) names.set(symbol.name.toUpperCase(), symbol.name); + return [...names.values()].sort((left, right) => left.localeCompare(right, 'en', { sensitivity: 'base' })); + } + + public uniqueQuickFunction(name: string): WorkspaceSymbol | undefined { + const candidates = this.quickFunctions(name); + return candidates.length === 1 ? candidates[0] : undefined; + } + + public symbolAt(uri: string, position: Position): WorkspaceSymbol | undefined { + return this.entry(uri)?.symbols.find(symbol => contains(symbol.definitionRange, position)); + } + + public symbolNameAt(uri: string, position: Position): string | undefined { + const entry = this.entry(uri); + const declaration = this.symbolAt(uri, position); + if (declaration?.kind !== 'QuickFunction') return entry?.calls.find(reference => contains(reference.range, position))?.name; + if (declaration !== undefined) return declaration.name; + return entry?.calls.find(reference => contains(reference.range, position))?.name; + } + + public references(name: string, includeDeclaration: boolean): WorkspaceReference[] { + const normalized = name.toUpperCase(); + const declarations = includeDeclaration + ? this.quickFunctions(name).map(symbol => ({ + name: symbol.name, + kind: 'declaration' as const, + uri: symbol.uri, + range: symbol.definitionRange, + })) + : []; + const calls = this.entries().flatMap(entry => entry.calls + .filter(reference => reference.name.toUpperCase() === normalized) + .map(reference => ({ name: reference.name, kind: 'call' as const, uri: entry.uri, range: reference.range }))); + return [...declarations, ...calls].sort((left, right) => left.uri.localeCompare(right.uri, 'en') + || left.range.start.line - right.range.start.line + || left.range.start.character - right.range.start.character); + } + + public diagnostics(uri: string): CoreDiagnostic[] { + const entry = this.entry(uri); + if (entry === undefined) return []; + const diagnostics: CoreDiagnostic[] = []; + for (const symbol of entry.symbols.filter(candidate => candidate.kind === 'QuickFunction')) { + if (this.quickFunctions(symbol.name).length > 1) { + diagnostics.push({ + code: 'duplicate-quickfunction', + message: `QuickFunction '${symbol.name}' has multiple workspace definitions.`, + severity: 'warning', + range: symbol.definitionRange, + source: 'intouch-metadata', + }); + } + } + for (const call of entry.calls) { + if (this.quickFunctions(call.name).length > 1) { + diagnostics.push({ + code: 'ambiguous-quickfunction', + message: `QuickFunction call '${call.name}' has multiple workspace definitions.`, + severity: 'warning', + range: call.range, + source: 'intouch-metadata', + }); + } + } + return diagnostics; + } +} + +/** Backward-compatible class name for callers migrating from the former name-only index. */ +export { WorkspaceSymbolIndex as WorkspaceFunctionIndex }; From e32289c71f4d3223dd45186a5fa3c81f74347205 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:01:38 +0200 Subject: [PATCH 32/40] test(language): cover metadata and workspace symbols --- packages/core/test/documentMetadata.test.ts | 119 ++++++++++++++++++ packages/core/test/formatter.test.ts | 27 ++++ packages/core/test/languageService.test.ts | 10 ++ .../language-server/test/features.test.ts | 116 ++++++++++++++++- .../language-server/test/protocol.test.ts | 72 ++++++++++- src/test/suite/extension.test.ts | 66 ++++++++++ 6 files changed, 406 insertions(+), 4 deletions(-) create mode 100644 packages/core/test/documentMetadata.test.ts diff --git a/packages/core/test/documentMetadata.test.ts b/packages/core/test/documentMetadata.test.ts new file mode 100644 index 0000000..4323efe --- /dev/null +++ b/packages/core/test/documentMetadata.test.ts @@ -0,0 +1,119 @@ +import * as assert from 'assert'; + +import { extractDocumentMetadata } from '../src/documentMetadata'; +import { analyzeQuickScript } from '../src/semantics'; + +suite('QuickScript document metadata', () => { + test('extracts explicit QuickFunction metadata exclusively from comment tokens', () => { + const source = [ + '{>', + '@ScriptType QuickFunction', + '@Name GetSomething', + '@Description Returns something useful.', + '@Param Source MESSAGE Source value.', + '@Param Index INTEGER Requested index.', + '@Returns MESSAGE', + 'CALL MissingExample() remains comment text.', + '{<}', + ].join('\n'); + const metadata = extractDocumentMetadata(source, { fileName: 'SomethingCompletelyDifferent.vbi' }); + const model = analyzeQuickScript(source, { fileName: 'SomethingCompletelyDifferent.vbi' }); + + assert.strictEqual(metadata.scriptType, 'QuickFunction'); + assert.strictEqual(metadata.name, 'GetSomething'); + assert.strictEqual(metadata.metadataSource, 'explicit'); + assert.deepStrictEqual(metadata.parameters.map(parameter => [parameter.name, parameter.datatype, parameter.description]), [ + ['Source', 'MESSAGE', 'Source value.'], + ['Index', 'INTEGER', 'Requested index.'], + ]); + assert.strictEqual(metadata.returnType, 'MESSAGE'); + assert.deepStrictEqual(model.diagnostics, []); + assert.strictEqual(model.quickFunctions[0].name, 'GetSomething'); + }); + + test('extracts documented legacy InTouch script types and context fields', () => { + const cases = [ + ['Type: QuickFunction\nName: Foo\nParameters:\nInteger Index', 'QuickFunction', 'Foo', undefined, undefined], + ['Type: ApplicationScript\nName: APP_Application_on_startup', 'Application', 'APP_Application_on_startup', undefined, undefined], + ['Type: datachange\nTagname[.field]: SomeTag', 'DataChange', undefined, 'SomeTag', undefined], + ['Type: ConditionalScript\nName: ConditionScript\nCondition: Ready\nCondition Type: OnTrue', 'Condition', 'ConditionScript', 'Ready', 'OnTrue'], + ] as const; + + for (const [body, scriptType, name, trigger, event] of cases) { + const metadata = extractDocumentMetadata(`{>\n${body}\n{<}`); + assert.strictEqual(metadata.scriptType, scriptType); + assert.strictEqual(metadata.name, name); + assert.strictEqual(metadata.trigger, trigger); + assert.strictEqual(metadata.event, event); + assert.strictEqual(metadata.metadataSource, 'legacy'); + } + }); + + test('preserves DataChange triggers as metadata references without variable diagnostics', () => { + const model = analyzeQuickScript('{>\n@ScriptType DataChange\n@Trigger SomeGlobalVariable\n{<}'); + + assert.deepStrictEqual(model.references.map(reference => [reference.name, reference.kind]), [['SomeGlobalVariable', 'trigger']]); + assert.ok(!model.diagnostics.some(diagnostic => diagnostic.code === 'unknown-variable')); + }); + + test('models KeyScript shortcuts as canonical InTouch metadata', () => { + const legacy = extractDocumentMetadata([ + '{>', + 'Type: KeyScript', + 'Name: KEY_Ctrl_D', + 'Parameters:', + 'Shortcut: Ctrl+d', + '{<}', + ].join('\n')); + const explicit = extractDocumentMetadata([ + '{>', + '@ScriptType KeyScript', + '@Name OpenPrintWindow', + '@Shortcut Ctrl+d', + '{<}', + ].join('\n')); + + assert.deepStrictEqual([legacy.scriptType, legacy.shortcut], ['KeyScript', 'Ctrl+d']); + assert.deepStrictEqual([explicit.scriptType, explicit.shortcut], ['KeyScript', 'Ctrl+d']); + }); + + test('prefers explicit metadata, reports conflicts, and uses filenames only as fallback', () => { + const conflict = extractDocumentMetadata([ + '{>', + '@ScriptType QuickFunction', + '@Name ExplicitName', + 'Type: DataChange', + 'Name: LegacyName', + '{<}', + ].join('\n'), { fileName: 'DCH_FileName_1.0.0.vbi' }); + const fallback = extractDocumentMetadata('', { fileName: 'QF_FallbackName_1.0.0.vbi' }); + + assert.deepStrictEqual([conflict.scriptType, conflict.name, conflict.metadataSource], ['QuickFunction', 'ExplicitName', 'explicit']); + assert.strictEqual(conflict.diagnostics.filter(diagnostic => diagnostic.code === 'metadata-conflict').length, 2); + assert.deepStrictEqual([fallback.scriptType, fallback.name, fallback.metadataSource], ['QuickFunction', 'FallbackName', 'filename']); + }); + + test('validates Window events without making Window scripts callable', () => { + for (const event of ['OnShow', 'WhileRunning', 'OnClose']) { + const source = `{>\n@ScriptType Window\n@Name MainWindow\n@Event ${event}\n{<}`; + const model = analyzeQuickScript(source); + assert.deepStrictEqual([model.metadata.scriptType, model.metadata.event], ['Window', event]); + assert.deepStrictEqual(model.quickFunctions, []); + assert.deepStrictEqual(model.diagnostics, []); + } + + const invalid = extractDocumentMetadata('{>\n@ScriptType Window\n@Name MainWindow\n@Event OnBanana\n@Returns INTEGER\n{<}'); + assert.deepStrictEqual(invalid.diagnostics.map(diagnostic => diagnostic.code), ['invalid-window-event', 'metadata-conflict']); + }); + + test('reports malformed known and unknown explicit fields as metadata diagnostics', () => { + const metadata = extractDocumentMetadata('{>\n@ScriptType Banana\n@Name\n@FooBar Value\n{<}'); + + assert.deepStrictEqual(metadata.diagnostics.map(diagnostic => [diagnostic.code, diagnostic.source]), [ + ['invalid-script-type', 'intouch-metadata'], + ['invalid-metadata-value', 'intouch-metadata'], + ['unknown-metadata-field', 'intouch-metadata'], + ]); + assert.strictEqual(metadata.scriptType, 'Generic'); + }); +}); diff --git a/packages/core/test/formatter.test.ts b/packages/core/test/formatter.test.ts index 17d4b9f..76996c4 100644 --- a/packages/core/test/formatter.test.ts +++ b/packages/core/test/formatter.test.ts @@ -187,6 +187,33 @@ suite('QuickScript lexical formatter', () => { assert.strictEqual(formatQuickScript(once).text, once); }); + test('preserves explicit document metadata content and relative indentation idempotently', () => { + const source = [ + '{>', + ' @ScriptType QuickFunction', + ' @Name GetSomething', + ' @Description Returns something useful.', + ' @Param Source MESSAGE Source value.', + ' @Param Index INTEGER Requested index.', + ' @Returns MESSAGE', + '{<}', + ].join('\n'); + const expected = [ + '{>', + ' @ScriptType QuickFunction', + ' @Name GetSomething', + ' @Description Returns something useful.', + ' @Param Source MESSAGE Source value.', + ' @Param Index INTEGER Requested index.', + ' @Returns MESSAGE', + '{<}', + ].join('\r\n'); + const once = formatQuickScript(source).text; + + assert.strictEqual(once, expected); + assert.strictEqual(formatQuickScript(once).text, once); + }); + test('ends lexical preservation at a decorated block marker before later code', () => { const source = [ '{>', diff --git a/packages/core/test/languageService.test.ts b/packages/core/test/languageService.test.ts index 82b699a..85ee34d 100644 --- a/packages/core/test/languageService.test.ts +++ b/packages/core/test/languageService.test.ts @@ -33,4 +33,14 @@ suite('QuickScript language service', () => { assert.deepStrictEqual(symbols.map(symbol => symbol.kind), ['variable', 'if']); }); + + test('builds metadata-backed QuickFunction, Window, and KeyScript outlines', () => { + const quickFunction = documentSymbols(analyzeQuickScript('{>\n@ScriptType QuickFunction\n@Name Foo\n{<}\nDIM Value AS INTEGER;')); + const window = documentSymbols(analyzeQuickScript('{>\n@ScriptType Window\n@Name MainWindow\n@Event OnShow\n{<}\nDIM Value AS INTEGER;')); + const keyScript = documentSymbols(analyzeQuickScript('{>\n@ScriptType KeyScript\n@Name OpenPrint\n@Shortcut Ctrl+d\n{<}')); + + assert.deepStrictEqual([quickFunction[0].name, quickFunction[0].kind, quickFunction[0].children[0].kind], ['Foo', 'function', 'variable']); + assert.deepStrictEqual([window[0].name, window[0].kind, window[0].children[0].name], ['MainWindow', 'window', 'OnShow']); + assert.deepStrictEqual([keyScript[0].name, keyScript[0].kind, keyScript[0].children[0].name], ['OpenPrint', 'key-script', 'Ctrl+d']); + }); }); diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index 086d8ac..29d3737 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -17,7 +17,7 @@ import { symbolsFor, } from '../src/features'; import { formattingSettings, readSettings } from '../src/settings'; -import { WorkspaceFunctionIndex } from '../src/workspaceFunctions'; +import { WorkspaceFunctionIndex, WorkspaceSymbolIndex } from '../src/workspaceFunctions'; function formattedText(document: TextDocument, settings = {}): string { const [edit] = formattingEdits(document, settings); @@ -320,6 +320,120 @@ suite('QuickScript language server features', () => { assert.deepStrictEqual(diagnostics.map(diagnostic => diagnostic.range.start), [{ line: 1, character: 5 }]); }); + test('resolves metadata QuickFunctions across files without a QF filename prefix', () => { + const definition = TextDocument.create('file:///SomethingCompletelyDifferent.vbi', 'intouch', 1, [ + '{>', + '@ScriptType QuickFunction', + '@Name MyFunction', + '@Description Test function.', + '@Param Source MESSAGE Source value.', + '@Returns MESSAGE', + '{<}', + ].join('\n')); + const caller = TextDocument.create('file:///caller.vbi', 'intouch', 1, 'CALL MyFunction(Value);'); + const nestedCaller = TextDocument.create('file:///nested-caller.vi', 'intouch', 1, 'X = Wrapper(CALL MyFunction(Value));'); + const workspace = new WorkspaceSymbolIndex(); + workspace.updateDocument(definition); + workspace.updateDocument(caller); + workspace.updateDocument(nestedCaller); + + assert.ok(!diagnosticsFor(caller, workspace).some(diagnostic => diagnostic.code === 'unknown-function')); + assert.deepStrictEqual(definitionFor(caller, { line: 0, character: 7 }, workspace), { + uri: definition.uri, + range: { start: { line: 2, character: 6 }, end: { line: 2, character: 16 } }, + }); + assert.deepStrictEqual( + referencesFor(caller, { line: 0, character: 7 }, true, workspace).map(location => location.uri).sort(), + [definition.uri, caller.uri, nestedCaller.uri].sort(), + ); + assert.match(String((hoverFor(caller, { line: 0, character: 7 }, workspace)?.contents as { value: string }).value), /MyFunction\(Source: MESSAGE\): MESSAGE/); + assert.match(completionsFor(caller, workspace).find(item => item.label === 'MyFunction')?.detail ?? '', /Test function/); + }); + + test('classifies Window events as non-callable document symbols', () => { + const workspace = new WorkspaceSymbolIndex(); + for (const event of ['OnShow', 'WhileRunning', 'OnClose']) { + const document = TextDocument.create(`file:///MainWindow-${event}.vbi`, 'intouch', 1, [ + '{>', + '@ScriptType Window', + '@Name MainWindow', + `@Event ${event}`, + '{<}', + ].join('\n')); + workspace.updateDocument(document); + const symbols = symbolsFor(document); + assert.strictEqual(symbols[0].name, 'MainWindow'); + assert.strictEqual(symbols[0]?.children?.[0]?.name, event); + assert.match(JSON.stringify(hoverFor(document, { line: 2, character: 8 }, workspace)?.contents), /Window/); + } + const caller = TextDocument.create('file:///window-caller.vbi', 'intouch', 1, 'CALL MainWindow();'); + workspace.updateDocument(caller); + + assert.ok(diagnosticsFor(caller, workspace).some(diagnostic => diagnostic.code === 'unknown-function')); + assert.ok(!workspace.knownFunctionNames().includes('MainWindow')); + assert.ok(!completionsFor(caller, workspace).some(item => item.label === 'MainWindow')); + assert.deepStrictEqual(workspace.symbols().filter(symbol => symbol.kind === 'WindowEvent').map(symbol => symbol.metadata.event), [ + 'OnClose', 'OnShow', 'WhileRunning', + ]); + }); + + test('indexes Application, DataChange, Condition, and KeyScript documents without making them callable', () => { + const workspace = new WorkspaceSymbolIndex(); + const sources = [ + ['application.vbi', 'Type: ApplicationScript\nName: APP_Application_on_startup', 'ApplicationScript'], + ['datachange.vbi', 'Type: datachange\nTagname[.field]: SomeTag', 'DataChangeScript'], + ['condition.vbi', 'Type: ConditionalScript\nName: ReadyCondition\nCondition: Ready\nCondition Type: OnTrue', 'ConditionScript'], + ['key.vbi', 'Type: KeyScript\nName: KEY_Ctrl_D\nShortcut: Ctrl+d', 'KeyScript'], + ] as const; + for (const [file, body] of sources) { + workspace.updateDocument(TextDocument.create(`file:///${file}`, 'intouch', 1, `{>\n${body}\n{<}`)); + } + + assert.deepStrictEqual(workspace.symbols().map(symbol => symbol.kind).sort(), sources.map(([, , kind]) => kind).sort()); + assert.deepStrictEqual(workspace.knownFunctionNames(), []); + }); + + test('diagnoses duplicate QuickFunctions and never chooses an arbitrary definition', () => { + const workspace = new WorkspaceSymbolIndex(); + const source = '{>\n@ScriptType QuickFunction\n@Name DuplicateName\n{<}'; + const first = TextDocument.create('file:///first.vbi', 'intouch', 1, source); + const second = TextDocument.create('file:///second.vbi', 'intouch', 1, source); + const caller = TextDocument.create('file:///duplicate-caller.vbi', 'intouch', 1, 'CALL DuplicateName();'); + for (const document of [first, second, caller]) workspace.updateDocument(document); + + assert.ok(diagnosticsFor(first, workspace).some(diagnostic => diagnostic.code === 'duplicate-quickfunction')); + assert.ok(diagnosticsFor(caller, workspace).some(diagnostic => diagnostic.code === 'ambiguous-quickfunction')); + assert.strictEqual(definitionFor(caller, { line: 0, character: 7 }, workspace), undefined); + assert.strictEqual(referencesFor(caller, { line: 0, character: 7 }, true, workspace).length, 3); + }); + + test('uses QF filenames only when structured metadata is absent', () => { + const workspace = new WorkspaceSymbolIndex(); + workspace.updateDocument(TextDocument.create('file:///QF_FallbackOnly_1.0.0.vbi', 'intouch', 1, '')); + workspace.updateDocument(TextDocument.create('file:///QF_WrongName_1.0.0.vbi', 'intouch', 1, '{>\n@ScriptType QuickFunction\n@Name CanonicalName\n{<}')); + + assert.deepStrictEqual(workspace.knownFunctionNames(), ['CanonicalName', 'FallbackOnly']); + }); + + test('prefers a real workspace definition over static Hermes catalog metadata', () => { + const workspace = new WorkspaceSymbolIndex(); + const definition = TextDocument.create('file:///hermes-debug.vbi', 'intouch', 1, [ + '{>', + '@ScriptType QuickFunction', + '@Name xHerDebugL', + '@Description Workspace implementation.', + '@Param Message MESSAGE Debug text.', + '@Param Level INTEGER Debug level.', + '{<}', + ].join('\n')); + const caller = TextDocument.create('file:///hermes-caller.vbi', 'intouch', 1, 'CALL xHerDebugL("ok", 10);'); + workspace.updateDocument(definition); + workspace.updateDocument(caller); + + assert.strictEqual(definitionFor(caller, { line: 0, character: 7 }, workspace)?.uri, definition.uri); + assert.match(JSON.stringify(hoverFor(caller, { line: 0, character: 7 }, workspace)?.contents), /Workspace implementation/); + }); + test('keeps the positive HIL datatype and function diagnostics', () => { const document = TextDocument.create('file:///hil-positive.vbi', 'intouch', 1, [ 'DIM ENDE AS DISCRET;', diff --git a/packages/language-server/test/protocol.test.ts b/packages/language-server/test/protocol.test.ts index a4dafeb..0d2bcb8 100644 --- a/packages/language-server/test/protocol.test.ts +++ b/packages/language-server/test/protocol.test.ts @@ -2,9 +2,10 @@ import * as assert from 'assert'; import { ChildProcessWithoutNullStreams, spawn } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; +import { pathToFileURL } from 'url'; import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from 'vscode-jsonrpc/node'; -import { CompletionItem, Diagnostic, DiagnosticSeverity, InitializeResult, TextEdit } from 'vscode-languageserver/node'; +import { CompletionItem, Diagnostic, DiagnosticSeverity, Hover, InitializeResult, Location, TextEdit } from 'vscode-languageserver/node'; function applyFormattingEdits(source: string, edits: readonly TextEdit[]): string { if (edits.length === 0) { @@ -18,6 +19,29 @@ function applyFormattingEdits(source: string, edits: readonly TextEdit[]): strin suite('QuickScript language server protocol', () => { test('handles lifecycle, synchronization, and representative requests without VS Code', async function () { this.timeout(10_000); + const localTemporaryRoot = path.resolve(process.cwd(), '.pio'); + fs.mkdirSync(localTemporaryRoot, { recursive: true }); + const workspacePath = fs.mkdtempSync(path.join(localTemporaryRoot, 'metadata-protocol-')); + const definitionPath = path.join(workspacePath, 'SomethingCompletelyDifferent.vbi'); + const callerPath = path.join(workspacePath, 'caller.vbi'); + const nestedCallerPath = path.join(workspacePath, 'nested-caller.vi'); + const definitionSource = [ + '{>', + '@ScriptType QuickFunction', + '@Name MyFunction', + '@Description Test function.', + '@Param Source MESSAGE Source value.', + '@Returns MESSAGE', + '{<}', + ].join('\n'); + const callerSource = 'CALL MyFunction(Value);'; + fs.writeFileSync(definitionPath, definitionSource, 'utf8'); + fs.writeFileSync(callerPath, callerSource, 'utf8'); + fs.writeFileSync(nestedCallerPath, 'X = Wrapper(CALL MyFunction(Value));', 'utf8'); + const workspaceUri = pathToFileURL(workspacePath).toString(); + const definitionUri = pathToFileURL(definitionPath).toString(); + const callerUri = pathToFileURL(callerPath).toString(); + const nestedCallerUri = pathToFileURL(nestedCallerPath).toString(); const serverPath = path.resolve(__dirname, '../src/server.js'); const environment = { ...process.env }; delete environment.ELECTRON_RUN_AS_NODE; @@ -69,9 +93,9 @@ suite('QuickScript language server protocol', () => { try { const initialize = await connection.sendRequest('initialize', { processId: null, - rootUri: null, + rootUri: workspaceUri, capabilities: { workspace: { configuration: true } }, - workspaceFolders: null, + workspaceFolders: [{ uri: workspaceUri, name: 'metadata-protocol' }], }); assert.strictEqual((initialize as InitializeResult).capabilities.documentFormattingProvider, true); connection.sendNotification('initialized', {}); @@ -89,6 +113,45 @@ suite('QuickScript language server protocol', () => { } }, } } }); + const metadataDiagnosticWaiter = nextDiagnostics(callerUri, diagnostics => + !diagnostics.some(diagnostic => diagnostic.code === 'unknown-function')); + connection.sendNotification('textDocument/didOpen', { + textDocument: { + uri: callerUri, + languageId: 'intouch', + version: 1, + text: callerSource, + }, + }); + const metadataDiagnostics = await metadataDiagnosticWaiter; + assert.ok(!metadataDiagnostics.some(diagnostic => diagnostic.code === 'unknown-function')); + + const crossFileDefinition = await connection.sendRequest('textDocument/definition', { + textDocument: { uri: callerUri }, + position: { line: 0, character: 7 }, + }); + assert.strictEqual(crossFileDefinition?.uri, definitionUri); + assert.deepStrictEqual(crossFileDefinition?.range.start, { line: 2, character: 6 }); + + const crossFileReferences = await connection.sendRequest('textDocument/references', { + textDocument: { uri: callerUri }, + position: { line: 0, character: 7 }, + context: { includeDeclaration: true }, + }); + assert.deepStrictEqual(crossFileReferences.map(location => location.uri).sort(), [definitionUri, callerUri, nestedCallerUri].sort()); + + const metadataHover = await connection.sendRequest('textDocument/hover', { + textDocument: { uri: callerUri }, + position: { line: 0, character: 7 }, + }); + assert.match(JSON.stringify(metadataHover?.contents), /MyFunction\(Source: MESSAGE\): MESSAGE/); + + const metadataCompletion = await connection.sendRequest('textDocument/completion', { + textDocument: { uri: callerUri }, + position: { line: 0, character: 5 }, + }); + assert.match(metadataCompletion.find(item => item.label === 'MyFunction')?.detail ?? '', /Test function/); + const uri = 'file:///protocol-smoke.vbi'; connection.sendNotification('textDocument/didOpen', { textDocument: { @@ -200,6 +263,9 @@ suite('QuickScript language server protocol', () => { if (!child.killed && child.exitCode === null) { child.kill(); } + const resolvedWorkspace = path.resolve(workspacePath); + assert.ok(resolvedWorkspace.startsWith(`${localTemporaryRoot}${path.sep}`)); + fs.rmSync(resolvedWorkspace, { recursive: true, force: true }); } }); }); diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts index e8c7a46..b8fd86f 100644 --- a/src/test/suite/extension.test.ts +++ b/src/test/suite/extension.test.ts @@ -118,6 +118,72 @@ suite('Extension Test Suite', () => { ]); }); + test('resolves metadata QuickFunctions across files through the production language client', async () => { + const extension = vscode.extensions.getExtension('Vitaly-ruhl.intouch-language'); + assert.ok(extension); + await extension.activate(); + const localTemporaryRoot = path.resolve(extension.extensionPath, '.pio'); + const workspacePath = path.join(localTemporaryRoot, `metadata-host-${process.pid}-${Date.now()}`); + fs.mkdirSync(workspacePath, { recursive: true }); + const definitionPath = path.join(workspacePath, 'SomethingCompletelyDifferent.vbi'); + const callerPath = path.join(workspacePath, 'caller.vbi'); + const nestedCallerPath = path.join(workspacePath, 'nested-caller.vi'); + const definitionSource = [ + '{>', + '@ScriptType QuickFunction', + '@Name HostFunction', + '@Description Production host function.', + '@Param Source MESSAGE Source value.', + '@Returns MESSAGE', + '{<}', + ].join('\n'); + const callerSource = 'CALL HostFunction(Value);'; + fs.writeFileSync(definitionPath, definitionSource, 'utf8'); + fs.writeFileSync(callerPath, callerSource, 'utf8'); + fs.writeFileSync(nestedCallerPath, 'X = Wrapper(CALL HostFunction(Value));', 'utf8'); + + try { + const definitionDocument = await vscode.workspace.openTextDocument(definitionPath); + const callerDocument = await vscode.workspace.openTextDocument(callerPath); + await vscode.workspace.openTextDocument(nestedCallerPath); + const callPosition = new vscode.Position(0, 7); + let definitions: vscode.Location[] | undefined; + const deadline = Date.now() + 10_000; + do { + definitions = await vscode.commands.executeCommand( + 'vscode.executeDefinitionProvider', callerDocument.uri, callPosition, + ); + if ((definitions?.length ?? 0) > 0) break; + await new Promise(resolve => setTimeout(resolve, 100)); + } while (Date.now() < deadline); + + assert.strictEqual(definitions?.length, 1); + assert.strictEqual(definitions?.[0].uri.toString(), definitionDocument.uri.toString()); + assert.deepStrictEqual(definitions?.[0].range.start, new vscode.Position(2, 6)); + + const references = await vscode.commands.executeCommand( + 'vscode.executeReferenceProvider', callerDocument.uri, callPosition, + ); + assert.strictEqual(references?.length, 3); + const hovers = await vscode.commands.executeCommand( + 'vscode.executeHoverProvider', callerDocument.uri, callPosition, + ); + const hoverText = hovers?.flatMap(hover => hover.contents) + .map(content => typeof content === 'string' ? content : content.value) + .join('\n') ?? ''; + assert.match(hoverText, /HostFunction\(Source: MESSAGE\): MESSAGE/); + const completion = await vscode.commands.executeCommand( + 'vscode.executeCompletionItemProvider', callerDocument.uri, new vscode.Position(0, 5), + ); + assert.match(completion?.items.find(item => item.label === 'HostFunction')?.detail ?? '', /Production host function/); + assert.ok(!vscode.languages.getDiagnostics(callerDocument.uri).some(diagnostic => diagnostic.code === 'unknown-function')); + } finally { + const resolvedWorkspace = path.resolve(workspacePath); + assert.ok(resolvedWorkspace.startsWith(`${localTemporaryRoot}${path.sep}`)); + fs.rmSync(resolvedWorkspace, { recursive: true, force: true }); + } + }); + test('routes naming quality settings and window context through the production language client', async () => { const extension = vscode.extensions.getExtension('Vitaly-ruhl.intouch-language'); assert.ok(extension); From 86a1d61dac60ff945ae705d9e7934bea70157f51 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:01:49 +0200 Subject: [PATCH 33/40] docs(language): document QuickScript metadata convention --- CHANGELOG.md | 5 +- README.md | 9 +- docs/architecture/intouch-core-preparation.md | 40 ++-- docs/language/document-metadata.md | 183 ++++++++++++++++++ docs/language/quickscript.md | 14 +- 5 files changed, 231 insertions(+), 20 deletions(-) create mode 100644 docs/language/document-metadata.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b23b0c3..1b4e85d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - Replace the legacy formatter lexers with the shared QuickScript tokenizer and recoverable structure parser. - Add a native language server with diagnostics, symbols, completion, hover, - and document-local definition/reference support. + document-local variable navigation, and workspace QuickFunction navigation. - Route VS Code formatting through the language client while preserving the existing grammar, snippets, theme, and formatter command. - Add editor-independent core tests, language-server protocol smoke tests, and @@ -23,6 +23,9 @@ dotfields, and multiline `IF` continuation forms. - Add configurable QuickScript quality diagnostics for non-ASCII identifiers and problematic literal window names without changing language validity. +- Add canonical comment-based document metadata, InTouch KeyScript/shortcut and + Window-event classification, plus URI-aware cross-file QuickFunction + definition, references, hover, and completion independent of filename prefixes. ### V1.4.0 diff --git a/README.md b/README.md index e0dd73d..da02263 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ # Intouch-Language -- **Intouch-Language** is an open source extension created for **Visual Studio Code** (**Not official!**). It provides syntax highlighting, snippets, parser-based formatting, diagnostics, symbols, completion, hover, and local definition/reference support for Intouch Basic. It also includes the Intouch Dark theme. +- **Intouch-Language** is an open source extension created for **Visual Studio Code** (**Not official!**). It provides syntax highlighting, snippets, parser-based formatting, diagnostics, metadata-aware symbols, completion, hover, and local plus QuickFunction cross-file definition/reference support for Intouch Basic. It also includes the Intouch Dark theme. - **Intouch** is a programming language for AVEVA (Wonderware) SCADA Intouch Applications.

@@ -132,6 +132,8 @@ Repository governance starts at [AGENTS.md](AGENTS.md). QuickScript language boundaries and the language-server architecture are documented in [docs/language/quickscript.md](docs/language/quickscript.md) and [docs/architecture/intouch-core-preparation.md](docs/architecture/intouch-core-preparation.md). +The supported comment-based script metadata convention is documented in +[docs/language/document-metadata.md](docs/language/document-metadata.md). The extension uses its own QuickScript language server for `.vbi` and `.vi`. Formatting and semantic features share the editor-independent core tokenizer @@ -167,8 +169,9 @@ The following items are either recently resolved or planned but not yet implemen - Diagnostics cover unclosed or invalid block nesting, duplicate local `DIM` declarations, and unknown datatypes. - Formatting uses the shared tokenizer and recoverable structure parser. -- Definition and references are intentionally document-local; project-wide - indexing and range formatting remain planned. +- Definition and references are document-local for variables and cross-file for + metadata-declared workspace QuickFunctions; project-wide variable indexing + and range formatting remain planned. - NOTE: Multiline IF continuation indentation intentionally uses base + 2 spaces before THEN; THEN line stays aligned with expression by design. - NOTE: Spacing inside string literals and single-line brace comments is preserved intentionally; only outer code regions are normalized. diff --git a/docs/architecture/intouch-core-preparation.md b/docs/architecture/intouch-core-preparation.md index 111e9fc..ef89d0c 100644 --- a/docs/architecture/intouch-core-preparation.md +++ b/docs/architecture/intouch-core-preparation.md @@ -7,8 +7,9 @@ QuickScript source | v packages/core - tokenizer -> parser -> semantics -> quality diagnostics - -> language features + tokenizer -> document metadata extractor -> parser -> semantics + -> quality diagnostics + -> language features | | | +-> structural formatter | | @@ -49,10 +50,13 @@ formatter implementations have been removed. ## Semantic model and language features -Each `.vbi` or `.vi` document is currently one local scope. `DIM` declarations -provide local variable symbols and case-insensitive uses. Navigation resolves -only those declarations; unknown identifiers, member accesses, and external -call targets are not guessed. +Each `.vbi` or `.vi` document has one canonical metadata model and one local +scope. Metadata is extracted only from comment tokens, with explicit `@` +fields taking priority over structured legacy headers and filename fallbacks. +`DIM` declarations provide local variable symbols and case-insensitive uses. +A URI-aware incremental language-server index adds cross-file QuickFunction +definitions and call references without moving editor or transport types into +core. Core diagnostics currently cover: @@ -75,8 +79,8 @@ QuickFunction and parameter declarations extracted from metadata comment tokens. Window strings are inspected only as arguments of documented window commands/functions. -The language service provides document symbols, local definition and reference -results, completion, and hover. Completion includes QuickScript keywords and +The language service provides metadata-aware document symbols, local and +cross-file definition/reference results, completion, and hover. Completion includes QuickScript keywords and datatypes, document locals and call targets, and known InTouch/Hermes function names. The function catalog is generated from `syntaxes/intouch.tmLanguage.json`; it is not maintained as a parallel manual @@ -89,7 +93,10 @@ The language server supports initialize/shutdown, incremental text document synchronization, document formatting, document symbols, definition, references, completion, hover, and publish diagnostics. Feature conversion is unit-tested independently, and a child-process protocol test exercises the -server lifecycle and representative requests without a VS Code process. +server lifecycle plus cross-file workspace requests without a VS Code process. +The initial workspace scan reads `.vbi` and `.vi` once. Open/change and watched +file events replace only the affected URI entry; requests do not reread or +reparse every workspace file. `src/extension.ts` contains no parser, formatter, or semantic logic. It starts `dist/server.js` through `vscode-languageclient`, registers `vbi-format` as a @@ -100,10 +107,17 @@ snippets and the theme remain declarative VS Code assets. ## Deliberate limits before manual HIL - Formatting is document-wide; selection/range formatting is not advertised. -- Definition and references are document-local and require a proven `DIM` - declaration. -- QuickFunction metadata supports workspace call-target resolution but does not - invent executable declaration syntax or cross-file navigation ranges. +- Local-variable navigation remains document-local. +- QuickFunction metadata supplies callable workspace symbols, cross-file + definition/reference locations, signatures, hover, and completion without + inventing executable declaration syntax. +- Window, Application, DataChange, Condition, and KeyScript documents are + non-callable workspace symbols. Window events are limited to `OnShow`, + `WhileRunning`, and `OnClose`. +- Signature metadata is canonical, but an LSP Signature Help provider remains + planned. +- Duplicate Window-event diagnostics remain deferred until version/backup + exports can be distinguished reliably. - Project-wide variable symbol indexing and cross-file variable navigation are not implemented. - `.vbi` and `.vi` remain excluded from Serena semantic indexing; the native diff --git a/docs/language/document-metadata.md b/docs/language/document-metadata.md new file mode 100644 index 0000000..0c16cc9 --- /dev/null +++ b/docs/language/document-metadata.md @@ -0,0 +1,183 @@ +# QuickScript Document Metadata + +## Purpose and syntax boundary + +QuickScript document metadata describes the script container around executable +QuickScript. It is stored inside an ordinary brace comment and is not native +QuickScript syntax. The tokenizer emits the complete block as comment trivia; +the metadata extractor is a separate consumer of that same lossless comment +token. + +```text +{> +@ScriptType QuickFunction +@Name GetSomething +@Description Returns something useful. +@Param Source MESSAGE Source value. +@Param Index INTEGER Requested index. +@Returns MESSAGE +{<} +``` + +Metadata text cannot produce parser or semantic diagnostics as executable code. +Metadata-specific diagnostics use the `intouch-metadata` source. Formatting may +move the whole comment block to its structural indentation while preserving its +content and relative internal indentation. + +## Canonical document types + +The editor-independent core model supports these canonical script types: + +- `QuickFunction`: a callable workspace function; +- `DataChange`: a data-change script with optional trigger metadata; +- `Condition`: a condition script with optional trigger and condition event; +- `Application`: an application script; +- `Window`: a non-callable window event script; +- `KeyScript`: a non-callable canonical InTouch shortcut script; +- `Generic`: valid QuickScript without a more specific classification; +- `Unknown`: structured metadata named a script type that is not yet modeled. + +`KeyScript` is an InTouch document type, not a project-specific helper type. +Its shortcut is modeled separately from executable QuickScript. + +## Explicit fields + +Field names are matched case-insensitively. The canonical spellings below are +recommended. Leading and trailing horizontal whitespace is ignored; field +values are otherwise preserved. + +| Field | Value | +| --- | --- | +| `@ScriptType` | One canonical script type listed above. | +| `@Name` | Document, function, window, or script name. | +| `@Description` | One-line sourced description. | +| `@Event` | Window event, or a sourced Application/Condition event. | +| `@Trigger` | DataChange/Condition trigger symbol. | +| `@Shortcut` | KeyScript shortcut such as `Ctrl+d`. | +| `@Param` | `Name TYPE Description...`; description is optional. | +| `@Returns` | QuickFunction return datatype. | + +The initial parameter datatypes are `DISCRETE`, `INTEGER`, `MESSAGE`, and +`REAL`. Parameters remain ordered. The model contains enough signature data for +completion and hover. LSP Signature Help is intentionally deferred until a +separate provider is implemented. + +Unknown `@` fields produce the informational `unknown-metadata-field` +diagnostic. Missing or malformed values produce `invalid-metadata-value`. +Unknown explicit script types produce `invalid-script-type`. + +## Window scripts + +Only these Window events are canonical in the initial model: + +- `OnShow`; +- `WhileRunning`; +- `OnClose`. + +```text +{> +@ScriptType Window +@Name MainOverview +@Event OnShow +@Description Initializes the window when it is opened. +{<} +``` + +Event values are matched case-insensitively and normalized to the canonical +spelling. Other Window events produce `invalid-window-event`. A Window script +is indexed as a non-callable Window container plus a WindowEvent symbol, so its +name does not resolve `CALL MainOverview()` and is not offered as a function +completion. A Window return type conflicts with its document type. + +Duplicate Window-event diagnostics are deliberately deferred. Versioned or +backup exports cannot yet be distinguished reliably enough to avoid false +positives. Documents with explicit Window metadata are still grouped by Window +name and event in the workspace symbol model. + +## KeyScripts + +A KeyScript can use explicit metadata: + +```text +{> +@ScriptType KeyScript +@Name OpenPrintWindow +@Shortcut Ctrl+d +{<} +``` + +Legacy `Type: KeyScript` and `Shortcut:` fields are also supported. KeyScripts +appear as non-callable document symbols and never enter QuickFunction +resolution or completion. + +## Legacy header compatibility + +Structured classic headers remain supported: + +```text +{> +Script: +Type: QuickFunction +Name: GetSomething + +Parameters: +Message Source +Integer Index +{<} +``` + +The extractor recognizes structured legacy labels only in a comment containing +`Script:` or a `Type:` plus an identity field. Supported real-corpus mappings +include: + +- `QuickFunction` -> `QuickFunction`; +- `datachange` -> `DataChange`, with `Tagname[.field]:` as its trigger; +- `ConditionalScript` -> `Condition`, with `Condition:` as its trigger and + `Condition Type:` as its sourced event; +- `ApplicationScript` -> `Application`; +- `KeyScript` -> `KeyScript`, with `Shortcut:` as its shortcut. + +Legacy parameter lines use `TYPE Name Description...`. Arbitrary comments that +merely contain words such as `function`, `window`, or `script` are not metadata. + +## Source priority and conflicts + +Each field follows this priority: + +1. explicit `@` metadata; +2. structured classic headers; +3. unambiguous InTouch export metadata when a separate source becomes + available; +4. filename fallback; +5. `Generic` or `Unknown`. + +The current real corpus represents export context through structured classic +headers, so there is no separate non-comment export source yet. The canonical +model reserves that source without guessing one. + +When explicit and legacy values disagree, the explicit value wins and a +warning-level `metadata-conflict` identifies the lower-priority value. Known +field/type incompatibilities also use `metadata-conflict`; they are never +QuickScript syntax errors. + +Filename conventions are fallback hints only. In the absence of structured +metadata, `QF_`, `DCH_`, `CS_`, `APP_`, and `KEY_` can classify a document and +remove a trailing numeric version. Metadata always overrides the filename. + +## Workspace behavior + +The language server incrementally indexes `.vbi` and `.vi` documents by URI. +Each entry retains canonical metadata, symbol kind, callability, definition +range, and call references. A QuickFunction declared in +`SomethingCompletelyDifferent.vbi` is therefore resolved by `@Name`, without a +`QF_` prefix. + +Workspace QuickFunctions provide cross-file diagnostics, completion, hover, +definition, and references. A workspace definition has richer information and +takes precedence over a static native or Hermes catalog entry with the same +name. Duplicate QuickFunction definitions produce deterministic duplicate and +ambiguity diagnostics; definition requests never choose an arbitrary file. + +Trigger metadata is represented as a semantic reference without inventing a +global-variable definition or producing an `unknown-variable` diagnostic. +Project-wide tag-dictionary indexing remains outside this metadata block. diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index 807d8a0..da2d4e9 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -39,8 +39,8 @@ describes ownership and architecture; it does not define a second grammar. Serena excludes QuickScript because it does not natively support this language. ProjectAtlas may index `.vbi` and `.vi` as neutral text for repository navigation and lexical search. The extension's native language server supplies -QuickScript symbols, document-local definitions/references, completion, hover, -formatting, and diagnostics. +QuickScript symbols, local and QuickFunction cross-file +definitions/references, completion, hover, formatting, and diagnostics. ## Implemented architecture @@ -82,10 +82,18 @@ one block while preserving relative indentation inside it. Known callable resolution combines the generated native InTouch and Hermes catalog entries with QuickFunction declarations discovered in the current document and workspace. The generated entries retain their catalog category; -workspace declarations remain a separate source. Configurable activation of +workspace declarations remain a separate, richer source and take precedence +for definition and hover. Configurable activation of additional project-specific catalogs is planned rather than inferred from individual call sites. +Document/script classification comes from the canonical comment-based metadata +model described in [QuickScript Document Metadata](document-metadata.md). +Explicit `@` metadata and structured classic headers take priority over +filename conventions. QuickFunction names therefore do not require `QF_`. +Window scripts (`OnShow`, `WhileRunning`, `OnClose`) and canonical InTouch +KeyScripts/shortcuts are non-callable document symbols. + ## Diagnostic layers Diagnostics retain three separate responsibilities: From db5f020f526d468195f5ab6ea21f4777374281c7 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:02:00 +0200 Subject: [PATCH 34/40] chore(release): prepare metadata HIL version 1.5.7 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3ccfb27..3635baf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.6", + "version": "1.5.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.6", + "version": "1.5.7", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index 0f7e52c..b919f10 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.6", + "version": "1.5.7", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { From 65d0cb986074a6a93e12278685168c0cc1c3ec70 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:28:26 +0200 Subject: [PATCH 35/40] fix(language): normalize Windows workspace document identities --- dist/server.js | 40 ++++++++-------- package-lock.json | 4 +- package.json | 2 +- .../language-server/src/workspaceFunctions.ts | 2 +- .../language-server/src/workspaceSymbols.ts | 38 ++++++++++++--- .../language-server/test/features.test.ts | 48 ++++++++++++++++--- 6 files changed, 96 insertions(+), 38 deletions(-) diff --git a/dist/server.js b/dist/server.js index 313dc59..a2bda42 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,36 +1,36 @@ -"use strict";var Ho=Object.defineProperty;var gh=Object.getOwnPropertyDescriptor;var ph=Object.getOwnPropertyNames;var yh=Object.prototype.hasOwnProperty;var za=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Va=(e,t)=>{for(var n in t)Ho(e,n,{get:t[n],enumerable:!0})},Th=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ph(t))!yh.call(e,o)&&o!==n&&Ho(e,o,{get:()=>t[o],enumerable:!(r=gh(t,o))||r.enumerable});return e};var cr=e=>Th(Ho({},"__esModule",{value:!0}),e);var ar=I(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolean=_h;Fe.string=Ka;Fe.number=bh;Fe.error=vh;Fe.func=Xa;Fe.array=Za;Fe.stringArray=Ch;Fe.typedArray=Sh;Fe.thenable=Ih;function _h(e){return e===!0||e===!1}function Ka(e){return typeof e=="string"||e instanceof String}function bh(e){return typeof e=="number"||e instanceof Number}function vh(e){return e instanceof Error}function Xa(e){return typeof e=="function"}function Za(e){return Array.isArray(e)}function Ch(e){return Za(e)&&e.every(t=>Ka(t))}function Sh(e,t){return Array.isArray(e)&&e.every(t)}function Ih(e){return e&&Xa(e.then)}});var Kt=I(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.boolean=Dh;Je.string=Ya;Je.number=wh;Je.error=kh;Je.func=Ph;Je.array=Ja;Je.stringArray=Rh;function Dh(e){return e===!0||e===!1}function Ya(e){return typeof e=="string"||e instanceof String}function wh(e){return typeof e=="number"||e instanceof Number}function kh(e){return e instanceof Error}function Ph(e){return typeof e=="function"}function Ja(e){return Array.isArray(e)}function Rh(e){return Ja(e)&&e.every(t=>Ya(t))}});var li=I(P=>{"use strict";var Oh=P&&P.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xh=P&&P.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mh=P&&P.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.LRUCache=mt.LinkedMap=mt.Touch=void 0;var de;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(de||(mt.Touch=de={}));var ur=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=de.None){let r=this._map.get(t);if(r)return n!==de.None&&this.touch(r,n),r.value}set(t,n,r=de.None){let o=this._map.get(t);if(o)o.value=n,r!==de.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case de.None:this.addItemLast(o);break;case de.First:this.addItemFirst(o);break;case de.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==de.First&&n!==de.Last)){if(n===de.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===de.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};mt.LinkedMap=ur;var di=class extends ur{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=de.AsNew){return super.get(t,n)}peek(t){return super.get(t,de.None)}set(t,n){return super.set(t,n,de.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};mt.LRUCache=di});var nu=I(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.Disposable=void 0;var tu;(function(e){function t(n){return{dispose:n}}e.create=t})(tu||(lr.Disposable=tu={}))});var ht=I(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});var mi;function hi(){if(mi===void 0)throw new Error("No runtime abstraction layer installed");return mi}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");mi=n}e.install=t})(hi||(hi={}));gi.default=hi});var Xt=I(gt=>{"use strict";var Eh=gt&>.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gt,"__esModule",{value:!0});gt.Emitter=gt.Event=void 0;var Ah=Eh(ht()),ru;(function(e){let t={dispose(){}};e.None=function(){return t}})(ru||(gt.Event=ru={}));var pi=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new pi),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};gt.Emitter=yi});var mr=I(Ie=>{"use strict";var qh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Nh=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fh=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.SharedArrayReceiverStrategy=Zt.SharedArraySenderStrategy=void 0;var Wh=mr(),Pn;(function(e){e.Continue=0,e.Cancelled=1})(Pn||(Pn={}));var bi=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Pn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Pn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Zt.SharedArraySenderStrategy=bi;var vi=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Pn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ci=class{token;constructor(t){this.token=new vi(t)}cancel(){}dispose(){}},Si=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Wh.CancellationTokenSource:new Ci(n)}};Zt.SharedArrayReceiverStrategy=Si});var Di=I(Yt=>{"use strict";var Uh=Yt&&Yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.Semaphore=void 0;var Qh=Uh(ht()),Ii=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Qh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Yt.Semaphore=Ii});var su=I(fe=>{"use strict";var Bh=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$h=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),zh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,ki.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};fe.ReadableStreamMessageReader=Ri});var du=I(me=>{"use strict";var Xh=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zh=me&&me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yh=me&&me.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(tg,r.byteLength.toString(),uu),o.push(uu),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};me.WriteableStreamMessageWriter=xi});var fu=I(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.AbstractMessageBuffer=void 0;var ng=13,rg=10,og=`\r -`,Mi=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};pr.AbstractMessageBuffer=Mi});var pu=I(O=>{"use strict";var ig=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),sg=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cg=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},log:()=>{}});var H;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(H||(O.Trace=H={}));var Fi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Fi||(O.TraceValue=Fi={}));O.TraceValues=Fi;(function(e){function t(r){if(!Z.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(H||(O.Trace=H={}));var Pe;(function(e){e.Text="text",e.JSON="json"})(Pe||(O.TraceFormat=Pe={}));(function(e){function t(n){return Z.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Pe||(O.TraceFormat=Pe={}));var Gi;(function(e){e.type=new E.NotificationType("$/setTrace")})(Gi||(O.SetTraceNotification=Gi={}));var yr;(function(e){e.type=new E.NotificationType("$/logTrace")})(yr||(O.LogTraceNotification=yr={}));var Mn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Mn||(O.ConnectionErrors=Mn={}));var en=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=en;var Hi;(function(e){function t(n){let r=n;return r&&Z.func(r.cancelUndispatched)}e.is=t})(Hi||(O.ConnectionStrategy=Hi={}));var Tr;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(Tr||(O.IdCancellationReceiverStrategy=Tr={}));var ji;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(ji||(O.RequestCancellationReceiverStrategy=ji={}));var _r;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Ei.CancellationTokenSource}});function t(n){return Tr.is(n)||ji.is(n)}e.is=t})(_r||(O.CancellationReceiverStrategy=_r={}));var br;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(En.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&Z.func(r.sendCancellation)&&Z.func(r.cleanup)}e.is=t})(br||(O.CancellationSenderStrategy=br={}));var vr;(function(e){e.Message=Object.freeze({receiver:_r.Message,sender:br.Message});function t(n){let r=n;return r&&_r.is(r.receiver)&&br.is(r.sender)}e.is=t})(vr||(O.CancellationStrategy=vr={}));var Cr;(function(e){function t(n){let r=n;return r&&Z.func(r.handleMessage)}e.is=t})(Cr||(O.MessageStrategy=Cr={}));var gu;(function(e){function t(n){let r=n;return r&&(vr.is(r.cancellationStrategy)||Hi.is(r.connectionStrategy)||Cr.is(r.messageStrategy)||Z.number(r.maxParallelism))}e.is=t})(gu||(O.ConnectionOptions=gu={}));var Ge;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Ge||(Ge={}));function ug(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,c=0,g="2.0",d=r?.maxParallelism??-1,h=0,b,m=new Map,T,D=new Map,q=new Map,N,x=new hu.LinkedMap,p=new Map,l=new Set,C=new Map,k=H.Off,M=Pe.Text,L,K=Ge.New,Ze=new On.Emitter,Aa=new On.Emitter,qa=new On.Emitter,Na=new On.Emitter,Fa=new On.Emitter,lt=r&&r.cancellationStrategy?r.cancellationStrategy:vr.Message;function Ym(u){}function Ga(){return K===Ge.Listening}function Ha(){return K===Ge.Closed}function zt(){return K===Ge.Disposed}function ja(){(K===Ge.New||K===Ge.Listening)&&(K=Ge.Closed,Aa.fire(void 0))}function Jm(u){Ze.fire([u,void 0,void 0])}function eh(u){Ze.fire(u)}e.onClose(ja),e.onError(Jm),t.onClose(ja),t.onError(eh);function La(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function th(u){return u===null?"res-unknown-"+(++c).toString():"res-"+u.toString()}function nh(){return"not-"+(++s).toString()}function rh(u,v){E.Message.isRequest(v)?u.set(La(v.id),v):E.Message.isResponse(v)?d===-1?u.set(th(v.id),v):Ua(v):u.set(nh(),v)}function qo(){N||x.size===0||d!==-1&&h>=d||(N=(0,mu.default)().timer.setImmediate(async()=>{if(N=void 0,x.size===0||d!==-1&&h>=d)return;let u=x.shift(),v;try{h++;let S=r?.messageStrategy;Cr.is(S)?v=S.handleMessage(u,Wa):v=Wa(u)}catch(S){o.error(`Processing message queue failed: ${S.toString()}`)}finally{v instanceof Promise?v.then(()=>{h--,qo()}).catch(S=>{o.error(`Processing message queue failed: ${S.toString()}`)}):h--,qo()}}))}async function Wa(u){return E.Message.isRequest(u)?ih(u):E.Message.isNotification(u)?sh(u):E.Message.isResponse(u)?Ua(u):ch(u)}let oh=u=>{try{if(E.Message.isNotification(u)&&u.method===En.type.method){let v=u.params.id,S=La(v),R=x.get(S);if(E.Message.isRequest(R)){let X=r?.connectionStrategy,W=X&&X.cancelUndispatched?X.cancelUndispatched(R,Ym):void 0;if(W&&(W.error!==void 0||W.result!==void 0)){x.delete(S),C.delete(v),W.id=R.id,No(W,u.method,Date.now()),t.write(W).catch(()=>o.error("Sending response for canceled message failed."));return}}let G=C.get(v);if(G!==void 0){G.cancel(),Fo(u);return}else l.add(v)}rh(x,u)}finally{qo()}};async function ih(u){if(zt())return Promise.resolve();function v(oe,le,J){let ee={jsonrpc:g,id:u.id};return oe instanceof E.ResponseError?ee.error=oe.toJson():ee.result=oe===void 0?null:oe,No(ee,le,J),t.write(ee)}function S(oe,le,J){let ee={jsonrpc:g,id:u.id,error:oe.toJson()};return No(ee,le,J),t.write(ee)}lh(u);let R=m.get(u.method),G,X;R&&(G=R.type,X=R.handler);let W=Date.now();if(X||b){let oe=u.id??String(Date.now()),le=Tr.is(lt.receiver)?lt.receiver.createCancellationTokenSource(oe):lt.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&le.cancel(),u.id!==null&&C.set(oe,le);try{let J;if(X)if(u.params===void 0){if(G!==void 0&&G.numberOfParams!==0)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines ${G.numberOfParams} params but received none.`),u.method,W);J=X(le.token)}else if(Array.isArray(u.params)){if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byName)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,W);J=X(...u.params,le.token)}else{if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byPosition)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,W);J=X(u.params,le.token)}else b&&(J=b(u.method,u.params,le.token));let ee=await J;await v(ee,u.method,W)}catch(J){J instanceof E.ResponseError?await v(J,u.method,W):J&&Z.string(J.message)?await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,W):await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,W)}finally{C.delete(oe)}}else await S(new E.ResponseError(E.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,W)}function Ua(u){if(!zt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let v=u.id,S=p.get(v);if(dh(u,S),S!==void 0){p.delete(v);try{if(u.error){let R=u.error;S.reject(new E.ResponseError(R.code,R.message,R.data))}else if(u.result!==void 0)S.resolve(u.result);else throw new Error("Should never happen.")}catch(R){R.message?o.error(`Response handler '${S.method}' failed with message: ${R.message}`):o.error(`Response handler '${S.method}' failed unexpectedly.`)}}}}async function sh(u){if(zt())return;let v,S;if(u.method===En.type.method){let R=u.params.id;l.delete(R),Fo(u);return}else{let R=D.get(u.method);R&&(S=R.handler,v=R.type)}if(S||T)try{if(Fo(u),S)if(u.params===void 0)v!==void 0&&v.numberOfParams!==0&&v.parameterStructures!==E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received none.`),await S();else if(Array.isArray(u.params)){let R=u.params;u.method===xn.type.method&&R.length===2&&Ai.is(R[0])?await S({token:R[0],value:R[1]}):(v!==void 0&&(v.parameterStructures===E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),v.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received ${R.length} arguments`)),await S(...R))}else v!==void 0&&v.parameterStructures===E.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await S(u.params);else T&&await T(u.method,u.params)}catch(R){R.message?o.error(`Notification handler '${u.method}' failed with message: ${R.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else qa.fire(u)}function ch(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let v=u;if(Z.string(v.id)||Z.number(v.id)){let S=v.id,R=p.get(S);R&&R.reject(new Error("The received response has neither a result nor an error property."))}}function dt(u){if(u!=null)switch(k){case H.Verbose:return JSON.stringify(u,null,4);case H.Compact:return JSON.stringify(u);default:return}}function ah(u){if(!(k===H.Off||!L))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${dt(u.params)}`),L.log(`Sending request '${u.method} - (${u.id})'.`,v)}else Vt("send-request",u)}function uh(u){if(!(k===H.Off||!L))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${dt(u.params)}`:v="No parameters provided."),L.log(`Sending notification '${u.method}'.`,v)}else Vt("send-notification",u)}function No(u,v,S){if(!(k===H.Off||!L))if(M===Pe.Text){let R;(k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?R=`Error data: ${dt(u.error.data)}`:u.result?R=`Result: ${dt(u.result)}`:u.error===void 0&&(R="No result returned.")),L.log(`Sending response '${v} - (${u.id})'. Processing request took ${Date.now()-S}ms`,R)}else Vt("send-response",u)}function lh(u){if(!(k===H.Off||!L))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${dt(u.params)}`),L.log(`Received request '${u.method} - (${u.id})'.`,v)}else Vt("receive-request",u)}function Fo(u){if(!(k===H.Off||!L||u.method===yr.type.method))if(M===Pe.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${dt(u.params)}`:v="No parameters provided."),L.log(`Received notification '${u.method}'.`,v)}else Vt("receive-notification",u)}function dh(u,v){if(!(k===H.Off||!L))if(M===Pe.Text){let S;if((k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?S=`Error data: ${dt(u.error.data)}`:u.result?S=`Result: ${dt(u.result)}`:u.error===void 0&&(S="No result returned.")),v){let R=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";L.log(`Received response '${v.method} - (${u.id})' in ${Date.now()-v.timerStart}ms.${R}`,S)}else L.log(`Received response ${u.id} without active response promise.`,S)}else Vt("receive-response",u)}function Vt(u,v){if(!L||k===H.Off)return;let S={isLSPMessage:!0,type:u,message:v,timestamp:Date.now()};L.log(S)}function Dn(){if(Ha())throw new en(Mn.Closed,"Connection is closed.");if(zt())throw new en(Mn.Disposed,"Connection is disposed.")}function fh(){if(Ga())throw new en(Mn.AlreadyListening,"Connection is already listening")}function mh(){if(!Ga())throw new Error("Call listen() first.")}function wn(u){return u===void 0?null:u}function Qa(u){if(u!==null)return u}function Ba(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Go(u,v){switch(u){case E.ParameterStructures.auto:return Ba(v)?Qa(v):[wn(v)];case E.ParameterStructures.byName:if(!Ba(v))throw new Error("Received parameters by name but param is not an object literal.");return Qa(v);case E.ParameterStructures.byPosition:return[wn(v)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function $a(u,v){let S,R=u.numberOfParams;switch(R){case 0:S=void 0;break;case 1:S=Go(u.parameterStructures,v[0]);break;default:S=[];for(let G=0;G{Dn();let S,R;if(Z.string(u)){S=u;let X=v[0],W=0,oe=E.ParameterStructures.auto;E.ParameterStructures.is(X)&&(W=1,oe=X);let le=v.length,J=le-W;switch(J){case 0:R=void 0;break;case 1:R=Go(oe,v[W]);break;default:if(oe===E.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);R=v.slice(W,le).map(ee=>wn(ee));break}}else{let X=v;S=u.method,R=$a(u,X)}let G={jsonrpc:g,method:S,params:R};return uh(G),t.write(G).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,v)=>{Dn();let S;return Z.func(u)?T=u:v&&(Z.string(u)?(S=u,D.set(u,{type:void 0,handler:v})):(S=u.method,D.set(u.method,{type:u,handler:v}))),{dispose:()=>{S!==void 0?D.get(S)?.handler===v&&D.delete(S):T===u&&(T=void 0)}}},onProgress:(u,v,S)=>{if(q.has(v))throw new Error(`Progress handler for token ${v} already registered`);return q.set(v,S),{dispose:()=>{q.get(v)===S&&q.delete(v)}}},sendProgress:(u,v,S)=>Ot.sendNotification(xn.type,{token:v,value:S}),onUnhandledProgress:Na.event,sendRequest:(u,...v)=>{Dn(),mh();function S(ee,Ne){let Ye=lt.sender.sendCancellation(ee,Ne);Ye===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Ne}`):Ye.catch(()=>{o.log(`Sending cancellation messages for id ${Ne} failed.`)})}let R,G,X;if(Z.string(u)){R=u;let ee=v[0],Ne=v[v.length-1],Ye=0,kn=E.ParameterStructures.auto;E.ParameterStructures.is(ee)&&(Ye=1,kn=ee);let xt=v.length;Ei.CancellationToken.is(Ne)&&(xt=xt-1,X=Ne);let Be=xt-Ye;switch(Be){case 0:G=void 0;break;case 1:G=Go(kn,v[Ye]);break;default:if(kn===E.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);G=v.slice(Ye,xt).map(hh=>wn(hh));break}}else{let ee=v;R=u.method,G=$a(u,ee);let Ne=u.numberOfParams;X=Ei.CancellationToken.is(ee[Ne])?ee[Ne]:void 0}let W=i++,oe,le=!1;X!==void 0&&(X.isCancellationRequested?le=!0:oe=X.onCancellationRequested(()=>{S(Ot,W)}));let J={jsonrpc:g,id:W,method:R,params:G};return ah(J),typeof lt.sender.enableCancellation=="function"&<.sender.enableCancellation(J),new Promise(async(ee,Ne)=>{let Ye=Be=>{ee(Be),lt.sender.cleanup(W),oe?.dispose()},kn=Be=>{Ne(Be),lt.sender.cleanup(W),oe?.dispose()},xt={method:R,timerStart:Date.now(),resolve:Ye,reject:kn};try{p.set(W,xt),await t.write(J),le&&S(Ot,W)}catch(Be){throw p.delete(W),xt.reject(new E.ResponseError(E.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),o.error("Sending request failed."),Be}})},onRequest:(u,v)=>{Dn();let S=null;return Ni.is(u)?(S=void 0,b=u):Z.string(u)?(S=null,v!==void 0&&(S=u,m.set(u,{handler:v,type:void 0}))):v!==void 0&&(S=u.method,m.set(u.method,{type:u,handler:v})),{dispose:()=>{S!==null&&(S!==void 0?m.get(S)?.handler===v&&m.delete(S):b===u&&(b=void 0))}}},hasPendingResponse:()=>p.size>0,trace:async(u,v,S)=>{let R=!1,G=Pe.Text;S!==void 0&&(Z.boolean(S)?R=S:(R=S.sendNotification||!1,G=S.traceFormat||Pe.Text)),k=u,M=G,k===H.Off?L=void 0:L=v,R&&!Ha()&&!zt()&&await Ot.sendNotification(Gi.type,{value:H.toString(u)})},onError:Ze.event,onClose:Aa.event,onUnhandledNotification:qa.event,onDispose:Fa.event,end:()=>{t.end()},dispose:()=>{if(zt())return;K=Ge.Disposed,Fa.fire(void 0);let u=new E.ResponseError(E.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let v of p.values())v.reject(u);p=new Map,C=new Map,l=new Set,x=new hu.LinkedMap,Z.func(t.dispose)&&t.dispose(),Z.func(e.dispose)&&e.dispose()},listen:()=>{Dn(),fh(),K=Ge.Listening,e.listen(oh)},inspect:()=>{(0,mu.default)().console.log("inspect")}};return Ot.onNotification(yr.type,u=>{if(k===H.Off||!L)return;let v=k===H.Verbose||k===H.Compact;L.log(u.message,v?u.verbose:void 0)}),Ot.onNotification(xn.type,async u=>{let v=q.get(u.token);v?await v(u.value):Na.fire(u)}),Ot}});var et=I(y=>{"use strict";var lg=y&&y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y,"__esModule",{value:!0});y.ProgressType=y.ProgressToken=y.createMessageConnection=y.NullLogger=y.ConnectionOptions=y.ConnectionStrategy=y.AbstractMessageBuffer=y.WriteableStreamMessageWriter=y.AbstractMessageWriter=y.MessageWriter=y.ReadableStreamMessageReader=y.AbstractMessageReader=y.MessageReader=y.SharedArrayReceiverStrategy=y.SharedArraySenderStrategy=y.CancellationToken=y.CancellationTokenSource=y.Emitter=y.Event=y.Disposable=y.LRUCache=y.Touch=y.LinkedMap=y.ParameterStructures=y.NotificationType9=y.NotificationType8=y.NotificationType7=y.NotificationType6=y.NotificationType5=y.NotificationType4=y.NotificationType3=y.NotificationType2=y.NotificationType1=y.NotificationType0=y.NotificationType=y.ErrorCodes=y.ResponseError=y.RequestType9=y.RequestType8=y.RequestType7=y.RequestType6=y.RequestType5=y.RequestType4=y.RequestType3=y.RequestType2=y.RequestType1=y.RequestType0=y.RequestType=y.Message=y.RAL=void 0;y.MessageStrategy=y.CancellationStrategy=y.CancellationSenderStrategy=y.RequestCancellationReceiverStrategy=y.IdCancellationReceiverStrategy=y.CancellationReceiverStrategy=y.ConnectionError=y.ConnectionErrors=y.LogTraceNotification=y.SetTraceNotification=y.TraceFormat=y.TraceValues=y.TraceValue=y.Trace=void 0;var $=li();Object.defineProperty(y,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(y,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(y,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(y,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(y,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(y,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(y,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(y,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(y,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(y,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(y,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(y,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(y,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(y,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(y,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(y,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(y,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(y,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(y,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(y,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(y,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(y,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(y,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(y,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(y,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(y,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var Li=fi();Object.defineProperty(y,"LinkedMap",{enumerable:!0,get:function(){return Li.LinkedMap}});Object.defineProperty(y,"LRUCache",{enumerable:!0,get:function(){return Li.LRUCache}});Object.defineProperty(y,"Touch",{enumerable:!0,get:function(){return Li.Touch}});var dg=nu();Object.defineProperty(y,"Disposable",{enumerable:!0,get:function(){return dg.Disposable}});var yu=Xt();Object.defineProperty(y,"Event",{enumerable:!0,get:function(){return yu.Event}});Object.defineProperty(y,"Emitter",{enumerable:!0,get:function(){return yu.Emitter}});var Tu=mr();Object.defineProperty(y,"CancellationTokenSource",{enumerable:!0,get:function(){return Tu.CancellationTokenSource}});Object.defineProperty(y,"CancellationToken",{enumerable:!0,get:function(){return Tu.CancellationToken}});var _u=ou();Object.defineProperty(y,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return _u.SharedArraySenderStrategy}});Object.defineProperty(y,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return _u.SharedArrayReceiverStrategy}});var Wi=su();Object.defineProperty(y,"MessageReader",{enumerable:!0,get:function(){return Wi.MessageReader}});Object.defineProperty(y,"AbstractMessageReader",{enumerable:!0,get:function(){return Wi.AbstractMessageReader}});Object.defineProperty(y,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Wi.ReadableStreamMessageReader}});var Ui=du();Object.defineProperty(y,"MessageWriter",{enumerable:!0,get:function(){return Ui.MessageWriter}});Object.defineProperty(y,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ui.AbstractMessageWriter}});Object.defineProperty(y,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ui.WriteableStreamMessageWriter}});var fg=fu();Object.defineProperty(y,"AbstractMessageBuffer",{enumerable:!0,get:function(){return fg.AbstractMessageBuffer}});var re=pu();Object.defineProperty(y,"ConnectionStrategy",{enumerable:!0,get:function(){return re.ConnectionStrategy}});Object.defineProperty(y,"ConnectionOptions",{enumerable:!0,get:function(){return re.ConnectionOptions}});Object.defineProperty(y,"NullLogger",{enumerable:!0,get:function(){return re.NullLogger}});Object.defineProperty(y,"createMessageConnection",{enumerable:!0,get:function(){return re.createMessageConnection}});Object.defineProperty(y,"ProgressToken",{enumerable:!0,get:function(){return re.ProgressToken}});Object.defineProperty(y,"ProgressType",{enumerable:!0,get:function(){return re.ProgressType}});Object.defineProperty(y,"Trace",{enumerable:!0,get:function(){return re.Trace}});Object.defineProperty(y,"TraceValue",{enumerable:!0,get:function(){return re.TraceValue}});Object.defineProperty(y,"TraceFormat",{enumerable:!0,get:function(){return re.TraceFormat}});Object.defineProperty(y,"SetTraceNotification",{enumerable:!0,get:function(){return re.SetTraceNotification}});Object.defineProperty(y,"LogTraceNotification",{enumerable:!0,get:function(){return re.LogTraceNotification}});Object.defineProperty(y,"ConnectionErrors",{enumerable:!0,get:function(){return re.ConnectionErrors}});Object.defineProperty(y,"ConnectionError",{enumerable:!0,get:function(){return re.ConnectionError}});Object.defineProperty(y,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return re.CancellationReceiverStrategy}});Object.defineProperty(y,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.IdCancellationReceiverStrategy}});Object.defineProperty(y,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.RequestCancellationReceiverStrategy}});Object.defineProperty(y,"CancellationSenderStrategy",{enumerable:!0,get:function(){return re.CancellationSenderStrategy}});Object.defineProperty(y,"CancellationStrategy",{enumerable:!0,get:function(){return re.CancellationStrategy}});Object.defineProperty(y,"MessageStrategy",{enumerable:!0,get:function(){return re.MessageStrategy}});Object.defineProperty(y,"TraceValues",{enumerable:!0,get:function(){return re.TraceValues}});var mg=lg(ht());y.RAL=mg.default});var Er={};Va(Er,{AnnotatedTextEdit:()=>tt,ApplyKind:()=>ds,ChangeAnnotation:()=>pt,ChangeAnnotationIdentifier:()=>ie,CodeAction:()=>ks,CodeActionContext:()=>ws,CodeActionKind:()=>Ds,CodeActionTag:()=>Rr,CodeActionTriggerKind:()=>jn,CodeDescription:()=>Ji,CodeLens:()=>Ps,Color:()=>Ir,ColorInformation:()=>zi,ColorPresentation:()=>Vi,Command:()=>Et,CompletionItem:()=>ms,CompletionItemKind:()=>ss,CompletionItemLabelDetails:()=>fs,CompletionItemTag:()=>as,CompletionList:()=>hs,CreateFile:()=>nn,DeleteFile:()=>on,Diagnostic:()=>Nn,DiagnosticRelatedInformation:()=>Dr,DiagnosticSeverity:()=>Zi,DiagnosticTag:()=>Yi,DocumentHighlight:()=>_s,DocumentHighlightKind:()=>Ts,DocumentLink:()=>Os,DocumentSymbol:()=>Is,DocumentUri:()=>Qi,EOL:()=>hg,FoldingRange:()=>Xi,FoldingRangeKind:()=>Ki,FormattingOptions:()=>Rs,Hover:()=>gs,InlayHint:()=>Hs,InlayHintKind:()=>Or,InlayHintLabelPart:()=>xr,InlineCompletionContext:()=>Qs,InlineCompletionItem:()=>js,InlineCompletionList:()=>Ls,InlineCompletionTriggerKind:()=>Ws,InlineValueContext:()=>Gs,InlineValueEvaluatableExpression:()=>Fs,InlineValueText:()=>qs,InlineValueVariableLookup:()=>Ns,InsertReplaceEdit:()=>us,InsertTextFormat:()=>cs,InsertTextMode:()=>ls,LanguageKind:()=>os,Location:()=>qn,LocationLink:()=>$i,MarkedString:()=>Hn,MarkupContent:()=>yt,MarkupKind:()=>Pr,OptionalVersionedTextDocumentIdentifier:()=>Gn,ParameterInformation:()=>ps,Position:()=>xe,Range:()=>Y,RenameFile:()=>rn,SelectedCompletionInfo:()=>Us,SelectionRange:()=>xs,SemanticTokenModifiers:()=>Es,SemanticTokenTypes:()=>Ms,SemanticTokens:()=>As,SignatureInformation:()=>ys,SnippetTextEdit:()=>es,StringValue:()=>Mr,SymbolInformation:()=>Cs,SymbolKind:()=>bs,SymbolTag:()=>vs,TextDocument:()=>$s,TextDocumentEdit:()=>Fn,TextDocumentIdentifier:()=>ns,TextDocumentItem:()=>is,TextEdit:()=>$e,URI:()=>Sr,VersionedTextDocumentIdentifier:()=>rs,WorkspaceChange:()=>ts,WorkspaceEdit:()=>wr,WorkspaceFolder:()=>Bs,WorkspaceSymbol:()=>Ss,integer:()=>Bi,uinteger:()=>An});var Qi,Sr,Bi,An,xe,Y,qn,$i,Ir,zi,Vi,Ki,Xi,Dr,Zi,Yi,Ji,Nn,Et,$e,pt,ie,tt,Fn,nn,rn,on,wr,tn,es,kr,ts,ns,rs,Gn,os,is,Pr,yt,ss,cs,as,us,ls,ds,fs,ms,hs,Hn,gs,ps,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,jn,ws,Rr,ks,Ps,Rs,Os,xs,Ms,Es,As,qs,Ns,Fs,Gs,Or,xr,Hs,Mr,js,Ls,Ws,Us,Qs,Bs,hg,$s,zs,f,Ar=za(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Qi||(Qi={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(Sr||(Sr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Bi||(Bi={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(An||(An={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=An.MAX_VALUE),o===Number.MAX_VALUE&&(o=An.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(xe||(xe={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:xe.create(r,o),end:xe.create(i,s)};if(xe.is(r)&&xe.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.start)&&xe.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(qn||(qn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.targetRange)&&f.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})($i||($i={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(Ir||(Ir={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&Ir.is(o.color)}e.is=n})(zi||(zi={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||$e.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,$e.is))}e.is=n})(Vi||(Vi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ki||(Ki={}));(function(e){function t(r,o,i,s,c,g){let d={startLine:r,endLine:o};return f.defined(i)&&(d.startCharacter=i),f.defined(s)&&(d.endCharacter=s),f.defined(c)&&(d.kind=c),f.defined(g)&&(d.collapsedText=g),d}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Xi||(Xi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&qn.is(o.location)&&f.string(o.message)}e.is=n})(Dr||(Dr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Zi||(Zi={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Yi||(Yi={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(Ji||(Ji={}));(function(e){function t(i,s,c,g,d,h){let b={range:i,message:s};return f.defined(c)&&(b.severity=c),f.defined(g)&&(b.code=g),f.defined(d)&&(b.source=d),f.defined(h)&&(b.relatedInformation=h),b}e.create=t;function n(i){var s;let c=i;return f.defined(c)&&Y.is(c.range)&&(f.string(c.message)||yt.is(c.message))&&(f.number(c.severity)||f.undefined(c.severity))&&(f.integer(c.code)||f.string(c.code)||f.undefined(c.code))&&(f.undefined(c.codeDescription)||f.string((s=c.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(c.source)||f.undefined(c.source))&&(f.undefined(c.relatedInformation)||f.typedArray(c.relatedInformation,Dr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(yt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Nn||(Nn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(Et||(Et={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Y.is(s.range)}e.is=o})($e||($e={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(pt||(pt={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(ie||(ie={}));(function(e){function t(i,s,c){return{range:i,newText:s,annotationId:c}}e.replace=t;function n(i,s,c){return{range:{start:i,end:i},newText:s,annotationId:c}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return $e.is(s)&&(pt.is(s.annotationId)||ie.is(s.annotationId))}e.is=o})(tt||(tt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Gn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Fn||(Fn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(nn||(nn={}));(function(e){function t(r,o,i,s){let c={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(c.options=i),s!==void 0&&(c.annotationId=s),c}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(rn||(rn={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(on||(on={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?nn.is(o)||rn.is(o)||on.is(o):Fn.is(o)))}e.is=t})(wr||(wr={}));tn=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=$e.insert(t,n):ie.is(r)?(i=r,o=tt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=$e.replace(t,n):ie.is(r)?(i=r,o=tt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=tt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=$e.del(t):ie.is(n)?(o=n,r=tt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=tt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Y.is(r.range)&&Mr.isSnippet(r.snippet)&&(r.annotationId===void 0||pt.is(r.annotationId)||ie.is(r.annotationId))}e.is=t})(es||(es={}));kr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ie.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},ts=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new kr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Fn.is(n)){let r=new tn(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new tn(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Gn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new tn(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new tn(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;pt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=nn.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=nn.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;pt.is(r)||ie.is(r)?i=r:o=r;let s,c;if(i===void 0?s=rn.create(t,n,o):(c=ie.is(i)?i:this._changeAnnotations.manage(i),s=rn.create(t,n,o,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;pt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=on.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=on.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(ns||(ns={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(rs||(rs={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(Gn||(Gn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(os||(os={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(is||(is={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Pr||(Pr={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&Pr.is(r.kind)&&f.string(r.value)}e.is=t})(yt||(yt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ss||(ss={}));(function(e){e.PlainText=1,e.Snippet=2})(cs||(cs={}));(function(e){e.Deprecated=1})(as||(as={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(us||(us={}));(function(e){e.asIs=1,e.adjustIndentation=2})(ls||(ls={}));(function(e){e.Replace=1,e.Merge=2})(ds||(ds={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(fs||(fs={}));(function(e){function t(n){return{label:n}}e.create=t})(ms||(ms={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(hs||(hs={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(Hn||(Hn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(yt.is(r.contents)||Hn.is(r.contents)||f.typedArray(r.contents,Hn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(gs||(gs={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ps||(ps={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(ys||(ys={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(Ts||(Ts={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(_s||(_s={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(bs||(bs={}));(function(e){e.Deprecated=1})(vs||(vs={}));(function(e){function t(n,r,o,i,s){let c={name:n,kind:r,location:{uri:i,range:o}};return s&&(c.containerName=s),c}e.create=t})(Cs||(Cs={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(Ss||(Ss={}));(function(e){function t(r,o,i,s,c,g){let d={name:r,detail:o,kind:i,range:s,selectionRange:c};return g!==void 0&&(d.children=g),d}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(Is||(Is={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(Ds||(Ds={}));(function(e){e.Invoked=1,e.Automatic=2})(jn||(jn={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,Nn.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===jn.Invoked||o.triggerKind===jn.Automatic)}e.is=n})(ws||(ws={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Rr||(Rr={}));(function(e){function t(r,o,i){let s={title:r},c=!0;return typeof o=="string"?(c=!1,s.kind=o):Et.is(o)?s.command=o:s.edit=o,c&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,Nn.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Et.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||wr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Rr.is))}e.is=n})(ks||(ks={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.command)||Et.is(o.command))}e.is=n})(Ps||(Ps={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(Rs||(Rs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Os||(Os={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(xs||(xs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Ms||(Ms={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Es||(Es={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(As||(As={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.string(o.text)}e.is=n})(qs||(qs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(Ns||(Ns={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Fs||(Fs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(Gs||(Gs={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Or||(Or={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||yt.is(o.tooltip))&&(o.location===void 0||qn.is(o.location))&&(o.command===void 0||Et.is(o.command))}e.is=n})(xr||(xr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&xe.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,xr.is))&&(o.kind===void 0||Or.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,$e.is)&&(o.tooltip===void 0||f.string(o.tooltip)||yt.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(Hs||(Hs={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Mr||(Mr={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(js||(js={}));(function(e){function t(n){return{items:n}}e.create=t})(Ls||(Ls={}));(function(e){e.Invoked=1,e.Automatic=2})(Ws||(Ws={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Us||(Us={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Qs||(Qs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Sr.is(r.uri)&&f.string(r.name)}e.is=t})(Bs||(Bs={}));hg=[` +"use strict";var Lo=Object.defineProperty;var yh=Object.getOwnPropertyDescriptor;var Th=Object.getOwnPropertyNames;var _h=Object.prototype.hasOwnProperty;var Ka=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Xa=(e,t)=>{for(var n in t)Lo(e,n,{get:t[n],enumerable:!0})},bh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Th(t))!_h.call(e,o)&&o!==n&&Lo(e,o,{get:()=>t[o],enumerable:!(r=yh(t,o))||r.enumerable});return e};var ar=e=>bh(Lo({},"__esModule",{value:!0}),e);var ur=I(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=vh;Ge.string=Za;Ge.number=Ch;Ge.error=Sh;Ge.func=Ya;Ge.array=Ja;Ge.stringArray=Ih;Ge.typedArray=Dh;Ge.thenable=wh;function vh(e){return e===!0||e===!1}function Za(e){return typeof e=="string"||e instanceof String}function Ch(e){return typeof e=="number"||e instanceof Number}function Sh(e){return e instanceof Error}function Ya(e){return typeof e=="function"}function Ja(e){return Array.isArray(e)}function Ih(e){return Ja(e)&&e.every(t=>Za(t))}function Dh(e,t){return Array.isArray(e)&&e.every(t)}function wh(e){return e&&Ya(e.then)}});var Xt=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.boolean=kh;et.string=eu;et.number=Ph;et.error=Rh;et.func=Oh;et.array=tu;et.stringArray=xh;function kh(e){return e===!0||e===!1}function eu(e){return typeof e=="string"||e instanceof String}function Ph(e){return typeof e=="number"||e instanceof Number}function Rh(e){return e instanceof Error}function Oh(e){return typeof e=="function"}function tu(e){return Array.isArray(e)}function xh(e){return tu(e)&&e.every(t=>eu(t))}});var fi=I(P=>{"use strict";var Mh=P&&P.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eh=P&&P.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ah=P&&P.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.LRUCache=ht.LinkedMap=ht.Touch=void 0;var de;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(de||(ht.Touch=de={}));var lr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=de.None){let r=this._map.get(t);if(r)return n!==de.None&&this.touch(r,n),r.value}set(t,n,r=de.None){let o=this._map.get(t);if(o)o.value=n,r!==de.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case de.None:this.addItemLast(o);break;case de.First:this.addItemFirst(o);break;case de.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==de.First&&n!==de.Last)){if(n===de.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===de.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};ht.LinkedMap=lr;var mi=class extends lr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=de.AsNew){return super.get(t,n)}peek(t){return super.get(t,de.None)}set(t,n){return super.set(t,n,de.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ht.LRUCache=mi});var ou=I(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.Disposable=void 0;var ru;(function(e){function t(n){return{dispose:n}}e.create=t})(ru||(dr.Disposable=ru={}))});var gt=I(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});var gi;function pi(){if(gi===void 0)throw new Error("No runtime abstraction layer installed");return gi}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");gi=n}e.install=t})(pi||(pi={}));yi.default=pi});var Zt=I(pt=>{"use strict";var qh=pt&&pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pt,"__esModule",{value:!0});pt.Emitter=pt.Event=void 0;var Nh=qh(gt()),iu;(function(e){let t={dispose(){}};e.None=function(){return t}})(iu||(pt.Event=iu={}));var Ti=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new Ti),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pt.Emitter=_i});var hr=I(Ie=>{"use strict";var Fh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gh=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hh=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.SharedArrayReceiverStrategy=Yt.SharedArraySenderStrategy=void 0;var Qh=hr(),Rn;(function(e){e.Continue=0,e.Cancelled=1})(Rn||(Rn={}));var Ci=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Rn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Rn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Yt.SharedArraySenderStrategy=Ci;var Si=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Rn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ii=class{token;constructor(t){this.token=new Si(t)}cancel(){}dispose(){}},Di=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Qh.CancellationTokenSource:new Ii(n)}};Yt.SharedArrayReceiverStrategy=Di});var ki=I(Jt=>{"use strict";var Bh=Jt&&Jt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.Semaphore=void 0;var $h=Bh(gt()),wi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,$h.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Jt.Semaphore=wi});var au=I(fe=>{"use strict";var zh=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Vh=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Kh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Ri.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};fe.ReadableStreamMessageReader=xi});var mu=I(me=>{"use strict";var Yh=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Jh=me&&me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eg=me&&me.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(rg,r.byteLength.toString(),du),o.push(du),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};me.WriteableStreamMessageWriter=Ei});var hu=I(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.AbstractMessageBuffer=void 0;var og=13,ig=10,sg=`\r +`,Ai=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};yr.AbstractMessageBuffer=Ai});var Tu=I(O=>{"use strict";var cg=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ag=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ug=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},log:()=>{}});var H;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(H||(O.Trace=H={}));var Hi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Hi||(O.TraceValue=Hi={}));O.TraceValues=Hi;(function(e){function t(r){if(!Z.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(H||(O.Trace=H={}));var Re;(function(e){e.Text="text",e.JSON="json"})(Re||(O.TraceFormat=Re={}));(function(e){function t(n){return Z.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Re||(O.TraceFormat=Re={}));var ji;(function(e){e.type=new E.NotificationType("$/setTrace")})(ji||(O.SetTraceNotification=ji={}));var Tr;(function(e){e.type=new E.NotificationType("$/logTrace")})(Tr||(O.LogTraceNotification=Tr={}));var En;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(En||(O.ConnectionErrors=En={}));var tn=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=tn;var Li;(function(e){function t(n){let r=n;return r&&Z.func(r.cancelUndispatched)}e.is=t})(Li||(O.ConnectionStrategy=Li={}));var _r;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(_r||(O.IdCancellationReceiverStrategy=_r={}));var Wi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(Wi||(O.RequestCancellationReceiverStrategy=Wi={}));var br;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new qi.CancellationTokenSource}});function t(n){return _r.is(n)||Wi.is(n)}e.is=t})(br||(O.CancellationReceiverStrategy=br={}));var vr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(An.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&Z.func(r.sendCancellation)&&Z.func(r.cleanup)}e.is=t})(vr||(O.CancellationSenderStrategy=vr={}));var Cr;(function(e){e.Message=Object.freeze({receiver:br.Message,sender:vr.Message});function t(n){let r=n;return r&&br.is(r.receiver)&&vr.is(r.sender)}e.is=t})(Cr||(O.CancellationStrategy=Cr={}));var Sr;(function(e){function t(n){let r=n;return r&&Z.func(r.handleMessage)}e.is=t})(Sr||(O.MessageStrategy=Sr={}));var yu;(function(e){function t(n){let r=n;return r&&(Cr.is(r.cancellationStrategy)||Li.is(r.connectionStrategy)||Sr.is(r.messageStrategy)||Z.number(r.maxParallelism))}e.is=t})(yu||(O.ConnectionOptions=yu={}));var He;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(He||(He={}));function dg(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,c=0,g="2.0",d=r?.maxParallelism??-1,h=0,b,m=new Map,T,D=new Map,q=new Map,N,x=new pu.LinkedMap,p=new Map,l=new Set,C=new Map,k=H.Off,M=Re.Text,L,K=He.New,Ye=new xn.Emitter,Na=new xn.Emitter,Fa=new xn.Emitter,Ga=new xn.Emitter,Ha=new xn.Emitter,dt=r&&r.cancellationStrategy?r.cancellationStrategy:Cr.Message;function eh(u){}function ja(){return K===He.Listening}function La(){return K===He.Closed}function Vt(){return K===He.Disposed}function Wa(){(K===He.New||K===He.Listening)&&(K=He.Closed,Na.fire(void 0))}function th(u){Ye.fire([u,void 0,void 0])}function nh(u){Ye.fire(u)}e.onClose(Wa),e.onError(th),t.onClose(Wa),t.onError(nh);function Ua(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function rh(u){return u===null?"res-unknown-"+(++c).toString():"res-"+u.toString()}function oh(){return"not-"+(++s).toString()}function ih(u,v){E.Message.isRequest(v)?u.set(Ua(v.id),v):E.Message.isResponse(v)?d===-1?u.set(rh(v.id),v):Ba(v):u.set(oh(),v)}function Fo(){N||x.size===0||d!==-1&&h>=d||(N=(0,gu.default)().timer.setImmediate(async()=>{if(N=void 0,x.size===0||d!==-1&&h>=d)return;let u=x.shift(),v;try{h++;let S=r?.messageStrategy;Sr.is(S)?v=S.handleMessage(u,Qa):v=Qa(u)}catch(S){o.error(`Processing message queue failed: ${S.toString()}`)}finally{v instanceof Promise?v.then(()=>{h--,Fo()}).catch(S=>{o.error(`Processing message queue failed: ${S.toString()}`)}):h--,Fo()}}))}async function Qa(u){return E.Message.isRequest(u)?ch(u):E.Message.isNotification(u)?ah(u):E.Message.isResponse(u)?Ba(u):uh(u)}let sh=u=>{try{if(E.Message.isNotification(u)&&u.method===An.type.method){let v=u.params.id,S=Ua(v),R=x.get(S);if(E.Message.isRequest(R)){let X=r?.connectionStrategy,W=X&&X.cancelUndispatched?X.cancelUndispatched(R,eh):void 0;if(W&&(W.error!==void 0||W.result!==void 0)){x.delete(S),C.delete(v),W.id=R.id,Go(W,u.method,Date.now()),t.write(W).catch(()=>o.error("Sending response for canceled message failed."));return}}let G=C.get(v);if(G!==void 0){G.cancel(),Ho(u);return}else l.add(v)}ih(x,u)}finally{Fo()}};async function ch(u){if(Vt())return Promise.resolve();function v(oe,le,J){let ee={jsonrpc:g,id:u.id};return oe instanceof E.ResponseError?ee.error=oe.toJson():ee.result=oe===void 0?null:oe,Go(ee,le,J),t.write(ee)}function S(oe,le,J){let ee={jsonrpc:g,id:u.id,error:oe.toJson()};return Go(ee,le,J),t.write(ee)}fh(u);let R=m.get(u.method),G,X;R&&(G=R.type,X=R.handler);let W=Date.now();if(X||b){let oe=u.id??String(Date.now()),le=_r.is(dt.receiver)?dt.receiver.createCancellationTokenSource(oe):dt.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&le.cancel(),u.id!==null&&C.set(oe,le);try{let J;if(X)if(u.params===void 0){if(G!==void 0&&G.numberOfParams!==0)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines ${G.numberOfParams} params but received none.`),u.method,W);J=X(le.token)}else if(Array.isArray(u.params)){if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byName)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,W);J=X(...u.params,le.token)}else{if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byPosition)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,W);J=X(u.params,le.token)}else b&&(J=b(u.method,u.params,le.token));let ee=await J;await v(ee,u.method,W)}catch(J){J instanceof E.ResponseError?await v(J,u.method,W):J&&Z.string(J.message)?await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,W):await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,W)}finally{C.delete(oe)}}else await S(new E.ResponseError(E.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,W)}function Ba(u){if(!Vt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let v=u.id,S=p.get(v);if(mh(u,S),S!==void 0){p.delete(v);try{if(u.error){let R=u.error;S.reject(new E.ResponseError(R.code,R.message,R.data))}else if(u.result!==void 0)S.resolve(u.result);else throw new Error("Should never happen.")}catch(R){R.message?o.error(`Response handler '${S.method}' failed with message: ${R.message}`):o.error(`Response handler '${S.method}' failed unexpectedly.`)}}}}async function ah(u){if(Vt())return;let v,S;if(u.method===An.type.method){let R=u.params.id;l.delete(R),Ho(u);return}else{let R=D.get(u.method);R&&(S=R.handler,v=R.type)}if(S||T)try{if(Ho(u),S)if(u.params===void 0)v!==void 0&&v.numberOfParams!==0&&v.parameterStructures!==E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received none.`),await S();else if(Array.isArray(u.params)){let R=u.params;u.method===Mn.type.method&&R.length===2&&Ni.is(R[0])?await S({token:R[0],value:R[1]}):(v!==void 0&&(v.parameterStructures===E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),v.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received ${R.length} arguments`)),await S(...R))}else v!==void 0&&v.parameterStructures===E.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await S(u.params);else T&&await T(u.method,u.params)}catch(R){R.message?o.error(`Notification handler '${u.method}' failed with message: ${R.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Fa.fire(u)}function uh(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let v=u;if(Z.string(v.id)||Z.number(v.id)){let S=v.id,R=p.get(S);R&&R.reject(new Error("The received response has neither a result nor an error property."))}}function ft(u){if(u!=null)switch(k){case H.Verbose:return JSON.stringify(u,null,4);case H.Compact:return JSON.stringify(u);default:return}}function lh(u){if(!(k===H.Off||!L))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${ft(u.params)}`),L.log(`Sending request '${u.method} - (${u.id})'.`,v)}else Kt("send-request",u)}function dh(u){if(!(k===H.Off||!L))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${ft(u.params)}`:v="No parameters provided."),L.log(`Sending notification '${u.method}'.`,v)}else Kt("send-notification",u)}function Go(u,v,S){if(!(k===H.Off||!L))if(M===Re.Text){let R;(k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?R=`Error data: ${ft(u.error.data)}`:u.result?R=`Result: ${ft(u.result)}`:u.error===void 0&&(R="No result returned.")),L.log(`Sending response '${v} - (${u.id})'. Processing request took ${Date.now()-S}ms`,R)}else Kt("send-response",u)}function fh(u){if(!(k===H.Off||!L))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${ft(u.params)}`),L.log(`Received request '${u.method} - (${u.id})'.`,v)}else Kt("receive-request",u)}function Ho(u){if(!(k===H.Off||!L||u.method===Tr.type.method))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${ft(u.params)}`:v="No parameters provided."),L.log(`Received notification '${u.method}'.`,v)}else Kt("receive-notification",u)}function mh(u,v){if(!(k===H.Off||!L))if(M===Re.Text){let S;if((k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?S=`Error data: ${ft(u.error.data)}`:u.result?S=`Result: ${ft(u.result)}`:u.error===void 0&&(S="No result returned.")),v){let R=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";L.log(`Received response '${v.method} - (${u.id})' in ${Date.now()-v.timerStart}ms.${R}`,S)}else L.log(`Received response ${u.id} without active response promise.`,S)}else Kt("receive-response",u)}function Kt(u,v){if(!L||k===H.Off)return;let S={isLSPMessage:!0,type:u,message:v,timestamp:Date.now()};L.log(S)}function wn(){if(La())throw new tn(En.Closed,"Connection is closed.");if(Vt())throw new tn(En.Disposed,"Connection is disposed.")}function hh(){if(ja())throw new tn(En.AlreadyListening,"Connection is already listening")}function gh(){if(!ja())throw new Error("Call listen() first.")}function kn(u){return u===void 0?null:u}function $a(u){if(u!==null)return u}function za(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function jo(u,v){switch(u){case E.ParameterStructures.auto:return za(v)?$a(v):[kn(v)];case E.ParameterStructures.byName:if(!za(v))throw new Error("Received parameters by name but param is not an object literal.");return $a(v);case E.ParameterStructures.byPosition:return[kn(v)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Va(u,v){let S,R=u.numberOfParams;switch(R){case 0:S=void 0;break;case 1:S=jo(u.parameterStructures,v[0]);break;default:S=[];for(let G=0;G{wn();let S,R;if(Z.string(u)){S=u;let X=v[0],W=0,oe=E.ParameterStructures.auto;E.ParameterStructures.is(X)&&(W=1,oe=X);let le=v.length,J=le-W;switch(J){case 0:R=void 0;break;case 1:R=jo(oe,v[W]);break;default:if(oe===E.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);R=v.slice(W,le).map(ee=>kn(ee));break}}else{let X=v;S=u.method,R=Va(u,X)}let G={jsonrpc:g,method:S,params:R};return dh(G),t.write(G).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,v)=>{wn();let S;return Z.func(u)?T=u:v&&(Z.string(u)?(S=u,D.set(u,{type:void 0,handler:v})):(S=u.method,D.set(u.method,{type:u,handler:v}))),{dispose:()=>{S!==void 0?D.get(S)?.handler===v&&D.delete(S):T===u&&(T=void 0)}}},onProgress:(u,v,S)=>{if(q.has(v))throw new Error(`Progress handler for token ${v} already registered`);return q.set(v,S),{dispose:()=>{q.get(v)===S&&q.delete(v)}}},sendProgress:(u,v,S)=>xt.sendNotification(Mn.type,{token:v,value:S}),onUnhandledProgress:Ga.event,sendRequest:(u,...v)=>{wn(),gh();function S(ee,Fe){let Je=dt.sender.sendCancellation(ee,Fe);Je===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Fe}`):Je.catch(()=>{o.log(`Sending cancellation messages for id ${Fe} failed.`)})}let R,G,X;if(Z.string(u)){R=u;let ee=v[0],Fe=v[v.length-1],Je=0,Pn=E.ParameterStructures.auto;E.ParameterStructures.is(ee)&&(Je=1,Pn=ee);let Mt=v.length;qi.CancellationToken.is(Fe)&&(Mt=Mt-1,X=Fe);let $e=Mt-Je;switch($e){case 0:G=void 0;break;case 1:G=jo(Pn,v[Je]);break;default:if(Pn===E.ParameterStructures.byName)throw new Error(`Received ${$e} parameters for 'by Name' request parameter structure.`);G=v.slice(Je,Mt).map(ph=>kn(ph));break}}else{let ee=v;R=u.method,G=Va(u,ee);let Fe=u.numberOfParams;X=qi.CancellationToken.is(ee[Fe])?ee[Fe]:void 0}let W=i++,oe,le=!1;X!==void 0&&(X.isCancellationRequested?le=!0:oe=X.onCancellationRequested(()=>{S(xt,W)}));let J={jsonrpc:g,id:W,method:R,params:G};return lh(J),typeof dt.sender.enableCancellation=="function"&&dt.sender.enableCancellation(J),new Promise(async(ee,Fe)=>{let Je=$e=>{ee($e),dt.sender.cleanup(W),oe?.dispose()},Pn=$e=>{Fe($e),dt.sender.cleanup(W),oe?.dispose()},Mt={method:R,timerStart:Date.now(),resolve:Je,reject:Pn};try{p.set(W,Mt),await t.write(J),le&&S(xt,W)}catch($e){throw p.delete(W),Mt.reject(new E.ResponseError(E.ErrorCodes.MessageWriteError,$e.message?$e.message:"Unknown reason")),o.error("Sending request failed."),$e}})},onRequest:(u,v)=>{wn();let S=null;return Gi.is(u)?(S=void 0,b=u):Z.string(u)?(S=null,v!==void 0&&(S=u,m.set(u,{handler:v,type:void 0}))):v!==void 0&&(S=u.method,m.set(u.method,{type:u,handler:v})),{dispose:()=>{S!==null&&(S!==void 0?m.get(S)?.handler===v&&m.delete(S):b===u&&(b=void 0))}}},hasPendingResponse:()=>p.size>0,trace:async(u,v,S)=>{let R=!1,G=Re.Text;S!==void 0&&(Z.boolean(S)?R=S:(R=S.sendNotification||!1,G=S.traceFormat||Re.Text)),k=u,M=G,k===H.Off?L=void 0:L=v,R&&!La()&&!Vt()&&await xt.sendNotification(ji.type,{value:H.toString(u)})},onError:Ye.event,onClose:Na.event,onUnhandledNotification:Fa.event,onDispose:Ha.event,end:()=>{t.end()},dispose:()=>{if(Vt())return;K=He.Disposed,Ha.fire(void 0);let u=new E.ResponseError(E.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let v of p.values())v.reject(u);p=new Map,C=new Map,l=new Set,x=new pu.LinkedMap,Z.func(t.dispose)&&t.dispose(),Z.func(e.dispose)&&e.dispose()},listen:()=>{wn(),hh(),K=He.Listening,e.listen(sh)},inspect:()=>{(0,gu.default)().console.log("inspect")}};return xt.onNotification(Tr.type,u=>{if(k===H.Off||!L)return;let v=k===H.Verbose||k===H.Compact;L.log(u.message,v?u.verbose:void 0)}),xt.onNotification(Mn.type,async u=>{let v=q.get(u.token);v?await v(u.value):Ga.fire(u)}),xt}});var tt=I(y=>{"use strict";var fg=y&&y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y,"__esModule",{value:!0});y.ProgressType=y.ProgressToken=y.createMessageConnection=y.NullLogger=y.ConnectionOptions=y.ConnectionStrategy=y.AbstractMessageBuffer=y.WriteableStreamMessageWriter=y.AbstractMessageWriter=y.MessageWriter=y.ReadableStreamMessageReader=y.AbstractMessageReader=y.MessageReader=y.SharedArrayReceiverStrategy=y.SharedArraySenderStrategy=y.CancellationToken=y.CancellationTokenSource=y.Emitter=y.Event=y.Disposable=y.LRUCache=y.Touch=y.LinkedMap=y.ParameterStructures=y.NotificationType9=y.NotificationType8=y.NotificationType7=y.NotificationType6=y.NotificationType5=y.NotificationType4=y.NotificationType3=y.NotificationType2=y.NotificationType1=y.NotificationType0=y.NotificationType=y.ErrorCodes=y.ResponseError=y.RequestType9=y.RequestType8=y.RequestType7=y.RequestType6=y.RequestType5=y.RequestType4=y.RequestType3=y.RequestType2=y.RequestType1=y.RequestType0=y.RequestType=y.Message=y.RAL=void 0;y.MessageStrategy=y.CancellationStrategy=y.CancellationSenderStrategy=y.RequestCancellationReceiverStrategy=y.IdCancellationReceiverStrategy=y.CancellationReceiverStrategy=y.ConnectionError=y.ConnectionErrors=y.LogTraceNotification=y.SetTraceNotification=y.TraceFormat=y.TraceValues=y.TraceValue=y.Trace=void 0;var $=fi();Object.defineProperty(y,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(y,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(y,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(y,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(y,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(y,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(y,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(y,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(y,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(y,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(y,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(y,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(y,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(y,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(y,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(y,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(y,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(y,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(y,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(y,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(y,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(y,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(y,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(y,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(y,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(y,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var Ui=hi();Object.defineProperty(y,"LinkedMap",{enumerable:!0,get:function(){return Ui.LinkedMap}});Object.defineProperty(y,"LRUCache",{enumerable:!0,get:function(){return Ui.LRUCache}});Object.defineProperty(y,"Touch",{enumerable:!0,get:function(){return Ui.Touch}});var mg=ou();Object.defineProperty(y,"Disposable",{enumerable:!0,get:function(){return mg.Disposable}});var _u=Zt();Object.defineProperty(y,"Event",{enumerable:!0,get:function(){return _u.Event}});Object.defineProperty(y,"Emitter",{enumerable:!0,get:function(){return _u.Emitter}});var bu=hr();Object.defineProperty(y,"CancellationTokenSource",{enumerable:!0,get:function(){return bu.CancellationTokenSource}});Object.defineProperty(y,"CancellationToken",{enumerable:!0,get:function(){return bu.CancellationToken}});var vu=su();Object.defineProperty(y,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return vu.SharedArraySenderStrategy}});Object.defineProperty(y,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return vu.SharedArrayReceiverStrategy}});var Qi=au();Object.defineProperty(y,"MessageReader",{enumerable:!0,get:function(){return Qi.MessageReader}});Object.defineProperty(y,"AbstractMessageReader",{enumerable:!0,get:function(){return Qi.AbstractMessageReader}});Object.defineProperty(y,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Qi.ReadableStreamMessageReader}});var Bi=mu();Object.defineProperty(y,"MessageWriter",{enumerable:!0,get:function(){return Bi.MessageWriter}});Object.defineProperty(y,"AbstractMessageWriter",{enumerable:!0,get:function(){return Bi.AbstractMessageWriter}});Object.defineProperty(y,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Bi.WriteableStreamMessageWriter}});var hg=hu();Object.defineProperty(y,"AbstractMessageBuffer",{enumerable:!0,get:function(){return hg.AbstractMessageBuffer}});var re=Tu();Object.defineProperty(y,"ConnectionStrategy",{enumerable:!0,get:function(){return re.ConnectionStrategy}});Object.defineProperty(y,"ConnectionOptions",{enumerable:!0,get:function(){return re.ConnectionOptions}});Object.defineProperty(y,"NullLogger",{enumerable:!0,get:function(){return re.NullLogger}});Object.defineProperty(y,"createMessageConnection",{enumerable:!0,get:function(){return re.createMessageConnection}});Object.defineProperty(y,"ProgressToken",{enumerable:!0,get:function(){return re.ProgressToken}});Object.defineProperty(y,"ProgressType",{enumerable:!0,get:function(){return re.ProgressType}});Object.defineProperty(y,"Trace",{enumerable:!0,get:function(){return re.Trace}});Object.defineProperty(y,"TraceValue",{enumerable:!0,get:function(){return re.TraceValue}});Object.defineProperty(y,"TraceFormat",{enumerable:!0,get:function(){return re.TraceFormat}});Object.defineProperty(y,"SetTraceNotification",{enumerable:!0,get:function(){return re.SetTraceNotification}});Object.defineProperty(y,"LogTraceNotification",{enumerable:!0,get:function(){return re.LogTraceNotification}});Object.defineProperty(y,"ConnectionErrors",{enumerable:!0,get:function(){return re.ConnectionErrors}});Object.defineProperty(y,"ConnectionError",{enumerable:!0,get:function(){return re.ConnectionError}});Object.defineProperty(y,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return re.CancellationReceiverStrategy}});Object.defineProperty(y,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.IdCancellationReceiverStrategy}});Object.defineProperty(y,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.RequestCancellationReceiverStrategy}});Object.defineProperty(y,"CancellationSenderStrategy",{enumerable:!0,get:function(){return re.CancellationSenderStrategy}});Object.defineProperty(y,"CancellationStrategy",{enumerable:!0,get:function(){return re.CancellationStrategy}});Object.defineProperty(y,"MessageStrategy",{enumerable:!0,get:function(){return re.MessageStrategy}});Object.defineProperty(y,"TraceValues",{enumerable:!0,get:function(){return re.TraceValues}});var gg=fg(gt());y.RAL=gg.default});var Ar={};Xa(Ar,{AnnotatedTextEdit:()=>nt,ApplyKind:()=>ms,ChangeAnnotation:()=>yt,ChangeAnnotationIdentifier:()=>ie,CodeAction:()=>Rs,CodeActionContext:()=>Ps,CodeActionKind:()=>ks,CodeActionTag:()=>Or,CodeActionTriggerKind:()=>Ln,CodeDescription:()=>ts,CodeLens:()=>Os,Color:()=>Dr,ColorInformation:()=>Ki,ColorPresentation:()=>Xi,Command:()=>At,CompletionItem:()=>gs,CompletionItemKind:()=>as,CompletionItemLabelDetails:()=>hs,CompletionItemTag:()=>ls,CompletionList:()=>ps,CreateFile:()=>rn,DeleteFile:()=>sn,Diagnostic:()=>Fn,DiagnosticRelatedInformation:()=>wr,DiagnosticSeverity:()=>Ji,DiagnosticTag:()=>es,DocumentHighlight:()=>vs,DocumentHighlightKind:()=>bs,DocumentLink:()=>Ms,DocumentSymbol:()=>ws,DocumentUri:()=>$i,EOL:()=>pg,FoldingRange:()=>Yi,FoldingRangeKind:()=>Zi,FormattingOptions:()=>xs,Hover:()=>ys,InlayHint:()=>Ls,InlayHintKind:()=>xr,InlayHintLabelPart:()=>Mr,InlineCompletionContext:()=>$s,InlineCompletionItem:()=>Ws,InlineCompletionList:()=>Us,InlineCompletionTriggerKind:()=>Qs,InlineValueContext:()=>js,InlineValueEvaluatableExpression:()=>Hs,InlineValueText:()=>Fs,InlineValueVariableLookup:()=>Gs,InsertReplaceEdit:()=>ds,InsertTextFormat:()=>us,InsertTextMode:()=>fs,LanguageKind:()=>ss,Location:()=>Nn,LocationLink:()=>Vi,MarkedString:()=>jn,MarkupContent:()=>Tt,MarkupKind:()=>Rr,OptionalVersionedTextDocumentIdentifier:()=>Hn,ParameterInformation:()=>Ts,Position:()=>Me,Range:()=>Y,RenameFile:()=>on,SelectedCompletionInfo:()=>Bs,SelectionRange:()=>Es,SemanticTokenModifiers:()=>qs,SemanticTokenTypes:()=>As,SemanticTokens:()=>Ns,SignatureInformation:()=>_s,SnippetTextEdit:()=>ns,StringValue:()=>Er,SymbolInformation:()=>Is,SymbolKind:()=>Cs,SymbolTag:()=>Ss,TextDocument:()=>Vs,TextDocumentEdit:()=>Gn,TextDocumentIdentifier:()=>os,TextDocumentItem:()=>cs,TextEdit:()=>ze,URI:()=>Ir,VersionedTextDocumentIdentifier:()=>is,WorkspaceChange:()=>rs,WorkspaceEdit:()=>kr,WorkspaceFolder:()=>zs,WorkspaceSymbol:()=>Ds,integer:()=>zi,uinteger:()=>qn});var $i,Ir,zi,qn,Me,Y,Nn,Vi,Dr,Ki,Xi,Zi,Yi,wr,Ji,es,ts,Fn,At,ze,yt,ie,nt,Gn,rn,on,sn,kr,nn,ns,Pr,rs,os,is,Hn,ss,cs,Rr,Tt,as,us,ls,ds,fs,ms,hs,gs,ps,jn,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,ws,ks,Ln,Ps,Or,Rs,Os,xs,Ms,Es,As,qs,Ns,Fs,Gs,Hs,js,xr,Mr,Ls,Er,Ws,Us,Qs,Bs,$s,zs,pg,Vs,Ks,f,qr=Ka(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})($i||($i={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(Ir||(Ir={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(zi||(zi={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(qn||(qn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=qn.MAX_VALUE),o===Number.MAX_VALUE&&(o=qn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(Me||(Me={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:Me.create(r,o),end:Me.create(i,s)};if(Me.is(r)&&Me.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.start)&&Me.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(Nn||(Nn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.targetRange)&&f.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})(Vi||(Vi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(Dr||(Dr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&Dr.is(o.color)}e.is=n})(Ki||(Ki={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||ze.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,ze.is))}e.is=n})(Xi||(Xi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Zi||(Zi={}));(function(e){function t(r,o,i,s,c,g){let d={startLine:r,endLine:o};return f.defined(i)&&(d.startCharacter=i),f.defined(s)&&(d.endCharacter=s),f.defined(c)&&(d.kind=c),f.defined(g)&&(d.collapsedText=g),d}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Yi||(Yi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Nn.is(o.location)&&f.string(o.message)}e.is=n})(wr||(wr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ji||(Ji={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(es||(es={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(ts||(ts={}));(function(e){function t(i,s,c,g,d,h){let b={range:i,message:s};return f.defined(c)&&(b.severity=c),f.defined(g)&&(b.code=g),f.defined(d)&&(b.source=d),f.defined(h)&&(b.relatedInformation=h),b}e.create=t;function n(i){var s;let c=i;return f.defined(c)&&Y.is(c.range)&&(f.string(c.message)||Tt.is(c.message))&&(f.number(c.severity)||f.undefined(c.severity))&&(f.integer(c.code)||f.string(c.code)||f.undefined(c.code))&&(f.undefined(c.codeDescription)||f.string((s=c.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(c.source)||f.undefined(c.source))&&(f.undefined(c.relatedInformation)||f.typedArray(c.relatedInformation,wr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(Tt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Fn||(Fn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(At||(At={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Y.is(s.range)}e.is=o})(ze||(ze={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(yt||(yt={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(ie||(ie={}));(function(e){function t(i,s,c){return{range:i,newText:s,annotationId:c}}e.replace=t;function n(i,s,c){return{range:{start:i,end:i},newText:s,annotationId:c}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return ze.is(s)&&(yt.is(s.annotationId)||ie.is(s.annotationId))}e.is=o})(nt||(nt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Hn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Gn||(Gn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(rn||(rn={}));(function(e){function t(r,o,i,s){let c={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(c.options=i),s!==void 0&&(c.annotationId=s),c}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(on||(on={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(sn||(sn={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?rn.is(o)||on.is(o)||sn.is(o):Gn.is(o)))}e.is=t})(kr||(kr={}));nn=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=ze.insert(t,n):ie.is(r)?(i=r,o=nt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=ze.replace(t,n):ie.is(r)?(i=r,o=nt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=ze.del(t):ie.is(n)?(o=n,r=nt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=nt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Y.is(r.range)&&Er.isSnippet(r.snippet)&&(r.annotationId===void 0||yt.is(r.annotationId)||ie.is(r.annotationId))}e.is=t})(ns||(ns={}));Pr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ie.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},rs=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Pr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Gn.is(n)){let r=new nn(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new nn(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Hn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new nn(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new nn(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Pr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;yt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=rn.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=rn.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;yt.is(r)||ie.is(r)?i=r:o=r;let s,c;if(i===void 0?s=on.create(t,n,o):(c=ie.is(i)?i:this._changeAnnotations.manage(i),s=on.create(t,n,o,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;yt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=sn.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=sn.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(os||(os={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(is||(is={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(Hn||(Hn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(ss||(ss={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(cs||(cs={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Rr||(Rr={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&Rr.is(r.kind)&&f.string(r.value)}e.is=t})(Tt||(Tt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(as||(as={}));(function(e){e.PlainText=1,e.Snippet=2})(us||(us={}));(function(e){e.Deprecated=1})(ls||(ls={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(ds||(ds={}));(function(e){e.asIs=1,e.adjustIndentation=2})(fs||(fs={}));(function(e){e.Replace=1,e.Merge=2})(ms||(ms={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(hs||(hs={}));(function(e){function t(n){return{label:n}}e.create=t})(gs||(gs={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ps||(ps={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(jn||(jn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(Tt.is(r.contents)||jn.is(r.contents)||f.typedArray(r.contents,jn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(ys||(ys={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Ts||(Ts={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(_s||(_s={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(bs||(bs={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(vs||(vs={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Cs||(Cs={}));(function(e){e.Deprecated=1})(Ss||(Ss={}));(function(e){function t(n,r,o,i,s){let c={name:n,kind:r,location:{uri:i,range:o}};return s&&(c.containerName=s),c}e.create=t})(Is||(Is={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(Ds||(Ds={}));(function(e){function t(r,o,i,s,c,g){let d={name:r,detail:o,kind:i,range:s,selectionRange:c};return g!==void 0&&(d.children=g),d}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(ws||(ws={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(ks||(ks={}));(function(e){e.Invoked=1,e.Automatic=2})(Ln||(Ln={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,Fn.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===Ln.Invoked||o.triggerKind===Ln.Automatic)}e.is=n})(Ps||(Ps={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Or||(Or={}));(function(e){function t(r,o,i){let s={title:r},c=!0;return typeof o=="string"?(c=!1,s.kind=o):At.is(o)?s.command=o:s.edit=o,c&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,Fn.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||At.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||kr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Or.is))}e.is=n})(Rs||(Rs={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.command)||At.is(o.command))}e.is=n})(Os||(Os={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(xs||(xs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Ms||(Ms={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(Es||(Es={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(As||(As={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(qs||(qs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Ns||(Ns={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.string(o.text)}e.is=n})(Fs||(Fs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(Gs||(Gs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Hs||(Hs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(js||(js={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(xr||(xr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||Tt.is(o.tooltip))&&(o.location===void 0||Nn.is(o.location))&&(o.command===void 0||At.is(o.command))}e.is=n})(Mr||(Mr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,Mr.is))&&(o.kind===void 0||xr.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,ze.is)&&(o.tooltip===void 0||f.string(o.tooltip)||Tt.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(Ls||(Ls={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Er||(Er={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Ws||(Ws={}));(function(e){function t(n){return{items:n}}e.create=t})(Us||(Us={}));(function(e){e.Invoked=1,e.Automatic=2})(Qs||(Qs={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Bs||(Bs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})($s||($s={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Ir.is(r.uri)&&f.string(r.name)}e.is=t})(zs||(zs={}));pg=[` `,`\r -`,"\r"];(function(e){function t(i,s,c,g){return new zs(i,s,c,g)}e.create=t;function n(i){let s=i;return!!(f.defined(s)&&f.string(s.uri)&&(f.undefined(s.languageId)||f.string(s.languageId))&&f.uinteger(s.lineCount)&&f.func(s.getText)&&f.func(s.positionAt)&&f.func(s.offsetAt))}e.is=n;function r(i,s){let c=i.getText(),g=o(s,(h,b)=>{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),d=c.length;for(let h=g.length-1;h>=0;h--){let b=g[h],m=i.offsetAt(b.range.start),T=i.offsetAt(b.range.end);if(T<=d)c=c.substring(0,m)+b.newText+c.substring(T,c.length);else throw new Error("Overlapping edit");d=m}return c}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let c=i.length/2|0,g=i.slice(0,c),d=i.slice(c);o(g,s),o(d,s);let h=0,b=0,m=0;for(;h{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),d=c.length;for(let h=g.length-1;h>=0;h--){let b=g[h],m=i.offsetAt(b.range.start),T=i.offsetAt(b.range.end);if(T<=d)c=c.substring(0,m)+b.newText+c.substring(T,c.length);else throw new Error("Overlapping edit");d=m}return c}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let c=i.length/2|0,g=i.slice(0,c),d=i.slice(c);o(g,s),o(d,s);let h=0,b=0,m=0;for(;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return xe.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return xe.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(T){return T===!0||T===!1}e.boolean=o;function i(T){return t.call(T)==="[object String]"}e.string=i;function s(T){return t.call(T)==="[object Number]"}e.number=s;function c(T,D,q){return t.call(T)==="[object Number]"&&D<=T&&T<=q}e.numberRange=c;function g(T){return t.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}e.integer=g;function d(T){return t.call(T)==="[object Number]"&&0<=T&&T<=2147483647}e.uinteger=d;function h(T){return t.call(T)==="[object Function]"}e.func=h;function b(T){return T!==null&&typeof T=="object"}e.objectLiteral=b;function m(T,D){return Array.isArray(T)&&T.every(D)}e.typedArray=m})(f||(f={}))});var V=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CM=he.ProtocolNotificationType=he.ProtocolNotificationType0=he.ProtocolRequestType=he.ProtocolRequestType0=he.RegistrationType=he.MessageDirection=void 0;var sn=et(),bu;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(bu||(he.MessageDirection=bu={}));var Vs=class{____;method;constructor(t){this.method=t}};he.RegistrationType=Vs;var Ks=class extends sn.RequestType0{__;___;____;_pr;constructor(t){super(t)}};he.ProtocolRequestType0=Ks;var Xs=class extends sn.RequestType{__;___;____;_pr;constructor(t){super(t,sn.ParameterStructures.byName)}};he.ProtocolRequestType=Xs;var Zs=class extends sn.NotificationType0{___;____;constructor(t){super(t)}};he.ProtocolNotificationType0=Zs;var Ys=class extends sn.NotificationType{___;____;constructor(t){super(t,sn.ParameterStructures.byName)}};he.ProtocolNotificationType=Ys;var vu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(vu||(he.CM=vu={}))});var qr=I(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.boolean=gg;He.string=Cu;He.number=pg;He.error=yg;He.func=Tg;He.array=Su;He.stringArray=_g;He.typedArray=bg;He.objectLiteral=vg;function gg(e){return e===!0||e===!1}function Cu(e){return typeof e=="string"||e instanceof String}function pg(e){return typeof e=="number"||e instanceof Number}function yg(e){return e instanceof Error}function Tg(e){return typeof e=="function"}function Su(e){return Array.isArray(e)}function _g(e){return Su(e)&&e.every(t=>Cu(t))}function bg(e,t){return Array.isArray(e)&&e.every(t)}function vg(e){return e!==null&&typeof e=="object"}});var Du=I(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ImplementationRequest=void 0;var Js=V(),Iu;(function(e){e.method="textDocument/implementation",e.messageDirection=Js.MessageDirection.clientToServer,e.type=new Js.ProtocolRequestType(e.method),e.capabilities=Js.CM.create("textDocument.implementation","implementationProvider")})(Iu||(Nr.ImplementationRequest=Iu={}))});var ku=I(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.TypeDefinitionRequest=void 0;var ec=V(),wu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=ec.MessageDirection.clientToServer,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(wu||(Fr.TypeDefinitionRequest=wu={}))});var Ou=I(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.DidChangeWorkspaceFoldersNotification=an.WorkspaceFoldersRequest=void 0;var cn=V(),Pu;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=cn.MessageDirection.serverToClient,e.type=new cn.ProtocolRequestType0(e.method),e.capabilities=cn.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Pu||(an.WorkspaceFoldersRequest=Pu={}));var Ru;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=cn.MessageDirection.clientToServer,e.type=new cn.ProtocolNotificationType(e.method),e.capabilities=cn.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Ru||(an.DidChangeWorkspaceFoldersNotification=Ru={}))});var Mu=I(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.ConfigurationRequest=void 0;var tc=V(),xu;(function(e){e.method="workspace/configuration",e.messageDirection=tc.MessageDirection.serverToClient,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("workspace.configuration",void 0)})(xu||(Gr.ConfigurationRequest=xu={}))});var qu=I(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ColorPresentationRequest=ln.DocumentColorRequest=void 0;var un=V(),Eu;(function(e){e.method="textDocument/documentColor",e.messageDirection=un.MessageDirection.clientToServer,e.type=new un.ProtocolRequestType(e.method),e.capabilities=un.CM.create("textDocument.colorProvider","colorProvider")})(Eu||(ln.DocumentColorRequest=Eu={}));var Au;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=un.MessageDirection.clientToServer,e.type=new un.ProtocolRequestType(e.method),e.capabilities=un.CM.create("textDocument.colorProvider","colorProvider")})(Au||(ln.ColorPresentationRequest=Au={}))});var Gu=I(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.FoldingRangeRefreshRequest=fn.FoldingRangeRequest=void 0;var dn=V(),Nu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=dn.MessageDirection.clientToServer,e.type=new dn.ProtocolRequestType(e.method),e.capabilities=dn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Nu||(fn.FoldingRangeRequest=Nu={}));var Fu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=dn.MessageDirection.serverToClient,e.type=new dn.ProtocolRequestType0(e.method),e.capabilities=dn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Fu||(fn.FoldingRangeRefreshRequest=Fu={}))});var ju=I(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.DeclarationRequest=void 0;var nc=V(),Hu;(function(e){e.method="textDocument/declaration",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.declaration","declarationProvider")})(Hu||(Hr.DeclarationRequest=Hu={}))});var Wu=I(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.SelectionRangeRequest=void 0;var rc=V(),Lu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=rc.MessageDirection.clientToServer,e.type=new rc.ProtocolRequestType(e.method),e.capabilities=rc.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Lu||(jr.SelectionRangeRequest=Lu={}))});var $u=I(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.WorkDoneProgressCancelNotification=Tt.WorkDoneProgressCreateRequest=Tt.WorkDoneProgress=void 0;var Cg=et(),Ln=V(),Uu;(function(e){e.type=new Cg.ProgressType;function t(n){return n===e.type}e.is=t})(Uu||(Tt.WorkDoneProgress=Uu={}));var Qu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Ln.MessageDirection.serverToClient,e.type=new Ln.ProtocolRequestType(e.method),e.capabilities=Ln.CM.create("window.workDoneProgress",void 0)})(Qu||(Tt.WorkDoneProgressCreateRequest=Qu={}));var Bu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Ln.MessageDirection.clientToServer,e.type=new Ln.ProtocolNotificationType(e.method)})(Bu||(Tt.WorkDoneProgressCancelNotification=Bu={}))});var Xu=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.CallHierarchyOutgoingCallsRequest=_t.CallHierarchyIncomingCallsRequest=_t.CallHierarchyPrepareRequest=void 0;var nt=V(),zu;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(zu||(_t.CallHierarchyPrepareRequest=zu={}));var Vu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Vu||(_t.CallHierarchyIncomingCallsRequest=Vu={}));var Ku;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=nt.MessageDirection.clientToServer,e.type=new nt.ProtocolRequestType(e.method),e.capabilities=nt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ku||(_t.CallHierarchyOutgoingCallsRequest=Ku={}))});var nl=I(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Re=V(),Zu;(function(e){e.Relative="relative"})(Zu||(De.TokenFormat=Zu={}));var Wn;(function(e){e.method="textDocument/semanticTokens",e.type=new Re.RegistrationType(e.method)})(Wn||(De.SemanticTokensRegistrationType=Wn={}));var Yu;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Re.MessageDirection.clientToServer,e.type=new Re.ProtocolRequestType(e.method),e.registrationMethod=Wn.method,e.capabilities=Re.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Yu||(De.SemanticTokensRequest=Yu={}));var Ju;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Re.MessageDirection.clientToServer,e.type=new Re.ProtocolRequestType(e.method),e.registrationMethod=Wn.method,e.capabilities=Re.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Ju||(De.SemanticTokensDeltaRequest=Ju={}));var el;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Re.MessageDirection.clientToServer,e.type=new Re.ProtocolRequestType(e.method),e.registrationMethod=Wn.method,e.capabilities=Re.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(el||(De.SemanticTokensRangeRequest=el={}));var tl;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Re.MessageDirection.serverToClient,e.type=new Re.ProtocolRequestType0(e.method),e.capabilities=Re.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(tl||(De.SemanticTokensRefreshRequest=tl={}))});var ol=I(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ShowDocumentRequest=void 0;var oc=V(),rl;(function(e){e.method="window/showDocument",e.messageDirection=oc.MessageDirection.serverToClient,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("window.showDocument.support",void 0)})(rl||(Lr.ShowDocumentRequest=rl={}))});var sl=I(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.LinkedEditingRangeRequest=void 0;var ic=V(),il;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(il||(Wr.LinkedEditingRangeRequest=il={}))});var hl=I(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.WillDeleteFilesRequest=ge.DidDeleteFilesNotification=ge.DidRenameFilesNotification=ge.WillRenameFilesRequest=ge.DidCreateFilesNotification=ge.WillCreateFilesRequest=ge.FileOperationPatternKind=void 0;var se=V(),cl;(function(e){e.file="file",e.folder="folder"})(cl||(ge.FileOperationPatternKind=cl={}));var al;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(al||(ge.WillCreateFilesRequest=al={}));var ul;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(ul||(ge.DidCreateFilesNotification=ul={}));var ll;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(ll||(ge.WillRenameFilesRequest=ll={}));var dl;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(dl||(ge.DidRenameFilesNotification=dl={}));var fl;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(fl||(ge.DidDeleteFilesNotification=fl={}));var ml;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(ml||(ge.WillDeleteFilesRequest=ml={}))});var Tl=I(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.MonikerRequest=bt.MonikerKind=bt.UniquenessLevel=void 0;var sc=V(),gl;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(gl||(bt.UniquenessLevel=gl={}));var pl;(function(e){e.$import="import",e.$export="export",e.local="local"})(pl||(bt.MonikerKind=pl={}));var yl;(function(e){e.method="textDocument/moniker",e.messageDirection=sc.MessageDirection.clientToServer,e.type=new sc.ProtocolRequestType(e.method),e.capabilities=sc.CM.create("textDocument.moniker","monikerProvider")})(yl||(bt.MonikerRequest=yl={}))});var Cl=I(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.TypeHierarchySubtypesRequest=vt.TypeHierarchySupertypesRequest=vt.TypeHierarchyPrepareRequest=void 0;var At=V(),_l;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method),e.capabilities=At.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(_l||(vt.TypeHierarchyPrepareRequest=_l={}));var bl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method)})(bl||(vt.TypeHierarchySupertypesRequest=bl={}));var vl;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method)})(vl||(vt.TypeHierarchySubtypesRequest=vl={}))});var Dl=I(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.InlineValueRefreshRequest=hn.InlineValueRequest=void 0;var mn=V(),Sl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=mn.MessageDirection.clientToServer,e.type=new mn.ProtocolRequestType(e.method),e.capabilities=mn.CM.create("textDocument.inlineValue","inlineValueProvider")})(Sl||(hn.InlineValueRequest=Sl={}));var Il;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=mn.MessageDirection.serverToClient,e.type=new mn.ProtocolRequestType0(e.method),e.capabilities=mn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(Il||(hn.InlineValueRefreshRequest=Il={}))});var Rl=I(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.InlayHintRefreshRequest=Ct.InlayHintResolveRequest=Ct.InlayHintRequest=void 0;var rt=V(),wl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint","inlayHintProvider")})(wl||(Ct.InlayHintRequest=wl={}));var kl;(function(e){e.method="inlayHint/resolve",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(kl||(Ct.InlayHintResolveRequest=kl={}));var Pl;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=rt.MessageDirection.serverToClient,e.type=new rt.ProtocolRequestType0(e.method),e.capabilities=rt.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Pl||(Ct.InlayHintRefreshRequest=Pl={}))});var Nl=I(ce=>{"use strict";var Sg=ce&&ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ig=ce&&ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dg=ce&&ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var kg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Pg=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Rg=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.InlineCompletionRequest=void 0;var uc=V(),Ql;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=uc.MessageDirection.clientToServer,e.type=new uc.ProtocolRequestType(e.method),e.capabilities=uc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Ql||(Qr.InlineCompletionRequest=Ql={}))});var Vl=I(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.TextDocumentContentRefreshRequest=pn.TextDocumentContentRequest=void 0;var Qn=V(),$l;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType(e.method),e.capabilities=Qn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})($l||(pn.TextDocumentContentRequest=$l={}));var zl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Qn.MessageDirection.serverToClient,e.type=new Qn.ProtocolRequestType(e.method)})(zl||(pn.TextDocumentContentRefreshRequest=zl={}))});var uf=I(a=>{"use strict";var Og=a&&a.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xg=a&&a.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mg=a&&a.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(nd||(a.StaticRegistrationOptions=nd={}));var rd;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||mc.is(r.documentSelector))}e.is=t})(rd||(a.TextDocumentRegistrationOptions=rd={}));var od;(function(e){function t(r){let o=r;return ae.objectLiteral(o)&&(o.workDoneProgress===void 0||ae.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ae.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(od||(a.WorkDoneProgressOptions=od={}));var id;(function(e){e.method="initialize",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method)})(id||(a.InitializeRequest=id={}));var sd;(function(e){e.unknownProtocolVersion=1})(sd||(a.InitializeErrorCodes=sd={}));var cd;(function(e){e.method="initialized",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method)})(cd||(a.InitializedNotification=cd={}));var ad;(function(e){e.method="shutdown",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType0(e.method)})(ad||(a.ShutdownRequest=ad={}));var ud;(function(e){e.method="exit",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType0(e.method)})(ud||(a.ExitNotification=ud={}));var ld;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeConfiguration",void 0)})(ld||(a.DidChangeConfigurationNotification=ld={}));var dd;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(dd||(a.MessageType=dd={}));var fd;(function(e){e.method="window/showMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(fd||(a.ShowMessageNotification=fd={}));var md;(function(e){e.method="window/showMessageRequest",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(md||(a.ShowMessageRequest=md={}));var hd;(function(e){e.method="window/logMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(hd||(a.LogMessageNotification=hd={}));var gd;(function(e){e.method="telemetry/event",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(gd||(a.TelemetryEventNotification=gd={}));var pd;(function(e){e.None=0,e.Full=1,e.Incremental=2})(pd||(a.TextDocumentSyncKind=pd={}));var yd;(function(e){e.method="textDocument/didOpen",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(yd||(a.DidOpenTextDocumentNotification=yd={}));var Td;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(Td||(a.TextDocumentContentChangeEvent=Td={}));var _d;(function(e){e.method="textDocument/didChange",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync")})(_d||(a.DidChangeTextDocumentNotification=_d={}));var bd;(function(e){e.method="textDocument/didClose",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(bd||(a.DidCloseTextDocumentNotification=bd={}));var vd;(function(e){e.method="textDocument/didSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(vd||(a.DidSaveTextDocumentNotification=vd={}));var Cd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Cd||(a.TextDocumentSaveReason=Cd={}));var Sd;(function(e){e.method="textDocument/willSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Sd||(a.WillSaveTextDocumentNotification=Sd={}));var Id;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(Id||(a.WillSaveTextDocumentWaitUntilRequest=Id={}));var Dd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeWatchedFiles",void 0)})(Dd||(a.DidChangeWatchedFilesNotification=Dd={}));var wd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(wd||(a.FileChangeType=wd={}));var hc;(function(e){function t(n){let r=n;return ae.objectLiteral(r)&&(Kl.URI.is(r.baseUri)||Kl.WorkspaceFolder.is(r.baseUri))&&ae.string(r.pattern)}e.is=t})(hc||(a.RelativePattern=hc={}));var gc;(function(e){function t(n){let r=n;return ae.string(r)||hc.is(r)}e.is=t})(gc||(a.GlobPattern=gc={}));var kd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(kd||(a.WatchKind=kd={}));var Pd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.publishDiagnostics",void 0)})(Pd||(a.PublishDiagnosticsNotification=Pd={}));var Rd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Rd||(a.CompletionTriggerKind=Rd={}));var Od;(function(e){e.method="textDocument/completion",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion","completionProvider")})(Od||(a.CompletionRequest=Od={}));var xd;(function(e){e.method="completionItem/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(xd||(a.CompletionResolveRequest=xd={}));var Md;(function(e){e.method="textDocument/hover",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.hover","hoverProvider")})(Md||(a.HoverRequest=Md={}));var Ed;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Ed||(a.SignatureHelpTriggerKind=Ed={}));var Ad;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Ad||(a.SignatureHelpRequest=Ad={}));var qd;(function(e){e.method="textDocument/definition",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.definition","definitionProvider")})(qd||(a.DefinitionRequest=qd={}));var Nd;(function(e){e.method="textDocument/references",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.references","referencesProvider")})(Nd||(a.ReferencesRequest=Nd={}));var Fd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Fd||(a.DocumentHighlightRequest=Fd={}));var Gd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Gd||(a.DocumentSymbolRequest=Gd={}));var Hd;(function(e){e.method="textDocument/codeAction",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction","codeActionProvider")})(Hd||(a.CodeActionRequest=Hd={}));var jd;(function(e){e.method="codeAction/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(jd||(a.CodeActionResolveRequest=jd={}));var Ld;(function(e){e.method="workspace/symbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol","workspaceSymbolProvider")})(Ld||(a.WorkspaceSymbolRequest=Ld={}));var Wd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Wd||(a.WorkspaceSymbolResolveRequest=Wd={}));var Ud;(function(e){e.method="textDocument/codeLens",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens","codeLensProvider")})(Ud||(a.CodeLensRequest=Ud={}));var Qd;(function(e){e.method="codeLens/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Qd||(a.CodeLensResolveRequest=Qd={}));var Bd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType0(e.method),e.capabilities=_.CM.create("workspace.codeLens",void 0)})(Bd||(a.CodeLensRefreshRequest=Bd={}));var $d;(function(e){e.method="textDocument/documentLink",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider")})($d||(a.DocumentLinkRequest=$d={}));var zd;(function(e){e.method="documentLink/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(zd||(a.DocumentLinkResolveRequest=zd={}));var Vd;(function(e){e.method="textDocument/formatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.formatting","documentFormattingProvider")})(Vd||(a.DocumentFormattingRequest=Vd={}));var Kd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Kd||(a.DocumentRangeFormattingRequest=Kd={}));var Xd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Xd||(a.DocumentRangesFormattingRequest=Xd={}));var Zd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Zd||(a.DocumentOnTypeFormattingRequest=Zd={}));var Yd;(function(e){e.Identifier=1})(Yd||(a.PrepareSupportDefaultBehavior=Yd={}));var Jd;(function(e){e.method="textDocument/rename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename","renameProvider")})(Jd||(a.RenameRequest=Jd={}));var ef;(function(e){e.method="textDocument/prepareRename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(ef||(a.PrepareRenameRequest=ef={}));var tf;(function(e){e.method="workspace/executeCommand",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.executeCommand","executeCommandProvider")})(tf||(a.ExecuteCommandRequest=tf={}));var nf;(function(e){e.method="workspace/applyEdit",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType("workspace/applyEdit"),e.capabilities=_.CM.create("workspace.applyEdit",void 0)})(nf||(a.ApplyWorkspaceEditRequest=nf={}))});var df=I(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.createProtocolConnection=Lg;var lf=et();function Lg(e,t,n,r){return lf.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,lf.createMessageConnection)(e,t,n,r)}});var te=I(we=>{"use strict";var Wg=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Br=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Wg(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;Br(et(),we);Br((Ar(),cr(Er)),we);Br(V(),we);Br(uf(),we);var Ug=df();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Ug.createProtocolConnection}});var ff;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(ff||(we.LSPErrorCodes=ff={}))});var Sc=I(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.empty=void 0;St.v4=mf;St.isUUID=hf;St.parse=Bg;St.generateUuid=$g;var $n=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Cc=class e extends $n{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};St.empty=new $n("00000000-0000-0000-0000-000000000000");function mf(){return new Cc}var Qg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function hf(e){return Qg.test(e)}function Bg(e){if(!hf(e))throw new Error("invalid uuid");return new $n(e)}function $g(){return mf().asHex()}});var gf=I(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.ProgressFeature=void 0;_n.attachWorkDone=Vg;_n.attachPartialResult=Xg;var It=te(),zg=Sc(),Tn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(It.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(It.WorkDoneProgress.type,this._token,{kind:"end"})}},$r=class extends Tn{_source;constructor(t,n){super(t,n),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},zn=class{constructor(){}begin(){}report(){}done(){}},zr=class extends zn{_source;constructor(){super(),this._source=new It.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Vg(e,t){if(t===void 0||t.workDoneToken===void 0)return new zn;let n=t.workDoneToken;return delete t.workDoneToken,new Tn(e,n)}var Kg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(It.WorkDoneProgressCancelNotification.type,n=>{let r=Tn.Instances.get(n.token);(r instanceof $r||r instanceof zr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new zn:new Tn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,zg.generateUuid)();return this.connection.sendRequest(It.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new $r(this.connection,t))}else return Promise.resolve(new zr)}};_n.ProgressFeature=Kg;var Ic;(function(e){e.type=new It.ProgressType})(Ic||(Ic={}));var Dc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Ic.type,this._token,t)}};function Xg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Dc(e,n)}});var pf=I(Ke=>{"use strict";var Zg=Ke&&Ke.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Yg=Ke&&Ke.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jg=Ke&&Ke.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?tp.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(ep.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Ke.ConfigurationFeature=np});var yf=I(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.WorkspaceFoldersFeature=void 0;var Vr=te(),rp=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Vr.Emitter,this.connection.onNotification(Vr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Vr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Vr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Kr.WorkspaceFoldersFeature=rp});var Tf=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.CallHierarchyFeature=void 0;var wc=te(),op=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(wc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=wc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=wc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Xr.CallHierarchyFeature=op});var Pc=I(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.SemanticTokensBuilder=Dt.SemanticTokensDiff=Dt.SemanticTokensFeature=void 0;var Zr=te(),ip=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Zr.SemanticTokensRefreshRequest.type),on:t=>{let n=Zr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Zr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Zr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Dt.SemanticTokensFeature=ip;var Yr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(c-=this._prevChar));let g=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;g[this._dataLen++]=s,g[this._dataLen++]=c,g[this._dataLen++]=r,g[this._dataLen++]=o,g[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let d=t[5*c],h=t[5*g];if(d===h){let b=t[5*c+1],m=t[5*g+1];return b-m}return d-h});let o=[],i=0,s=0;for(let c=0;c{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.ShowDocumentFeature=void 0;var sp=te(),cp=e=>class extends e{showDocument(t){return this.connection.sendRequest(sp.ShowDocumentRequest.type,t)}};Jr.ShowDocumentFeature=cp});var bf=I(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.FileOperationsFeature=void 0;var bn=te(),ap=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(bn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(bn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(bn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(bn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(bn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(bn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};eo.FileOperationsFeature=ap});var vf=I(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.LinkedEditingRangeFeature=void 0;var up=te(),lp=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(up.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};to.LinkedEditingRangeFeature=lp});var Cf=I(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.TypeHierarchyFeature=void 0;var Rc=te(),dp=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Rc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Rc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Rc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};no.TypeHierarchyFeature=dp});var If=I(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.InlineValueFeature=void 0;var Sf=te(),fp=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Sf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Sf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};ro.InlineValueFeature=fp});var wf=I(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.FoldingRangeFeature=void 0;var Df=te(),mp=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(Df.FoldingRangeRefreshRequest.type),on:t=>{let n=Df.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};oo.FoldingRangeFeature=mp});var kf=I(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.InlayHintFeature=void 0;var Oc=te(),hp=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Oc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Oc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Oc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};io.InlayHintFeature=hp});var Pf=I(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.DiagnosticFeature=void 0;var Vn=te(),gp=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Vn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Vn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Vn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Vn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Vn.WorkspaceDiagnosticRequest.partialResult,n)))}}};so.DiagnosticFeature=gp});var Mc=I(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.TextDocuments=void 0;var Nt=te(),xc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Nt.Emitter,this._onDidOpen=new Nt.Emitter,this._onDidClose=new Nt.Emitter,this._onDidSave=new Nt.Emitter,this._onWillSave=new Nt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Nt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let c=this._syncedDocuments.get(o.uri);c!==void 0&&(c=this._configuration.update(c,i,s),this._syncedDocuments.set(o.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Nt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};co.TextDocuments=xc});var qc=I(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.NotebookDocuments=vn.NotebookSyncFeature=void 0;var Me=te(),Rf=Mc(),pp=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Me.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Me.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Me.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Me.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};vn.NotebookSyncFeature=pp;var Ec=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Me.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Me.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Me.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ac=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof Rf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Rf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Me.Emitter,this._onDidChange=new Me.Emitter,this._onDidSave=new Me.Emitter,this._onDidClose=new Me.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Ec,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,c=!1,g=o.change;g.metadata!==void 0&&(c=!0,i.metadata=g.metadata);let d=[],h=[],b=[],m=[];if(g.cells!==void 0){let x=g.cells;if(x.structure!==void 0){let p=x.structure.array;if(i.cells.splice(p.start,p.deleteCount,...p.cells!==void 0?p.cells:[]),x.structure.didOpen!==void 0)for(let l of x.structure.didOpen)await n.openTextDocument({textDocument:l}),d.push(l.uri);if(x.structure.didClose)for(let l of x.structure.didClose)await n.closeTextDocument({textDocument:l}),h.push(l.uri)}if(x.data!==void 0){let p=new Map(x.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let C=p.get(i.cells[l].document);if(C!==void 0){let k=i.cells.splice(l,1,C);if(b.push({old:k[0],new:C}),p.delete(C.document),p.size===0)break}}}if(x.textContent!==void 0)for(let p of x.textContent)await n.changeTextDocument({textDocument:p.document,contentChanges:p.changes}),m.push(p.document.uri)}this.updateCellMap(i);let T={notebookDocument:i};c&&(T.metadata={old:s,new:i.metadata});let D=[];for(let x of d)D.push(this.getNotebookCell(x));let q=[];for(let x of h)q.push(this.getNotebookCell(x));let N=[];for(let x of m)N.push(this.getNotebookCell(x));(D.length>0||q.length>0||b.length>0||N.length>0)&&(T.cells={added:D,removed:q,changed:{data:b,textContent:N}}),(T.metadata!==void 0||T.cells!==void 0)&&this._onDidChange.fire(T)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Me.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};vn.NotebookDocuments=Ac});var Of=I(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.MonikerFeature=void 0;var yp=te(),Tp=e=>class extends e{get moniker(){return{on:t=>{let n=yp.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ao.MonikerFeature=Tp});var xf=I(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.InlineCompletionFeature=void 0;var _p=te(),bp=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(_p.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};uo.InlineCompletionFeature=bp});var Ef=I(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.TextDocumentContentFeature=void 0;var Mf=te(),vp=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Mf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Mf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};lo.TextDocumentContentFeature=vp});var Lc=I(Q=>{"use strict";var Cp=Q&&Q.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Sp=Q&&Q.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jf=Q&&Q.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};Q.ErrorMessageTracker=Gc;var fo=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(w.MessageType.Error,t)}warn(t){this.send(w.MessageType.Warning,t)}info(t){this.send(w.MessageType.Info,t)}log(t){this.send(w.MessageType.Log,t)}debug(t){this.send(w.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(w.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,w.RAL)().console.error("Sending log message failed")})}},Hc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:w.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Nc)}showWarningMessage(t,...n){let r={type:w.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Nc)}showInformationMessage(t,...n){let r={type:w.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Nc)}},Af=(0,Pp.ShowDocumentFeature)((0,A.ProgressFeature)(Hc)),qf;(function(e){function t(){return new mo}e.create=t})(qf||(Q.BulkRegistration=qf={}));var mo=class{_registrations=[];_registered=new Set;add(t,n){let r=Ee.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Fc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Nf;(function(e){function t(){return new Kn(void 0,[])}e.create=t})(Nf||(Q.BulkUnregistration=Nf={}));var Kn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(w.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ee.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(w.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},ho=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof mo?this.registerMany(t):t instanceof Kn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ee.string(n)?n:n.method,i=Fc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(w.RegistrationRequest.type,s).then(c=>(t.add({id:i,method:o}),t),c=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(c)))}registerSingle2(t,n){let r=Ee.string(t)?t:t.method,o=Fc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(w.RegistrationRequest.type,i).then(s=>w.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(w.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(w.RegistrationRequest.type,n).then(()=>new Kn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},jc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(w.ApplyWorkspaceEditRequest.type,r)}},Ff=(0,Hp.TextDocumentContentFeature)((0,Rp.FileOperationsFeature)((0,Dp.WorkspaceFoldersFeature)((0,Ip.ConfigurationFeature)(jc)))),go=class{_trace;_connection;constructor(){this._trace=w.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==w.Trace.Off&&this.connection.sendNotification(w.LogTraceNotification.type,{message:t,verbose:this._trace===w.Trace.Verbose?n:void 0}).catch(()=>{})}},po=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(w.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},yo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._LanguagesImpl=yo;var Gf=(0,Gp.InlineCompletionFeature)((0,Ep.FoldingRangeFeature)((0,Fp.MonikerFeature)((0,qp.DiagnosticFeature)((0,Ap.InlayHintFeature)((0,Mp.InlineValueFeature)((0,xp.TypeHierarchyFeature)((0,Op.LinkedEditingRangeFeature)((0,kp.SemanticTokensFeature)((0,wp.CallHierarchyFeature)(yo)))))))))),To=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._NotebooksImpl=To;var Hf=(0,Np.NotebookSyncFeature)(To);function Lf(e,t){return function(n){return t(e(n))}}function Wf(e,t){return function(n){return t(e(n))}}function Uf(e,t){return function(n){return t(e(n))}}function Qf(e,t){return function(n){return t(e(n))}}function Bf(e,t){return function(n){return t(e(n))}}function $f(e,t){return function(n){return t(e(n))}}function zf(e,t){return function(n){return t(e(n))}}function Vf(e,t){return function(n){return t(e(n))}}function jp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Lf),tracer:n(e.tracer,t.tracer,Uf),telemetry:n(e.telemetry,t.telemetry,Wf),client:n(e.client,t.client,Qf),window:n(e.window,t.window,Bf),workspace:n(e.workspace,t.workspace,$f),languages:n(e.languages,t.languages,zf),notebooks:n(e.notebooks,t.notebooks,Vf)}}function Lp(e,t,n){let r=n&&n.console?new(n.console(fo)):new fo,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(go)):new go,s=n&&n.telemetry?new(n.telemetry(po)):new po,c=n&&n.client?new(n.client(ho)):new ho,g=n&&n.window?new(n.window(Af)):new Af,d=n&&n.workspace?new(n.workspace(Ff)):new Ff,h=n&&n.languages?new(n.languages(Gf)):new Gf,b=n&&n.notebooks?new(n.notebooks(Hf)):new Hf,m=[r,i,s,c,g,d,h,b];function T(p){return p instanceof Promise?p:Ee.thenable(p)?new Promise((l,C)=>{p.then(k=>l(k),k=>C(k))}):Promise.resolve(p)}let D,q,N,x={listen:()=>o.listen(),sendRequest:(p,...l)=>o.sendRequest(Ee.string(p)?p:p.method,...l),onRequest:(p,l)=>o.onRequest(p,l),sendNotification:(p,l)=>{let C=Ee.string(p)?p:p.method;return o.sendNotification(C,l)},onNotification:(p,l)=>o.onNotification(p,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:p=>(q=p,{dispose:()=>{q=void 0}}),onInitialized:p=>o.onNotification(w.InitializedNotification.type,p),onShutdown:p=>(D=p,{dispose:()=>{D=void 0}}),onExit:p=>(N=p,{dispose:()=>{N=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return c},get window(){return g},get workspace(){return d},get languages(){return h},get notebooks(){return b},onDidChangeConfiguration:p=>o.onNotification(w.DidChangeConfigurationNotification.type,p),onDidChangeWatchedFiles:p=>o.onNotification(w.DidChangeWatchedFilesNotification.type,p),__textDocumentSync:void 0,onDidOpenTextDocument:p=>o.onNotification(w.DidOpenTextDocumentNotification.type,p),onDidChangeTextDocument:p=>o.onNotification(w.DidChangeTextDocumentNotification.type,p),onDidCloseTextDocument:p=>o.onNotification(w.DidCloseTextDocumentNotification.type,p),onWillSaveTextDocument:p=>o.onNotification(w.WillSaveTextDocumentNotification.type,p),onWillSaveTextDocumentWaitUntil:p=>o.onRequest(w.WillSaveTextDocumentWaitUntilRequest.type,p),onDidSaveTextDocument:p=>o.onNotification(w.DidSaveTextDocumentNotification.type,p),sendDiagnostics:p=>o.sendNotification(w.PublishDiagnosticsNotification.type,p),onHover:p=>o.onRequest(w.HoverRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onCompletion:p=>o.onRequest(w.CompletionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCompletionResolve:p=>o.onRequest(w.CompletionResolveRequest.type,p),onSignatureHelp:p=>o.onRequest(w.SignatureHelpRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDeclaration:p=>o.onRequest(w.DeclarationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDefinition:p=>o.onRequest(w.DefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onTypeDefinition:p=>o.onRequest(w.TypeDefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onImplementation:p=>o.onRequest(w.ImplementationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onReferences:p=>o.onRequest(w.ReferencesRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentHighlight:p=>o.onRequest(w.DocumentHighlightRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentSymbol:p=>o.onRequest(w.DocumentSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbol:p=>o.onRequest(w.WorkspaceSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:p=>o.onRequest(w.WorkspaceSymbolResolveRequest.type,p),onCodeAction:p=>o.onRequest(w.CodeActionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeActionResolve:p=>o.onRequest(w.CodeActionResolveRequest.type,(l,C)=>p(l,C)),onCodeLens:p=>o.onRequest(w.CodeLensRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeLensResolve:p=>o.onRequest(w.CodeLensResolveRequest.type,(l,C)=>p(l,C)),onDocumentFormatting:p=>o.onRequest(w.DocumentFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:p=>o.onRequest(w.DocumentRangeFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:p=>o.onRequest(w.DocumentOnTypeFormattingRequest.type,(l,C)=>p(l,C)),onRenameRequest:p=>o.onRequest(w.RenameRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onPrepareRename:p=>o.onRequest(w.PrepareRenameRequest.type,(l,C)=>p(l,C)),onDocumentLinks:p=>o.onRequest(w.DocumentLinkRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentLinkResolve:p=>o.onRequest(w.DocumentLinkResolveRequest.type,(l,C)=>p(l,C)),onDocumentColor:p=>o.onRequest(w.DocumentColorRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onColorPresentation:p=>o.onRequest(w.ColorPresentationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onFoldingRanges:p=>o.onRequest(w.FoldingRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onSelectionRanges:p=>o.onRequest(w.SelectionRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onExecuteCommand:p=>o.onRequest(w.ExecuteCommandRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let p of m)p.attach(x);return o.onRequest(w.InitializeRequest.type,p=>{t.initialize(p),Ee.string(p.trace)&&(i.trace=w.Trace.fromString(p.trace));for(let l of m)l.initialize(p.capabilities);if(q){let l=q(p,new w.CancellationTokenSource().token,(0,A.attachWorkDone)(o,p),void 0);return T(l).then(C=>{if(C instanceof w.ResponseError)return C;let k=C;k||(k={capabilities:{}});let M=k.capabilities;M||(M={},k.capabilities=M),M.textDocumentSync===void 0||M.textDocumentSync===null?M.textDocumentSync=Ee.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None:!Ee.number(M.textDocumentSync)&&!Ee.number(M.textDocumentSync.change)&&(M.textDocumentSync.change=Ee.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None);for(let L of m)L.fillServerCapabilities(M);return k})}else{let l={capabilities:{textDocumentSync:w.TextDocumentSyncKind.None}};for(let C of m)C.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(w.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,D)return D(new w.CancellationTokenSource().token)}),o.onNotification(w.ExitNotification.type,()=>{try{if(N)return N()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(w.SetTraceNotification.type,p=>{i.trace=w.Trace.fromString(p.value)}),x}});var Kf=I(ve=>{"use strict";var Wp=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Up=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$c=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return Le.normalize(n.join("/"))}function Uc(){return process.platform==="win32"}function _o(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,c)=>{let g=process.env,d=Object.create(null);Object.keys(g).forEach(h=>d[h]=g[h]),t&&Wc.existsSync(t)&&(d[o]?d[o]=t+Le.delimiter+d[o]:d[o]=t,r&&r(`NODE_PATH value is: ${d[o]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let h=(0,zc.fork)("",[],{cwd:n,env:d,execArgv:["-e",i]});if(h.pid===void 0){c(new Error(`Starting process to resolve node module ${e} failed`));return}h.on("error",m=>{c(m)}),h.on("message",m=>{m.c==="r"&&(h.send({c:"e"}),m.s?s(m.r):c(new Error(`Failed to resolve module: ${e}`)))});let b={c:"rs",a:e};h.send(b)}catch(h){c(h)}})}function Qc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Uc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,zc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Uc()?Le.join(s,"node_modules"):Le.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function $p(e){let t="yarn",n={encoding:"utf8"};Uc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,zc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let c of s)try{let g=JSON.parse(c);if(g.type==="log")return Le.join(g.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Bc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Wc.existsSync(__filename.toUpperCase())||!Wc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?Le.normalize(i).indexOf(Le.normalize(o))===0:Le.normalize(i).toLowerCase().indexOf(Le.normalize(o).toLowerCase())===0}e.isParent=r})(Bc||(ve.FileSystem=Bc={}));function zp(e,t,n,r){return n?(Le.isAbsolute(n)||(n=Le.join(e,n)),_o(t,n,n,r).then(o=>Bc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>_o(t,Qc(r),e,r))):_o(t,Qc(r),e,r)}});var Yf=I(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var Xf=require("util"),it=et(),Vc=class e extends it.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Xf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Kc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),it.Disposable.create(()=>this.stream.off("data",t))}},Xc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),it.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),it.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),it.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},Zf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Vc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Xf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Kc(e),asWritableStream:e=>new Xc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Zc(){return Zf}(function(e){function t(){it.RAL.install(Zf)}e.install=t})(Zc||(Zc={}));Yc.default=Zc});var oa=I(F=>{"use strict";var em=F&&F.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Vp=F&&F.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ra=F&&F.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),Oe.Disposable.create(()=>this.process.off("message",t))}};F.IPCMessageReader=Jc;var ea=class extends Oe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.IPCMessageWriter=ea;var ta=class extends Oe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new Oe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};F.PortMessageReader=ta;var na=class extends Oe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.PortMessageWriter=na;var Ft=class extends Oe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Xn.default)().stream.asReadableStream(t),n)}};F.SocketMessageReader=Ft;var Gt=class extends Oe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Xn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};F.SocketMessageWriter=Gt;var bo=class extends Oe.ReadableStreamMessageReader{constructor(t,n){super((0,Xn.default)().stream.asReadableStream(t),n)}};F.StreamMessageReader=bo;var vo=class extends Oe.WriteableStreamMessageWriter{constructor(t,n){super((0,Xn.default)().stream.asWritableStream(t),n)}};F.StreamMessageWriter=vo;var ey=process.env.XDG_RUNTIME_DIR,ty=new Map([["linux",107],["darwin",102]]);function ny(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Jf.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=Jp.realpathSync(ey??Yp.tmpdir()),r=ty.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,Jf.randomBytes)(Math.floor(e/2)).toString("hex");return Zp.join(n,`lsp-${o}.sock`)}function ry(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,Co.createServer)(c=>{s.close(),n([new Ft(c,t),new Gt(c,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function oy(e,t="utf-8"){let n=(0,Co.createConnection)(e);return[new Ft(n,t),new Gt(n,t)]}function iy(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,Co.createServer)(c=>{s.close(),n([new Ft(c,t),new Gt(c,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function sy(e,t="utf-8"){let n=(0,Co.createConnection)(e,"127.0.0.1");return[new Ft(n,t),new Gt(n,t)]}function cy(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function ay(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function uy(e,t,n,r){n||(n=Oe.NullLogger);let o=cy(e)?new bo(e):e,i=ay(t)?new vo(t):t;return Oe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Oe.createMessageConnection)(o,i,n,r)}});var ia=I(st=>{"use strict";var ly=st&&st.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),tm=st&&st.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ly(t,e,n)};Object.defineProperty(st,"__esModule",{value:!0});st.createProtocolConnection=fy;var dy=oa();tm(oa(),st);tm(te(),st);function fy(e,t,n,r){return(0,dy.createMessageConnection)(e,t,n,r)}});var sa=I(pe=>{"use strict";var my=pe&&pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rm=pe&&pe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&my(t,e,n)};Object.defineProperty(pe,"__esModule",{value:!0});pe.ProposedFeatures=pe.NotebookDocuments=pe.TextDocuments=pe.SemanticTokensBuilder=void 0;var hy=Pc();Object.defineProperty(pe,"SemanticTokensBuilder",{enumerable:!0,get:function(){return hy.SemanticTokensBuilder}});rm(te(),pe);var gy=Mc();Object.defineProperty(pe,"TextDocuments",{enumerable:!0,get:function(){return gy.TextDocuments}});var py=qc();Object.defineProperty(pe,"NotebookDocuments",{enumerable:!0,get:function(){return py.NotebookDocuments}});rm(Lc(),pe);var nm;(function(e){e.all={__brand:"features"}})(nm||(pe.ProposedFeatures=nm={}))});var aa=I(Ce=>{"use strict";var cm=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),yy=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),am=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{So(),process.exit(Cn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;ca.number(t)&&lm===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(Cn?0:1)}},3e3)},get shutdownReceived(){return Cn},set shutdownReceived(e){Cn=e},exit:e=>{So(),process.exit(e)}};function vy(e,t,n,r){let o,i,s,c;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),Ht.ConnectionStrategy.is(e)||Ht.ConnectionOptions.is(e)?c=e:(i=e,s=t,c=n),Cy(i,s,c,o)}function Cy(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let c,g,d=process.argv.slice(2);for(let h=0;h{So(),process.exit(Cn?0:1)}),c.on("close",()=>{So(),process.exit(Cn?0:1)})}let s=c=>{let g=(0,Ht.createProtocolConnection)(e,t,c,n);return o&&Sy(c),g};return(0,Ty.createConnection)(s,by,r)}function Sy(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,om.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...c]=i;e.error(`Assertion failed: ${s} ${t(c)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,om.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var hm={};Va(hm,{TextDocument:()=>ua});function la(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);la(r,t),la(o,t);let i=0,s=0,c=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Iy(e){let t=mm(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Io,ua,gm=za(()=>{"use strict";Io=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=mm(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let c=Math.max(o.start.line,0),g=Math.max(o.end.line,0),d=this._lineOffsets,h=dm(r.text,!1,i);if(g-c===h.length)for(let m=0,T=h.length;mt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&fm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,c){return new Io(o,i,s,c)}e.create=t;function n(o,i,s){if(o instanceof Io)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),c=la(i.map(Iy),(h,b)=>{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),g=0,d=[];for(let h of c){let b=o.offsetAt(h.range.start);if(bg&&d.push(s.substring(g,b)),h.newText.length&&d.push(h.newText),g=o.offsetAt(h.range.end)}return d.push(s.substr(g)),d.join("")}e.applyEdits=r})(ua||(ua={}))});var Yn=I(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.DATATYPE_SET=ye.KEYWORD_SET=ye.PUNCTUATION=ye.OPERATORS=ye.DATATYPES=ye.KEYWORDS=void 0;ye.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ye.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ye.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ye.PUNCTUATION=["(",")","[","]",";",",",":","."];ye.KEYWORD_SET=new Set(ye.KEYWORDS);ye.DATATYPE_SET=new Set(ye.DATATYPES)});var er=I(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.positionAt=fa;Jn.offsetAt=wy;Jn.sourceRange=ky;function da(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function pm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function ym(e){let t=[0];for(let n=0;n0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Me.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Me.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(T){return T===!0||T===!1}e.boolean=o;function i(T){return t.call(T)==="[object String]"}e.string=i;function s(T){return t.call(T)==="[object Number]"}e.number=s;function c(T,D,q){return t.call(T)==="[object Number]"&&D<=T&&T<=q}e.numberRange=c;function g(T){return t.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}e.integer=g;function d(T){return t.call(T)==="[object Number]"&&0<=T&&T<=2147483647}e.uinteger=d;function h(T){return t.call(T)==="[object Function]"}e.func=h;function b(T){return T!==null&&typeof T=="object"}e.objectLiteral=b;function m(T,D){return Array.isArray(T)&&T.every(D)}e.typedArray=m})(f||(f={}))});var V=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CM=he.ProtocolNotificationType=he.ProtocolNotificationType0=he.ProtocolRequestType=he.ProtocolRequestType0=he.RegistrationType=he.MessageDirection=void 0;var cn=tt(),Cu;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Cu||(he.MessageDirection=Cu={}));var Xs=class{____;method;constructor(t){this.method=t}};he.RegistrationType=Xs;var Zs=class extends cn.RequestType0{__;___;____;_pr;constructor(t){super(t)}};he.ProtocolRequestType0=Zs;var Ys=class extends cn.RequestType{__;___;____;_pr;constructor(t){super(t,cn.ParameterStructures.byName)}};he.ProtocolRequestType=Ys;var Js=class extends cn.NotificationType0{___;____;constructor(t){super(t)}};he.ProtocolNotificationType0=Js;var ec=class extends cn.NotificationType{___;____;constructor(t){super(t,cn.ParameterStructures.byName)}};he.ProtocolNotificationType=ec;var Su;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(Su||(he.CM=Su={}))});var Nr=I(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.boolean=yg;je.string=Iu;je.number=Tg;je.error=_g;je.func=bg;je.array=Du;je.stringArray=vg;je.typedArray=Cg;je.objectLiteral=Sg;function yg(e){return e===!0||e===!1}function Iu(e){return typeof e=="string"||e instanceof String}function Tg(e){return typeof e=="number"||e instanceof Number}function _g(e){return e instanceof Error}function bg(e){return typeof e=="function"}function Du(e){return Array.isArray(e)}function vg(e){return Du(e)&&e.every(t=>Iu(t))}function Cg(e,t){return Array.isArray(e)&&e.every(t)}function Sg(e){return e!==null&&typeof e=="object"}});var ku=I(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.ImplementationRequest=void 0;var tc=V(),wu;(function(e){e.method="textDocument/implementation",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.implementation","implementationProvider")})(wu||(Fr.ImplementationRequest=wu={}))});var Ru=I(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.TypeDefinitionRequest=void 0;var nc=V(),Pu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(Pu||(Gr.TypeDefinitionRequest=Pu={}))});var Mu=I(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.DidChangeWorkspaceFoldersNotification=un.WorkspaceFoldersRequest=void 0;var an=V(),Ou;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=an.MessageDirection.serverToClient,e.type=new an.ProtocolRequestType0(e.method),e.capabilities=an.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Ou||(un.WorkspaceFoldersRequest=Ou={}));var xu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=an.MessageDirection.clientToServer,e.type=new an.ProtocolNotificationType(e.method),e.capabilities=an.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(xu||(un.DidChangeWorkspaceFoldersNotification=xu={}))});var Au=I(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ConfigurationRequest=void 0;var rc=V(),Eu;(function(e){e.method="workspace/configuration",e.messageDirection=rc.MessageDirection.serverToClient,e.type=new rc.ProtocolRequestType(e.method),e.capabilities=rc.CM.create("workspace.configuration",void 0)})(Eu||(Hr.ConfigurationRequest=Eu={}))});var Fu=I(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.ColorPresentationRequest=dn.DocumentColorRequest=void 0;var ln=V(),qu;(function(e){e.method="textDocument/documentColor",e.messageDirection=ln.MessageDirection.clientToServer,e.type=new ln.ProtocolRequestType(e.method),e.capabilities=ln.CM.create("textDocument.colorProvider","colorProvider")})(qu||(dn.DocumentColorRequest=qu={}));var Nu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=ln.MessageDirection.clientToServer,e.type=new ln.ProtocolRequestType(e.method),e.capabilities=ln.CM.create("textDocument.colorProvider","colorProvider")})(Nu||(dn.ColorPresentationRequest=Nu={}))});var ju=I(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.FoldingRangeRefreshRequest=mn.FoldingRangeRequest=void 0;var fn=V(),Gu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=fn.MessageDirection.clientToServer,e.type=new fn.ProtocolRequestType(e.method),e.capabilities=fn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Gu||(mn.FoldingRangeRequest=Gu={}));var Hu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=fn.MessageDirection.serverToClient,e.type=new fn.ProtocolRequestType0(e.method),e.capabilities=fn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Hu||(mn.FoldingRangeRefreshRequest=Hu={}))});var Wu=I(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.DeclarationRequest=void 0;var oc=V(),Lu;(function(e){e.method="textDocument/declaration",e.messageDirection=oc.MessageDirection.clientToServer,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("textDocument.declaration","declarationProvider")})(Lu||(jr.DeclarationRequest=Lu={}))});var Qu=I(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.SelectionRangeRequest=void 0;var ic=V(),Uu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Uu||(Lr.SelectionRangeRequest=Uu={}))});var Vu=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.WorkDoneProgressCancelNotification=_t.WorkDoneProgressCreateRequest=_t.WorkDoneProgress=void 0;var Ig=tt(),Wn=V(),Bu;(function(e){e.type=new Ig.ProgressType;function t(n){return n===e.type}e.is=t})(Bu||(_t.WorkDoneProgress=Bu={}));var $u;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Wn.MessageDirection.serverToClient,e.type=new Wn.ProtocolRequestType(e.method),e.capabilities=Wn.CM.create("window.workDoneProgress",void 0)})($u||(_t.WorkDoneProgressCreateRequest=$u={}));var zu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Wn.MessageDirection.clientToServer,e.type=new Wn.ProtocolNotificationType(e.method)})(zu||(_t.WorkDoneProgressCancelNotification=zu={}))});var Yu=I(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.CallHierarchyOutgoingCallsRequest=bt.CallHierarchyIncomingCallsRequest=bt.CallHierarchyPrepareRequest=void 0;var rt=V(),Ku;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ku||(bt.CallHierarchyPrepareRequest=Ku={}));var Xu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Xu||(bt.CallHierarchyIncomingCallsRequest=Xu={}));var Zu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Zu||(bt.CallHierarchyOutgoingCallsRequest=Zu={}))});var ol=I(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Oe=V(),Ju;(function(e){e.Relative="relative"})(Ju||(De.TokenFormat=Ju={}));var Un;(function(e){e.method="textDocument/semanticTokens",e.type=new Oe.RegistrationType(e.method)})(Un||(De.SemanticTokensRegistrationType=Un={}));var el;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Un.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(el||(De.SemanticTokensRequest=el={}));var tl;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Un.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(tl||(De.SemanticTokensDeltaRequest=tl={}));var nl;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Un.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(nl||(De.SemanticTokensRangeRequest=nl={}));var rl;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Oe.MessageDirection.serverToClient,e.type=new Oe.ProtocolRequestType0(e.method),e.capabilities=Oe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(rl||(De.SemanticTokensRefreshRequest=rl={}))});var sl=I(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ShowDocumentRequest=void 0;var sc=V(),il;(function(e){e.method="window/showDocument",e.messageDirection=sc.MessageDirection.serverToClient,e.type=new sc.ProtocolRequestType(e.method),e.capabilities=sc.CM.create("window.showDocument.support",void 0)})(il||(Wr.ShowDocumentRequest=il={}))});var al=I(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeRequest=void 0;var cc=V(),cl;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=cc.MessageDirection.clientToServer,e.type=new cc.ProtocolRequestType(e.method),e.capabilities=cc.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(cl||(Ur.LinkedEditingRangeRequest=cl={}))});var pl=I(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.WillDeleteFilesRequest=ge.DidDeleteFilesNotification=ge.DidRenameFilesNotification=ge.WillRenameFilesRequest=ge.DidCreateFilesNotification=ge.WillCreateFilesRequest=ge.FileOperationPatternKind=void 0;var se=V(),ul;(function(e){e.file="file",e.folder="folder"})(ul||(ge.FileOperationPatternKind=ul={}));var ll;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(ll||(ge.WillCreateFilesRequest=ll={}));var dl;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(dl||(ge.DidCreateFilesNotification=dl={}));var fl;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(fl||(ge.WillRenameFilesRequest=fl={}));var ml;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(ml||(ge.DidRenameFilesNotification=ml={}));var hl;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(hl||(ge.DidDeleteFilesNotification=hl={}));var gl;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(gl||(ge.WillDeleteFilesRequest=gl={}))});var bl=I(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.MonikerRequest=vt.MonikerKind=vt.UniquenessLevel=void 0;var ac=V(),yl;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(yl||(vt.UniquenessLevel=yl={}));var Tl;(function(e){e.$import="import",e.$export="export",e.local="local"})(Tl||(vt.MonikerKind=Tl={}));var _l;(function(e){e.method="textDocument/moniker",e.messageDirection=ac.MessageDirection.clientToServer,e.type=new ac.ProtocolRequestType(e.method),e.capabilities=ac.CM.create("textDocument.moniker","monikerProvider")})(_l||(vt.MonikerRequest=_l={}))});var Il=I(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.TypeHierarchySubtypesRequest=Ct.TypeHierarchySupertypesRequest=Ct.TypeHierarchyPrepareRequest=void 0;var qt=V(),vl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method),e.capabilities=qt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(vl||(Ct.TypeHierarchyPrepareRequest=vl={}));var Cl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(Cl||(Ct.TypeHierarchySupertypesRequest=Cl={}));var Sl;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(Sl||(Ct.TypeHierarchySubtypesRequest=Sl={}))});var kl=I(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.InlineValueRefreshRequest=gn.InlineValueRequest=void 0;var hn=V(),Dl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=hn.MessageDirection.clientToServer,e.type=new hn.ProtocolRequestType(e.method),e.capabilities=hn.CM.create("textDocument.inlineValue","inlineValueProvider")})(Dl||(gn.InlineValueRequest=Dl={}));var wl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=hn.MessageDirection.serverToClient,e.type=new hn.ProtocolRequestType0(e.method),e.capabilities=hn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(wl||(gn.InlineValueRefreshRequest=wl={}))});var xl=I(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.InlayHintRefreshRequest=St.InlayHintResolveRequest=St.InlayHintRequest=void 0;var ot=V(),Pl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint","inlayHintProvider")})(Pl||(St.InlayHintRequest=Pl={}));var Rl;(function(e){e.method="inlayHint/resolve",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Rl||(St.InlayHintResolveRequest=Rl={}));var Ol;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=ot.MessageDirection.serverToClient,e.type=new ot.ProtocolRequestType0(e.method),e.capabilities=ot.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Ol||(St.InlayHintRefreshRequest=Ol={}))});var Gl=I(ce=>{"use strict";var Dg=ce&&ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),wg=ce&&ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kg=ce&&ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Rg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Og=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xg=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.InlineCompletionRequest=void 0;var dc=V(),$l;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=dc.MessageDirection.clientToServer,e.type=new dc.ProtocolRequestType(e.method),e.capabilities=dc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})($l||(Br.InlineCompletionRequest=$l={}))});var Xl=I(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.TextDocumentContentRefreshRequest=yn.TextDocumentContentRequest=void 0;var Bn=V(),Vl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Bn.MessageDirection.clientToServer,e.type=new Bn.ProtocolRequestType(e.method),e.capabilities=Bn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Vl||(yn.TextDocumentContentRequest=Vl={}));var Kl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Bn.MessageDirection.serverToClient,e.type=new Bn.ProtocolRequestType(e.method)})(Kl||(yn.TextDocumentContentRefreshRequest=Kl={}))});var df=I(a=>{"use strict";var Mg=a&&a.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eg=a&&a.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ag=a&&a.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(od||(a.StaticRegistrationOptions=od={}));var id;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||gc.is(r.documentSelector))}e.is=t})(id||(a.TextDocumentRegistrationOptions=id={}));var sd;(function(e){function t(r){let o=r;return ae.objectLiteral(o)&&(o.workDoneProgress===void 0||ae.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ae.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(sd||(a.WorkDoneProgressOptions=sd={}));var cd;(function(e){e.method="initialize",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method)})(cd||(a.InitializeRequest=cd={}));var ad;(function(e){e.unknownProtocolVersion=1})(ad||(a.InitializeErrorCodes=ad={}));var ud;(function(e){e.method="initialized",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method)})(ud||(a.InitializedNotification=ud={}));var ld;(function(e){e.method="shutdown",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType0(e.method)})(ld||(a.ShutdownRequest=ld={}));var dd;(function(e){e.method="exit",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType0(e.method)})(dd||(a.ExitNotification=dd={}));var fd;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeConfiguration",void 0)})(fd||(a.DidChangeConfigurationNotification=fd={}));var md;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(md||(a.MessageType=md={}));var hd;(function(e){e.method="window/showMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(hd||(a.ShowMessageNotification=hd={}));var gd;(function(e){e.method="window/showMessageRequest",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(gd||(a.ShowMessageRequest=gd={}));var pd;(function(e){e.method="window/logMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(pd||(a.LogMessageNotification=pd={}));var yd;(function(e){e.method="telemetry/event",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(yd||(a.TelemetryEventNotification=yd={}));var Td;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Td||(a.TextDocumentSyncKind=Td={}));var _d;(function(e){e.method="textDocument/didOpen",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(_d||(a.DidOpenTextDocumentNotification=_d={}));var bd;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(bd||(a.TextDocumentContentChangeEvent=bd={}));var vd;(function(e){e.method="textDocument/didChange",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync")})(vd||(a.DidChangeTextDocumentNotification=vd={}));var Cd;(function(e){e.method="textDocument/didClose",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Cd||(a.DidCloseTextDocumentNotification=Cd={}));var Sd;(function(e){e.method="textDocument/didSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Sd||(a.DidSaveTextDocumentNotification=Sd={}));var Id;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Id||(a.TextDocumentSaveReason=Id={}));var Dd;(function(e){e.method="textDocument/willSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Dd||(a.WillSaveTextDocumentNotification=Dd={}));var wd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(wd||(a.WillSaveTextDocumentWaitUntilRequest=wd={}));var kd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeWatchedFiles",void 0)})(kd||(a.DidChangeWatchedFilesNotification=kd={}));var Pd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Pd||(a.FileChangeType=Pd={}));var pc;(function(e){function t(n){let r=n;return ae.objectLiteral(r)&&(Zl.URI.is(r.baseUri)||Zl.WorkspaceFolder.is(r.baseUri))&&ae.string(r.pattern)}e.is=t})(pc||(a.RelativePattern=pc={}));var yc;(function(e){function t(n){let r=n;return ae.string(r)||pc.is(r)}e.is=t})(yc||(a.GlobPattern=yc={}));var Rd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Rd||(a.WatchKind=Rd={}));var Od;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.publishDiagnostics",void 0)})(Od||(a.PublishDiagnosticsNotification=Od={}));var xd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(xd||(a.CompletionTriggerKind=xd={}));var Md;(function(e){e.method="textDocument/completion",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion","completionProvider")})(Md||(a.CompletionRequest=Md={}));var Ed;(function(e){e.method="completionItem/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Ed||(a.CompletionResolveRequest=Ed={}));var Ad;(function(e){e.method="textDocument/hover",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.hover","hoverProvider")})(Ad||(a.HoverRequest=Ad={}));var qd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(qd||(a.SignatureHelpTriggerKind=qd={}));var Nd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Nd||(a.SignatureHelpRequest=Nd={}));var Fd;(function(e){e.method="textDocument/definition",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.definition","definitionProvider")})(Fd||(a.DefinitionRequest=Fd={}));var Gd;(function(e){e.method="textDocument/references",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.references","referencesProvider")})(Gd||(a.ReferencesRequest=Gd={}));var Hd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Hd||(a.DocumentHighlightRequest=Hd={}));var jd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(jd||(a.DocumentSymbolRequest=jd={}));var Ld;(function(e){e.method="textDocument/codeAction",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction","codeActionProvider")})(Ld||(a.CodeActionRequest=Ld={}));var Wd;(function(e){e.method="codeAction/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Wd||(a.CodeActionResolveRequest=Wd={}));var Ud;(function(e){e.method="workspace/symbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol","workspaceSymbolProvider")})(Ud||(a.WorkspaceSymbolRequest=Ud={}));var Qd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Qd||(a.WorkspaceSymbolResolveRequest=Qd={}));var Bd;(function(e){e.method="textDocument/codeLens",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens","codeLensProvider")})(Bd||(a.CodeLensRequest=Bd={}));var $d;(function(e){e.method="codeLens/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})($d||(a.CodeLensResolveRequest=$d={}));var zd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType0(e.method),e.capabilities=_.CM.create("workspace.codeLens",void 0)})(zd||(a.CodeLensRefreshRequest=zd={}));var Vd;(function(e){e.method="textDocument/documentLink",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider")})(Vd||(a.DocumentLinkRequest=Vd={}));var Kd;(function(e){e.method="documentLink/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Kd||(a.DocumentLinkResolveRequest=Kd={}));var Xd;(function(e){e.method="textDocument/formatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.formatting","documentFormattingProvider")})(Xd||(a.DocumentFormattingRequest=Xd={}));var Zd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Zd||(a.DocumentRangeFormattingRequest=Zd={}));var Yd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Yd||(a.DocumentRangesFormattingRequest=Yd={}));var Jd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Jd||(a.DocumentOnTypeFormattingRequest=Jd={}));var ef;(function(e){e.Identifier=1})(ef||(a.PrepareSupportDefaultBehavior=ef={}));var tf;(function(e){e.method="textDocument/rename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename","renameProvider")})(tf||(a.RenameRequest=tf={}));var nf;(function(e){e.method="textDocument/prepareRename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(nf||(a.PrepareRenameRequest=nf={}));var rf;(function(e){e.method="workspace/executeCommand",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.executeCommand","executeCommandProvider")})(rf||(a.ExecuteCommandRequest=rf={}));var of;(function(e){e.method="workspace/applyEdit",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType("workspace/applyEdit"),e.capabilities=_.CM.create("workspace.applyEdit",void 0)})(of||(a.ApplyWorkspaceEditRequest=of={}))});var mf=I(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.createProtocolConnection=Ug;var ff=tt();function Ug(e,t,n,r){return ff.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,ff.createMessageConnection)(e,t,n,r)}});var te=I(we=>{"use strict";var Qg=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$r=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qg(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;$r(tt(),we);$r((qr(),ar(Ar)),we);$r(V(),we);$r(df(),we);var Bg=mf();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Bg.createProtocolConnection}});var hf;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(hf||(we.LSPErrorCodes=hf={}))});var Dc=I(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.empty=void 0;It.v4=gf;It.isUUID=pf;It.parse=zg;It.generateUuid=Vg;var zn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Ic=class e extends zn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};It.empty=new zn("00000000-0000-0000-0000-000000000000");function gf(){return new Ic}var $g=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function pf(e){return $g.test(e)}function zg(e){if(!pf(e))throw new Error("invalid uuid");return new zn(e)}function Vg(){return gf().asHex()}});var yf=I(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ProgressFeature=void 0;bn.attachWorkDone=Xg;bn.attachPartialResult=Yg;var Dt=te(),Kg=Dc(),_n=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,{kind:"end"})}},zr=class extends _n{_source;constructor(t,n){super(t,n),this._source=new Dt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Vn=class{constructor(){}begin(){}report(){}done(){}},Vr=class extends Vn{_source;constructor(){super(),this._source=new Dt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Xg(e,t){if(t===void 0||t.workDoneToken===void 0)return new Vn;let n=t.workDoneToken;return delete t.workDoneToken,new _n(e,n)}var Zg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Dt.WorkDoneProgressCancelNotification.type,n=>{let r=_n.Instances.get(n.token);(r instanceof zr||r instanceof Vr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Vn:new _n(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,Kg.generateUuid)();return this.connection.sendRequest(Dt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new zr(this.connection,t))}else return Promise.resolve(new Vr)}};bn.ProgressFeature=Zg;var wc;(function(e){e.type=new Dt.ProgressType})(wc||(wc={}));var kc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(wc.type,this._token,t)}};function Yg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new kc(e,n)}});var Tf=I(Xe=>{"use strict";var Jg=Xe&&Xe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ep=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tp=Xe&&Xe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?rp.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(np.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Xe.ConfigurationFeature=op});var _f=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.WorkspaceFoldersFeature=void 0;var Kr=te(),ip=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Kr.Emitter,this.connection.onNotification(Kr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Kr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Kr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Xr.WorkspaceFoldersFeature=ip});var bf=I(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.CallHierarchyFeature=void 0;var Pc=te(),sp=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Pc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Pc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Pc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Zr.CallHierarchyFeature=sp});var Oc=I(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.SemanticTokensBuilder=wt.SemanticTokensDiff=wt.SemanticTokensFeature=void 0;var Yr=te(),cp=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Yr.SemanticTokensRefreshRequest.type),on:t=>{let n=Yr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Yr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Yr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};wt.SemanticTokensFeature=cp;var Jr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(c-=this._prevChar));let g=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;g[this._dataLen++]=s,g[this._dataLen++]=c,g[this._dataLen++]=r,g[this._dataLen++]=o,g[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let d=t[5*c],h=t[5*g];if(d===h){let b=t[5*c+1],m=t[5*g+1];return b-m}return d-h});let o=[],i=0,s=0;for(let c=0;c{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.ShowDocumentFeature=void 0;var ap=te(),up=e=>class extends e{showDocument(t){return this.connection.sendRequest(ap.ShowDocumentRequest.type,t)}};eo.ShowDocumentFeature=up});var Cf=I(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.FileOperationsFeature=void 0;var vn=te(),lp=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(vn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(vn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(vn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(vn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(vn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(vn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};to.FileOperationsFeature=lp});var Sf=I(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.LinkedEditingRangeFeature=void 0;var dp=te(),fp=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(dp.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};no.LinkedEditingRangeFeature=fp});var If=I(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.TypeHierarchyFeature=void 0;var xc=te(),mp=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(xc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=xc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=xc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ro.TypeHierarchyFeature=mp});var wf=I(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.InlineValueFeature=void 0;var Df=te(),hp=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Df.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Df.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};oo.InlineValueFeature=hp});var Pf=I(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.FoldingRangeFeature=void 0;var kf=te(),gp=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(kf.FoldingRangeRefreshRequest.type),on:t=>{let n=kf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};io.FoldingRangeFeature=gp});var Rf=I(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.InlayHintFeature=void 0;var Mc=te(),pp=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Mc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Mc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Mc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};so.InlayHintFeature=pp});var Of=I(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.DiagnosticFeature=void 0;var Kn=te(),yp=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Kn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Kn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Kn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Kn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Kn.WorkspaceDiagnosticRequest.partialResult,n)))}}};co.DiagnosticFeature=yp});var Ac=I(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.TextDocuments=void 0;var Ft=te(),Ec=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Ft.Emitter,this._onDidOpen=new Ft.Emitter,this._onDidClose=new Ft.Emitter,this._onDidSave=new Ft.Emitter,this._onWillSave=new Ft.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Ft.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let c=this._syncedDocuments.get(o.uri);c!==void 0&&(c=this._configuration.update(c,i,s),this._syncedDocuments.set(o.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Ft.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};ao.TextDocuments=Ec});var Fc=I(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.NotebookDocuments=Cn.NotebookSyncFeature=void 0;var Ee=te(),xf=Ac(),Tp=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Ee.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Ee.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Ee.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Ee.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};Cn.NotebookSyncFeature=Tp;var qc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Ee.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Ee.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Ee.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Nc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof xf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new xf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Ee.Emitter,this._onDidChange=new Ee.Emitter,this._onDidSave=new Ee.Emitter,this._onDidClose=new Ee.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new qc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,c=!1,g=o.change;g.metadata!==void 0&&(c=!0,i.metadata=g.metadata);let d=[],h=[],b=[],m=[];if(g.cells!==void 0){let x=g.cells;if(x.structure!==void 0){let p=x.structure.array;if(i.cells.splice(p.start,p.deleteCount,...p.cells!==void 0?p.cells:[]),x.structure.didOpen!==void 0)for(let l of x.structure.didOpen)await n.openTextDocument({textDocument:l}),d.push(l.uri);if(x.structure.didClose)for(let l of x.structure.didClose)await n.closeTextDocument({textDocument:l}),h.push(l.uri)}if(x.data!==void 0){let p=new Map(x.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let C=p.get(i.cells[l].document);if(C!==void 0){let k=i.cells.splice(l,1,C);if(b.push({old:k[0],new:C}),p.delete(C.document),p.size===0)break}}}if(x.textContent!==void 0)for(let p of x.textContent)await n.changeTextDocument({textDocument:p.document,contentChanges:p.changes}),m.push(p.document.uri)}this.updateCellMap(i);let T={notebookDocument:i};c&&(T.metadata={old:s,new:i.metadata});let D=[];for(let x of d)D.push(this.getNotebookCell(x));let q=[];for(let x of h)q.push(this.getNotebookCell(x));let N=[];for(let x of m)N.push(this.getNotebookCell(x));(D.length>0||q.length>0||b.length>0||N.length>0)&&(T.cells={added:D,removed:q,changed:{data:b,textContent:N}}),(T.metadata!==void 0||T.cells!==void 0)&&this._onDidChange.fire(T)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Ee.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};Cn.NotebookDocuments=Nc});var Mf=I(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.MonikerFeature=void 0;var _p=te(),bp=e=>class extends e{get moniker(){return{on:t=>{let n=_p.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};uo.MonikerFeature=bp});var Ef=I(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.InlineCompletionFeature=void 0;var vp=te(),Cp=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(vp.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};lo.InlineCompletionFeature=Cp});var qf=I(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TextDocumentContentFeature=void 0;var Af=te(),Sp=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Af.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Af.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};fo.TextDocumentContentFeature=Sp});var Uc=I(Q=>{"use strict";var Ip=Q&&Q.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Dp=Q&&Q.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wf=Q&&Q.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};Q.ErrorMessageTracker=jc;var mo=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(w.MessageType.Error,t)}warn(t){this.send(w.MessageType.Warning,t)}info(t){this.send(w.MessageType.Info,t)}log(t){this.send(w.MessageType.Log,t)}debug(t){this.send(w.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(w.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,w.RAL)().console.error("Sending log message failed")})}},Lc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:w.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Gc)}showWarningMessage(t,...n){let r={type:w.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Gc)}showInformationMessage(t,...n){let r={type:w.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Gc)}},Nf=(0,Op.ShowDocumentFeature)((0,A.ProgressFeature)(Lc)),Ff;(function(e){function t(){return new ho}e.create=t})(Ff||(Q.BulkRegistration=Ff={}));var ho=class{_registrations=[];_registered=new Set;add(t,n){let r=Ae.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Hc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Gf;(function(e){function t(){return new Xn(void 0,[])}e.create=t})(Gf||(Q.BulkUnregistration=Gf={}));var Xn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(w.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ae.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(w.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},go=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof ho?this.registerMany(t):t instanceof Xn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ae.string(n)?n:n.method,i=Hc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(w.RegistrationRequest.type,s).then(c=>(t.add({id:i,method:o}),t),c=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(c)))}registerSingle2(t,n){let r=Ae.string(t)?t:t.method,o=Hc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(w.RegistrationRequest.type,i).then(s=>w.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(w.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(w.RegistrationRequest.type,n).then(()=>new Xn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Wc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(w.ApplyWorkspaceEditRequest.type,r)}},Hf=(0,Lp.TextDocumentContentFeature)((0,xp.FileOperationsFeature)((0,kp.WorkspaceFoldersFeature)((0,wp.ConfigurationFeature)(Wc)))),po=class{_trace;_connection;constructor(){this._trace=w.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==w.Trace.Off&&this.connection.sendNotification(w.LogTraceNotification.type,{message:t,verbose:this._trace===w.Trace.Verbose?n:void 0}).catch(()=>{})}},yo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(w.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},To=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._LanguagesImpl=To;var jf=(0,jp.InlineCompletionFeature)((0,qp.FoldingRangeFeature)((0,Hp.MonikerFeature)((0,Fp.DiagnosticFeature)((0,Np.InlayHintFeature)((0,Ap.InlineValueFeature)((0,Ep.TypeHierarchyFeature)((0,Mp.LinkedEditingRangeFeature)((0,Rp.SemanticTokensFeature)((0,Pp.CallHierarchyFeature)(To)))))))))),_o=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._NotebooksImpl=_o;var Lf=(0,Gp.NotebookSyncFeature)(_o);function Uf(e,t){return function(n){return t(e(n))}}function Qf(e,t){return function(n){return t(e(n))}}function Bf(e,t){return function(n){return t(e(n))}}function $f(e,t){return function(n){return t(e(n))}}function zf(e,t){return function(n){return t(e(n))}}function Vf(e,t){return function(n){return t(e(n))}}function Kf(e,t){return function(n){return t(e(n))}}function Xf(e,t){return function(n){return t(e(n))}}function Wp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Uf),tracer:n(e.tracer,t.tracer,Bf),telemetry:n(e.telemetry,t.telemetry,Qf),client:n(e.client,t.client,$f),window:n(e.window,t.window,zf),workspace:n(e.workspace,t.workspace,Vf),languages:n(e.languages,t.languages,Kf),notebooks:n(e.notebooks,t.notebooks,Xf)}}function Up(e,t,n){let r=n&&n.console?new(n.console(mo)):new mo,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(po)):new po,s=n&&n.telemetry?new(n.telemetry(yo)):new yo,c=n&&n.client?new(n.client(go)):new go,g=n&&n.window?new(n.window(Nf)):new Nf,d=n&&n.workspace?new(n.workspace(Hf)):new Hf,h=n&&n.languages?new(n.languages(jf)):new jf,b=n&&n.notebooks?new(n.notebooks(Lf)):new Lf,m=[r,i,s,c,g,d,h,b];function T(p){return p instanceof Promise?p:Ae.thenable(p)?new Promise((l,C)=>{p.then(k=>l(k),k=>C(k))}):Promise.resolve(p)}let D,q,N,x={listen:()=>o.listen(),sendRequest:(p,...l)=>o.sendRequest(Ae.string(p)?p:p.method,...l),onRequest:(p,l)=>o.onRequest(p,l),sendNotification:(p,l)=>{let C=Ae.string(p)?p:p.method;return o.sendNotification(C,l)},onNotification:(p,l)=>o.onNotification(p,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:p=>(q=p,{dispose:()=>{q=void 0}}),onInitialized:p=>o.onNotification(w.InitializedNotification.type,p),onShutdown:p=>(D=p,{dispose:()=>{D=void 0}}),onExit:p=>(N=p,{dispose:()=>{N=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return c},get window(){return g},get workspace(){return d},get languages(){return h},get notebooks(){return b},onDidChangeConfiguration:p=>o.onNotification(w.DidChangeConfigurationNotification.type,p),onDidChangeWatchedFiles:p=>o.onNotification(w.DidChangeWatchedFilesNotification.type,p),__textDocumentSync:void 0,onDidOpenTextDocument:p=>o.onNotification(w.DidOpenTextDocumentNotification.type,p),onDidChangeTextDocument:p=>o.onNotification(w.DidChangeTextDocumentNotification.type,p),onDidCloseTextDocument:p=>o.onNotification(w.DidCloseTextDocumentNotification.type,p),onWillSaveTextDocument:p=>o.onNotification(w.WillSaveTextDocumentNotification.type,p),onWillSaveTextDocumentWaitUntil:p=>o.onRequest(w.WillSaveTextDocumentWaitUntilRequest.type,p),onDidSaveTextDocument:p=>o.onNotification(w.DidSaveTextDocumentNotification.type,p),sendDiagnostics:p=>o.sendNotification(w.PublishDiagnosticsNotification.type,p),onHover:p=>o.onRequest(w.HoverRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onCompletion:p=>o.onRequest(w.CompletionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCompletionResolve:p=>o.onRequest(w.CompletionResolveRequest.type,p),onSignatureHelp:p=>o.onRequest(w.SignatureHelpRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDeclaration:p=>o.onRequest(w.DeclarationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDefinition:p=>o.onRequest(w.DefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onTypeDefinition:p=>o.onRequest(w.TypeDefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onImplementation:p=>o.onRequest(w.ImplementationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onReferences:p=>o.onRequest(w.ReferencesRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentHighlight:p=>o.onRequest(w.DocumentHighlightRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentSymbol:p=>o.onRequest(w.DocumentSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbol:p=>o.onRequest(w.WorkspaceSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:p=>o.onRequest(w.WorkspaceSymbolResolveRequest.type,p),onCodeAction:p=>o.onRequest(w.CodeActionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeActionResolve:p=>o.onRequest(w.CodeActionResolveRequest.type,(l,C)=>p(l,C)),onCodeLens:p=>o.onRequest(w.CodeLensRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeLensResolve:p=>o.onRequest(w.CodeLensResolveRequest.type,(l,C)=>p(l,C)),onDocumentFormatting:p=>o.onRequest(w.DocumentFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:p=>o.onRequest(w.DocumentRangeFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:p=>o.onRequest(w.DocumentOnTypeFormattingRequest.type,(l,C)=>p(l,C)),onRenameRequest:p=>o.onRequest(w.RenameRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onPrepareRename:p=>o.onRequest(w.PrepareRenameRequest.type,(l,C)=>p(l,C)),onDocumentLinks:p=>o.onRequest(w.DocumentLinkRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentLinkResolve:p=>o.onRequest(w.DocumentLinkResolveRequest.type,(l,C)=>p(l,C)),onDocumentColor:p=>o.onRequest(w.DocumentColorRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onColorPresentation:p=>o.onRequest(w.ColorPresentationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onFoldingRanges:p=>o.onRequest(w.FoldingRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onSelectionRanges:p=>o.onRequest(w.SelectionRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onExecuteCommand:p=>o.onRequest(w.ExecuteCommandRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let p of m)p.attach(x);return o.onRequest(w.InitializeRequest.type,p=>{t.initialize(p),Ae.string(p.trace)&&(i.trace=w.Trace.fromString(p.trace));for(let l of m)l.initialize(p.capabilities);if(q){let l=q(p,new w.CancellationTokenSource().token,(0,A.attachWorkDone)(o,p),void 0);return T(l).then(C=>{if(C instanceof w.ResponseError)return C;let k=C;k||(k={capabilities:{}});let M=k.capabilities;M||(M={},k.capabilities=M),M.textDocumentSync===void 0||M.textDocumentSync===null?M.textDocumentSync=Ae.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None:!Ae.number(M.textDocumentSync)&&!Ae.number(M.textDocumentSync.change)&&(M.textDocumentSync.change=Ae.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None);for(let L of m)L.fillServerCapabilities(M);return k})}else{let l={capabilities:{textDocumentSync:w.TextDocumentSyncKind.None}};for(let C of m)C.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(w.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,D)return D(new w.CancellationTokenSource().token)}),o.onNotification(w.ExitNotification.type,()=>{try{if(N)return N()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(w.SetTraceNotification.type,p=>{i.trace=w.Trace.fromString(p.value)}),x}});var Zf=I(ve=>{"use strict";var Qp=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Bp=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vc=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return We.normalize(n.join("/"))}function Bc(){return process.platform==="win32"}function bo(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,c)=>{let g=process.env,d=Object.create(null);Object.keys(g).forEach(h=>d[h]=g[h]),t&&Qc.existsSync(t)&&(d[o]?d[o]=t+We.delimiter+d[o]:d[o]=t,r&&r(`NODE_PATH value is: ${d[o]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let h=(0,Kc.fork)("",[],{cwd:n,env:d,execArgv:["-e",i]});if(h.pid===void 0){c(new Error(`Starting process to resolve node module ${e} failed`));return}h.on("error",m=>{c(m)}),h.on("message",m=>{m.c==="r"&&(h.send({c:"e"}),m.s?s(m.r):c(new Error(`Failed to resolve module: ${e}`)))});let b={c:"rs",a:e};h.send(b)}catch(h){c(h)}})}function $c(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Bc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Kc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Bc()?We.join(s,"node_modules"):We.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Vp(e){let t="yarn",n={encoding:"utf8"};Bc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Kc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let c of s)try{let g=JSON.parse(c);if(g.type==="log")return We.join(g.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var zc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Qc.existsSync(__filename.toUpperCase())||!Qc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?We.normalize(i).indexOf(We.normalize(o))===0:We.normalize(i).toLowerCase().indexOf(We.normalize(o).toLowerCase())===0}e.isParent=r})(zc||(ve.FileSystem=zc={}));function Kp(e,t,n,r){return n?(We.isAbsolute(n)||(n=We.join(e,n)),bo(t,n,n,r).then(o=>zc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>bo(t,$c(r),e,r))):bo(t,$c(r),e,r)}});var em=I(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var Yf=require("util"),st=tt(),Xc=class e extends st.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Yf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Zc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),st.Disposable.create(()=>this.stream.off("data",t))}},Yc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},Jf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Xc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Yf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Zc(e),asWritableStream:e=>new Yc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Jc(){return Jf}(function(e){function t(){st.RAL.install(Jf)}e.install=t})(Jc||(Jc={}));ea.default=Jc});var sa=I(F=>{"use strict";var nm=F&&F.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Xp=F&&F.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ia=F&&F.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),xe.Disposable.create(()=>this.process.off("message",t))}};F.IPCMessageReader=ta;var na=class extends xe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.IPCMessageWriter=na;var ra=class extends xe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new xe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};F.PortMessageReader=ra;var oa=class extends xe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.PortMessageWriter=oa;var Gt=class extends xe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Zn.default)().stream.asReadableStream(t),n)}};F.SocketMessageReader=Gt;var Ht=class extends xe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Zn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};F.SocketMessageWriter=Ht;var vo=class extends xe.ReadableStreamMessageReader{constructor(t,n){super((0,Zn.default)().stream.asReadableStream(t),n)}};F.StreamMessageReader=vo;var Co=class extends xe.WriteableStreamMessageWriter{constructor(t,n){super((0,Zn.default)().stream.asWritableStream(t),n)}};F.StreamMessageWriter=Co;var ny=process.env.XDG_RUNTIME_DIR,ry=new Map([["linux",107],["darwin",102]]);function oy(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,tm.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=ty.realpathSync(ny??ey.tmpdir()),r=ry.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,tm.randomBytes)(Math.floor(e/2)).toString("hex");return Jp.join(n,`lsp-${o}.sock`)}function iy(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,So.createServer)(c=>{s.close(),n([new Gt(c,t),new Ht(c,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function sy(e,t="utf-8"){let n=(0,So.createConnection)(e);return[new Gt(n,t),new Ht(n,t)]}function cy(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,So.createServer)(c=>{s.close(),n([new Gt(c,t),new Ht(c,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function ay(e,t="utf-8"){let n=(0,So.createConnection)(e,"127.0.0.1");return[new Gt(n,t),new Ht(n,t)]}function uy(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function ly(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function dy(e,t,n,r){n||(n=xe.NullLogger);let o=uy(e)?new vo(e):e,i=ly(t)?new Co(t):t;return xe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,xe.createMessageConnection)(o,i,n,r)}});var ca=I(ct=>{"use strict";var fy=ct&&ct.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rm=ct&&ct.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&fy(t,e,n)};Object.defineProperty(ct,"__esModule",{value:!0});ct.createProtocolConnection=hy;var my=sa();rm(sa(),ct);rm(te(),ct);function hy(e,t,n,r){return(0,my.createMessageConnection)(e,t,n,r)}});var aa=I(pe=>{"use strict";var gy=pe&&pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),im=pe&&pe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&gy(t,e,n)};Object.defineProperty(pe,"__esModule",{value:!0});pe.ProposedFeatures=pe.NotebookDocuments=pe.TextDocuments=pe.SemanticTokensBuilder=void 0;var py=Oc();Object.defineProperty(pe,"SemanticTokensBuilder",{enumerable:!0,get:function(){return py.SemanticTokensBuilder}});im(te(),pe);var yy=Ac();Object.defineProperty(pe,"TextDocuments",{enumerable:!0,get:function(){return yy.TextDocuments}});var Ty=Fc();Object.defineProperty(pe,"NotebookDocuments",{enumerable:!0,get:function(){return Ty.NotebookDocuments}});im(Uc(),pe);var om;(function(e){e.all={__brand:"features"}})(om||(pe.ProposedFeatures=om={}))});var la=I(Ce=>{"use strict";var um=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),_y=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lm=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{Io(),process.exit(Sn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;ua.number(t)&&fm===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(Sn?0:1)}},3e3)},get shutdownReceived(){return Sn},set shutdownReceived(e){Sn=e},exit:e=>{Io(),process.exit(e)}};function Sy(e,t,n,r){let o,i,s,c;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),jt.ConnectionStrategy.is(e)||jt.ConnectionOptions.is(e)?c=e:(i=e,s=t,c=n),Iy(i,s,c,o)}function Iy(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let c,g,d=process.argv.slice(2);for(let h=0;h{Io(),process.exit(Sn?0:1)}),c.on("close",()=>{Io(),process.exit(Sn?0:1)})}let s=c=>{let g=(0,jt.createProtocolConnection)(e,t,c,n);return o&&Dy(c),g};return(0,by.createConnection)(s,Cy,r)}function Dy(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,sm.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...c]=i;e.error(`Assertion failed: ${s} ${t(c)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,sm.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} +${i}`)},console.warn=function(...o){e.warn(t(o))}}});var pm={};Xa(pm,{TextDocument:()=>da});function fa(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);fa(r,t),fa(o,t);let i=0,s=0,c=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function wy(e){let t=gm(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Do,da,ym=Ka(()=>{"use strict";Do=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=gm(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let c=Math.max(o.start.line,0),g=Math.max(o.end.line,0),d=this._lineOffsets,h=mm(r.text,!1,i);if(g-c===h.length)for(let m=0,T=h.length;mt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&hm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,c){return new Do(o,i,s,c)}e.create=t;function n(o,i,s){if(o instanceof Do)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),c=fa(i.map(wy),(h,b)=>{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),g=0,d=[];for(let h of c){let b=o.offsetAt(h.range.start);if(bg&&d.push(s.substring(g,b)),h.newText.length&&d.push(h.newText),g=o.offsetAt(h.range.end)}return d.push(s.substr(g)),d.join("")}e.applyEdits=r})(da||(da={}))});var Jn=I(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.DATATYPE_SET=ye.KEYWORD_SET=ye.PUNCTUATION=ye.OPERATORS=ye.DATATYPES=ye.KEYWORDS=void 0;ye.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ye.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ye.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ye.PUNCTUATION=["(",")","[","]",";",",",":","."];ye.KEYWORD_SET=new Set(ye.KEYWORDS);ye.DATATYPE_SET=new Set(ye.DATATYPES)});var tr=I(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.positionAt=ha;er.offsetAt=Py;er.sourceRange=Ry;function ma(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Tm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function _m(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function fa(e,t){da(e,t);let n=ym(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=Dy(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function ky(e,t){if(da(e,t.start),da(e,t.end),t.end{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TokenKind=void 0;var Tm;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(Tm||(Do.TokenKind=Tm={}))});var nr=I(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.tokenize=Ry;var ko=Yn(),ke=ct();function _m(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function tr(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function wo(e){return e!==void 0&&/[0-9]/.test(e)}function Py(e){let t=e.toUpperCase();return ko.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:ko.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function Ry(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=d=>{for(;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ha(e,t){ma(e,t);let n=_m(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=ky(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function Ry(e,t){if(ma(e,t.start),ma(e,t.end),t.end{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.TokenKind=void 0;var bm;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(bm||(wo.TokenKind=bm={}))});var rr=I(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.tokenize=xy;var Po=Jn(),ke=at();function vm(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function nr(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function ko(e){return e!==void 0&&/[0-9]/.test(e)}function Oy(e){let t=e.toUpperCase();return Po.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:Po.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function xy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=d=>{for(;n{let b=n,m=i();s(h),t.push({kind:d,lexeme:e.slice(b,h),span:{start:b,end:h},range:{start:m,end:i()}})};for(;ne.startsWith(m,n));if(h!==void 0){c(ke.TokenKind.Operator,n+h.length);continue}if(ko.PUNCTUATION.includes(d)){c(ke.TokenKind.Punctuation,n+1);continue}let b=e.codePointAt(n);c(ke.TokenKind.Unknown,n+(b!==void 0&&b>65535?2:1))}let g=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:g,end:{...g}}}),t}});var ga=I(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.extractDocumentMetadata=By;var Lt=er(),Oy=ct(),xy=nr(),bm="[\\p{L}_$#][\\p{L}\\p{N}_$#-]*",My=/^[ \t]*@([A-Za-z]+)(?:[ \t]+([^\r\n]*?))?[ \t]*$/gmu,Ey=/^[ \t]*(Type|Name|Description|Trigger|Event|Shortcut|Returns?|Tagname\[\.field\]|Condition|Condition Type)[ \t]*:[ \t]*([^\r\n]*?)[ \t]*$/gimu,Ay=new RegExp(`^[ \\t]*(DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${bm})(?:[ \\t]+([^\\r\\n]*?))?[ \\t]*$`,"gimu"),qy={quickfunction:"QuickFunction",datachange:"DataChange",condition:"Condition",conditionalscript:"Condition",application:"Application",applicationscript:"Application",window:"Window",windowscript:"Window",keyscript:"KeyScript",generic:"Generic"},Ny={onshow:"OnShow",whilerunning:"WhileRunning",onclose:"OnClose"},Fy=new Set(["scripttype","name","description","event","trigger","shortcut","param","returns"]);function at(e,t,n,r="warning"){return{code:e,message:t,severity:r,range:n,source:"intouch-metadata"}}function rr(e,t,n,r,o,i){let c=(n.index??0)+n[0].lastIndexOf(r),g=(0,Lt.sourceRange)(e,{start:t.span.start+c,end:t.span.start+c+r.length});return{value:o,raw:r,...g,source:i}}function vm(e){return qy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Gy(e){return Ny[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Hy(e,t){return typeof e=="string"&&typeof t=="string"?e.localeCompare(t,"en",{sensitivity:"base"})===0:e===t}function jt(e,t,n,r){let o=t[0]??n[0];if(o!==void 0){for(let i of[...t.slice(1),...n])Hy(o.value,i.value)||r.push(at("metadata-conflict",`${e} '${i.raw}' conflicts with higher-priority ${o.source} metadata '${o.raw}'.`,i.range));return o}}function jy(e,t,n,r){for(let o of t.lexeme.matchAll(My)){let i=o[1],s=(o[2]??"").trim(),c=i.toLowerCase(),g=t.span.start+(o.index??0)+o[0].indexOf(`@${i}`)+1,d=(0,Lt.sourceRange)(e,{start:g,end:g+i.length}).range;if(!Fy.has(c)){r.push(at("unknown-metadata-field",`Unknown QuickScript metadata field '@${i}'.`,d,"information"));continue}if(s.length===0){r.push(at("invalid-metadata-value",`Metadata field '@${i}' requires a value.`,d));continue}if(c==="scripttype"){let b=vm(s),m=rr(e,t,o,s,b??"Unknown","explicit");b===void 0?r.push(at("invalid-script-type",`Unknown QuickScript script type '${s}'.`,m.range)):n.scriptTypes.push(m);continue}if(c==="param"){let b=s.match(new RegExp(`^(${bm})[ \\t]+(DISCRETE|INTEGER|MESSAGE|REAL)(?:[ \\t]+([\\s\\S]*))?$`,"iu")),m=rr(e,t,o,s,s,"explicit");if(b===null){r.push(at("invalid-metadata-value","Metadata field '@Param' must use '@Param Name TYPE Description...'.",m.range));continue}let T=m.span.start+s.indexOf(b[1]),D=m.span.start+s.indexOf(b[2],b[1].length);n.explicitParameters.push({name:b[1],datatype:b[2].toUpperCase(),description:b[3]?.trim()||void 0,range:m.range,nameRange:(0,Lt.sourceRange)(e,{start:T,end:T+b[1].length}).range,datatypeRange:(0,Lt.sourceRange)(e,{start:D,end:D+b[2].length}).range});continue}let h=rr(e,t,o,s,s,"explicit");switch(c){case"name":n.names.push(h);break;case"description":n.descriptions.push(h);break;case"event":n.events.push(h);break;case"trigger":n.triggers.push(h);break;case"shortcut":n.shortcuts.push(h);break;case"returns":n.returnTypes.push({...h,value:s.toUpperCase()});break}}}function Ly(e){let t=e.lexeme.match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu);if(t===null)return;let n=(t.index??0)+t[0].indexOf(t[1]);return{text:t[1],start:n}}function Wy(e,t,n){for(let o of t.lexeme.matchAll(Ey)){let i=o[1].toLowerCase(),s=o[2].trim();if(s.length===0)continue;if(i==="type"){n.legacyScriptType??=s;let g=vm(s);n.scriptTypes.push(rr(e,t,o,s,g??"Unknown","legacy"));continue}let c=rr(e,t,o,s,s,"legacy");switch(i){case"name":n.names.push(c);break;case"description":n.descriptions.push(c);break;case"event":n.events.push(c);break;case"trigger":n.triggers.push(c);break;case"shortcut":n.shortcuts.push(c);break;case"tagname[.field]":n.triggers.push(c);break;case"condition":n.triggers.push(c);break;case"condition type":n.events.push(c);break;case"return":case"returns":n.returnTypes.push({...c,value:s.toUpperCase()});break}}let r=Ly(t);if(r!==void 0)for(let o of r.text.matchAll(Ay)){let i=o[1],s=o[2],c=r.start+(o.index??0),g=t.span.start+c+o[0].indexOf(i),d=t.span.start+c+o[0].indexOf(s,o[0].indexOf(i)+i.length);n.legacyParameters.push({name:s,datatype:i.toUpperCase(),description:o[3]?.trim()||void 0,range:(0,Lt.sourceRange)(e,{start:g,end:t.span.start+c+o[0].trimEnd().length}).range,nameRange:(0,Lt.sourceRange)(e,{start:d,end:d+s.length}).range,datatypeRange:(0,Lt.sourceRange)(e,{start:g,end:g+i.length}).range})}}function Uy(e){if(/^[ \t]*Script[ \t]*:[ \t]*$/imu.test(e))return!0;let t=/^[ \t]*Type[ \t]*:[ \t]*[^\r\n]+$/imu.test(e),n=/^[ \t]*(?:Name|Tagname\[\.field\]|Condition)[ \t]*:[ \t]*[^\r\n]+$/imu.test(e);return t&&n}function Qy(e){if(e===void 0)return;let t=e.replace(/^.*[\\/]/,"").replace(/\.(?:vbi|vi)$/i,"").replace(/_\d+(?:\.\d+){1,3}$/i,"");for(let[n,r]of[["QF_","QuickFunction"],["DCH_","DataChange"],["CS_","Condition"],["APP_","Application"],["KEY_","KeyScript"]])if(t.toUpperCase().startsWith(n))return{scriptType:r,name:t.slice(n.length)}}function By(e,t={}){let n=[],r={scriptTypes:[],names:[],events:[],triggers:[],shortcuts:[],descriptions:[],returnTypes:[],explicitParameters:[],legacyParameters:[]},o=(t.tokens??(0,xy.tokenize)(e)).filter(k=>k.kind===Oy.TokenKind.Comment);for(let k of o)jy(e,k,r,n),Uy(k.lexeme)&&Wy(e,k,r);let i=k=>k.filter(M=>M.source==="explicit"),s=k=>k.filter(M=>M.source==="legacy"),c=jt("Script type",i(r.scriptTypes),s(r.scriptTypes),n),g=jt("Name",i(r.names),s(r.names),n),d=jt("Event",i(r.events),s(r.events),n),h=jt("Trigger",i(r.triggers),s(r.triggers),n),b=jt("Shortcut",i(r.shortcuts),s(r.shortcuts),n),m=jt("Description",i(r.descriptions),s(r.descriptions),n),T=jt("Return type",i(r.returnTypes),s(r.returnTypes),n),D=r.explicitParameters.length>0?r.explicitParameters:r.legacyParameters;if(r.explicitParameters.length>0&&r.legacyParameters.length>0){let k=M=>M.map(L=>`${L.name.toUpperCase()}:${L.datatype.toUpperCase()}`).join(",");k(r.explicitParameters)!==k(r.legacyParameters)&&n.push(at("metadata-conflict","Legacy parameter metadata conflicts with higher-priority explicit @Param metadata.",r.legacyParameters[0].range))}let q=Qy(t.fileName),N=c?.value??q?.scriptType??"Generic",x=g?.value??q?.name,p=d?.value;if(N==="Window"&&d!==void 0){let k=Gy(d.value);k===void 0?(n.push(at("invalid-window-event",`Unknown Window script event '${d.value}'.`,d.range)),p=void 0):p=k}else d!==void 0&&!["Application","Condition"].includes(N)&&n.push(at("metadata-conflict",`Event metadata is not supported for ${N} scripts.`,d.range));N==="Window"&&T!==void 0&&n.push(at("metadata-conflict","Window scripts cannot declare a return type.",T.range));let l=[c,g,d,h,b,m,T].flatMap(k=>k===void 0?[]:[k.source]);r.explicitParameters.length>0?l.push("explicit"):r.legacyParameters.length>0&&l.push("legacy");let C=l.includes("explicit")?"explicit":l.includes("legacy")?"legacy":q===void 0?"none":"filename";return{scriptType:N,name:x,nameRange:g?.range,event:p,eventRange:d?.range,trigger:h?.value,triggerRange:h?.range,shortcut:b?.value,shortcutRange:b?.range,description:m?.value,descriptionRange:m?.range,parameters:D,returnType:T?.value,returnTypeRange:T?.range,metadataSource:C,legacyScriptType:r.legacyScriptType,diagnostics:n}}});var Ro=I(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.parseQuickScript=rT;var $y=Yn(),Po=er(),ne=ct(),zy=nr(),Cm=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),Sm=new Set(["+","-","NOT","!","~"]),Vy=new Set(["TRUE","FALSE","NULL","EOF"]),Ky=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),Xy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function Zy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function wt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function Se(e){return e?.kind===ne.TokenKind.Keyword?wt(e):void 0}function Im(e,t,n=t){return(0,Po.sourceRange)(e,{start:t.span.start,end:n.span.end})}function Yy(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,Po.sourceRange)(e,{start:n,end:n}).range}function Te(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function We(e,t,n,r){return{code:t,message:n,severity:"error",range:Yy(e,r)}}function Jy(e,t){return e.filter(n=>n.range.start.line===t&&!Zy(n))}function Dm(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function wm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?wt(e):e.lexeme}var pa=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;Sm.has(wm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(wt(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||Vy.has(wt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===ne.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!Ky.has(wt(t)??"")&&!Cm.has(wt(t)??"")&&!Sm.has(wt(t)??"")}};function eT(e,t,n){return n.token===void 0?We(e,n.code,n.message,t):Te(n.code,n.message,n.token)}function Ae(e,t,n){let r=new pa(t).parse();return r===void 0?!0:(n.push(eT(e,t,r)),!1)}var ya=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positionc.lexeme==="(")&&this.diagnostics.push(Te("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(We(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else Ae(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?We(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):Te("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?We(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):Te("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(We(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{Ae(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),c=i>=0&&i=0&&i0&&Ae(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&ob.lexeme==="=")&&r.some(b=>Se(b)==="TO");this.statements.push({kind:c,first:t,last:d,name:c==="direct-call"?t:void 0,recoveredLoop:h})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[ne.TokenKind.Identifier,ne.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!Ae(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(We(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function tT(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function nT(e,t){let n=tT(e,t);if(n>t)return n;let r=e[t],o=Se(r[0])==="IF",i=Se(r[0])==="ELSE"&&Se(r[1])==="IF";if(!o&&!i||r.some(d=>Se(d)==="THEN"))return t;let s=o&&r.length===1,c=["AND","OR","NOT"].includes(Se(r[r.length-1])??""),g=["AND","OR"].includes(Se(e[t+1]?.[0])??"");if(!s&&!c&&!g)return t;for(let d=t+1;dSe(h)==="THEN"))return d;return t}function rT(e){let t=(0,zy.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(m,T)=>Jy(t,T)),o=[],i=[],s=[],c=new Array(n),g=[],d=[];for(let m=0;mT.kind==="dim"&&T.datatype!==void 0))if(!$y.DATATYPE_SET.has(m.datatype.toUpperCase())){let T=m.datatypeRange??m.range,D=`${T.start.line}:${T.start.character}`;if(h.has(D))continue;h.add(D),s.push({code:"unknown-datatype",message:`Unknown datatype '${m.datatype}'.`,severity:"error",range:T})}let b=(0,Po.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:c,...b}}});var Mm=I(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.formatQuickScriptLexically=Om;ir.formatQuickScriptStructure=xm;ir.formatQuickScript=fT;var j=ct(),va=nr(),oT=Ro();function km(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function ba(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function Rm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function _a(e){or(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function iT(e,t){if(e[t].lexeme!=="-"||Rm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=ba(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function sT(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function Om(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,va.tokenize)(r);if(o.some(d=>d.kind===j.TokenKind.String&&!d.lexeme.endsWith('"'))||o.some(d=>d.kind===j.TokenKind.Unknown&&d.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,c=!1;for(let d=0;d")||_e(b,t.regionBlockCodeBegin??"{region"))&&(c=!0),T!==void 0&&(T.kind===j.TokenKind.Identifier||T.kind===j.TokenKind.Keyword||T.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(h.lexeme)}let g=sT(i.join(""),n);return{text:g,changed:g!==e}}function cT(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function aT(e){let t=(0,va.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function _e(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function uT(e,t){return _e(e,t.blockCodeBegin??"{>")||_e(e,t.blockCodeEnd??"{<")||_e(e,t.blockCodeExclude??"{#")||_e(e,t.regionBlockCodeBegin??"{region")||_e(e,t.regionBlockCodeEnd??"{endregion")||_e(e,t.regionBlockCodeExclude??"{#")}function lT(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function dT(e,t){let n=new Map;for(let r of(0,va.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` -`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:uT(s,t),contentIndent:lT(r.lexeme)})}return n}function Pm(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function xm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,oT.parseQuickScript)(r),i=r.split(n),s=dT(r,t),c=[],g=cT(t),d=0,h=0,b,m=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let D=0;D")||_e(x,t.regionBlockCodeBegin??"{region"))&&M?.directive!==!0&&(d+=1)}let T=c.join(n);return{text:T,changed:T!==e,diagnostics:o.diagnostics}}function fT(e,t={}){let n=Om(e,t),r=xm(n.text,t);return{...r,changed:r.text!==e}}});var xo=I(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.KNOWN_FUNCTIONS=void 0;Oo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Nm=I(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.completions=hT;sr.hoverAt=gT;sr.documentSymbols=pT;var qm=xo(),Em=Yn(),Am=ct();function mT(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of Em.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of Em.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of qm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function gT(e,t){let n=e.document.tokens.find(i=>mT(i.range,t));if(n===void 0)return;if(n.kind===Am.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Am.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=qm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function pT(e){let t=e.document.blocks.map(s=>({name:s.kind.toUpperCase(),kind:s.kind,range:s.range,selectionRange:s.opener,children:[]})),n=[];for(let s of e.document.blocks)s.parentId===void 0?n.push(t[s.id]):t[s.parentId].children.push(t[s.id]);let r=[...e.symbols.map(s=>({name:s.name,kind:"variable",range:s.range,selectionRange:s.selectionRange,children:[]})),...n],o=e.metadata,i=o.nameRange??o.triggerRange??e.document.range;if(o.scriptType==="QuickFunction"&&o.name!==void 0)return[{name:o.name,kind:"function",range:e.document.range,selectionRange:i,children:r}];if(o.scriptType==="Window"&&o.name!==void 0){let s=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:o.name,kind:"window",range:e.document.range,selectionRange:i,children:s}]}if(o.scriptType==="Application"){let s=o.name??"Application",c=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:s,kind:"application",range:e.document.range,selectionRange:i,children:c}]}if(o.scriptType==="DataChange"||o.scriptType==="Condition"){let s=o.scriptType==="DataChange"?"data-change":"condition";return[{name:o.name??o.trigger??o.scriptType,kind:s,range:e.document.range,selectionRange:i,children:r}]}if(o.scriptType==="KeyScript"){let s=o.name??"KeyScript",c=o.shortcut===void 0?r:[{name:o.shortcut,kind:"event",range:e.document.range,selectionRange:o.shortcutRange??i,children:r}];return[{name:s,kind:"key-script",range:e.document.range,selectionRange:i,children:c}]}return r}});var Fm=I(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.QUALITY_DIAGNOSTIC_CODES=void 0;kt.qualityDiagnostics=ST;var Sn=ct();kt.QUALITY_DIAGNOSTIC_CODES={nonAsciiIdentifier:"quickscript.naming.nonAsciiIdentifier",windowWhitespace:"quickscript.naming.windowWhitespace",windowNonAscii:"quickscript.naming.windowNonAscii"};var yT=/^[A-Za-z0-9_$#-]+$/,TT=new Set(["HIDE","SHOW"]),_T=new Set(["HIDE","INFOAPPSTATUS","INFOAPPTITLEEXPAND","MOVEWINDOW","PRINTWINDOW","SHOW","SHOWAT","SHOWTOPLEFTAT","WINDOWSTATE"]);function bT(e){return e.document.tokens.filter(t=>![Sn.TokenKind.Whitespace,Sn.TokenKind.Newline,Sn.TokenKind.Comment,Sn.TokenKind.EOF].includes(t.kind))}function vT(e){return e.lexeme.startsWith('"')&&e.lexeme.endsWith('"')?e.lexeme.slice(1,-1):e.lexeme.slice(1)}function CT(e){let t=bT(e),n=[];for(let r=0;r")){if(TT.has(o)&&t[r+1]?.kind===Sn.TokenKind.String){n.push(t[r+1]);continue}_T.has(o)&&t[r+1]?.lexeme==="("&&t[r+2]?.kind===Sn.TokenKind.String&&n.push(t[r+2])}}return n}function Ca(e,t,n,r){if(n!=="off")return{code:e,message:t,severity:n,range:r.range,source:"intouch-quality"}}function ST(e,t={}){let n=[],r=new Set,o=t.nonAsciiIdentifiers??"warning";for(let i of e.identifiers){let s=i.name.toUpperCase();if(yT.test(i.name)||r.has(s))continue;r.add(s);let c=Ca(kt.QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier,`Avoid non-ASCII characters in identifier '${i.name}'.`,o,i);c!==void 0&&n.push(c)}for(let i of CT(e)){let s=vT(i);if(/\s/u.test(s)){let c=Ca(kt.QUALITY_DIAGNOSTIC_CODES.windowWhitespace,"Avoid whitespace in window names.",t.windowWhitespace??"warning",i);c!==void 0&&n.push(c)}if(/[^\x00-\x7f]/u.test(s)){let c=Ca(kt.QUALITY_DIAGNOSTIC_CODES.windowNonAscii,"Avoid non-ASCII characters in window names.",t.windowNonAscii??"warning",i);c!==void 0&&n.push(c)}}return n}});var Wm=I(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.quickFunctionDeclarations=Lm;Ut.quickFunctionNames=PT;Ut.analyzeQuickScript=RT;Ut.definitionAt=OT;Ut.referencesAt=xT;var IT=Ro(),Gm=ga(),DT=xo(),Sa=er(),Wt=ct();function Hm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Wt.TokenKind.Whitespace,Wt.TokenKind.Newline,Wt.TokenKind.Comment].includes(e[n].kind))return e[n]}function kT(e,t){for(let n=t+1;n({name:n.name,kind:"parameter",range:n.nameRange})),metadata:t}]}function Lm(e,t={}){return jm(e,(0,Gm.extractDocumentMetadata)(e,t))}function PT(e){let t=new Map;for(let n of Lm(e))t.set(n.name.toUpperCase(),n.name);return[...t.values()]}function RT(e,t={}){let n=(0,IT.parseQuickScript)(e),r=(0,Gm.extractDocumentMetadata)(e,{fileName:t.fileName,tokens:n.tokens}),o=[...n.diagnostics,...r.diagnostics],i=[],s=jm(e,r),c=new Map,g=new Set(DT.KNOWN_FUNCTIONS.map(T=>T.name.toUpperCase()));for(let T of s)g.add(T.name.toUpperCase());for(let T of t.knownFunctionNames??[])g.add(T.toUpperCase());for(let T of n.statements.filter(D=>D.kind==="dim"&&D.name!==void 0&&D.nameRange!==void 0)){let D=T.name.toUpperCase();if(c.get(D)!==void 0){o.push({code:"duplicate-local",message:`Local variable '${T.name}' is already declared.`,severity:"error",range:T.nameRange});continue}let N={id:i.length,name:T.name,kind:"variable",range:T.range,selectionRange:T.nameRange,datatype:T.datatype,scopeId:0};i.push(N),c.set(D,N)}let d=new Map;for(let T of i)d.set((0,Sa.offsetAt)(e,T.selectionRange.start),T);let h=new Set;for(let T of n.statements.filter(D=>D.kind==="call"&&D.name!==void 0&&D.nameRange!==void 0))h.add((0,Sa.offsetAt)(e,T.nameRange.start));let b=r.trigger===void 0||r.triggerRange===void 0?[]:[{name:r.trigger,kind:"trigger",range:r.triggerRange}],m=s.flatMap(T=>[{name:T.name,kind:"function",range:T.nameRange},...T.parameters]);r.trigger!==void 0&&r.triggerRange!==void 0&&m.push({name:r.trigger,kind:"global",range:r.triggerRange});for(let T of i)m.push({name:T.name,kind:"local",range:T.selectionRange});for(let T=0;T"){m.push({name:D.lexeme,kind:"member",range:D.range});continue}let x=c.get(D.lexeme.toUpperCase()),p=kT(n.tokens,T),l=h.has(D.span.start)||p?.lexeme==="(";if(m.push({name:D.lexeme,kind:l?"function":x===void 0?"global":"local",range:D.range}),l&&!g.has(D.lexeme.toUpperCase())&&o.push({code:"unknown-function",message:`Unknown QuickScript function '${D.lexeme}'.`,severity:"warning",range:D.range}),x!==void 0||l){let C=l?"call":p?.lexeme==="="?"write":"read";b.push({name:D.lexeme,kind:C,range:D.range,declarationId:x?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:i.map(T=>T.id)}],symbols:i,references:b,identifiers:m,quickFunctions:s,metadata:r,diagnostics:o}}function OT(e,t){let n=e.references.find(r=>Hm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function xT(e,t,n=!0){let r=e.references.find(o=>Hm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var Ia=I(ue=>{"use strict";var MT=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ue=ue&&ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&MT(t,e,n)};Object.defineProperty(ue,"__esModule",{value:!0});Ue(Yn(),ue);Ue(ga(),ue);Ue(Mm(),ue);Ue(xo(),ue);Ue(Nm(),ue);Ue(Ro(),ue);Ue(Fm(),ue);Ue(Wm(),ue);Ue(er(),ue);Ue(ct(),ue);Ue(nr(),ue)});var ka=I(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.WorkspaceFunctionIndex=Qt.WorkspaceSymbolIndex=void 0;Qt.documentFileName=Um;var ET=Ia();function Da(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.linen.kind==="call"),symbols:qT(e.uri,t.metadata)}}var Mo=class{constructor(){this.workspaceDocuments=new Map,this.openDocuments=new Map}replaceWorkspaceDocuments(t){this.workspaceDocuments.clear();for(let n of t)this.workspaceDocuments.set(n.uri,wa(n))}updateWorkspaceDocument(t){this.workspaceDocuments.set(t.uri,wa(t))}removeWorkspaceDocument(t){this.workspaceDocuments.delete(t)}updateDocument(t){this.openDocuments.set(t.uri,wa({uri:t.uri,text:t.getText()}))}removeDocument(t){this.openDocuments.delete(t)}entries(){let t=new Map(this.workspaceDocuments);for(let[n,r]of this.openDocuments)t.set(n,r);return[...t.values()].sort((n,r)=>n.uri.localeCompare(r.uri,"en"))}entry(t){return this.openDocuments.get(t)??this.workspaceDocuments.get(t)}symbols(){return this.entries().flatMap(t=>t.symbols)}quickFunctions(t){let n=t?.toUpperCase();return this.symbols().filter(r=>r.kind==="QuickFunction"&&(n===void 0||r.name.toUpperCase()===n))}knownFunctionNames(){let t=new Map;for(let n of this.quickFunctions())t.set(n.name.toUpperCase(),n.name);return[...t.values()].sort((n,r)=>n.localeCompare(r,"en",{sensitivity:"base"}))}uniqueQuickFunction(t){let n=this.quickFunctions(t);return n.length===1?n[0]:void 0}symbolAt(t,n){return this.entry(t)?.symbols.find(r=>Da(r.definitionRange,n))}symbolNameAt(t,n){let r=this.entry(t),o=this.symbolAt(t,n);return o?.kind!=="QuickFunction"?r?.calls.find(i=>Da(i.range,n))?.name:o!==void 0?o.name:r?.calls.find(i=>Da(i.range,n))?.name}references(t,n){let r=t.toUpperCase(),o=n?this.quickFunctions(t).map(s=>({name:s.name,kind:"declaration",uri:s.uri,range:s.definitionRange})):[],i=this.entries().flatMap(s=>s.calls.filter(c=>c.name.toUpperCase()===r).map(c=>({name:c.name,kind:"call",uri:s.uri,range:c.range})));return[...o,...i].sort((s,c)=>s.uri.localeCompare(c.uri,"en")||s.range.start.line-c.range.start.line||s.range.start.character-c.range.start.character)}diagnostics(t){let n=this.entry(t);if(n===void 0)return[];let r=[];for(let o of n.symbols.filter(i=>i.kind==="QuickFunction"))this.quickFunctions(o.name).length>1&&r.push({code:"duplicate-quickfunction",message:`QuickFunction '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.definitionRange,source:"intouch-metadata"});for(let o of n.calls)this.quickFunctions(o.name).length>1&&r.push({code:"ambiguous-quickfunction",message:`QuickFunction call '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.range,source:"intouch-metadata"});return r}};Qt.WorkspaceSymbolIndex=Mo;Qt.WorkspaceFunctionIndex=Mo});var zm=I(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.serverCapabilities=NT;Xe.diagnosticsFor=LT;Xe.formattingEdits=WT;Xe.symbolsFor=UT;Xe.definitionFor=QT;Xe.referencesFor=BT;Xe.completionsFor=$T;Xe.hoverFor=zT;var B=aa(),Pt=Ia(),Qm=ka();function NT(){return{capabilities:{textDocumentSync:B.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function FT(e){switch(e){case"keyword":return B.CompletionItemKind.Keyword;case"datatype":return B.CompletionItemKind.TypeParameter;case"variable":return B.CompletionItemKind.Variable;case"call-target":return B.CompletionItemKind.Method;default:return B.CompletionItemKind.Function}}function GT(e){switch(e){case"error":return B.DiagnosticSeverity.Error;case"information":return B.DiagnosticSeverity.Information;case"hint":return B.DiagnosticSeverity.Hint;default:return B.DiagnosticSeverity.Warning}}function Bm(e){return e instanceof Qm.WorkspaceSymbolIndex?e:void 0}function HT(e){let t=Bm(e);return t===void 0?e:t.knownFunctionNames()}function In(e,t){return(0,Pt.analyzeQuickScript)(e.getText(),{knownFunctionNames:HT(t),fileName:(0,Qm.documentFileName)(e.uri)})}function jT(e){let t=e.metadata.parameters.map(r=>`${r.name}: ${r.datatype}`).join(", "),n=e.metadata.returnType===void 0?"":`: ${e.metadata.returnType}`;return`${e.name}(${t})${n}`}function $m(e){let t=jT(e);return e.metadata.description===void 0?t:`${t} +`;)m+=1;c(ke.TokenKind.Comment,m);continue}if(ko(d)){let m=n+1;for(;ko(e[m]);)m+=1;if(e[m]==="."&&ko(e[m+1]))for(m+=1;ko(e[m]);)m+=1;else if(nr(e[m])||e[m]==="-"&&vm(e[m+1])){for(;nr(e[m])||e[m]==="-"&&nr(e[m+1]);)m+=1;c(ke.TokenKind.Identifier,m);continue}c(ke.TokenKind.Number,m);continue}if(vm(d)){let m=n+1;for(;nr(e[m])||e[m]==="-"&&nr(e[m+1]);)m+=1;c(Oy(e.slice(n,m)),m);continue}let h=Po.OPERATORS.find(m=>e.startsWith(m,n));if(h!==void 0){c(ke.TokenKind.Operator,n+h.length);continue}if(Po.PUNCTUATION.includes(d)){c(ke.TokenKind.Punctuation,n+1);continue}let b=e.codePointAt(n);c(ke.TokenKind.Unknown,n+(b!==void 0&&b>65535?2:1))}let g=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:g,end:{...g}}}),t}});var ya=I(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.extractDocumentMetadata=zy;var Wt=tr(),My=at(),Ey=rr(),Cm="[\\p{L}_$#][\\p{L}\\p{N}_$#-]*",Ay=/^[ \t]*@([A-Za-z]+)(?:[ \t]+([^\r\n]*?))?[ \t]*$/gmu,qy=/^[ \t]*(Type|Name|Description|Trigger|Event|Shortcut|Returns?|Tagname\[\.field\]|Condition|Condition Type)[ \t]*:[ \t]*([^\r\n]*?)[ \t]*$/gimu,Ny=new RegExp(`^[ \\t]*(DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${Cm})(?:[ \\t]+([^\\r\\n]*?))?[ \\t]*$`,"gimu"),Fy={quickfunction:"QuickFunction",datachange:"DataChange",condition:"Condition",conditionalscript:"Condition",application:"Application",applicationscript:"Application",window:"Window",windowscript:"Window",keyscript:"KeyScript",generic:"Generic"},Gy={onshow:"OnShow",whilerunning:"WhileRunning",onclose:"OnClose"},Hy=new Set(["scripttype","name","description","event","trigger","shortcut","param","returns"]);function ut(e,t,n,r="warning"){return{code:e,message:t,severity:r,range:n,source:"intouch-metadata"}}function or(e,t,n,r,o,i){let c=(n.index??0)+n[0].lastIndexOf(r),g=(0,Wt.sourceRange)(e,{start:t.span.start+c,end:t.span.start+c+r.length});return{value:o,raw:r,...g,source:i}}function Sm(e){return Fy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function jy(e){return Gy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Ly(e,t){return typeof e=="string"&&typeof t=="string"?e.localeCompare(t,"en",{sensitivity:"base"})===0:e===t}function Lt(e,t,n,r){let o=t[0]??n[0];if(o!==void 0){for(let i of[...t.slice(1),...n])Ly(o.value,i.value)||r.push(ut("metadata-conflict",`${e} '${i.raw}' conflicts with higher-priority ${o.source} metadata '${o.raw}'.`,i.range));return o}}function Wy(e,t,n,r){for(let o of t.lexeme.matchAll(Ay)){let i=o[1],s=(o[2]??"").trim(),c=i.toLowerCase(),g=t.span.start+(o.index??0)+o[0].indexOf(`@${i}`)+1,d=(0,Wt.sourceRange)(e,{start:g,end:g+i.length}).range;if(!Hy.has(c)){r.push(ut("unknown-metadata-field",`Unknown QuickScript metadata field '@${i}'.`,d,"information"));continue}if(s.length===0){r.push(ut("invalid-metadata-value",`Metadata field '@${i}' requires a value.`,d));continue}if(c==="scripttype"){let b=Sm(s),m=or(e,t,o,s,b??"Unknown","explicit");b===void 0?r.push(ut("invalid-script-type",`Unknown QuickScript script type '${s}'.`,m.range)):n.scriptTypes.push(m);continue}if(c==="param"){let b=s.match(new RegExp(`^(${Cm})[ \\t]+(DISCRETE|INTEGER|MESSAGE|REAL)(?:[ \\t]+([\\s\\S]*))?$`,"iu")),m=or(e,t,o,s,s,"explicit");if(b===null){r.push(ut("invalid-metadata-value","Metadata field '@Param' must use '@Param Name TYPE Description...'.",m.range));continue}let T=m.span.start+s.indexOf(b[1]),D=m.span.start+s.indexOf(b[2],b[1].length);n.explicitParameters.push({name:b[1],datatype:b[2].toUpperCase(),description:b[3]?.trim()||void 0,range:m.range,nameRange:(0,Wt.sourceRange)(e,{start:T,end:T+b[1].length}).range,datatypeRange:(0,Wt.sourceRange)(e,{start:D,end:D+b[2].length}).range});continue}let h=or(e,t,o,s,s,"explicit");switch(c){case"name":n.names.push(h);break;case"description":n.descriptions.push(h);break;case"event":n.events.push(h);break;case"trigger":n.triggers.push(h);break;case"shortcut":n.shortcuts.push(h);break;case"returns":n.returnTypes.push({...h,value:s.toUpperCase()});break}}}function Uy(e){let t=e.lexeme.match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu);if(t===null)return;let n=(t.index??0)+t[0].indexOf(t[1]);return{text:t[1],start:n}}function Qy(e,t,n){for(let o of t.lexeme.matchAll(qy)){let i=o[1].toLowerCase(),s=o[2].trim();if(s.length===0)continue;if(i==="type"){n.legacyScriptType??=s;let g=Sm(s);n.scriptTypes.push(or(e,t,o,s,g??"Unknown","legacy"));continue}let c=or(e,t,o,s,s,"legacy");switch(i){case"name":n.names.push(c);break;case"description":n.descriptions.push(c);break;case"event":n.events.push(c);break;case"trigger":n.triggers.push(c);break;case"shortcut":n.shortcuts.push(c);break;case"tagname[.field]":n.triggers.push(c);break;case"condition":n.triggers.push(c);break;case"condition type":n.events.push(c);break;case"return":case"returns":n.returnTypes.push({...c,value:s.toUpperCase()});break}}let r=Uy(t);if(r!==void 0)for(let o of r.text.matchAll(Ny)){let i=o[1],s=o[2],c=r.start+(o.index??0),g=t.span.start+c+o[0].indexOf(i),d=t.span.start+c+o[0].indexOf(s,o[0].indexOf(i)+i.length);n.legacyParameters.push({name:s,datatype:i.toUpperCase(),description:o[3]?.trim()||void 0,range:(0,Wt.sourceRange)(e,{start:g,end:t.span.start+c+o[0].trimEnd().length}).range,nameRange:(0,Wt.sourceRange)(e,{start:d,end:d+s.length}).range,datatypeRange:(0,Wt.sourceRange)(e,{start:g,end:g+i.length}).range})}}function By(e){if(/^[ \t]*Script[ \t]*:[ \t]*$/imu.test(e))return!0;let t=/^[ \t]*Type[ \t]*:[ \t]*[^\r\n]+$/imu.test(e),n=/^[ \t]*(?:Name|Tagname\[\.field\]|Condition)[ \t]*:[ \t]*[^\r\n]+$/imu.test(e);return t&&n}function $y(e){if(e===void 0)return;let t=e.replace(/^.*[\\/]/,"").replace(/\.(?:vbi|vi)$/i,"").replace(/_\d+(?:\.\d+){1,3}$/i,"");for(let[n,r]of[["QF_","QuickFunction"],["DCH_","DataChange"],["CS_","Condition"],["APP_","Application"],["KEY_","KeyScript"]])if(t.toUpperCase().startsWith(n))return{scriptType:r,name:t.slice(n.length)}}function zy(e,t={}){let n=[],r={scriptTypes:[],names:[],events:[],triggers:[],shortcuts:[],descriptions:[],returnTypes:[],explicitParameters:[],legacyParameters:[]},o=(t.tokens??(0,Ey.tokenize)(e)).filter(k=>k.kind===My.TokenKind.Comment);for(let k of o)Wy(e,k,r,n),By(k.lexeme)&&Qy(e,k,r);let i=k=>k.filter(M=>M.source==="explicit"),s=k=>k.filter(M=>M.source==="legacy"),c=Lt("Script type",i(r.scriptTypes),s(r.scriptTypes),n),g=Lt("Name",i(r.names),s(r.names),n),d=Lt("Event",i(r.events),s(r.events),n),h=Lt("Trigger",i(r.triggers),s(r.triggers),n),b=Lt("Shortcut",i(r.shortcuts),s(r.shortcuts),n),m=Lt("Description",i(r.descriptions),s(r.descriptions),n),T=Lt("Return type",i(r.returnTypes),s(r.returnTypes),n),D=r.explicitParameters.length>0?r.explicitParameters:r.legacyParameters;if(r.explicitParameters.length>0&&r.legacyParameters.length>0){let k=M=>M.map(L=>`${L.name.toUpperCase()}:${L.datatype.toUpperCase()}`).join(",");k(r.explicitParameters)!==k(r.legacyParameters)&&n.push(ut("metadata-conflict","Legacy parameter metadata conflicts with higher-priority explicit @Param metadata.",r.legacyParameters[0].range))}let q=$y(t.fileName),N=c?.value??q?.scriptType??"Generic",x=g?.value??q?.name,p=d?.value;if(N==="Window"&&d!==void 0){let k=jy(d.value);k===void 0?(n.push(ut("invalid-window-event",`Unknown Window script event '${d.value}'.`,d.range)),p=void 0):p=k}else d!==void 0&&!["Application","Condition"].includes(N)&&n.push(ut("metadata-conflict",`Event metadata is not supported for ${N} scripts.`,d.range));N==="Window"&&T!==void 0&&n.push(ut("metadata-conflict","Window scripts cannot declare a return type.",T.range));let l=[c,g,d,h,b,m,T].flatMap(k=>k===void 0?[]:[k.source]);r.explicitParameters.length>0?l.push("explicit"):r.legacyParameters.length>0&&l.push("legacy");let C=l.includes("explicit")?"explicit":l.includes("legacy")?"legacy":q===void 0?"none":"filename";return{scriptType:N,name:x,nameRange:g?.range,event:p,eventRange:d?.range,trigger:h?.value,triggerRange:h?.range,shortcut:b?.value,shortcutRange:b?.range,description:m?.value,descriptionRange:m?.range,parameters:D,returnType:T?.value,returnTypeRange:T?.range,metadataSource:C,legacyScriptType:r.legacyScriptType,diagnostics:n}}});var Oo=I(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.parseQuickScript=iT;var Vy=Jn(),Ro=tr(),ne=at(),Ky=rr(),Im=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),Dm=new Set(["+","-","NOT","!","~"]),Xy=new Set(["TRUE","FALSE","NULL","EOF"]),Zy=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),Yy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function Jy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function kt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function Se(e){return e?.kind===ne.TokenKind.Keyword?kt(e):void 0}function wm(e,t,n=t){return(0,Ro.sourceRange)(e,{start:t.span.start,end:n.span.end})}function eT(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,Ro.sourceRange)(e,{start:n,end:n}).range}function Te(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function Ue(e,t,n,r){return{code:t,message:n,severity:"error",range:eT(e,r)}}function tT(e,t){return e.filter(n=>n.range.start.line===t&&!Jy(n))}function km(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function Pm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?kt(e):e.lexeme}var Ta=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;Dm.has(Pm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(kt(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||Xy.has(kt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===ne.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!Zy.has(kt(t)??"")&&!Im.has(kt(t)??"")&&!Dm.has(kt(t)??"")}};function nT(e,t,n){return n.token===void 0?Ue(e,n.code,n.message,t):Te(n.code,n.message,n.token)}function qe(e,t,n){let r=new Ta(t).parse();return r===void 0?!0:(n.push(nT(e,t,r)),!1)}var _a=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positionc.lexeme==="(")&&this.diagnostics.push(Te("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(Ue(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else qe(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?Ue(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):Te("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?Ue(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):Te("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(Ue(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{qe(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),c=i>=0&&i=0&&i0&&qe(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&ob.lexeme==="=")&&r.some(b=>Se(b)==="TO");this.statements.push({kind:c,first:t,last:d,name:c==="direct-call"?t:void 0,recoveredLoop:h})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[ne.TokenKind.Identifier,ne.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!qe(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(Ue(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function rT(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function oT(e,t){let n=rT(e,t);if(n>t)return n;let r=e[t],o=Se(r[0])==="IF",i=Se(r[0])==="ELSE"&&Se(r[1])==="IF";if(!o&&!i||r.some(d=>Se(d)==="THEN"))return t;let s=o&&r.length===1,c=["AND","OR","NOT"].includes(Se(r[r.length-1])??""),g=["AND","OR"].includes(Se(e[t+1]?.[0])??"");if(!s&&!c&&!g)return t;for(let d=t+1;dSe(h)==="THEN"))return d;return t}function iT(e){let t=(0,Ky.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(m,T)=>tT(t,T)),o=[],i=[],s=[],c=new Array(n),g=[],d=[];for(let m=0;mT.kind==="dim"&&T.datatype!==void 0))if(!Vy.DATATYPE_SET.has(m.datatype.toUpperCase())){let T=m.datatypeRange??m.range,D=`${T.start.line}:${T.start.character}`;if(h.has(D))continue;h.add(D),s.push({code:"unknown-datatype",message:`Unknown datatype '${m.datatype}'.`,severity:"error",range:T})}let b=(0,Ro.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:c,...b}}});var Am=I(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatQuickScriptLexically=Mm;sr.formatQuickScriptStructure=Em;sr.formatQuickScript=hT;var j=at(),Sa=rr(),sT=Oo();function Rm(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function Ca(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function xm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function va(e){ir(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function cT(e,t){if(e[t].lexeme!=="-"||xm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=Ca(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function aT(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function Mm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Sa.tokenize)(r);if(o.some(d=>d.kind===j.TokenKind.String&&!d.lexeme.endsWith('"'))||o.some(d=>d.kind===j.TokenKind.Unknown&&d.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,c=!1;for(let d=0;d")||_e(b,t.regionBlockCodeBegin??"{region"))&&(c=!0),T!==void 0&&(T.kind===j.TokenKind.Identifier||T.kind===j.TokenKind.Keyword||T.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(h.lexeme)}let g=aT(i.join(""),n);return{text:g,changed:g!==e}}function uT(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function lT(e){let t=(0,Sa.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function _e(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function dT(e,t){return _e(e,t.blockCodeBegin??"{>")||_e(e,t.blockCodeEnd??"{<")||_e(e,t.blockCodeExclude??"{#")||_e(e,t.regionBlockCodeBegin??"{region")||_e(e,t.regionBlockCodeEnd??"{endregion")||_e(e,t.regionBlockCodeExclude??"{#")}function fT(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function mT(e,t){let n=new Map;for(let r of(0,Sa.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` +`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:dT(s,t),contentIndent:fT(r.lexeme)})}return n}function Om(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function Em(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,sT.parseQuickScript)(r),i=r.split(n),s=mT(r,t),c=[],g=uT(t),d=0,h=0,b,m=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let D=0;D")||_e(x,t.regionBlockCodeBegin??"{region"))&&M?.directive!==!0&&(d+=1)}let T=c.join(n);return{text:T,changed:T!==e,diagnostics:o.diagnostics}}function hT(e,t={}){let n=Mm(e,t),r=Em(n.text,t);return{...r,changed:r.text!==e}}});var Mo=I(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.KNOWN_FUNCTIONS=void 0;xo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Gm=I(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.completions=pT;cr.hoverAt=yT;cr.documentSymbols=TT;var Fm=Mo(),qm=Jn(),Nm=at();function gT(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of qm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of qm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of Fm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function yT(e,t){let n=e.document.tokens.find(i=>gT(i.range,t));if(n===void 0)return;if(n.kind===Nm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Nm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=Fm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function TT(e){let t=e.document.blocks.map(s=>({name:s.kind.toUpperCase(),kind:s.kind,range:s.range,selectionRange:s.opener,children:[]})),n=[];for(let s of e.document.blocks)s.parentId===void 0?n.push(t[s.id]):t[s.parentId].children.push(t[s.id]);let r=[...e.symbols.map(s=>({name:s.name,kind:"variable",range:s.range,selectionRange:s.selectionRange,children:[]})),...n],o=e.metadata,i=o.nameRange??o.triggerRange??e.document.range;if(o.scriptType==="QuickFunction"&&o.name!==void 0)return[{name:o.name,kind:"function",range:e.document.range,selectionRange:i,children:r}];if(o.scriptType==="Window"&&o.name!==void 0){let s=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:o.name,kind:"window",range:e.document.range,selectionRange:i,children:s}]}if(o.scriptType==="Application"){let s=o.name??"Application",c=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:s,kind:"application",range:e.document.range,selectionRange:i,children:c}]}if(o.scriptType==="DataChange"||o.scriptType==="Condition"){let s=o.scriptType==="DataChange"?"data-change":"condition";return[{name:o.name??o.trigger??o.scriptType,kind:s,range:e.document.range,selectionRange:i,children:r}]}if(o.scriptType==="KeyScript"){let s=o.name??"KeyScript",c=o.shortcut===void 0?r:[{name:o.shortcut,kind:"event",range:e.document.range,selectionRange:o.shortcutRange??i,children:r}];return[{name:s,kind:"key-script",range:e.document.range,selectionRange:i,children:c}]}return r}});var Hm=I(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.QUALITY_DIAGNOSTIC_CODES=void 0;Pt.qualityDiagnostics=DT;var In=at();Pt.QUALITY_DIAGNOSTIC_CODES={nonAsciiIdentifier:"quickscript.naming.nonAsciiIdentifier",windowWhitespace:"quickscript.naming.windowWhitespace",windowNonAscii:"quickscript.naming.windowNonAscii"};var _T=/^[A-Za-z0-9_$#-]+$/,bT=new Set(["HIDE","SHOW"]),vT=new Set(["HIDE","INFOAPPSTATUS","INFOAPPTITLEEXPAND","MOVEWINDOW","PRINTWINDOW","SHOW","SHOWAT","SHOWTOPLEFTAT","WINDOWSTATE"]);function CT(e){return e.document.tokens.filter(t=>![In.TokenKind.Whitespace,In.TokenKind.Newline,In.TokenKind.Comment,In.TokenKind.EOF].includes(t.kind))}function ST(e){return e.lexeme.startsWith('"')&&e.lexeme.endsWith('"')?e.lexeme.slice(1,-1):e.lexeme.slice(1)}function IT(e){let t=CT(e),n=[];for(let r=0;r")){if(bT.has(o)&&t[r+1]?.kind===In.TokenKind.String){n.push(t[r+1]);continue}vT.has(o)&&t[r+1]?.lexeme==="("&&t[r+2]?.kind===In.TokenKind.String&&n.push(t[r+2])}}return n}function Ia(e,t,n,r){if(n!=="off")return{code:e,message:t,severity:n,range:r.range,source:"intouch-quality"}}function DT(e,t={}){let n=[],r=new Set,o=t.nonAsciiIdentifiers??"warning";for(let i of e.identifiers){let s=i.name.toUpperCase();if(_T.test(i.name)||r.has(s))continue;r.add(s);let c=Ia(Pt.QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier,`Avoid non-ASCII characters in identifier '${i.name}'.`,o,i);c!==void 0&&n.push(c)}for(let i of IT(e)){let s=ST(i);if(/\s/u.test(s)){let c=Ia(Pt.QUALITY_DIAGNOSTIC_CODES.windowWhitespace,"Avoid whitespace in window names.",t.windowWhitespace??"warning",i);c!==void 0&&n.push(c)}if(/[^\x00-\x7f]/u.test(s)){let c=Ia(Pt.QUALITY_DIAGNOSTIC_CODES.windowNonAscii,"Avoid non-ASCII characters in window names.",t.windowNonAscii??"warning",i);c!==void 0&&n.push(c)}}return n}});var Qm=I(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.quickFunctionDeclarations=Um;Qt.quickFunctionNames=OT;Qt.analyzeQuickScript=xT;Qt.definitionAt=MT;Qt.referencesAt=ET;var wT=Oo(),jm=ya(),kT=Mo(),Da=tr(),Ut=at();function Lm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Ut.TokenKind.Whitespace,Ut.TokenKind.Newline,Ut.TokenKind.Comment].includes(e[n].kind))return e[n]}function RT(e,t){for(let n=t+1;n({name:n.name,kind:"parameter",range:n.nameRange})),metadata:t}]}function Um(e,t={}){return Wm(e,(0,jm.extractDocumentMetadata)(e,t))}function OT(e){let t=new Map;for(let n of Um(e))t.set(n.name.toUpperCase(),n.name);return[...t.values()]}function xT(e,t={}){let n=(0,wT.parseQuickScript)(e),r=(0,jm.extractDocumentMetadata)(e,{fileName:t.fileName,tokens:n.tokens}),o=[...n.diagnostics,...r.diagnostics],i=[],s=Wm(e,r),c=new Map,g=new Set(kT.KNOWN_FUNCTIONS.map(T=>T.name.toUpperCase()));for(let T of s)g.add(T.name.toUpperCase());for(let T of t.knownFunctionNames??[])g.add(T.toUpperCase());for(let T of n.statements.filter(D=>D.kind==="dim"&&D.name!==void 0&&D.nameRange!==void 0)){let D=T.name.toUpperCase();if(c.get(D)!==void 0){o.push({code:"duplicate-local",message:`Local variable '${T.name}' is already declared.`,severity:"error",range:T.nameRange});continue}let N={id:i.length,name:T.name,kind:"variable",range:T.range,selectionRange:T.nameRange,datatype:T.datatype,scopeId:0};i.push(N),c.set(D,N)}let d=new Map;for(let T of i)d.set((0,Da.offsetAt)(e,T.selectionRange.start),T);let h=new Set;for(let T of n.statements.filter(D=>D.kind==="call"&&D.name!==void 0&&D.nameRange!==void 0))h.add((0,Da.offsetAt)(e,T.nameRange.start));let b=r.trigger===void 0||r.triggerRange===void 0?[]:[{name:r.trigger,kind:"trigger",range:r.triggerRange}],m=s.flatMap(T=>[{name:T.name,kind:"function",range:T.nameRange},...T.parameters]);r.trigger!==void 0&&r.triggerRange!==void 0&&m.push({name:r.trigger,kind:"global",range:r.triggerRange});for(let T of i)m.push({name:T.name,kind:"local",range:T.selectionRange});for(let T=0;T"){m.push({name:D.lexeme,kind:"member",range:D.range});continue}let x=c.get(D.lexeme.toUpperCase()),p=RT(n.tokens,T),l=h.has(D.span.start)||p?.lexeme==="(";if(m.push({name:D.lexeme,kind:l?"function":x===void 0?"global":"local",range:D.range}),l&&!g.has(D.lexeme.toUpperCase())&&o.push({code:"unknown-function",message:`Unknown QuickScript function '${D.lexeme}'.`,severity:"warning",range:D.range}),x!==void 0||l){let C=l?"call":p?.lexeme==="="?"write":"read";b.push({name:D.lexeme,kind:C,range:D.range,declarationId:x?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:i.map(T=>T.id)}],symbols:i,references:b,identifiers:m,quickFunctions:s,metadata:r,diagnostics:o}}function MT(e,t){let n=e.references.find(r=>Lm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function ET(e,t,n=!0){let r=e.references.find(o=>Lm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var wa=I(ue=>{"use strict";var AT=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Qe=ue&&ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&AT(t,e,n)};Object.defineProperty(ue,"__esModule",{value:!0});Qe(Jn(),ue);Qe(ya(),ue);Qe(Am(),ue);Qe(Mo(),ue);Qe(Gm(),ue);Qe(Oo(),ue);Qe(Hm(),ue);Qe(Qm(),ue);Qe(tr(),ue);Qe(at(),ue);Qe(rr(),ue)});var Ra=I(Pe=>{"use strict";var qT=Pe&&Pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),NT=Pe&&Pe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),FT=Pe&&Pe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oe.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.linen.kind==="call"),symbols:jT(e.uri,t.metadata)}}var Ao=class{constructor(){this.workspaceDocuments=new Map,this.openDocuments=new Map}replaceWorkspaceDocuments(t){this.workspaceDocuments.clear();for(let n of t)this.workspaceDocuments.set(Bt(n.uri),Pa(n))}updateWorkspaceDocument(t){this.workspaceDocuments.set(Bt(t.uri),Pa(t))}removeWorkspaceDocument(t){this.workspaceDocuments.delete(Bt(t))}updateDocument(t){this.openDocuments.set(Bt(t.uri),Pa({uri:t.uri,text:t.getText()}))}removeDocument(t){this.openDocuments.delete(Bt(t))}entries(){let t=new Map(this.workspaceDocuments);for(let[n,r]of this.openDocuments)t.set(n,r);return[...t.values()].sort((n,r)=>n.uri.localeCompare(r.uri,"en"))}entry(t){let n=Bt(t);return this.openDocuments.get(n)??this.workspaceDocuments.get(n)}symbols(){return this.entries().flatMap(t=>t.symbols)}quickFunctions(t){let n=t?.toUpperCase();return this.symbols().filter(r=>r.kind==="QuickFunction"&&(n===void 0||r.name.toUpperCase()===n))}knownFunctionNames(){let t=new Map;for(let n of this.quickFunctions())t.set(n.name.toUpperCase(),n.name);return[...t.values()].sort((n,r)=>n.localeCompare(r,"en",{sensitivity:"base"}))}uniqueQuickFunction(t){let n=this.quickFunctions(t);return n.length===1?n[0]:void 0}symbolAt(t,n){return this.entry(t)?.symbols.find(r=>ka(r.definitionRange,n))}symbolNameAt(t,n){let r=this.entry(t),o=this.symbolAt(t,n);return o?.kind!=="QuickFunction"?r?.calls.find(i=>ka(i.range,n))?.name:o!==void 0?o.name:r?.calls.find(i=>ka(i.range,n))?.name}references(t,n){let r=t.toUpperCase(),o=n?this.quickFunctions(t).map(s=>({name:s.name,kind:"declaration",uri:s.uri,range:s.definitionRange})):[],i=this.entries().flatMap(s=>s.calls.filter(c=>c.name.toUpperCase()===r).map(c=>({name:c.name,kind:"call",uri:s.uri,range:c.range})));return[...o,...i].sort((s,c)=>s.uri.localeCompare(c.uri,"en")||s.range.start.line-c.range.start.line||s.range.start.character-c.range.start.character)}diagnostics(t){let n=this.entry(t);if(n===void 0)return[];let r=[];for(let o of n.symbols.filter(i=>i.kind==="QuickFunction"))this.quickFunctions(o.name).length>1&&r.push({code:"duplicate-quickfunction",message:`QuickFunction '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.definitionRange,source:"intouch-metadata"});for(let o of n.calls)this.quickFunctions(o.name).length>1&&r.push({code:"ambiguous-quickfunction",message:`QuickFunction call '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.range,source:"intouch-metadata"});return r}};Pe.WorkspaceSymbolIndex=Ao;Pe.WorkspaceFunctionIndex=Ao});var Km=I(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.serverCapabilities=LT;Ze.diagnosticsFor=$T;Ze.formattingEdits=zT;Ze.symbolsFor=VT;Ze.definitionFor=KT;Ze.referencesFor=XT;Ze.completionsFor=ZT;Ze.hoverFor=YT;var B=la(),Rt=wa(),$m=Ra();function LT(){return{capabilities:{textDocumentSync:B.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function WT(e){switch(e){case"keyword":return B.CompletionItemKind.Keyword;case"datatype":return B.CompletionItemKind.TypeParameter;case"variable":return B.CompletionItemKind.Variable;case"call-target":return B.CompletionItemKind.Method;default:return B.CompletionItemKind.Function}}function UT(e){switch(e){case"error":return B.DiagnosticSeverity.Error;case"information":return B.DiagnosticSeverity.Information;case"hint":return B.DiagnosticSeverity.Hint;default:return B.DiagnosticSeverity.Warning}}function zm(e){return e instanceof $m.WorkspaceSymbolIndex?e:void 0}function QT(e){let t=zm(e);return t===void 0?e:t.knownFunctionNames()}function Dn(e,t){return(0,Rt.analyzeQuickScript)(e.getText(),{knownFunctionNames:QT(t),fileName:(0,$m.documentFileName)(e.uri)})}function BT(e){let t=e.metadata.parameters.map(r=>`${r.name}: ${r.datatype}`).join(", "),n=e.metadata.returnType===void 0?"":`: ${e.metadata.returnType}`;return`${e.name}(${t})${n}`}function Vm(e){let t=BT(e);return e.metadata.description===void 0?t:`${t} -${e.metadata.description}`}function LT(e,t,n={}){let r=In(e,t),o=Bm(t)?.diagnostics(e.uri)??[];return[...r.diagnostics,...o,...(0,Pt.qualityDiagnostics)(r,n.qualityDiagnostics)].map(i=>({code:i.code,message:i.message,range:i.range,severity:GT(i.severity),source:i.source??"intouch-language"}))}function WT(e,t){let n=(0,Pt.formatQuickScript)(e.getText(),t);return n.changed?[B.TextEdit.replace(B.Range.create(B.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function UT(e){let t=r=>{switch(r){case"variable":return B.SymbolKind.Variable;case"function":return B.SymbolKind.Function;case"window":return B.SymbolKind.Namespace;case"event":return B.SymbolKind.Event;case"application":return B.SymbolKind.Module;case"data-change":return B.SymbolKind.Event;case"condition":return B.SymbolKind.Event;case"key-script":return B.SymbolKind.Event;default:return B.SymbolKind.Struct}},n=r=>B.DocumentSymbol.create(r.name,void 0,t(r.kind),r.range,r.selectionRange,r.children.map(n));return(0,Pt.documentSymbols)(In(e)).map(n)}function QT(e,t,n){let r=(0,Pt.definitionAt)(In(e,n),t);if(r!==void 0)return B.Location.create(e.uri,r);if(n===void 0)return;let o=n.symbolNameAt(e.uri,t);if(o===void 0)return;let i=n.uniqueQuickFunction(o);return i===void 0?void 0:B.Location.create(i.uri,i.definitionRange)}function BT(e,t,n,r){let o=(0,Pt.referencesAt)(In(e,r),t,n);if(o.length>0)return o.map(s=>B.Location.create(e.uri,s));if(r===void 0)return[];let i=r.symbolNameAt(e.uri,t);return i===void 0?[]:r.references(i,n).map(s=>B.Location.create(s.uri,s.range))}function $T(e,t){let n=new Set((t?.symbols()??[]).filter(i=>!i.callable).map(i=>i.name.toUpperCase())),r=(0,Pt.completions)(In(e,t)).filter(i=>i.kind!=="call-target"||!n.has(i.label.toUpperCase())),o=new Map(r.map(i=>[i.label.toUpperCase(),{label:i.label,kind:FT(i.kind),detail:i.detail}]));for(let i of t?.quickFunctions()??[]){let s=t?.quickFunctions(i.name).length??0;o.set(i.name.toUpperCase(),{label:i.name,kind:B.CompletionItemKind.Function,detail:s>1?`Ambiguous workspace QuickFunction (${s} definitions)`:$m(i)})}return[...o.values()].sort((i,s)=>i.label.localeCompare(s.label,"en",{sensitivity:"base"}))}function zT(e,t,n){let r=n?.symbolAt(e.uri,t);if(r!==void 0&&r.kind!=="QuickFunction"){let s=r.metadata.event??r.metadata.shortcut??r.metadata.trigger,c=s===void 0?r.kind:`${r.kind}: ${s}`;return{contents:{kind:"markdown",value:`**${r.name}** +${e.metadata.description}`}function $T(e,t,n={}){let r=Dn(e,t),o=zm(t)?.diagnostics(e.uri)??[];return[...r.diagnostics,...o,...(0,Rt.qualityDiagnostics)(r,n.qualityDiagnostics)].map(i=>({code:i.code,message:i.message,range:i.range,severity:UT(i.severity),source:i.source??"intouch-language"}))}function zT(e,t){let n=(0,Rt.formatQuickScript)(e.getText(),t);return n.changed?[B.TextEdit.replace(B.Range.create(B.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function VT(e){let t=r=>{switch(r){case"variable":return B.SymbolKind.Variable;case"function":return B.SymbolKind.Function;case"window":return B.SymbolKind.Namespace;case"event":return B.SymbolKind.Event;case"application":return B.SymbolKind.Module;case"data-change":return B.SymbolKind.Event;case"condition":return B.SymbolKind.Event;case"key-script":return B.SymbolKind.Event;default:return B.SymbolKind.Struct}},n=r=>B.DocumentSymbol.create(r.name,void 0,t(r.kind),r.range,r.selectionRange,r.children.map(n));return(0,Rt.documentSymbols)(Dn(e)).map(n)}function KT(e,t,n){let r=(0,Rt.definitionAt)(Dn(e,n),t);if(r!==void 0)return B.Location.create(e.uri,r);if(n===void 0)return;let o=n.symbolNameAt(e.uri,t);if(o===void 0)return;let i=n.uniqueQuickFunction(o);return i===void 0?void 0:B.Location.create(i.uri,i.definitionRange)}function XT(e,t,n,r){let o=(0,Rt.referencesAt)(Dn(e,r),t,n);if(o.length>0)return o.map(s=>B.Location.create(e.uri,s));if(r===void 0)return[];let i=r.symbolNameAt(e.uri,t);return i===void 0?[]:r.references(i,n).map(s=>B.Location.create(s.uri,s.range))}function ZT(e,t){let n=new Set((t?.symbols()??[]).filter(i=>!i.callable).map(i=>i.name.toUpperCase())),r=(0,Rt.completions)(Dn(e,t)).filter(i=>i.kind!=="call-target"||!n.has(i.label.toUpperCase())),o=new Map(r.map(i=>[i.label.toUpperCase(),{label:i.label,kind:WT(i.kind),detail:i.detail}]));for(let i of t?.quickFunctions()??[]){let s=t?.quickFunctions(i.name).length??0;o.set(i.name.toUpperCase(),{label:i.name,kind:B.CompletionItemKind.Function,detail:s>1?`Ambiguous workspace QuickFunction (${s} definitions)`:Vm(i)})}return[...o.values()].sort((i,s)=>i.label.localeCompare(s.label,"en",{sensitivity:"base"}))}function YT(e,t,n){let r=n?.symbolAt(e.uri,t);if(r!==void 0&&r.kind!=="QuickFunction"){let s=r.metadata.event??r.metadata.shortcut??r.metadata.trigger,c=s===void 0?r.kind:`${r.kind}: ${s}`;return{contents:{kind:"markdown",value:`**${r.name}** ${c}`},range:r.definitionRange}}let o=n?.symbolNameAt(e.uri,t);if(o!==void 0){let s=n.quickFunctions(o);if(s.length>1)return{contents:{kind:"markdown",value:`**${o}** Ambiguous workspace QuickFunction (${s.length} definitions).`}};if(s.length===1)return{contents:{kind:"markdown",value:`**${s[0].name}** -${$m(s[0])}`},range:n?.entry(e.uri)?.calls.find(c=>c.name.toUpperCase()===o.toUpperCase()&&c.range.start.line===t.line&&c.range.start.character<=t.character&&c.range.end.character>t.character)?.range}}let i=(0,Pt.hoverAt)(In(e,n),t);return i===void 0?void 0:{contents:{kind:"markdown",value:`**${i.label}** +${Vm(s[0])}`},range:n?.entry(e.uri)?.calls.find(c=>c.name.toUpperCase()===o.toUpperCase()&&c.range.start.line===t.line&&c.range.start.character<=t.character&&c.range.end.character>t.character)?.range}}let i=(0,Rt.hoverAt)(Dn(e,n),t);return i===void 0?void 0:{contents:{kind:"markdown",value:`**${i.label}** -${i.detail}`},range:i.range}}});var Km=I(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.readSettings=VT;Eo.formattingSettings=KT;function ut(e){return typeof e=="object"&&e!==null?e:{}}function Vm(e){return typeof e=="number"?e:void 0}function Pa(e){return typeof e=="boolean"?e:void 0}function Bt(e){return typeof e=="string"?e:void 0}function Ra(e){let t=Bt(e)?.toLowerCase();return t!==void 0&&["off","hint","information","warning","error"].includes(t)?t:void 0}function VT(e){let t=ut(e),n=t.VBI===void 0?t:ut(t.VBI),r=ut(n.formatter),o=ut(r.EmptyLine),i=ut(r.BC),s=ut(r.Region),c=ut(r.Misc),g=ut(n.diagnostics),d=ut(g.naming);return{allowedNumberOfEmptyLines:Vm(o.allowedNumberOfEmptyLines),removeEmptyLines:Pa(o.RemoveEmptyLines),removeEmptyLinesInComments:Pa(o.EmptyLinesAlsoInComment),blockCodeBegin:Bt(i.BlockCodeBegin),blockCodeEnd:Bt(i.BlockCodeEnd),blockCodeExclude:Bt(i.BlockCodeExclude),regionBlockCodeBegin:Bt(s.BlockCodeBegin),regionBlockCodeEnd:Bt(s.BlockCodeEnd),regionBlockCodeExclude:Bt(s.BlockCodeExclude),insertSpaces:Pa(c.ReplaceTabToSpaces),indentSize:Vm(c.IndentSize),qualityDiagnostics:{nonAsciiIdentifiers:Ra(d.nonAsciiIdentifiers),windowWhitespace:Ra(d.windowWhitespace),windowNonAscii:Ra(d.windowNonAscii)}}}function KT(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var XT=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ZT=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),YT=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(Xm=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,Ma.fileURLToPath)(n)),await o_(Xm),(0,Rt.serverCapabilities)()));be.onInitialized(async()=>{let e=await be.workspace.getConfiguration({section:"VBI"});Ao=(0,Ea.readSettings)({VBI:e}),$t()});be.onDidChangeConfiguration(e=>{Ao=(0,Ea.readSettings)(e.settings),$t()});be.onDidChangeWatchedFiles(e=>{(async()=>{for(let t of e.changes.filter(n=>/\.(?:vbi|vi)$/i.test(n.uri))){if(t.type===Oa.FileChangeType.Deleted){qe.removeWorkspaceDocument(t.uri);continue}try{qe.updateWorkspaceDocument({uri:t.uri,text:await xa.promises.readFile((0,Ma.fileURLToPath)(t.uri),"utf8")})}catch{qe.removeWorkspaceDocument(t.uri)}}$t()})()});Qe.onDidOpen(e=>{qe.updateDocument(e.document),$t()});Qe.onDidChangeContent(e=>{qe.updateDocument(e.document),$t()});Qe.onDidClose(e=>{qe.removeDocument(e.document.uri),be.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),$t()});be.onDocumentFormatting(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.formattingEdits)(t,(0,Ea.formattingSettings)(Ao,e.options))});be.onDocumentSymbol(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.symbolsFor)(t)});be.onDefinition(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?void 0:(0,Rt.definitionFor)(t,e.position,qe)});be.onReferences(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.referencesFor)(t,e.position,e.context.includeDeclaration,qe)});be.onCompletion(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?[]:(0,Rt.completionsFor)(t,qe)});be.onHover(e=>{let t=Qe.get(e.textDocument.uri);return t===void 0?void 0:(0,Rt.hoverFor)(t,e.position,qe)});be.onShutdown(()=>{});Qe.listen(be);be.listen(); +${i.detail}`},range:i.range}}});var Zm=I(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.readSettings=JT;qo.formattingSettings=e_;function lt(e){return typeof e=="object"&&e!==null?e:{}}function Xm(e){return typeof e=="number"?e:void 0}function Oa(e){return typeof e=="boolean"?e:void 0}function $t(e){return typeof e=="string"?e:void 0}function xa(e){let t=$t(e)?.toLowerCase();return t!==void 0&&["off","hint","information","warning","error"].includes(t)?t:void 0}function JT(e){let t=lt(e),n=t.VBI===void 0?t:lt(t.VBI),r=lt(n.formatter),o=lt(r.EmptyLine),i=lt(r.BC),s=lt(r.Region),c=lt(r.Misc),g=lt(n.diagnostics),d=lt(g.naming);return{allowedNumberOfEmptyLines:Xm(o.allowedNumberOfEmptyLines),removeEmptyLines:Oa(o.RemoveEmptyLines),removeEmptyLinesInComments:Oa(o.EmptyLinesAlsoInComment),blockCodeBegin:$t(i.BlockCodeBegin),blockCodeEnd:$t(i.BlockCodeEnd),blockCodeExclude:$t(i.BlockCodeExclude),regionBlockCodeBegin:$t(s.BlockCodeBegin),regionBlockCodeEnd:$t(s.BlockCodeEnd),regionBlockCodeExclude:$t(s.BlockCodeExclude),insertSpaces:Oa(c.ReplaceTabToSpaces),indentSize:Xm(c.IndentSize),qualityDiagnostics:{nonAsciiIdentifiers:xa(d.nonAsciiIdentifiers),windowWhitespace:xa(d.windowWhitespace),windowNonAscii:xa(d.windowNonAscii)}}}function e_(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var t_=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n_=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r_=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(Ym=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,Aa.fileURLToPath)(n)),await u_(Ym),(0,Ot.serverCapabilities)()));be.onInitialized(async()=>{let e=await be.workspace.getConfiguration({section:"VBI"});No=(0,qa.readSettings)({VBI:e}),zt()});be.onDidChangeConfiguration(e=>{No=(0,qa.readSettings)(e.settings),zt()});be.onDidChangeWatchedFiles(e=>{(async()=>{for(let t of e.changes.filter(n=>/\.(?:vbi|vi)$/i.test(n.uri))){if(t.type===Ma.FileChangeType.Deleted){Ne.removeWorkspaceDocument(t.uri);continue}try{Ne.updateWorkspaceDocument({uri:t.uri,text:await Ea.promises.readFile((0,Aa.fileURLToPath)(t.uri),"utf8")})}catch{Ne.removeWorkspaceDocument(t.uri)}}zt()})()});Be.onDidOpen(e=>{Ne.updateDocument(e.document),zt()});Be.onDidChangeContent(e=>{Ne.updateDocument(e.document),zt()});Be.onDidClose(e=>{Ne.removeDocument(e.document.uri),be.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),zt()});be.onDocumentFormatting(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.formattingEdits)(t,(0,qa.formattingSettings)(No,e.options))});be.onDocumentSymbol(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.symbolsFor)(t)});be.onDefinition(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?void 0:(0,Ot.definitionFor)(t,e.position,Ne)});be.onReferences(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.referencesFor)(t,e.position,e.context.includeDeclaration,Ne)});be.onCompletion(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.completionsFor)(t,Ne)});be.onHover(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?void 0:(0,Ot.hoverFor)(t,e.position,Ne)});be.onShutdown(()=>{});Be.listen(be);be.listen(); //# sourceMappingURL=server.js.map diff --git a/package-lock.json b/package-lock.json index 3635baf..021e2cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.7", + "version": "1.5.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.7", + "version": "1.5.8", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index b919f10..a37a946 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.7", + "version": "1.5.8", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { diff --git a/packages/language-server/src/workspaceFunctions.ts b/packages/language-server/src/workspaceFunctions.ts index 17ff68e..2235c2c 100644 --- a/packages/language-server/src/workspaceFunctions.ts +++ b/packages/language-server/src/workspaceFunctions.ts @@ -1,4 +1,4 @@ -export { WorkspaceFunctionIndex, WorkspaceSymbolIndex } from './workspaceSymbols'; +export { WorkspaceFunctionIndex, WorkspaceSymbolIndex, workspaceDocumentKey } from './workspaceSymbols'; export type { WorkspaceDocumentEntry, WorkspaceDocumentSource, diff --git a/packages/language-server/src/workspaceSymbols.ts b/packages/language-server/src/workspaceSymbols.ts index 8c37042..5bcc8f3 100644 --- a/packages/language-server/src/workspaceSymbols.ts +++ b/packages/language-server/src/workspaceSymbols.ts @@ -6,6 +6,7 @@ import { Range, analyzeQuickScript, } from '@intouch-language/core'; +import * as path from 'node:path'; import { TextDocument } from 'vscode-languageserver-textdocument'; export type WorkspaceSymbolKind = @@ -45,6 +46,28 @@ export interface WorkspaceDocumentEntry { symbols: WorkspaceSymbol[]; } +/** Stable identity key for one physical document across equivalent URI spellings. */ +export function workspaceDocumentKey(uri: string): string { + try { + const parsed = new URL(uri); + if (parsed.protocol !== 'file:') return parsed.toString(); + + const decodedPath = decodeURIComponent(parsed.pathname); + if (/^\/[A-Za-z]:(?:\/|$)/.test(decodedPath)) { + const windowsPath = path.win32.normalize(decodedPath.slice(1).replace(/\//g, '\\')); + return `file-win:${windowsPath.toLowerCase()}`; + } + if (parsed.hostname !== '') { + const windowsPath = path.win32.normalize(`\\\\${parsed.hostname}${decodedPath.replace(/\//g, '\\')}`); + return `file-win:${windowsPath.toLowerCase()}`; + } + return `file-posix:${path.posix.normalize(decodedPath)}`; + } catch { + if (/^[A-Za-z]:[\\/]/.test(uri)) return `file-win:${path.win32.normalize(uri).toLowerCase()}`; + return uri; + } +} + function contains(range: Range, position: Position): boolean { return (position.line > range.start.line || (position.line === range.start.line && position.character >= range.start.character)) && (position.line < range.end.line || (position.line === range.end.line && position.character < range.end.character)); @@ -124,33 +147,34 @@ export class WorkspaceSymbolIndex { public replaceWorkspaceDocuments(sources: Iterable): void { this.workspaceDocuments.clear(); - for (const source of sources) this.workspaceDocuments.set(source.uri, indexDocument(source)); + for (const source of sources) this.workspaceDocuments.set(workspaceDocumentKey(source.uri), indexDocument(source)); } public updateWorkspaceDocument(source: WorkspaceDocumentSource): void { - this.workspaceDocuments.set(source.uri, indexDocument(source)); + this.workspaceDocuments.set(workspaceDocumentKey(source.uri), indexDocument(source)); } public removeWorkspaceDocument(uri: string): void { - this.workspaceDocuments.delete(uri); + this.workspaceDocuments.delete(workspaceDocumentKey(uri)); } public updateDocument(document: TextDocument): void { - this.openDocuments.set(document.uri, indexDocument({ uri: document.uri, text: document.getText() })); + this.openDocuments.set(workspaceDocumentKey(document.uri), indexDocument({ uri: document.uri, text: document.getText() })); } public removeDocument(uri: string): void { - this.openDocuments.delete(uri); + this.openDocuments.delete(workspaceDocumentKey(uri)); } public entries(): WorkspaceDocumentEntry[] { const documents = new Map(this.workspaceDocuments); - for (const [uri, entry] of this.openDocuments) documents.set(uri, entry); + for (const [key, entry] of this.openDocuments) documents.set(key, entry); return [...documents.values()].sort((left, right) => left.uri.localeCompare(right.uri, 'en')); } public entry(uri: string): WorkspaceDocumentEntry | undefined { - return this.openDocuments.get(uri) ?? this.workspaceDocuments.get(uri); + const key = workspaceDocumentKey(uri); + return this.openDocuments.get(key) ?? this.workspaceDocuments.get(key); } public symbols(): WorkspaceSymbol[] { diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index 29d3737..a3541d2 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -6,6 +6,8 @@ import * as path from 'path'; import { DiagnosticSeverity } from 'vscode-languageserver/node'; import { TextDocument } from 'vscode-languageserver-textdocument'; +import { KNOWN_FUNCTIONS } from '@intouch-language/core'; + import { completionsFor, definitionFor, @@ -17,7 +19,7 @@ import { symbolsFor, } from '../src/features'; import { formattingSettings, readSettings } from '../src/settings'; -import { WorkspaceFunctionIndex, WorkspaceSymbolIndex } from '../src/workspaceFunctions'; +import { WorkspaceFunctionIndex, WorkspaceSymbolIndex, workspaceDocumentKey } from '../src/workspaceFunctions'; function formattedText(document: TextDocument, settings = {}): string { const [edit] = formattingEdits(document, settings); @@ -407,6 +409,36 @@ suite('QuickScript language server features', () => { assert.strictEqual(referencesFor(caller, { line: 0, character: 7 }, true, workspace).length, 3); }); + test('replaces one physical Windows QuickFunction across scan and open-document lifecycle', () => { + const scanUri = 'file:///C:/HIL/QF_StartEP3_1.0.1.vbi'; + const openUri = 'file:///c:/HIL/QF_StartEP3_1.0.1.vbi'; + const source = '{>\n@ScriptType QuickFunction\n@Name StartEP3\n{<}'; + const caller = TextDocument.create('file:///C:/HIL/caller.vbi', 'intouch', 1, 'CALL StartEP3();'); + const workspace = new WorkspaceSymbolIndex(); + const assertPhase = (expectedUri: string): void => { + assert.strictEqual(workspace.quickFunctions('StartEP3').length, 1); + assert.strictEqual( + workspace.diagnostics(expectedUri).filter(diagnostic => diagnostic.code === 'duplicate-quickfunction').length, + 0, + ); + assert.strictEqual(definitionFor(caller, { line: 0, character: 7 }, workspace)?.uri, expectedUri); + }; + + assert.strictEqual(workspaceDocumentKey(scanUri), workspaceDocumentKey(openUri)); + workspace.replaceWorkspaceDocuments([{ uri: scanUri, text: source }]); + workspace.updateDocument(caller); + assertPhase(scanUri); + + workspace.updateDocument(TextDocument.create(openUri, 'intouch', 1, source)); + assertPhase(openUri); + workspace.updateDocument(TextDocument.create(openUri, 'intouch', 2, `${source}\n`)); + assertPhase(openUri); + workspace.removeDocument(openUri); + assertPhase(scanUri); + workspace.updateDocument(TextDocument.create(openUri, 'intouch', 3, source)); + assertPhase(openUri); + }); + test('uses QF filenames only when structured metadata is absent', () => { const workspace = new WorkspaceSymbolIndex(); workspace.updateDocument(TextDocument.create('file:///QF_FallbackOnly_1.0.0.vbi', 'intouch', 1, '')); @@ -415,23 +447,25 @@ suite('QuickScript language server features', () => { assert.deepStrictEqual(workspace.knownFunctionNames(), ['CanonicalName', 'FallbackOnly']); }); - test('prefers a real workspace definition over static Hermes catalog metadata', () => { + test('keeps static Hermes catalog entries out of workspace definition counts', () => { const workspace = new WorkspaceSymbolIndex(); - const definition = TextDocument.create('file:///hermes-debug.vbi', 'intouch', 1, [ + const definition = TextDocument.create('file:///StartEP3.vbi', 'intouch', 1, [ '{>', '@ScriptType QuickFunction', - '@Name xHerDebugL', + '@Name StartEP3', '@Description Workspace implementation.', - '@Param Message MESSAGE Debug text.', - '@Param Level INTEGER Debug level.', '{<}', ].join('\n')); - const caller = TextDocument.create('file:///hermes-caller.vbi', 'intouch', 1, 'CALL xHerDebugL("ok", 10);'); + const caller = TextDocument.create('file:///hermes-caller.vbi', 'intouch', 1, 'CALL StartEP3();'); workspace.updateDocument(definition); workspace.updateDocument(caller); + assert.strictEqual(KNOWN_FUNCTIONS.filter(entry => entry.name.toUpperCase() === 'STARTEP3').length, 1); + assert.strictEqual(workspace.quickFunctions('StartEP3').length, 1); + assert.ok(!diagnosticsFor(definition, workspace).some(diagnostic => diagnostic.code === 'duplicate-quickfunction')); assert.strictEqual(definitionFor(caller, { line: 0, character: 7 }, workspace)?.uri, definition.uri); assert.match(JSON.stringify(hoverFor(caller, { line: 0, character: 7 }, workspace)?.contents), /Workspace implementation/); + assert.match(completionsFor(caller, workspace).find(item => item.label === 'StartEP3')?.detail ?? '', /Workspace implementation/); }); test('keeps the positive HIL datatype and function diagnostics', () => { From cda82002908a2c989fe4fd4d566dff1fbe2c875b Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 21:30:33 +0200 Subject: [PATCH 36/40] fix(security): remove private project function catalog --- .serena/memories/language-intelligence.md | 10 +- .serena/project.yml | 1 + dist/server.js | 54 +- docs/language/quickscript.md | 22 +- packages/core/src/generatedFunctionCatalog.ts | 735 ------------------ .../core/test/fixtures/representative.vbi | 2 +- packages/core/test/languageService.test.ts | 11 +- packages/core/test/semantics.test.ts | 20 +- packages/core/test/tokenizer.test.ts | 6 +- .../language-server/test/features.test.ts | 45 +- syntaxes/intouch.tmLanguage.json | 23 +- 11 files changed, 85 insertions(+), 844 deletions(-) diff --git a/.serena/memories/language-intelligence.md b/.serena/memories/language-intelligence.md index 8794b72..de27e5b 100644 --- a/.serena/memories/language-intelligence.md +++ b/.serena/memories/language-intelligence.md @@ -3,11 +3,11 @@ - `.vbi` and `.vi` are proprietary InTouch QuickScript, not Visual Basic, VBA, VBScript, Pascal, or PowerShell. Do not route them to a foreign language server. -- Serena excludes QuickScript from semantic navigation until this repository - provides a native InTouch language server. Use targeted text search and - repository language evidence in the meantime. -- ProjectAtlas may index QuickScript as neutral text for file orientation and - lexical search, never as a source of semantic symbols or references. +- This repository provides a native InTouch QuickScript language server. Serena + uses its thin QuickScript adapter for semantic navigation of `.vbi` and `.vi`. +- ProjectAtlas may index QuickScript structurally for file orientation and + lexical search, while semantic language intelligence remains in the native + language server. - Current language evidence: `syntaxes/intouch.tmLanguage.json`, `src/const.ts`, `src/nestingdef.ts`, `src/formatCore.ts`, `src/test/suite/testfiles/`, and `docs/language/quickscript.md`. diff --git a/.serena/project.yml b/.serena/project.yml index 5222ef7..d8a4808 100644 --- a/.serena/project.yml +++ b/.serena/project.yml @@ -179,6 +179,7 @@ activation_command_timeout: 180.0 # The first language server is the default language and the respective language server will be used as a fallback. # Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. language_servers: +- quickscript - yaml - json - markdown diff --git a/dist/server.js b/dist/server.js index a2bda42..efe7071 100644 --- a/dist/server.js +++ b/dist/server.js @@ -1,36 +1,36 @@ -"use strict";var Lo=Object.defineProperty;var yh=Object.getOwnPropertyDescriptor;var Th=Object.getOwnPropertyNames;var _h=Object.prototype.hasOwnProperty;var Ka=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Xa=(e,t)=>{for(var n in t)Lo(e,n,{get:t[n],enumerable:!0})},bh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Th(t))!_h.call(e,o)&&o!==n&&Lo(e,o,{get:()=>t[o],enumerable:!(r=yh(t,o))||r.enumerable});return e};var ar=e=>bh(Lo({},"__esModule",{value:!0}),e);var ur=I(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.boolean=vh;Ge.string=Za;Ge.number=Ch;Ge.error=Sh;Ge.func=Ya;Ge.array=Ja;Ge.stringArray=Ih;Ge.typedArray=Dh;Ge.thenable=wh;function vh(e){return e===!0||e===!1}function Za(e){return typeof e=="string"||e instanceof String}function Ch(e){return typeof e=="number"||e instanceof Number}function Sh(e){return e instanceof Error}function Ya(e){return typeof e=="function"}function Ja(e){return Array.isArray(e)}function Ih(e){return Ja(e)&&e.every(t=>Za(t))}function Dh(e,t){return Array.isArray(e)&&e.every(t)}function wh(e){return e&&Ya(e.then)}});var Xt=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.boolean=kh;et.string=eu;et.number=Ph;et.error=Rh;et.func=Oh;et.array=tu;et.stringArray=xh;function kh(e){return e===!0||e===!1}function eu(e){return typeof e=="string"||e instanceof String}function Ph(e){return typeof e=="number"||e instanceof Number}function Rh(e){return e instanceof Error}function Oh(e){return typeof e=="function"}function tu(e){return Array.isArray(e)}function xh(e){return tu(e)&&e.every(t=>eu(t))}});var fi=I(P=>{"use strict";var Mh=P&&P.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eh=P&&P.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ah=P&&P.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.LRUCache=ht.LinkedMap=ht.Touch=void 0;var de;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(de||(ht.Touch=de={}));var lr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=de.None){let r=this._map.get(t);if(r)return n!==de.None&&this.touch(r,n),r.value}set(t,n,r=de.None){let o=this._map.get(t);if(o)o.value=n,r!==de.None&&this.touch(o,r);else{switch(o={key:t,value:n,next:void 0,previous:void 0},r){case de.None:this.addItemLast(o);break;case de.First:this.addItemFirst(o);break;case de.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,o=this._head;for(;o;){if(n?t.bind(n)(o.value,o.key,this):t(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==de.First&&n!==de.Last)){if(n===de.First){if(t===this._head)return;let r=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===de.Last){if(t===this._tail)return;let r=t.next,o=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};ht.LinkedMap=lr;var mi=class extends lr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=de.AsNew){return super.get(t,n)}peek(t){return super.get(t,de.None)}set(t,n){return super.set(t,n,de.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ht.LRUCache=mi});var ou=I(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.Disposable=void 0;var ru;(function(e){function t(n){return{dispose:n}}e.create=t})(ru||(dr.Disposable=ru={}))});var gt=I(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});var gi;function pi(){if(gi===void 0)throw new Error("No runtime abstraction layer installed");return gi}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");gi=n}e.install=t})(pi||(pi={}));yi.default=pi});var Zt=I(pt=>{"use strict";var qh=pt&&pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pt,"__esModule",{value:!0});pt.Emitter=pt.Event=void 0;var Nh=qh(gt()),iu;(function(e){let t={dispose(){}};e.None=function(){return t}})(iu||(pt.Event=iu={}));var Ti=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let o=0,i=this._callbacks.length;o{this._callbacks||(this._callbacks=new Ti),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let o={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),o.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pt.Emitter=_i});var hr=I(Ie=>{"use strict";var Fh=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gh=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hh=Ie&&Ie.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.SharedArrayReceiverStrategy=Yt.SharedArraySenderStrategy=void 0;var Qh=hr(),Rn;(function(e){e.Continue=0,e.Cancelled=1})(Rn||(Rn={}));var Ci=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Rn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let o=new Int32Array(r,0,1);Atomics.store(o,0,Rn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Yt.SharedArraySenderStrategy=Ci;var Si=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Rn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ii=class{token;constructor(t){this.token=new Si(t)}cancel(){}dispose(){}},Di=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Qh.CancellationTokenSource:new Ii(n)}};Yt.SharedArrayReceiverStrategy=Di});var ki=I(Jt=>{"use strict";var Bh=Jt&&Jt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.Semaphore=void 0;var $h=Bh(gt()),wi=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,$h.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Jt.Semaphore=wi});var au=I(fe=>{"use strict";var zh=fe&&fe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Vh=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Kh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let o=r.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}let i=parseInt(o);if(isNaN(i)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=i}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,o=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(o)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Ri.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};fe.ReadableStreamMessageReader=xi});var mu=I(me=>{"use strict";var Yh=me&&me.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Jh=me&&me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eg=me&&me.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let o=[];return o.push(rg,r.byteLength.toString(),du),o.push(du),this.doWrite(t,o,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};me.WriteableStreamMessageWriter=Ei});var hu=I(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.AbstractMessageBuffer=void 0;var og=13,ig=10,sg=`\r -`,Ai=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,o=0,i=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let i=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(i)}if(this._chunks[0].byteLength>t){let i=this._chunks[0],s=this.asNative(i,t);return this._chunks[0]=i.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,o=0;for(;t>0;){let i=this._chunks[o];if(i.byteLength>t){let s=i.slice(0,t);n.set(s,r),r+=t,this._chunks[o]=i.slice(t),this._totalLength-=t,t-=t}else n.set(i,r),r+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,t-=i.byteLength}return n}};yr.AbstractMessageBuffer=Ai});var Tu=I(O=>{"use strict";var cg=O&&O.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ag=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ug=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{},warn:()=>{},info:()=>{},log:()=>{}});var H;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(H||(O.Trace=H={}));var Hi;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Hi||(O.TraceValue=Hi={}));O.TraceValues=Hi;(function(e){function t(r){if(!Z.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(H||(O.Trace=H={}));var Re;(function(e){e.Text="text",e.JSON="json"})(Re||(O.TraceFormat=Re={}));(function(e){function t(n){return Z.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Re||(O.TraceFormat=Re={}));var ji;(function(e){e.type=new E.NotificationType("$/setTrace")})(ji||(O.SetTraceNotification=ji={}));var Tr;(function(e){e.type=new E.NotificationType("$/logTrace")})(Tr||(O.LogTraceNotification=Tr={}));var En;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(En||(O.ConnectionErrors=En={}));var tn=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=tn;var Li;(function(e){function t(n){let r=n;return r&&Z.func(r.cancelUndispatched)}e.is=t})(Li||(O.ConnectionStrategy=Li={}));var _r;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(_r||(O.IdCancellationReceiverStrategy=_r={}));var Wi;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&Z.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Z.func(r.dispose))}e.is=t})(Wi||(O.RequestCancellationReceiverStrategy=Wi={}));var br;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new qi.CancellationTokenSource}});function t(n){return _r.is(n)||Wi.is(n)}e.is=t})(br||(O.CancellationReceiverStrategy=br={}));var vr;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(An.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&Z.func(r.sendCancellation)&&Z.func(r.cleanup)}e.is=t})(vr||(O.CancellationSenderStrategy=vr={}));var Cr;(function(e){e.Message=Object.freeze({receiver:br.Message,sender:vr.Message});function t(n){let r=n;return r&&br.is(r.receiver)&&vr.is(r.sender)}e.is=t})(Cr||(O.CancellationStrategy=Cr={}));var Sr;(function(e){function t(n){let r=n;return r&&Z.func(r.handleMessage)}e.is=t})(Sr||(O.MessageStrategy=Sr={}));var yu;(function(e){function t(n){let r=n;return r&&(Cr.is(r.cancellationStrategy)||Li.is(r.connectionStrategy)||Sr.is(r.messageStrategy)||Z.number(r.maxParallelism))}e.is=t})(yu||(O.ConnectionOptions=yu={}));var He;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(He||(He={}));function dg(e,t,n,r){let o=n!==void 0?n:O.NullLogger,i=0,s=0,c=0,g="2.0",d=r?.maxParallelism??-1,h=0,b,m=new Map,T,D=new Map,q=new Map,N,x=new pu.LinkedMap,p=new Map,l=new Set,C=new Map,k=H.Off,M=Re.Text,L,K=He.New,Ye=new xn.Emitter,Na=new xn.Emitter,Fa=new xn.Emitter,Ga=new xn.Emitter,Ha=new xn.Emitter,dt=r&&r.cancellationStrategy?r.cancellationStrategy:Cr.Message;function eh(u){}function ja(){return K===He.Listening}function La(){return K===He.Closed}function Vt(){return K===He.Disposed}function Wa(){(K===He.New||K===He.Listening)&&(K=He.Closed,Na.fire(void 0))}function th(u){Ye.fire([u,void 0,void 0])}function nh(u){Ye.fire(u)}e.onClose(Wa),e.onError(th),t.onClose(Wa),t.onError(nh);function Ua(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function rh(u){return u===null?"res-unknown-"+(++c).toString():"res-"+u.toString()}function oh(){return"not-"+(++s).toString()}function ih(u,v){E.Message.isRequest(v)?u.set(Ua(v.id),v):E.Message.isResponse(v)?d===-1?u.set(rh(v.id),v):Ba(v):u.set(oh(),v)}function Fo(){N||x.size===0||d!==-1&&h>=d||(N=(0,gu.default)().timer.setImmediate(async()=>{if(N=void 0,x.size===0||d!==-1&&h>=d)return;let u=x.shift(),v;try{h++;let S=r?.messageStrategy;Sr.is(S)?v=S.handleMessage(u,Qa):v=Qa(u)}catch(S){o.error(`Processing message queue failed: ${S.toString()}`)}finally{v instanceof Promise?v.then(()=>{h--,Fo()}).catch(S=>{o.error(`Processing message queue failed: ${S.toString()}`)}):h--,Fo()}}))}async function Qa(u){return E.Message.isRequest(u)?ch(u):E.Message.isNotification(u)?ah(u):E.Message.isResponse(u)?Ba(u):uh(u)}let sh=u=>{try{if(E.Message.isNotification(u)&&u.method===An.type.method){let v=u.params.id,S=Ua(v),R=x.get(S);if(E.Message.isRequest(R)){let X=r?.connectionStrategy,W=X&&X.cancelUndispatched?X.cancelUndispatched(R,eh):void 0;if(W&&(W.error!==void 0||W.result!==void 0)){x.delete(S),C.delete(v),W.id=R.id,Go(W,u.method,Date.now()),t.write(W).catch(()=>o.error("Sending response for canceled message failed."));return}}let G=C.get(v);if(G!==void 0){G.cancel(),Ho(u);return}else l.add(v)}ih(x,u)}finally{Fo()}};async function ch(u){if(Vt())return Promise.resolve();function v(oe,le,J){let ee={jsonrpc:g,id:u.id};return oe instanceof E.ResponseError?ee.error=oe.toJson():ee.result=oe===void 0?null:oe,Go(ee,le,J),t.write(ee)}function S(oe,le,J){let ee={jsonrpc:g,id:u.id,error:oe.toJson()};return Go(ee,le,J),t.write(ee)}fh(u);let R=m.get(u.method),G,X;R&&(G=R.type,X=R.handler);let W=Date.now();if(X||b){let oe=u.id??String(Date.now()),le=_r.is(dt.receiver)?dt.receiver.createCancellationTokenSource(oe):dt.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&le.cancel(),u.id!==null&&C.set(oe,le);try{let J;if(X)if(u.params===void 0){if(G!==void 0&&G.numberOfParams!==0)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines ${G.numberOfParams} params but received none.`),u.method,W);J=X(le.token)}else if(Array.isArray(u.params)){if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byName)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,W);J=X(...u.params,le.token)}else{if(G!==void 0&&G.parameterStructures===E.ParameterStructures.byPosition)return S(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,W);J=X(u.params,le.token)}else b&&(J=b(u.method,u.params,le.token));let ee=await J;await v(ee,u.method,W)}catch(J){J instanceof E.ResponseError?await v(J,u.method,W):J&&Z.string(J.message)?await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${J.message}`),u.method,W):await S(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,W)}finally{C.delete(oe)}}else await S(new E.ResponseError(E.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,W)}function Ba(u){if(!Vt())if(u.id===null)u.error?o.error(`Received response message without id: Error is: -${JSON.stringify(u.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let v=u.id,S=p.get(v);if(mh(u,S),S!==void 0){p.delete(v);try{if(u.error){let R=u.error;S.reject(new E.ResponseError(R.code,R.message,R.data))}else if(u.result!==void 0)S.resolve(u.result);else throw new Error("Should never happen.")}catch(R){R.message?o.error(`Response handler '${S.method}' failed with message: ${R.message}`):o.error(`Response handler '${S.method}' failed unexpectedly.`)}}}}async function ah(u){if(Vt())return;let v,S;if(u.method===An.type.method){let R=u.params.id;l.delete(R),Ho(u);return}else{let R=D.get(u.method);R&&(S=R.handler,v=R.type)}if(S||T)try{if(Ho(u),S)if(u.params===void 0)v!==void 0&&v.numberOfParams!==0&&v.parameterStructures!==E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received none.`),await S();else if(Array.isArray(u.params)){let R=u.params;u.method===Mn.type.method&&R.length===2&&Ni.is(R[0])?await S({token:R[0],value:R[1]}):(v!==void 0&&(v.parameterStructures===E.ParameterStructures.byName&&o.error(`Notification ${u.method} defines parameters by name but received parameters by position`),v.numberOfParams!==u.params.length&&o.error(`Notification ${u.method} defines ${v.numberOfParams} params but received ${R.length} arguments`)),await S(...R))}else v!==void 0&&v.parameterStructures===E.ParameterStructures.byPosition&&o.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await S(u.params);else T&&await T(u.method,u.params)}catch(R){R.message?o.error(`Notification handler '${u.method}' failed with message: ${R.message}`):o.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Fa.fire(u)}function uh(u){if(!u){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(u,null,4)}`);let v=u;if(Z.string(v.id)||Z.number(v.id)){let S=v.id,R=p.get(S);R&&R.reject(new Error("The received response has neither a result nor an error property."))}}function ft(u){if(u!=null)switch(k){case H.Verbose:return JSON.stringify(u,null,4);case H.Compact:return JSON.stringify(u);default:return}}function lh(u){if(!(k===H.Off||!L))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${ft(u.params)}`),L.log(`Sending request '${u.method} - (${u.id})'.`,v)}else Kt("send-request",u)}function dh(u){if(!(k===H.Off||!L))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${ft(u.params)}`:v="No parameters provided."),L.log(`Sending notification '${u.method}'.`,v)}else Kt("send-notification",u)}function Go(u,v,S){if(!(k===H.Off||!L))if(M===Re.Text){let R;(k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?R=`Error data: ${ft(u.error.data)}`:u.result?R=`Result: ${ft(u.result)}`:u.error===void 0&&(R="No result returned.")),L.log(`Sending response '${v} - (${u.id})'. Processing request took ${Date.now()-S}ms`,R)}else Kt("send-response",u)}function fh(u){if(!(k===H.Off||!L))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&u.params&&(v=`Params: ${ft(u.params)}`),L.log(`Received request '${u.method} - (${u.id})'.`,v)}else Kt("receive-request",u)}function Ho(u){if(!(k===H.Off||!L||u.method===Tr.type.method))if(M===Re.Text){let v;(k===H.Verbose||k===H.Compact)&&(u.params?v=`Params: ${ft(u.params)}`:v="No parameters provided."),L.log(`Received notification '${u.method}'.`,v)}else Kt("receive-notification",u)}function mh(u,v){if(!(k===H.Off||!L))if(M===Re.Text){let S;if((k===H.Verbose||k===H.Compact)&&(u.error&&u.error.data?S=`Error data: ${ft(u.error.data)}`:u.result?S=`Result: ${ft(u.result)}`:u.error===void 0&&(S="No result returned.")),v){let R=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";L.log(`Received response '${v.method} - (${u.id})' in ${Date.now()-v.timerStart}ms.${R}`,S)}else L.log(`Received response ${u.id} without active response promise.`,S)}else Kt("receive-response",u)}function Kt(u,v){if(!L||k===H.Off)return;let S={isLSPMessage:!0,type:u,message:v,timestamp:Date.now()};L.log(S)}function wn(){if(La())throw new tn(En.Closed,"Connection is closed.");if(Vt())throw new tn(En.Disposed,"Connection is disposed.")}function hh(){if(ja())throw new tn(En.AlreadyListening,"Connection is already listening")}function gh(){if(!ja())throw new Error("Call listen() first.")}function kn(u){return u===void 0?null:u}function $a(u){if(u!==null)return u}function za(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function jo(u,v){switch(u){case E.ParameterStructures.auto:return za(v)?$a(v):[kn(v)];case E.ParameterStructures.byName:if(!za(v))throw new Error("Received parameters by name but param is not an object literal.");return $a(v);case E.ParameterStructures.byPosition:return[kn(v)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Va(u,v){let S,R=u.numberOfParams;switch(R){case 0:S=void 0;break;case 1:S=jo(u.parameterStructures,v[0]);break;default:S=[];for(let G=0;G{wn();let S,R;if(Z.string(u)){S=u;let X=v[0],W=0,oe=E.ParameterStructures.auto;E.ParameterStructures.is(X)&&(W=1,oe=X);let le=v.length,J=le-W;switch(J){case 0:R=void 0;break;case 1:R=jo(oe,v[W]);break;default:if(oe===E.ParameterStructures.byName)throw new Error(`Received ${J} parameters for 'by Name' notification parameter structure.`);R=v.slice(W,le).map(ee=>kn(ee));break}}else{let X=v;S=u.method,R=Va(u,X)}let G={jsonrpc:g,method:S,params:R};return dh(G),t.write(G).catch(X=>{throw o.error("Sending notification failed."),X})},onNotification:(u,v)=>{wn();let S;return Z.func(u)?T=u:v&&(Z.string(u)?(S=u,D.set(u,{type:void 0,handler:v})):(S=u.method,D.set(u.method,{type:u,handler:v}))),{dispose:()=>{S!==void 0?D.get(S)?.handler===v&&D.delete(S):T===u&&(T=void 0)}}},onProgress:(u,v,S)=>{if(q.has(v))throw new Error(`Progress handler for token ${v} already registered`);return q.set(v,S),{dispose:()=>{q.get(v)===S&&q.delete(v)}}},sendProgress:(u,v,S)=>xt.sendNotification(Mn.type,{token:v,value:S}),onUnhandledProgress:Ga.event,sendRequest:(u,...v)=>{wn(),gh();function S(ee,Fe){let Je=dt.sender.sendCancellation(ee,Fe);Je===void 0?o.log(`Received no promise from cancellation strategy when cancelling id ${Fe}`):Je.catch(()=>{o.log(`Sending cancellation messages for id ${Fe} failed.`)})}let R,G,X;if(Z.string(u)){R=u;let ee=v[0],Fe=v[v.length-1],Je=0,Pn=E.ParameterStructures.auto;E.ParameterStructures.is(ee)&&(Je=1,Pn=ee);let Mt=v.length;qi.CancellationToken.is(Fe)&&(Mt=Mt-1,X=Fe);let $e=Mt-Je;switch($e){case 0:G=void 0;break;case 1:G=jo(Pn,v[Je]);break;default:if(Pn===E.ParameterStructures.byName)throw new Error(`Received ${$e} parameters for 'by Name' request parameter structure.`);G=v.slice(Je,Mt).map(ph=>kn(ph));break}}else{let ee=v;R=u.method,G=Va(u,ee);let Fe=u.numberOfParams;X=qi.CancellationToken.is(ee[Fe])?ee[Fe]:void 0}let W=i++,oe,le=!1;X!==void 0&&(X.isCancellationRequested?le=!0:oe=X.onCancellationRequested(()=>{S(xt,W)}));let J={jsonrpc:g,id:W,method:R,params:G};return lh(J),typeof dt.sender.enableCancellation=="function"&&dt.sender.enableCancellation(J),new Promise(async(ee,Fe)=>{let Je=$e=>{ee($e),dt.sender.cleanup(W),oe?.dispose()},Pn=$e=>{Fe($e),dt.sender.cleanup(W),oe?.dispose()},Mt={method:R,timerStart:Date.now(),resolve:Je,reject:Pn};try{p.set(W,Mt),await t.write(J),le&&S(xt,W)}catch($e){throw p.delete(W),Mt.reject(new E.ResponseError(E.ErrorCodes.MessageWriteError,$e.message?$e.message:"Unknown reason")),o.error("Sending request failed."),$e}})},onRequest:(u,v)=>{wn();let S=null;return Gi.is(u)?(S=void 0,b=u):Z.string(u)?(S=null,v!==void 0&&(S=u,m.set(u,{handler:v,type:void 0}))):v!==void 0&&(S=u.method,m.set(u.method,{type:u,handler:v})),{dispose:()=>{S!==null&&(S!==void 0?m.get(S)?.handler===v&&m.delete(S):b===u&&(b=void 0))}}},hasPendingResponse:()=>p.size>0,trace:async(u,v,S)=>{let R=!1,G=Re.Text;S!==void 0&&(Z.boolean(S)?R=S:(R=S.sendNotification||!1,G=S.traceFormat||Re.Text)),k=u,M=G,k===H.Off?L=void 0:L=v,R&&!La()&&!Vt()&&await xt.sendNotification(ji.type,{value:H.toString(u)})},onError:Ye.event,onClose:Na.event,onUnhandledNotification:Fa.event,onDispose:Ha.event,end:()=>{t.end()},dispose:()=>{if(Vt())return;K=He.Disposed,Ha.fire(void 0);let u=new E.ResponseError(E.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let v of p.values())v.reject(u);p=new Map,C=new Map,l=new Set,x=new pu.LinkedMap,Z.func(t.dispose)&&t.dispose(),Z.func(e.dispose)&&e.dispose()},listen:()=>{wn(),hh(),K=He.Listening,e.listen(sh)},inspect:()=>{(0,gu.default)().console.log("inspect")}};return xt.onNotification(Tr.type,u=>{if(k===H.Off||!L)return;let v=k===H.Verbose||k===H.Compact;L.log(u.message,v?u.verbose:void 0)}),xt.onNotification(Mn.type,async u=>{let v=q.get(u.token);v?await v(u.value):Ga.fire(u)}),xt}});var tt=I(y=>{"use strict";var fg=y&&y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y,"__esModule",{value:!0});y.ProgressType=y.ProgressToken=y.createMessageConnection=y.NullLogger=y.ConnectionOptions=y.ConnectionStrategy=y.AbstractMessageBuffer=y.WriteableStreamMessageWriter=y.AbstractMessageWriter=y.MessageWriter=y.ReadableStreamMessageReader=y.AbstractMessageReader=y.MessageReader=y.SharedArrayReceiverStrategy=y.SharedArraySenderStrategy=y.CancellationToken=y.CancellationTokenSource=y.Emitter=y.Event=y.Disposable=y.LRUCache=y.Touch=y.LinkedMap=y.ParameterStructures=y.NotificationType9=y.NotificationType8=y.NotificationType7=y.NotificationType6=y.NotificationType5=y.NotificationType4=y.NotificationType3=y.NotificationType2=y.NotificationType1=y.NotificationType0=y.NotificationType=y.ErrorCodes=y.ResponseError=y.RequestType9=y.RequestType8=y.RequestType7=y.RequestType6=y.RequestType5=y.RequestType4=y.RequestType3=y.RequestType2=y.RequestType1=y.RequestType0=y.RequestType=y.Message=y.RAL=void 0;y.MessageStrategy=y.CancellationStrategy=y.CancellationSenderStrategy=y.RequestCancellationReceiverStrategy=y.IdCancellationReceiverStrategy=y.CancellationReceiverStrategy=y.ConnectionError=y.ConnectionErrors=y.LogTraceNotification=y.SetTraceNotification=y.TraceFormat=y.TraceValues=y.TraceValue=y.Trace=void 0;var $=fi();Object.defineProperty(y,"Message",{enumerable:!0,get:function(){return $.Message}});Object.defineProperty(y,"RequestType",{enumerable:!0,get:function(){return $.RequestType}});Object.defineProperty(y,"RequestType0",{enumerable:!0,get:function(){return $.RequestType0}});Object.defineProperty(y,"RequestType1",{enumerable:!0,get:function(){return $.RequestType1}});Object.defineProperty(y,"RequestType2",{enumerable:!0,get:function(){return $.RequestType2}});Object.defineProperty(y,"RequestType3",{enumerable:!0,get:function(){return $.RequestType3}});Object.defineProperty(y,"RequestType4",{enumerable:!0,get:function(){return $.RequestType4}});Object.defineProperty(y,"RequestType5",{enumerable:!0,get:function(){return $.RequestType5}});Object.defineProperty(y,"RequestType6",{enumerable:!0,get:function(){return $.RequestType6}});Object.defineProperty(y,"RequestType7",{enumerable:!0,get:function(){return $.RequestType7}});Object.defineProperty(y,"RequestType8",{enumerable:!0,get:function(){return $.RequestType8}});Object.defineProperty(y,"RequestType9",{enumerable:!0,get:function(){return $.RequestType9}});Object.defineProperty(y,"ResponseError",{enumerable:!0,get:function(){return $.ResponseError}});Object.defineProperty(y,"ErrorCodes",{enumerable:!0,get:function(){return $.ErrorCodes}});Object.defineProperty(y,"NotificationType",{enumerable:!0,get:function(){return $.NotificationType}});Object.defineProperty(y,"NotificationType0",{enumerable:!0,get:function(){return $.NotificationType0}});Object.defineProperty(y,"NotificationType1",{enumerable:!0,get:function(){return $.NotificationType1}});Object.defineProperty(y,"NotificationType2",{enumerable:!0,get:function(){return $.NotificationType2}});Object.defineProperty(y,"NotificationType3",{enumerable:!0,get:function(){return $.NotificationType3}});Object.defineProperty(y,"NotificationType4",{enumerable:!0,get:function(){return $.NotificationType4}});Object.defineProperty(y,"NotificationType5",{enumerable:!0,get:function(){return $.NotificationType5}});Object.defineProperty(y,"NotificationType6",{enumerable:!0,get:function(){return $.NotificationType6}});Object.defineProperty(y,"NotificationType7",{enumerable:!0,get:function(){return $.NotificationType7}});Object.defineProperty(y,"NotificationType8",{enumerable:!0,get:function(){return $.NotificationType8}});Object.defineProperty(y,"NotificationType9",{enumerable:!0,get:function(){return $.NotificationType9}});Object.defineProperty(y,"ParameterStructures",{enumerable:!0,get:function(){return $.ParameterStructures}});var Ui=hi();Object.defineProperty(y,"LinkedMap",{enumerable:!0,get:function(){return Ui.LinkedMap}});Object.defineProperty(y,"LRUCache",{enumerable:!0,get:function(){return Ui.LRUCache}});Object.defineProperty(y,"Touch",{enumerable:!0,get:function(){return Ui.Touch}});var mg=ou();Object.defineProperty(y,"Disposable",{enumerable:!0,get:function(){return mg.Disposable}});var _u=Zt();Object.defineProperty(y,"Event",{enumerable:!0,get:function(){return _u.Event}});Object.defineProperty(y,"Emitter",{enumerable:!0,get:function(){return _u.Emitter}});var bu=hr();Object.defineProperty(y,"CancellationTokenSource",{enumerable:!0,get:function(){return bu.CancellationTokenSource}});Object.defineProperty(y,"CancellationToken",{enumerable:!0,get:function(){return bu.CancellationToken}});var vu=su();Object.defineProperty(y,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return vu.SharedArraySenderStrategy}});Object.defineProperty(y,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return vu.SharedArrayReceiverStrategy}});var Qi=au();Object.defineProperty(y,"MessageReader",{enumerable:!0,get:function(){return Qi.MessageReader}});Object.defineProperty(y,"AbstractMessageReader",{enumerable:!0,get:function(){return Qi.AbstractMessageReader}});Object.defineProperty(y,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Qi.ReadableStreamMessageReader}});var Bi=mu();Object.defineProperty(y,"MessageWriter",{enumerable:!0,get:function(){return Bi.MessageWriter}});Object.defineProperty(y,"AbstractMessageWriter",{enumerable:!0,get:function(){return Bi.AbstractMessageWriter}});Object.defineProperty(y,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Bi.WriteableStreamMessageWriter}});var hg=hu();Object.defineProperty(y,"AbstractMessageBuffer",{enumerable:!0,get:function(){return hg.AbstractMessageBuffer}});var re=Tu();Object.defineProperty(y,"ConnectionStrategy",{enumerable:!0,get:function(){return re.ConnectionStrategy}});Object.defineProperty(y,"ConnectionOptions",{enumerable:!0,get:function(){return re.ConnectionOptions}});Object.defineProperty(y,"NullLogger",{enumerable:!0,get:function(){return re.NullLogger}});Object.defineProperty(y,"createMessageConnection",{enumerable:!0,get:function(){return re.createMessageConnection}});Object.defineProperty(y,"ProgressToken",{enumerable:!0,get:function(){return re.ProgressToken}});Object.defineProperty(y,"ProgressType",{enumerable:!0,get:function(){return re.ProgressType}});Object.defineProperty(y,"Trace",{enumerable:!0,get:function(){return re.Trace}});Object.defineProperty(y,"TraceValue",{enumerable:!0,get:function(){return re.TraceValue}});Object.defineProperty(y,"TraceFormat",{enumerable:!0,get:function(){return re.TraceFormat}});Object.defineProperty(y,"SetTraceNotification",{enumerable:!0,get:function(){return re.SetTraceNotification}});Object.defineProperty(y,"LogTraceNotification",{enumerable:!0,get:function(){return re.LogTraceNotification}});Object.defineProperty(y,"ConnectionErrors",{enumerable:!0,get:function(){return re.ConnectionErrors}});Object.defineProperty(y,"ConnectionError",{enumerable:!0,get:function(){return re.ConnectionError}});Object.defineProperty(y,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return re.CancellationReceiverStrategy}});Object.defineProperty(y,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.IdCancellationReceiverStrategy}});Object.defineProperty(y,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.RequestCancellationReceiverStrategy}});Object.defineProperty(y,"CancellationSenderStrategy",{enumerable:!0,get:function(){return re.CancellationSenderStrategy}});Object.defineProperty(y,"CancellationStrategy",{enumerable:!0,get:function(){return re.CancellationStrategy}});Object.defineProperty(y,"MessageStrategy",{enumerable:!0,get:function(){return re.MessageStrategy}});Object.defineProperty(y,"TraceValues",{enumerable:!0,get:function(){return re.TraceValues}});var gg=fg(gt());y.RAL=gg.default});var Ar={};Xa(Ar,{AnnotatedTextEdit:()=>nt,ApplyKind:()=>ms,ChangeAnnotation:()=>yt,ChangeAnnotationIdentifier:()=>ie,CodeAction:()=>Rs,CodeActionContext:()=>Ps,CodeActionKind:()=>ks,CodeActionTag:()=>Or,CodeActionTriggerKind:()=>Ln,CodeDescription:()=>ts,CodeLens:()=>Os,Color:()=>Dr,ColorInformation:()=>Ki,ColorPresentation:()=>Xi,Command:()=>At,CompletionItem:()=>gs,CompletionItemKind:()=>as,CompletionItemLabelDetails:()=>hs,CompletionItemTag:()=>ls,CompletionList:()=>ps,CreateFile:()=>rn,DeleteFile:()=>sn,Diagnostic:()=>Fn,DiagnosticRelatedInformation:()=>wr,DiagnosticSeverity:()=>Ji,DiagnosticTag:()=>es,DocumentHighlight:()=>vs,DocumentHighlightKind:()=>bs,DocumentLink:()=>Ms,DocumentSymbol:()=>ws,DocumentUri:()=>$i,EOL:()=>pg,FoldingRange:()=>Yi,FoldingRangeKind:()=>Zi,FormattingOptions:()=>xs,Hover:()=>ys,InlayHint:()=>Ls,InlayHintKind:()=>xr,InlayHintLabelPart:()=>Mr,InlineCompletionContext:()=>$s,InlineCompletionItem:()=>Ws,InlineCompletionList:()=>Us,InlineCompletionTriggerKind:()=>Qs,InlineValueContext:()=>js,InlineValueEvaluatableExpression:()=>Hs,InlineValueText:()=>Fs,InlineValueVariableLookup:()=>Gs,InsertReplaceEdit:()=>ds,InsertTextFormat:()=>us,InsertTextMode:()=>fs,LanguageKind:()=>ss,Location:()=>Nn,LocationLink:()=>Vi,MarkedString:()=>jn,MarkupContent:()=>Tt,MarkupKind:()=>Rr,OptionalVersionedTextDocumentIdentifier:()=>Hn,ParameterInformation:()=>Ts,Position:()=>Me,Range:()=>Y,RenameFile:()=>on,SelectedCompletionInfo:()=>Bs,SelectionRange:()=>Es,SemanticTokenModifiers:()=>qs,SemanticTokenTypes:()=>As,SemanticTokens:()=>Ns,SignatureInformation:()=>_s,SnippetTextEdit:()=>ns,StringValue:()=>Er,SymbolInformation:()=>Is,SymbolKind:()=>Cs,SymbolTag:()=>Ss,TextDocument:()=>Vs,TextDocumentEdit:()=>Gn,TextDocumentIdentifier:()=>os,TextDocumentItem:()=>cs,TextEdit:()=>ze,URI:()=>Ir,VersionedTextDocumentIdentifier:()=>is,WorkspaceChange:()=>rs,WorkspaceEdit:()=>kr,WorkspaceFolder:()=>zs,WorkspaceSymbol:()=>Ds,integer:()=>zi,uinteger:()=>qn});var $i,Ir,zi,qn,Me,Y,Nn,Vi,Dr,Ki,Xi,Zi,Yi,wr,Ji,es,ts,Fn,At,ze,yt,ie,nt,Gn,rn,on,sn,kr,nn,ns,Pr,rs,os,is,Hn,ss,cs,Rr,Tt,as,us,ls,ds,fs,ms,hs,gs,ps,jn,ys,Ts,_s,bs,vs,Cs,Ss,Is,Ds,ws,ks,Ln,Ps,Or,Rs,Os,xs,Ms,Es,As,qs,Ns,Fs,Gs,Hs,js,xr,Mr,Ls,Er,Ws,Us,Qs,Bs,$s,zs,pg,Vs,Ks,f,qr=Ka(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})($i||($i={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(Ir||(Ir={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(zi||(zi={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(qn||(qn={}));(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=qn.MAX_VALUE),o===Number.MAX_VALUE&&(o=qn.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.line)&&f.uinteger(o.character)}e.is=n})(Me||(Me={}));(function(e){function t(r,o,i,s){if(f.uinteger(r)&&f.uinteger(o)&&f.uinteger(i)&&f.uinteger(s))return{start:Me.create(r,o),end:Me.create(i,s)};if(Me.is(r)&&Me.is(o))return{start:r,end:o};throw new Error(`Range#create called with invalid arguments[${r}, ${o}, ${i}, ${s}]`)}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.start)&&Me.is(o.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(f.string(o.uri)||f.undefined(o.uri))}e.is=n})(Nn||(Nn={}));(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.targetRange)&&f.string(o.targetUri)&&Y.is(o.targetSelectionRange)&&(Y.is(o.originSelectionRange)||f.undefined(o.originSelectionRange))}e.is=n})(Vi||(Vi={}));(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.numberRange(o.red,0,1)&&f.numberRange(o.green,0,1)&&f.numberRange(o.blue,0,1)&&f.numberRange(o.alpha,0,1)}e.is=n})(Dr||(Dr={}));(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&Dr.is(o.color)}e.is=n})(Ki||(Ki={}));(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.undefined(o.textEdit)||ze.is(o))&&(f.undefined(o.additionalTextEdits)||f.typedArray(o.additionalTextEdits,ze.is))}e.is=n})(Xi||(Xi={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Zi||(Zi={}));(function(e){function t(r,o,i,s,c,g){let d={startLine:r,endLine:o};return f.defined(i)&&(d.startCharacter=i),f.defined(s)&&(d.endCharacter=s),f.defined(c)&&(d.kind=c),f.defined(g)&&(d.collapsedText=g),d}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.uinteger(o.startLine)&&f.uinteger(o.startLine)&&(f.undefined(o.startCharacter)||f.uinteger(o.startCharacter))&&(f.undefined(o.endCharacter)||f.uinteger(o.endCharacter))&&(f.undefined(o.kind)||f.string(o.kind))}e.is=n})(Yi||(Yi={}));(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Nn.is(o.location)&&f.string(o.message)}e.is=n})(wr||(wr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ji||(Ji={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(es||(es={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(ts||(ts={}));(function(e){function t(i,s,c,g,d,h){let b={range:i,message:s};return f.defined(c)&&(b.severity=c),f.defined(g)&&(b.code=g),f.defined(d)&&(b.source=d),f.defined(h)&&(b.relatedInformation=h),b}e.create=t;function n(i){var s;let c=i;return f.defined(c)&&Y.is(c.range)&&(f.string(c.message)||Tt.is(c.message))&&(f.number(c.severity)||f.undefined(c.severity))&&(f.integer(c.code)||f.string(c.code)||f.undefined(c.code))&&(f.undefined(c.codeDescription)||f.string((s=c.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(c.source)||f.undefined(c.source))&&(f.undefined(c.relatedInformation)||f.typedArray(c.relatedInformation,wr.is))}e.is=n;function r(i){return f.string(i.message)}e.is3_17=r;function o(i){if(f.string(i.message))return i.message;if(Tt.is(i.message))return i.message.value;throw new Error(`Unknown message type ${typeof i.message}`)}e.getMessageString=o})(Fn||(Fn={}));(function(e){function t(r,o,...i){let s={title:r,command:o};return f.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.title)&&(o.tooltip===void 0||f.string(o.tooltip))&&f.string(o.command)}e.is=n})(At||(At={}));(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){let s=i;return f.objectLiteral(s)&&f.string(s.newText)&&Y.is(s.range)}e.is=o})(ze||(ze={}));(function(e){function t(r,o,i){let s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&f.string(o.label)&&(f.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(f.string(o.description)||o.description===void 0)}e.is=n})(yt||(yt={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(ie||(ie={}));(function(e){function t(i,s,c){return{range:i,newText:s,annotationId:c}}e.replace=t;function n(i,s,c){return{range:{start:i,end:i},newText:s,annotationId:c}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){let s=i;return ze.is(s)&&(yt.is(s.annotationId)||ie.is(s.annotationId))}e.is=o})(nt||(nt={}));(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Hn.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(Gn||(Gn={}));(function(e){function t(r,o,i){let s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="create"&&f.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(rn||(rn={}));(function(e){function t(r,o,i,s){let c={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(c.options=i),s!==void 0&&(c.annotationId=s),c}e.create=t;function n(r){let o=r;return o&&o.kind==="rename"&&f.string(o.oldUri)&&f.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||f.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||f.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(on||(on={}));(function(e){function t(r,o,i){let s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){let o=r;return o&&o.kind==="delete"&&f.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||f.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||f.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ie.is(o.annotationId))}e.is=n})(sn||(sn={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(o=>f.string(o.kind)?rn.is(o)||on.is(o)||sn.is(o):Gn.is(o)))}e.is=t})(kr||(kr={}));nn=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let o,i;if(r===void 0?o=ze.insert(t,n):ie.is(r)?(i=r,o=nt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.insert(t,n,i)),this.edits.push(o),i!==void 0)return i}replace(t,n,r){let o,i;if(r===void 0?o=ze.replace(t,n):ie.is(r)?(i=r,o=nt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=nt.replace(t,n,i)),this.edits.push(o),i!==void 0)return i}delete(t,n){let r,o;if(n===void 0?r=ze.del(t):ie.is(n)?(o=n,r=nt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=nt.del(t,o)),this.edits.push(r),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Y.is(r.range)&&Er.isSnippet(r.snippet)&&(r.annotationId===void 0||yt.is(r.annotationId)||ie.is(r.annotationId))}e.is=t})(ns||(ns={}));Pr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(ie.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},rs=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Pr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Gn.is(n)){let r=new nn(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new nn(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Hn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new nn(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new nn(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Pr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;yt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=rn.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=rn.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}renameFile(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;yt.is(r)||ie.is(r)?i=r:o=r;let s,c;if(i===void 0?s=on.create(t,n,o):(c=ie.is(i)?i:this._changeAnnotations.manage(i),s=on.create(t,n,o,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;yt.is(n)||ie.is(n)?o=n:r=n;let i,s;if(o===void 0?i=sn.create(t,r):(s=ie.is(o)?o:this._changeAnnotations.manage(o),i=sn.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)}e.is=n})(os||(os={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.integer(o.version)}e.is=n})(is||(is={}));(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&(o.version===null||f.integer(o.version))}e.is=n})(Hn||(Hn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(ss||(ss={}));(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.string(o.uri)&&f.string(o.languageId)&&f.integer(o.version)&&f.string(o.text)}e.is=n})(cs||(cs={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Rr||(Rr={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&Rr.is(r.kind)&&f.string(r.value)}e.is=t})(Tt||(Tt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(as||(as={}));(function(e){e.PlainText=1,e.Snippet=2})(us||(us={}));(function(e){e.Deprecated=1})(ls||(ls={}));(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){let o=r;return o&&f.string(o.newText)&&Y.is(o.insert)&&Y.is(o.replace)}e.is=n})(ds||(ds={}));(function(e){e.asIs=1,e.adjustIndentation=2})(fs||(fs={}));(function(e){e.Replace=1,e.Merge=2})(ms||(ms={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(hs||(hs={}));(function(e){function t(n){return{label:n}}e.create=t})(gs||(gs={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ps||(ps={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let o=r;return f.string(o)||f.objectLiteral(o)&&f.string(o.language)&&f.string(o.value)}e.is=n})(jn||(jn={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(Tt.is(r.contents)||jn.is(r.contents)||f.typedArray(r.contents,jn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(ys||(ys={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Ts||(Ts={}));(function(e){function t(n,r,...o){let i={label:n};return f.defined(r)&&(i.documentation=r),f.defined(o)?i.parameters=o:i.parameters=[],i}e.create=t})(_s||(_s={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(bs||(bs={}));(function(e){function t(n,r){let o={range:n};return f.number(r)&&(o.kind=r),o}e.create=t})(vs||(vs={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Cs||(Cs={}));(function(e){e.Deprecated=1})(Ss||(Ss={}));(function(e){function t(n,r,o,i,s){let c={name:n,kind:r,location:{uri:i,range:o}};return s&&(c.containerName=s),c}e.create=t})(Is||(Is={}));(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(Ds||(Ds={}));(function(e){function t(r,o,i,s,c,g){let d={name:r,detail:o,kind:i,range:s,selectionRange:c};return g!==void 0&&(d.children=g),d}e.create=t;function n(r){let o=r;return o&&f.string(o.name)&&f.number(o.kind)&&Y.is(o.range)&&Y.is(o.selectionRange)&&(o.detail===void 0||f.string(o.detail))&&(o.deprecated===void 0||f.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(ws||(ws={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(ks||(ks={}));(function(e){e.Invoked=1,e.Automatic=2})(Ln||(Ln={}));(function(e){function t(r,o,i){let s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){let o=r;return f.defined(o)&&f.typedArray(o.diagnostics,Fn.is)&&(o.only===void 0||f.typedArray(o.only,f.string))&&(o.triggerKind===void 0||o.triggerKind===Ln.Invoked||o.triggerKind===Ln.Automatic)}e.is=n})(Ps||(Ps={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Or||(Or={}));(function(e){function t(r,o,i){let s={title:r},c=!0;return typeof o=="string"?(c=!1,s.kind=o):At.is(o)?s.command=o:s.edit=o,c&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return o&&f.string(o.title)&&(o.diagnostics===void 0||f.typedArray(o.diagnostics,Fn.is))&&(o.kind===void 0||f.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||At.is(o.command))&&(o.isPreferred===void 0||f.boolean(o.isPreferred))&&(o.edit===void 0||kr.is(o.edit))&&(o.tags===void 0||f.typedArray(o.tags,Or.is))}e.is=n})(Rs||(Rs={}));(function(e){function t(r,o){let i={range:r};return f.defined(o)&&(i.data=o),i}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.command)||At.is(o.command))}e.is=n})(Os||(Os={}));(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&f.uinteger(o.tabSize)&&f.boolean(o.insertSpaces)}e.is=n})(xs||(xs={}));(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(o.range)&&(f.undefined(o.target)||f.string(o.target))}e.is=n})(Ms||(Ms={}));(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Y.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(Es||(Es={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(As||(As={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(qs||(qs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Ns||(Ns={}));(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.string(o.text)}e.is=n})(Fs||(Fs={}));(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&f.boolean(o.caseSensitiveLookup)&&(f.string(o.variableName)||o.variableName===void 0)}e.is=n})(Gs||(Gs={}));(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){let o=r;return o!=null&&Y.is(o.range)&&(f.string(o.expression)||o.expression===void 0)}e.is=n})(Hs||(Hs={}));(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){let o=r;return f.defined(o)&&Y.is(r.stoppedLocation)}e.is=n})(js||(js={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(xr||(xr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&(o.tooltip===void 0||f.string(o.tooltip)||Tt.is(o.tooltip))&&(o.location===void 0||Nn.is(o.location))&&(o.command===void 0||At.is(o.command))}e.is=n})(Mr||(Mr={}));(function(e){function t(r,o,i){let s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){let o=r;return f.objectLiteral(o)&&Me.is(o.position)&&(f.string(o.label)||f.typedArray(o.label,Mr.is))&&(o.kind===void 0||xr.is(o.kind))&&o.textEdits===void 0||f.typedArray(o.textEdits,ze.is)&&(o.tooltip===void 0||f.string(o.tooltip)||Tt.is(o.tooltip))&&(o.paddingLeft===void 0||f.boolean(o.paddingLeft))&&(o.paddingRight===void 0||f.boolean(o.paddingRight))}e.is=n})(Ls||(Ls={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let o=r;return f.objectLiteral(o)&&o.kind==="snippet"&&f.string(o.value)}e.isSnippet=n})(Er||(Er={}));(function(e){function t(n,r,o,i){return{insertText:n,filterText:r,range:o,command:i}}e.create=t})(Ws||(Ws={}));(function(e){function t(n){return{items:n}}e.create=t})(Us||(Us={}));(function(e){e.Invoked=1,e.Automatic=2})(Qs||(Qs={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Bs||(Bs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})($s||($s={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Ir.is(r.uri)&&f.string(r.name)}e.is=t})(zs||(zs={}));pg=[` +"use strict";var Li=Object.defineProperty;var yh=Object.getOwnPropertyDescriptor;var Th=Object.getOwnPropertyNames;var _h=Object.prototype.hasOwnProperty;var Ka=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Xa=(e,t)=>{for(var n in t)Li(e,n,{get:t[n],enumerable:!0})},vh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Th(t))!_h.call(e,i)&&i!==n&&Li(e,i,{get:()=>t[i],enumerable:!(r=yh(t,i))||r.enumerable});return e};var ar=e=>vh(Li({},"__esModule",{value:!0}),e);var ur=S(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.boolean=bh;je.string=Ya;je.number=Ch;je.error=Ih;je.func=Ja;je.array=Za;je.stringArray=Sh;je.typedArray=Dh;je.thenable=wh;function bh(e){return e===!0||e===!1}function Ya(e){return typeof e=="string"||e instanceof String}function Ch(e){return typeof e=="number"||e instanceof Number}function Ih(e){return e instanceof Error}function Ja(e){return typeof e=="function"}function Za(e){return Array.isArray(e)}function Sh(e){return Za(e)&&e.every(t=>Ya(t))}function Dh(e,t){return Array.isArray(e)&&e.every(t)}function wh(e){return e&&Ja(e.then)}});var Xt=S(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.boolean=Ph;et.string=eu;et.number=kh;et.error=Rh;et.func=Oh;et.array=tu;et.stringArray=xh;function Ph(e){return e===!0||e===!1}function eu(e){return typeof e=="string"||e instanceof String}function kh(e){return typeof e=="number"||e instanceof Number}function Rh(e){return e instanceof Error}function Oh(e){return typeof e=="function"}function tu(e){return Array.isArray(e)}function xh(e){return tu(e)&&e.every(t=>eu(t))}});var fo=S(k=>{"use strict";var Mh=k&&k.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eh=k&&k.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qh=k&&k.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.LRUCache=ht.LinkedMap=ht.Touch=void 0;var de;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(de||(ht.Touch=de={}));var lr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=de.None){let r=this._map.get(t);if(r)return n!==de.None&&this.touch(r,n),r.value}set(t,n,r=de.None){let i=this._map.get(t);if(i)i.value=n,r!==de.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case de.None:this.addItemLast(i);break;case de.First:this.addItemFirst(i);break;case de.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==de.First&&n!==de.Last)){if(n===de.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===de.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};ht.LinkedMap=lr;var mo=class extends lr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=de.AsNew){return super.get(t,n)}peek(t){return super.get(t,de.None)}set(t,n){return super.set(t,n,de.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ht.LRUCache=mo});var iu=S(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.Disposable=void 0;var ru;(function(e){function t(n){return{dispose:n}}e.create=t})(ru||(dr.Disposable=ru={}))});var gt=S(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var go;function po(){if(go===void 0)throw new Error("No runtime abstraction layer installed");return go}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");go=n}e.install=t})(po||(po={}));yo.default=po});var Yt=S(pt=>{"use strict";var Nh=pt&&pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pt,"__esModule",{value:!0});pt.Emitter=pt.Event=void 0;var Ah=Nh(gt()),ou;(function(e){let t={dispose(){}};e.None=function(){return t}})(ou||(pt.Event=ou={}));var To=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i{this._callbacks||(this._callbacks=new To),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pt.Emitter=_o});var hr=S(Se=>{"use strict";var Gh=Se&&Se.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jh=Se&&Se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fh=Se&&Se.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.SharedArrayReceiverStrategy=Jt.SharedArraySenderStrategy=void 0;var $h=hr(),Rn;(function(e){e.Continue=0,e.Cancelled=1})(Rn||(Rn={}));var Co=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Rn.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Rn.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Jt.SharedArraySenderStrategy=Co;var Io=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Rn.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},So=class{token;constructor(t){this.token=new Io(t)}cancel(){}dispose(){}},Do=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new $h.CancellationTokenSource:new So(n)}};Jt.SharedArrayReceiverStrategy=Do});var Po=S(Zt=>{"use strict";var zh=Zt&&Zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.Semaphore=void 0;var Bh=zh(gt()),wo=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Bh.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Zt.Semaphore=wo});var au=S(fe=>{"use strict";var Qh=fe&&fe.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Vh=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Kh=fe&&fe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=o}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Ro.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};fe.ReadableStreamMessageReader=xo});var mu=S(me=>{"use strict";var Jh=me&&me.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zh=me&&me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eg=me&&me.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;ithis.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(rg,r.byteLength.toString(),du),i.push(du),this.doWrite(t,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,t),Promise.reject(i)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};me.WriteableStreamMessageWriter=Eo});var hu=S(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.AbstractMessageBuffer=void 0;var ig=13,og=10,sg=`\r +`,qo=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,o=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(o)}if(this._chunks[0].byteLength>t){let o=this._chunks[0],s=this.asNative(o,t);return this._chunks[0]=o.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,i=0;for(;t>0;){let o=this._chunks[i];if(o.byteLength>t){let s=o.slice(0,t);n.set(s,r),r+=t,this._chunks[i]=o.slice(t),this._totalLength-=t,t-=t}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,t-=o.byteLength}return n}};yr.AbstractMessageBuffer=qo});var Tu=S(O=>{"use strict";var cg=O&&O.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ag=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ug=O&&O.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{},warn:()=>{},info:()=>{},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||(O.Trace=F={}));var Fo;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Fo||(O.TraceValue=Fo={}));O.TraceValues=Fo;(function(e){function t(r){if(!Y.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(F||(O.Trace=F={}));var Re;(function(e){e.Text="text",e.JSON="json"})(Re||(O.TraceFormat=Re={}));(function(e){function t(n){return Y.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Re||(O.TraceFormat=Re={}));var Lo;(function(e){e.type=new E.NotificationType("$/setTrace")})(Lo||(O.SetTraceNotification=Lo={}));var Tr;(function(e){e.type=new E.NotificationType("$/logTrace")})(Tr||(O.LogTraceNotification=Tr={}));var En;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(En||(O.ConnectionErrors=En={}));var tn=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};O.ConnectionError=tn;var Wo;(function(e){function t(n){let r=n;return r&&Y.func(r.cancelUndispatched)}e.is=t})(Wo||(O.ConnectionStrategy=Wo={}));var _r;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&Y.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Y.func(r.dispose))}e.is=t})(_r||(O.IdCancellationReceiverStrategy=_r={}));var Uo;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&Y.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Y.func(r.dispose))}e.is=t})(Uo||(O.RequestCancellationReceiverStrategy=Uo={}));var vr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new No.CancellationTokenSource}});function t(n){return _r.is(n)||Uo.is(n)}e.is=t})(vr||(O.CancellationReceiverStrategy=vr={}));var br;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(qn.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&Y.func(r.sendCancellation)&&Y.func(r.cleanup)}e.is=t})(br||(O.CancellationSenderStrategy=br={}));var Cr;(function(e){e.Message=Object.freeze({receiver:vr.Message,sender:br.Message});function t(n){let r=n;return r&&vr.is(r.receiver)&&br.is(r.sender)}e.is=t})(Cr||(O.CancellationStrategy=Cr={}));var Ir;(function(e){function t(n){let r=n;return r&&Y.func(r.handleMessage)}e.is=t})(Ir||(O.MessageStrategy=Ir={}));var yu;(function(e){function t(n){let r=n;return r&&(Cr.is(r.cancellationStrategy)||Wo.is(r.connectionStrategy)||Ir.is(r.messageStrategy)||Y.number(r.maxParallelism))}e.is=t})(yu||(O.ConnectionOptions=yu={}));var Fe;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Fe||(Fe={}));function dg(e,t,n,r){let i=n!==void 0?n:O.NullLogger,o=0,s=0,c=0,g="2.0",d=r?.maxParallelism??-1,h=0,v,m=new Map,T,D=new Map,N=new Map,A,x=new pu.LinkedMap,p=new Map,l=new Set,C=new Map,P=F.Off,M=Re.Text,W,K=Fe.New,Je=new xn.Emitter,Aa=new xn.Emitter,Ga=new xn.Emitter,ja=new xn.Emitter,Fa=new xn.Emitter,dt=r&&r.cancellationStrategy?r.cancellationStrategy:Cr.Message;function eh(u){}function La(){return K===Fe.Listening}function Wa(){return K===Fe.Closed}function Vt(){return K===Fe.Disposed}function Ua(){(K===Fe.New||K===Fe.Listening)&&(K=Fe.Closed,Aa.fire(void 0))}function th(u){Je.fire([u,void 0,void 0])}function nh(u){Je.fire(u)}e.onClose(Ua),e.onError(th),t.onClose(Ua),t.onError(nh);function Ha(u){if(u===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+u.toString()}function rh(u){return u===null?"res-unknown-"+(++c).toString():"res-"+u.toString()}function ih(){return"not-"+(++s).toString()}function oh(u,b){E.Message.isRequest(b)?u.set(Ha(b.id),b):E.Message.isResponse(b)?d===-1?u.set(rh(b.id),b):za(b):u.set(ih(),b)}function Ai(){A||x.size===0||d!==-1&&h>=d||(A=(0,gu.default)().timer.setImmediate(async()=>{if(A=void 0,x.size===0||d!==-1&&h>=d)return;let u=x.shift(),b;try{h++;let I=r?.messageStrategy;Ir.is(I)?b=I.handleMessage(u,$a):b=$a(u)}catch(I){i.error(`Processing message queue failed: ${I.toString()}`)}finally{b instanceof Promise?b.then(()=>{h--,Ai()}).catch(I=>{i.error(`Processing message queue failed: ${I.toString()}`)}):h--,Ai()}}))}async function $a(u){return E.Message.isRequest(u)?ch(u):E.Message.isNotification(u)?ah(u):E.Message.isResponse(u)?za(u):uh(u)}let sh=u=>{try{if(E.Message.isNotification(u)&&u.method===qn.type.method){let b=u.params.id,I=Ha(b),R=x.get(I);if(E.Message.isRequest(R)){let X=r?.connectionStrategy,U=X&&X.cancelUndispatched?X.cancelUndispatched(R,eh):void 0;if(U&&(U.error!==void 0||U.result!==void 0)){x.delete(I),C.delete(b),U.id=R.id,Gi(U,u.method,Date.now()),t.write(U).catch(()=>i.error("Sending response for canceled message failed."));return}}let j=C.get(b);if(j!==void 0){j.cancel(),ji(u);return}else l.add(b)}oh(x,u)}finally{Ai()}};async function ch(u){if(Vt())return Promise.resolve();function b(ie,le,Z){let ee={jsonrpc:g,id:u.id};return ie instanceof E.ResponseError?ee.error=ie.toJson():ee.result=ie===void 0?null:ie,Gi(ee,le,Z),t.write(ee)}function I(ie,le,Z){let ee={jsonrpc:g,id:u.id,error:ie.toJson()};return Gi(ee,le,Z),t.write(ee)}fh(u);let R=m.get(u.method),j,X;R&&(j=R.type,X=R.handler);let U=Date.now();if(X||v){let ie=u.id??String(Date.now()),le=_r.is(dt.receiver)?dt.receiver.createCancellationTokenSource(ie):dt.receiver.createCancellationTokenSource(u);u.id!==null&&l.has(u.id)&&le.cancel(),u.id!==null&&C.set(ie,le);try{let Z;if(X)if(u.params===void 0){if(j!==void 0&&j.numberOfParams!==0)return I(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines ${j.numberOfParams} params but received none.`),u.method,U);Z=X(le.token)}else if(Array.isArray(u.params)){if(j!==void 0&&j.parameterStructures===E.ParameterStructures.byName)return I(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by name but received parameters by position`),u.method,U);Z=X(...u.params,le.token)}else{if(j!==void 0&&j.parameterStructures===E.ParameterStructures.byPosition)return I(new E.ResponseError(E.ErrorCodes.InvalidParams,`Request ${u.method} defines parameters by position but received parameters by name`),u.method,U);Z=X(u.params,le.token)}else v&&(Z=v(u.method,u.params,le.token));let ee=await Z;await b(ee,u.method,U)}catch(Z){Z instanceof E.ResponseError?await b(Z,u.method,U):Z&&Y.string(Z.message)?await I(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed with message: ${Z.message}`),u.method,U):await I(new E.ResponseError(E.ErrorCodes.InternalError,`Request ${u.method} failed unexpectedly without providing any details.`),u.method,U)}finally{C.delete(ie)}}else await I(new E.ResponseError(E.ErrorCodes.MethodNotFound,`Unhandled method ${u.method}`),u.method,U)}function za(u){if(!Vt())if(u.id===null)u.error?i.error(`Received response message without id: Error is: +${JSON.stringify(u.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let b=u.id,I=p.get(b);if(mh(u,I),I!==void 0){p.delete(b);try{if(u.error){let R=u.error;I.reject(new E.ResponseError(R.code,R.message,R.data))}else if(u.result!==void 0)I.resolve(u.result);else throw new Error("Should never happen.")}catch(R){R.message?i.error(`Response handler '${I.method}' failed with message: ${R.message}`):i.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}async function ah(u){if(Vt())return;let b,I;if(u.method===qn.type.method){let R=u.params.id;l.delete(R),ji(u);return}else{let R=D.get(u.method);R&&(I=R.handler,b=R.type)}if(I||T)try{if(ji(u),I)if(u.params===void 0)b!==void 0&&b.numberOfParams!==0&&b.parameterStructures!==E.ParameterStructures.byName&&i.error(`Notification ${u.method} defines ${b.numberOfParams} params but received none.`),await I();else if(Array.isArray(u.params)){let R=u.params;u.method===Mn.type.method&&R.length===2&&Ao.is(R[0])?await I({token:R[0],value:R[1]}):(b!==void 0&&(b.parameterStructures===E.ParameterStructures.byName&&i.error(`Notification ${u.method} defines parameters by name but received parameters by position`),b.numberOfParams!==u.params.length&&i.error(`Notification ${u.method} defines ${b.numberOfParams} params but received ${R.length} arguments`)),await I(...R))}else b!==void 0&&b.parameterStructures===E.ParameterStructures.byPosition&&i.error(`Notification ${u.method} defines parameters by position but received parameters by name`),await I(u.params);else T&&await T(u.method,u.params)}catch(R){R.message?i.error(`Notification handler '${u.method}' failed with message: ${R.message}`):i.error(`Notification handler '${u.method}' failed unexpectedly.`)}else Ga.fire(u)}function uh(u){if(!u){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(u,null,4)}`);let b=u;if(Y.string(b.id)||Y.number(b.id)){let I=b.id,R=p.get(I);R&&R.reject(new Error("The received response has neither a result nor an error property."))}}function ft(u){if(u!=null)switch(P){case F.Verbose:return JSON.stringify(u,null,4);case F.Compact:return JSON.stringify(u);default:return}}function lh(u){if(!(P===F.Off||!W))if(M===Re.Text){let b;(P===F.Verbose||P===F.Compact)&&u.params&&(b=`Params: ${ft(u.params)}`),W.log(`Sending request '${u.method} - (${u.id})'.`,b)}else Kt("send-request",u)}function dh(u){if(!(P===F.Off||!W))if(M===Re.Text){let b;(P===F.Verbose||P===F.Compact)&&(u.params?b=`Params: ${ft(u.params)}`:b="No parameters provided."),W.log(`Sending notification '${u.method}'.`,b)}else Kt("send-notification",u)}function Gi(u,b,I){if(!(P===F.Off||!W))if(M===Re.Text){let R;(P===F.Verbose||P===F.Compact)&&(u.error&&u.error.data?R=`Error data: ${ft(u.error.data)}`:u.result?R=`Result: ${ft(u.result)}`:u.error===void 0&&(R="No result returned.")),W.log(`Sending response '${b} - (${u.id})'. Processing request took ${Date.now()-I}ms`,R)}else Kt("send-response",u)}function fh(u){if(!(P===F.Off||!W))if(M===Re.Text){let b;(P===F.Verbose||P===F.Compact)&&u.params&&(b=`Params: ${ft(u.params)}`),W.log(`Received request '${u.method} - (${u.id})'.`,b)}else Kt("receive-request",u)}function ji(u){if(!(P===F.Off||!W||u.method===Tr.type.method))if(M===Re.Text){let b;(P===F.Verbose||P===F.Compact)&&(u.params?b=`Params: ${ft(u.params)}`:b="No parameters provided."),W.log(`Received notification '${u.method}'.`,b)}else Kt("receive-notification",u)}function mh(u,b){if(!(P===F.Off||!W))if(M===Re.Text){let I;if((P===F.Verbose||P===F.Compact)&&(u.error&&u.error.data?I=`Error data: ${ft(u.error.data)}`:u.result?I=`Result: ${ft(u.result)}`:u.error===void 0&&(I="No result returned.")),b){let R=u.error?` Request failed: ${u.error.message} (${u.error.code}).`:"";W.log(`Received response '${b.method} - (${u.id})' in ${Date.now()-b.timerStart}ms.${R}`,I)}else W.log(`Received response ${u.id} without active response promise.`,I)}else Kt("receive-response",u)}function Kt(u,b){if(!W||P===F.Off)return;let I={isLSPMessage:!0,type:u,message:b,timestamp:Date.now()};W.log(I)}function wn(){if(Wa())throw new tn(En.Closed,"Connection is closed.");if(Vt())throw new tn(En.Disposed,"Connection is disposed.")}function hh(){if(La())throw new tn(En.AlreadyListening,"Connection is already listening")}function gh(){if(!La())throw new Error("Call listen() first.")}function Pn(u){return u===void 0?null:u}function Ba(u){if(u!==null)return u}function Qa(u){return u!=null&&!Array.isArray(u)&&typeof u=="object"}function Fi(u,b){switch(u){case E.ParameterStructures.auto:return Qa(b)?Ba(b):[Pn(b)];case E.ParameterStructures.byName:if(!Qa(b))throw new Error("Received parameters by name but param is not an object literal.");return Ba(b);case E.ParameterStructures.byPosition:return[Pn(b)];default:throw new Error(`Unknown parameter structure ${u.toString()}`)}}function Va(u,b){let I,R=u.numberOfParams;switch(R){case 0:I=void 0;break;case 1:I=Fi(u.parameterStructures,b[0]);break;default:I=[];for(let j=0;j{wn();let I,R;if(Y.string(u)){I=u;let X=b[0],U=0,ie=E.ParameterStructures.auto;E.ParameterStructures.is(X)&&(U=1,ie=X);let le=b.length,Z=le-U;switch(Z){case 0:R=void 0;break;case 1:R=Fi(ie,b[U]);break;default:if(ie===E.ParameterStructures.byName)throw new Error(`Received ${Z} parameters for 'by Name' notification parameter structure.`);R=b.slice(U,le).map(ee=>Pn(ee));break}}else{let X=b;I=u.method,R=Va(u,X)}let j={jsonrpc:g,method:I,params:R};return dh(j),t.write(j).catch(X=>{throw i.error("Sending notification failed."),X})},onNotification:(u,b)=>{wn();let I;return Y.func(u)?T=u:b&&(Y.string(u)?(I=u,D.set(u,{type:void 0,handler:b})):(I=u.method,D.set(u.method,{type:u,handler:b}))),{dispose:()=>{I!==void 0?D.get(I)?.handler===b&&D.delete(I):T===u&&(T=void 0)}}},onProgress:(u,b,I)=>{if(N.has(b))throw new Error(`Progress handler for token ${b} already registered`);return N.set(b,I),{dispose:()=>{N.get(b)===I&&N.delete(b)}}},sendProgress:(u,b,I)=>xt.sendNotification(Mn.type,{token:b,value:I}),onUnhandledProgress:ja.event,sendRequest:(u,...b)=>{wn(),gh();function I(ee,Ge){let Ze=dt.sender.sendCancellation(ee,Ge);Ze===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${Ge}`):Ze.catch(()=>{i.log(`Sending cancellation messages for id ${Ge} failed.`)})}let R,j,X;if(Y.string(u)){R=u;let ee=b[0],Ge=b[b.length-1],Ze=0,kn=E.ParameterStructures.auto;E.ParameterStructures.is(ee)&&(Ze=1,kn=ee);let Mt=b.length;No.CancellationToken.is(Ge)&&(Mt=Mt-1,X=Ge);let Be=Mt-Ze;switch(Be){case 0:j=void 0;break;case 1:j=Fi(kn,b[Ze]);break;default:if(kn===E.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' request parameter structure.`);j=b.slice(Ze,Mt).map(ph=>Pn(ph));break}}else{let ee=b;R=u.method,j=Va(u,ee);let Ge=u.numberOfParams;X=No.CancellationToken.is(ee[Ge])?ee[Ge]:void 0}let U=o++,ie,le=!1;X!==void 0&&(X.isCancellationRequested?le=!0:ie=X.onCancellationRequested(()=>{I(xt,U)}));let Z={jsonrpc:g,id:U,method:R,params:j};return lh(Z),typeof dt.sender.enableCancellation=="function"&&dt.sender.enableCancellation(Z),new Promise(async(ee,Ge)=>{let Ze=Be=>{ee(Be),dt.sender.cleanup(U),ie?.dispose()},kn=Be=>{Ge(Be),dt.sender.cleanup(U),ie?.dispose()},Mt={method:R,timerStart:Date.now(),resolve:Ze,reject:kn};try{p.set(U,Mt),await t.write(Z),le&&I(xt,U)}catch(Be){throw p.delete(U),Mt.reject(new E.ResponseError(E.ErrorCodes.MessageWriteError,Be.message?Be.message:"Unknown reason")),i.error("Sending request failed."),Be}})},onRequest:(u,b)=>{wn();let I=null;return jo.is(u)?(I=void 0,v=u):Y.string(u)?(I=null,b!==void 0&&(I=u,m.set(u,{handler:b,type:void 0}))):b!==void 0&&(I=u.method,m.set(u.method,{type:u,handler:b})),{dispose:()=>{I!==null&&(I!==void 0?m.get(I)?.handler===b&&m.delete(I):v===u&&(v=void 0))}}},hasPendingResponse:()=>p.size>0,trace:async(u,b,I)=>{let R=!1,j=Re.Text;I!==void 0&&(Y.boolean(I)?R=I:(R=I.sendNotification||!1,j=I.traceFormat||Re.Text)),P=u,M=j,P===F.Off?W=void 0:W=b,R&&!Wa()&&!Vt()&&await xt.sendNotification(Lo.type,{value:F.toString(u)})},onError:Je.event,onClose:Aa.event,onUnhandledNotification:Ga.event,onDispose:Fa.event,end:()=>{t.end()},dispose:()=>{if(Vt())return;K=Fe.Disposed,Fa.fire(void 0);let u=new E.ResponseError(E.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let b of p.values())b.reject(u);p=new Map,C=new Map,l=new Set,x=new pu.LinkedMap,Y.func(t.dispose)&&t.dispose(),Y.func(e.dispose)&&e.dispose()},listen:()=>{wn(),hh(),K=Fe.Listening,e.listen(sh)},inspect:()=>{(0,gu.default)().console.log("inspect")}};return xt.onNotification(Tr.type,u=>{if(P===F.Off||!W)return;let b=P===F.Verbose||P===F.Compact;W.log(u.message,b?u.verbose:void 0)}),xt.onNotification(Mn.type,async u=>{let b=N.get(u.token);b?await b(u.value):ja.fire(u)}),xt}});var tt=S(y=>{"use strict";var fg=y&&y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y,"__esModule",{value:!0});y.ProgressType=y.ProgressToken=y.createMessageConnection=y.NullLogger=y.ConnectionOptions=y.ConnectionStrategy=y.AbstractMessageBuffer=y.WriteableStreamMessageWriter=y.AbstractMessageWriter=y.MessageWriter=y.ReadableStreamMessageReader=y.AbstractMessageReader=y.MessageReader=y.SharedArrayReceiverStrategy=y.SharedArraySenderStrategy=y.CancellationToken=y.CancellationTokenSource=y.Emitter=y.Event=y.Disposable=y.LRUCache=y.Touch=y.LinkedMap=y.ParameterStructures=y.NotificationType9=y.NotificationType8=y.NotificationType7=y.NotificationType6=y.NotificationType5=y.NotificationType4=y.NotificationType3=y.NotificationType2=y.NotificationType1=y.NotificationType0=y.NotificationType=y.ErrorCodes=y.ResponseError=y.RequestType9=y.RequestType8=y.RequestType7=y.RequestType6=y.RequestType5=y.RequestType4=y.RequestType3=y.RequestType2=y.RequestType1=y.RequestType0=y.RequestType=y.Message=y.RAL=void 0;y.MessageStrategy=y.CancellationStrategy=y.CancellationSenderStrategy=y.RequestCancellationReceiverStrategy=y.IdCancellationReceiverStrategy=y.CancellationReceiverStrategy=y.ConnectionError=y.ConnectionErrors=y.LogTraceNotification=y.SetTraceNotification=y.TraceFormat=y.TraceValues=y.TraceValue=y.Trace=void 0;var B=fo();Object.defineProperty(y,"Message",{enumerable:!0,get:function(){return B.Message}});Object.defineProperty(y,"RequestType",{enumerable:!0,get:function(){return B.RequestType}});Object.defineProperty(y,"RequestType0",{enumerable:!0,get:function(){return B.RequestType0}});Object.defineProperty(y,"RequestType1",{enumerable:!0,get:function(){return B.RequestType1}});Object.defineProperty(y,"RequestType2",{enumerable:!0,get:function(){return B.RequestType2}});Object.defineProperty(y,"RequestType3",{enumerable:!0,get:function(){return B.RequestType3}});Object.defineProperty(y,"RequestType4",{enumerable:!0,get:function(){return B.RequestType4}});Object.defineProperty(y,"RequestType5",{enumerable:!0,get:function(){return B.RequestType5}});Object.defineProperty(y,"RequestType6",{enumerable:!0,get:function(){return B.RequestType6}});Object.defineProperty(y,"RequestType7",{enumerable:!0,get:function(){return B.RequestType7}});Object.defineProperty(y,"RequestType8",{enumerable:!0,get:function(){return B.RequestType8}});Object.defineProperty(y,"RequestType9",{enumerable:!0,get:function(){return B.RequestType9}});Object.defineProperty(y,"ResponseError",{enumerable:!0,get:function(){return B.ResponseError}});Object.defineProperty(y,"ErrorCodes",{enumerable:!0,get:function(){return B.ErrorCodes}});Object.defineProperty(y,"NotificationType",{enumerable:!0,get:function(){return B.NotificationType}});Object.defineProperty(y,"NotificationType0",{enumerable:!0,get:function(){return B.NotificationType0}});Object.defineProperty(y,"NotificationType1",{enumerable:!0,get:function(){return B.NotificationType1}});Object.defineProperty(y,"NotificationType2",{enumerable:!0,get:function(){return B.NotificationType2}});Object.defineProperty(y,"NotificationType3",{enumerable:!0,get:function(){return B.NotificationType3}});Object.defineProperty(y,"NotificationType4",{enumerable:!0,get:function(){return B.NotificationType4}});Object.defineProperty(y,"NotificationType5",{enumerable:!0,get:function(){return B.NotificationType5}});Object.defineProperty(y,"NotificationType6",{enumerable:!0,get:function(){return B.NotificationType6}});Object.defineProperty(y,"NotificationType7",{enumerable:!0,get:function(){return B.NotificationType7}});Object.defineProperty(y,"NotificationType8",{enumerable:!0,get:function(){return B.NotificationType8}});Object.defineProperty(y,"NotificationType9",{enumerable:!0,get:function(){return B.NotificationType9}});Object.defineProperty(y,"ParameterStructures",{enumerable:!0,get:function(){return B.ParameterStructures}});var Ho=ho();Object.defineProperty(y,"LinkedMap",{enumerable:!0,get:function(){return Ho.LinkedMap}});Object.defineProperty(y,"LRUCache",{enumerable:!0,get:function(){return Ho.LRUCache}});Object.defineProperty(y,"Touch",{enumerable:!0,get:function(){return Ho.Touch}});var mg=iu();Object.defineProperty(y,"Disposable",{enumerable:!0,get:function(){return mg.Disposable}});var _u=Yt();Object.defineProperty(y,"Event",{enumerable:!0,get:function(){return _u.Event}});Object.defineProperty(y,"Emitter",{enumerable:!0,get:function(){return _u.Emitter}});var vu=hr();Object.defineProperty(y,"CancellationTokenSource",{enumerable:!0,get:function(){return vu.CancellationTokenSource}});Object.defineProperty(y,"CancellationToken",{enumerable:!0,get:function(){return vu.CancellationToken}});var bu=su();Object.defineProperty(y,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return bu.SharedArraySenderStrategy}});Object.defineProperty(y,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return bu.SharedArrayReceiverStrategy}});var $o=au();Object.defineProperty(y,"MessageReader",{enumerable:!0,get:function(){return $o.MessageReader}});Object.defineProperty(y,"AbstractMessageReader",{enumerable:!0,get:function(){return $o.AbstractMessageReader}});Object.defineProperty(y,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return $o.ReadableStreamMessageReader}});var zo=mu();Object.defineProperty(y,"MessageWriter",{enumerable:!0,get:function(){return zo.MessageWriter}});Object.defineProperty(y,"AbstractMessageWriter",{enumerable:!0,get:function(){return zo.AbstractMessageWriter}});Object.defineProperty(y,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return zo.WriteableStreamMessageWriter}});var hg=hu();Object.defineProperty(y,"AbstractMessageBuffer",{enumerable:!0,get:function(){return hg.AbstractMessageBuffer}});var re=Tu();Object.defineProperty(y,"ConnectionStrategy",{enumerable:!0,get:function(){return re.ConnectionStrategy}});Object.defineProperty(y,"ConnectionOptions",{enumerable:!0,get:function(){return re.ConnectionOptions}});Object.defineProperty(y,"NullLogger",{enumerable:!0,get:function(){return re.NullLogger}});Object.defineProperty(y,"createMessageConnection",{enumerable:!0,get:function(){return re.createMessageConnection}});Object.defineProperty(y,"ProgressToken",{enumerable:!0,get:function(){return re.ProgressToken}});Object.defineProperty(y,"ProgressType",{enumerable:!0,get:function(){return re.ProgressType}});Object.defineProperty(y,"Trace",{enumerable:!0,get:function(){return re.Trace}});Object.defineProperty(y,"TraceValue",{enumerable:!0,get:function(){return re.TraceValue}});Object.defineProperty(y,"TraceFormat",{enumerable:!0,get:function(){return re.TraceFormat}});Object.defineProperty(y,"SetTraceNotification",{enumerable:!0,get:function(){return re.SetTraceNotification}});Object.defineProperty(y,"LogTraceNotification",{enumerable:!0,get:function(){return re.LogTraceNotification}});Object.defineProperty(y,"ConnectionErrors",{enumerable:!0,get:function(){return re.ConnectionErrors}});Object.defineProperty(y,"ConnectionError",{enumerable:!0,get:function(){return re.ConnectionError}});Object.defineProperty(y,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return re.CancellationReceiverStrategy}});Object.defineProperty(y,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.IdCancellationReceiverStrategy}});Object.defineProperty(y,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return re.RequestCancellationReceiverStrategy}});Object.defineProperty(y,"CancellationSenderStrategy",{enumerable:!0,get:function(){return re.CancellationSenderStrategy}});Object.defineProperty(y,"CancellationStrategy",{enumerable:!0,get:function(){return re.CancellationStrategy}});Object.defineProperty(y,"MessageStrategy",{enumerable:!0,get:function(){return re.MessageStrategy}});Object.defineProperty(y,"TraceValues",{enumerable:!0,get:function(){return re.TraceValues}});var gg=fg(gt());y.RAL=gg.default});var qr={};Xa(qr,{AnnotatedTextEdit:()=>nt,ApplyKind:()=>ms,ChangeAnnotation:()=>yt,ChangeAnnotationIdentifier:()=>oe,CodeAction:()=>Rs,CodeActionContext:()=>ks,CodeActionKind:()=>Ps,CodeActionTag:()=>Or,CodeActionTriggerKind:()=>Wn,CodeDescription:()=>ts,CodeLens:()=>Os,Color:()=>Dr,ColorInformation:()=>Ko,ColorPresentation:()=>Xo,Command:()=>qt,CompletionItem:()=>gs,CompletionItemKind:()=>as,CompletionItemLabelDetails:()=>hs,CompletionItemTag:()=>ls,CompletionList:()=>ps,CreateFile:()=>rn,DeleteFile:()=>sn,Diagnostic:()=>Gn,DiagnosticRelatedInformation:()=>wr,DiagnosticSeverity:()=>Zo,DiagnosticTag:()=>es,DocumentHighlight:()=>bs,DocumentHighlightKind:()=>vs,DocumentLink:()=>Ms,DocumentSymbol:()=>ws,DocumentUri:()=>Bo,EOL:()=>pg,FoldingRange:()=>Jo,FoldingRangeKind:()=>Yo,FormattingOptions:()=>xs,Hover:()=>ys,InlayHint:()=>Ws,InlayHintKind:()=>xr,InlayHintLabelPart:()=>Mr,InlineCompletionContext:()=>Bs,InlineCompletionItem:()=>Us,InlineCompletionList:()=>Hs,InlineCompletionTriggerKind:()=>$s,InlineValueContext:()=>Ls,InlineValueEvaluatableExpression:()=>Fs,InlineValueText:()=>Gs,InlineValueVariableLookup:()=>js,InsertReplaceEdit:()=>ds,InsertTextFormat:()=>us,InsertTextMode:()=>fs,LanguageKind:()=>ss,Location:()=>An,LocationLink:()=>Vo,MarkedString:()=>Ln,MarkupContent:()=>Tt,MarkupKind:()=>Rr,OptionalVersionedTextDocumentIdentifier:()=>Fn,ParameterInformation:()=>Ts,Position:()=>Me,Range:()=>J,RenameFile:()=>on,SelectedCompletionInfo:()=>zs,SelectionRange:()=>Es,SemanticTokenModifiers:()=>Ns,SemanticTokenTypes:()=>qs,SemanticTokens:()=>As,SignatureInformation:()=>_s,SnippetTextEdit:()=>ns,StringValue:()=>Er,SymbolInformation:()=>Ss,SymbolKind:()=>Cs,SymbolTag:()=>Is,TextDocument:()=>Vs,TextDocumentEdit:()=>jn,TextDocumentIdentifier:()=>is,TextDocumentItem:()=>cs,TextEdit:()=>Qe,URI:()=>Sr,VersionedTextDocumentIdentifier:()=>os,WorkspaceChange:()=>rs,WorkspaceEdit:()=>Pr,WorkspaceFolder:()=>Qs,WorkspaceSymbol:()=>Ds,integer:()=>Qo,uinteger:()=>Nn});var Bo,Sr,Qo,Nn,Me,J,An,Vo,Dr,Ko,Xo,Yo,Jo,wr,Zo,es,ts,Gn,qt,Qe,yt,oe,nt,jn,rn,on,sn,Pr,nn,ns,kr,rs,is,os,Fn,ss,cs,Rr,Tt,as,us,ls,ds,fs,ms,hs,gs,ps,Ln,ys,Ts,_s,vs,bs,Cs,Is,Ss,Ds,ws,Ps,Wn,ks,Or,Rs,Os,xs,Ms,Es,qs,Ns,As,Gs,js,Fs,Ls,xr,Mr,Ws,Er,Us,Hs,$s,zs,Bs,Qs,pg,Vs,Ks,f,Nr=Ka(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Bo||(Bo={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(Sr||(Sr={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Qo||(Qo={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Nn||(Nn={}));(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=Nn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Nn.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.uinteger(i.line)&&f.uinteger(i.character)}e.is=n})(Me||(Me={}));(function(e){function t(r,i,o,s){if(f.uinteger(r)&&f.uinteger(i)&&f.uinteger(o)&&f.uinteger(s))return{start:Me.create(r,i),end:Me.create(o,s)};if(Me.is(r)&&Me.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&Me.is(i.start)&&Me.is(i.end)}e.is=n})(J||(J={}));(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&J.is(i.range)&&(f.string(i.uri)||f.undefined(i.uri))}e.is=n})(An||(An={}));(function(e){function t(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&J.is(i.targetRange)&&f.string(i.targetUri)&&J.is(i.targetSelectionRange)&&(J.is(i.originSelectionRange)||f.undefined(i.originSelectionRange))}e.is=n})(Vo||(Vo={}));(function(e){function t(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.numberRange(i.red,0,1)&&f.numberRange(i.green,0,1)&&f.numberRange(i.blue,0,1)&&f.numberRange(i.alpha,0,1)}e.is=n})(Dr||(Dr={}));(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&J.is(i.range)&&Dr.is(i.color)}e.is=n})(Ko||(Ko={}));(function(e){function t(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.string(i.label)&&(f.undefined(i.textEdit)||Qe.is(i))&&(f.undefined(i.additionalTextEdits)||f.typedArray(i.additionalTextEdits,Qe.is))}e.is=n})(Xo||(Xo={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Yo||(Yo={}));(function(e){function t(r,i,o,s,c,g){let d={startLine:r,endLine:i};return f.defined(o)&&(d.startCharacter=o),f.defined(s)&&(d.endCharacter=s),f.defined(c)&&(d.kind=c),f.defined(g)&&(d.collapsedText=g),d}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.uinteger(i.startLine)&&f.uinteger(i.startLine)&&(f.undefined(i.startCharacter)||f.uinteger(i.startCharacter))&&(f.undefined(i.endCharacter)||f.uinteger(i.endCharacter))&&(f.undefined(i.kind)||f.string(i.kind))}e.is=n})(Jo||(Jo={}));(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&An.is(i.location)&&f.string(i.message)}e.is=n})(wr||(wr={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Zo||(Zo={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(es||(es={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(ts||(ts={}));(function(e){function t(o,s,c,g,d,h){let v={range:o,message:s};return f.defined(c)&&(v.severity=c),f.defined(g)&&(v.code=g),f.defined(d)&&(v.source=d),f.defined(h)&&(v.relatedInformation=h),v}e.create=t;function n(o){var s;let c=o;return f.defined(c)&&J.is(c.range)&&(f.string(c.message)||Tt.is(c.message))&&(f.number(c.severity)||f.undefined(c.severity))&&(f.integer(c.code)||f.string(c.code)||f.undefined(c.code))&&(f.undefined(c.codeDescription)||f.string((s=c.codeDescription)===null||s===void 0?void 0:s.href))&&(f.string(c.source)||f.undefined(c.source))&&(f.undefined(c.relatedInformation)||f.typedArray(c.relatedInformation,wr.is))}e.is=n;function r(o){return f.string(o.message)}e.is3_17=r;function i(o){if(f.string(o.message))return o.message;if(Tt.is(o.message))return o.message.value;throw new Error(`Unknown message type ${typeof o.message}`)}e.getMessageString=i})(Gn||(Gn={}));(function(e){function t(r,i,...o){let s={title:r,command:i};return f.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.title)&&(i.tooltip===void 0||f.string(i.tooltip))&&f.string(i.command)}e.is=n})(qt||(qt={}));(function(e){function t(o,s){return{range:o,newText:s}}e.replace=t;function n(o,s){return{range:{start:o,end:o},newText:s}}e.insert=n;function r(o){return{range:o,newText:""}}e.del=r;function i(o){let s=o;return f.objectLiteral(s)&&f.string(s.newText)&&J.is(s.range)}e.is=i})(Qe||(Qe={}));(function(e){function t(r,i,o){let s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.string(i.label)&&(f.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(f.string(i.description)||i.description===void 0)}e.is=n})(yt||(yt={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(oe||(oe={}));(function(e){function t(o,s,c){return{range:o,newText:s,annotationId:c}}e.replace=t;function n(o,s,c){return{range:{start:o,end:o},newText:s,annotationId:c}}e.insert=n;function r(o,s){return{range:o,newText:"",annotationId:s}}e.del=r;function i(o){let s=o;return Qe.is(s)&&(yt.is(s.annotationId)||oe.is(s.annotationId))}e.is=i})(nt||(nt={}));(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&Fn.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(jn||(jn={}));(function(e){function t(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&f.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||f.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||f.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||oe.is(i.annotationId))}e.is=n})(rn||(rn={}));(function(e){function t(r,i,o,s){let c={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(c.options=o),s!==void 0&&(c.annotationId=s),c}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&f.string(i.oldUri)&&f.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||f.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||f.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||oe.is(i.annotationId))}e.is=n})(on||(on={}));(function(e){function t(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&f.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||f.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||f.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||oe.is(i.annotationId))}e.is=n})(sn||(sn={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>f.string(i.kind)?rn.is(i)||on.is(i)||sn.is(i):jn.is(i)))}e.is=t})(Pr||(Pr={}));nn=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let i,o;if(r===void 0?i=Qe.insert(t,n):oe.is(r)?(o=r,i=nt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=nt.insert(t,n,o)),this.edits.push(i),o!==void 0)return o}replace(t,n,r){let i,o;if(r===void 0?i=Qe.replace(t,n):oe.is(r)?(o=r,i=nt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=nt.replace(t,n,o)),this.edits.push(i),o!==void 0)return o}delete(t,n){let r,i;if(n===void 0?r=Qe.del(t):oe.is(n)?(i=n,r=nt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=nt.del(t,i)),this.edits.push(r),i!==void 0)return i}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return f.objectLiteral(r)&&J.is(r.range)&&Er.isSnippet(r.snippet)&&(r.annotationId===void 0||yt.is(r.annotationId)||oe.is(r.annotationId))}e.is=t})(ns||(ns={}));kr=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},rs=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new kr(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(jn.is(n)){let r=new nn(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new nn(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Fn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let i=[],o={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(o),r=new nn(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new nn(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;yt.is(n)||oe.is(n)?i=n:r=n;let o,s;if(i===void 0?o=rn.create(t,r):(s=oe.is(i)?i:this._changeAnnotations.manage(i),o=rn.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}renameFile(t,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;yt.is(r)||oe.is(r)?o=r:i=r;let s,c;if(o===void 0?s=on.create(t,n,i):(c=oe.is(o)?o:this._changeAnnotations.manage(o),s=on.create(t,n,i,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;yt.is(n)||oe.is(n)?i=n:r=n;let o,s;if(i===void 0?o=sn.create(t,r):(s=oe.is(i)?i:this._changeAnnotations.manage(i),o=sn.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)}e.is=n})(is||(is={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)&&f.integer(i.version)}e.is=n})(os||(os={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)&&(i.version===null||f.integer(i.version))}e.is=n})(Fn||(Fn={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(ss||(ss={}));(function(e){function t(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)&&f.string(i.languageId)&&f.integer(i.version)&&f.string(i.text)}e.is=n})(cs||(cs={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Rr||(Rr={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&Rr.is(r.kind)&&f.string(r.value)}e.is=t})(Tt||(Tt={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(as||(as={}));(function(e){e.PlainText=1,e.Snippet=2})(us||(us={}));(function(e){e.Deprecated=1})(ls||(ls={}));(function(e){function t(r,i,o){return{newText:r,insert:i,replace:o}}e.create=t;function n(r){let i=r;return i&&f.string(i.newText)&&J.is(i.insert)&&J.is(i.replace)}e.is=n})(ds||(ds={}));(function(e){e.asIs=1,e.adjustIndentation=2})(fs||(fs={}));(function(e){e.Replace=1,e.Merge=2})(ms||(ms={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(hs||(hs={}));(function(e){function t(n){return{label:n}}e.create=t})(gs||(gs={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ps||(ps={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return f.string(i)||f.objectLiteral(i)&&f.string(i.language)&&f.string(i.value)}e.is=n})(Ln||(Ln={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&(Tt.is(r.contents)||Ln.is(r.contents)||f.typedArray(r.contents,Ln.is))&&(n.range===void 0||J.is(n.range))}e.is=t})(ys||(ys={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Ts||(Ts={}));(function(e){function t(n,r,...i){let o={label:n};return f.defined(r)&&(o.documentation=r),f.defined(i)?o.parameters=i:o.parameters=[],o}e.create=t})(_s||(_s={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(vs||(vs={}));(function(e){function t(n,r){let i={range:n};return f.number(r)&&(i.kind=r),i}e.create=t})(bs||(bs={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Cs||(Cs={}));(function(e){e.Deprecated=1})(Is||(Is={}));(function(e){function t(n,r,i,o,s){let c={name:n,kind:r,location:{uri:o,range:i}};return s&&(c.containerName=s),c}e.create=t})(Ss||(Ss={}));(function(e){function t(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(Ds||(Ds={}));(function(e){function t(r,i,o,s,c,g){let d={name:r,detail:i,kind:o,range:s,selectionRange:c};return g!==void 0&&(d.children=g),d}e.create=t;function n(r){let i=r;return i&&f.string(i.name)&&f.number(i.kind)&&J.is(i.range)&&J.is(i.selectionRange)&&(i.detail===void 0||f.string(i.detail))&&(i.deprecated===void 0||f.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(ws||(ws={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(Ps||(Ps={}));(function(e){e.Invoked=1,e.Automatic=2})(Wn||(Wn={}));(function(e){function t(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}e.create=t;function n(r){let i=r;return f.defined(i)&&f.typedArray(i.diagnostics,Gn.is)&&(i.only===void 0||f.typedArray(i.only,f.string))&&(i.triggerKind===void 0||i.triggerKind===Wn.Invoked||i.triggerKind===Wn.Automatic)}e.is=n})(ks||(ks={}));(function(e){e.LLMGenerated=1;function t(n){return f.defined(n)&&n===e.LLMGenerated}e.is=t})(Or||(Or={}));(function(e){function t(r,i,o){let s={title:r},c=!0;return typeof i=="string"?(c=!1,s.kind=i):qt.is(i)?s.command=i:s.edit=i,c&&o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return i&&f.string(i.title)&&(i.diagnostics===void 0||f.typedArray(i.diagnostics,Gn.is))&&(i.kind===void 0||f.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||qt.is(i.command))&&(i.isPreferred===void 0||f.boolean(i.isPreferred))&&(i.edit===void 0||Pr.is(i.edit))&&(i.tags===void 0||f.typedArray(i.tags,Or.is))}e.is=n})(Rs||(Rs={}));(function(e){function t(r,i){let o={range:r};return f.defined(i)&&(o.data=i),o}e.create=t;function n(r){let i=r;return f.defined(i)&&J.is(i.range)&&(f.undefined(i.command)||qt.is(i.command))}e.is=n})(Os||(Os={}));(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.uinteger(i.tabSize)&&f.boolean(i.insertSpaces)}e.is=n})(xs||(xs={}));(function(e){function t(r,i,o){return{range:r,target:i,data:o}}e.create=t;function n(r){let i=r;return f.defined(i)&&J.is(i.range)&&(f.undefined(i.target)||f.string(i.target))}e.is=n})(Ms||(Ms={}));(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&J.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(Es||(Es={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(qs||(qs={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ns||(Ns={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(As||(As={}));(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&J.is(i.range)&&f.string(i.text)}e.is=n})(Gs||(Gs={}));(function(e){function t(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}e.create=t;function n(r){let i=r;return i!=null&&J.is(i.range)&&f.boolean(i.caseSensitiveLookup)&&(f.string(i.variableName)||i.variableName===void 0)}e.is=n})(js||(js={}));(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&J.is(i.range)&&(f.string(i.expression)||i.expression===void 0)}e.is=n})(Fs||(Fs={}));(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&J.is(r.stoppedLocation)}e.is=n})(Ls||(Ls={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(xr||(xr={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&(i.tooltip===void 0||f.string(i.tooltip)||Tt.is(i.tooltip))&&(i.location===void 0||An.is(i.location))&&(i.command===void 0||qt.is(i.command))}e.is=n})(Mr||(Mr={}));(function(e){function t(r,i,o){let s={position:r,label:i};return o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&Me.is(i.position)&&(f.string(i.label)||f.typedArray(i.label,Mr.is))&&(i.kind===void 0||xr.is(i.kind))&&i.textEdits===void 0||f.typedArray(i.textEdits,Qe.is)&&(i.tooltip===void 0||f.string(i.tooltip)||Tt.is(i.tooltip))&&(i.paddingLeft===void 0||f.boolean(i.paddingLeft))&&(i.paddingRight===void 0||f.boolean(i.paddingRight))}e.is=n})(Ws||(Ws={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let i=r;return f.objectLiteral(i)&&i.kind==="snippet"&&f.string(i.value)}e.isSnippet=n})(Er||(Er={}));(function(e){function t(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}e.create=t})(Us||(Us={}));(function(e){function t(n){return{items:n}}e.create=t})(Hs||(Hs={}));(function(e){e.Invoked=1,e.Automatic=2})($s||($s={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(zs||(zs={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Bs||(Bs={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&Sr.is(r.uri)&&f.string(r.name)}e.is=t})(Qs||(Qs={}));pg=[` `,`\r -`,"\r"];(function(e){function t(i,s,c,g){return new Ks(i,s,c,g)}e.create=t;function n(i){let s=i;return!!(f.defined(s)&&f.string(s.uri)&&(f.undefined(s.languageId)||f.string(s.languageId))&&f.uinteger(s.lineCount)&&f.func(s.getText)&&f.func(s.positionAt)&&f.func(s.offsetAt))}e.is=n;function r(i,s){let c=i.getText(),g=o(s,(h,b)=>{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),d=c.length;for(let h=g.length-1;h>=0;h--){let b=g[h],m=i.offsetAt(b.range.start),T=i.offsetAt(b.range.end);if(T<=d)c=c.substring(0,m)+b.newText+c.substring(T,c.length);else throw new Error("Overlapping edit");d=m}return c}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;let c=i.length/2|0,g=i.slice(0,c),d=i.slice(c);o(g,s),o(d,s);let h=0,b=0,m=0;for(;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return Me.create(0,t);for(;rt?o=s:r=s+1}let i=r-1;return Me.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],o=t.line+1"u"}e.undefined=r;function o(T){return T===!0||T===!1}e.boolean=o;function i(T){return t.call(T)==="[object String]"}e.string=i;function s(T){return t.call(T)==="[object Number]"}e.number=s;function c(T,D,q){return t.call(T)==="[object Number]"&&D<=T&&T<=q}e.numberRange=c;function g(T){return t.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}e.integer=g;function d(T){return t.call(T)==="[object Number]"&&0<=T&&T<=2147483647}e.uinteger=d;function h(T){return t.call(T)==="[object Function]"}e.func=h;function b(T){return T!==null&&typeof T=="object"}e.objectLiteral=b;function m(T,D){return Array.isArray(T)&&T.every(D)}e.typedArray=m})(f||(f={}))});var V=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CM=he.ProtocolNotificationType=he.ProtocolNotificationType0=he.ProtocolRequestType=he.ProtocolRequestType0=he.RegistrationType=he.MessageDirection=void 0;var cn=tt(),Cu;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Cu||(he.MessageDirection=Cu={}));var Xs=class{____;method;constructor(t){this.method=t}};he.RegistrationType=Xs;var Zs=class extends cn.RequestType0{__;___;____;_pr;constructor(t){super(t)}};he.ProtocolRequestType0=Zs;var Ys=class extends cn.RequestType{__;___;____;_pr;constructor(t){super(t,cn.ParameterStructures.byName)}};he.ProtocolRequestType=Ys;var Js=class extends cn.NotificationType0{___;____;constructor(t){super(t)}};he.ProtocolNotificationType0=Js;var ec=class extends cn.NotificationType{___;____;constructor(t){super(t,cn.ParameterStructures.byName)}};he.ProtocolNotificationType=ec;var Su;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(Su||(he.CM=Su={}))});var Nr=I(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.boolean=yg;je.string=Iu;je.number=Tg;je.error=_g;je.func=bg;je.array=Du;je.stringArray=vg;je.typedArray=Cg;je.objectLiteral=Sg;function yg(e){return e===!0||e===!1}function Iu(e){return typeof e=="string"||e instanceof String}function Tg(e){return typeof e=="number"||e instanceof Number}function _g(e){return e instanceof Error}function bg(e){return typeof e=="function"}function Du(e){return Array.isArray(e)}function vg(e){return Du(e)&&e.every(t=>Iu(t))}function Cg(e,t){return Array.isArray(e)&&e.every(t)}function Sg(e){return e!==null&&typeof e=="object"}});var ku=I(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.ImplementationRequest=void 0;var tc=V(),wu;(function(e){e.method="textDocument/implementation",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.implementation","implementationProvider")})(wu||(Fr.ImplementationRequest=wu={}))});var Ru=I(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.TypeDefinitionRequest=void 0;var nc=V(),Pu;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(Pu||(Gr.TypeDefinitionRequest=Pu={}))});var Mu=I(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.DidChangeWorkspaceFoldersNotification=un.WorkspaceFoldersRequest=void 0;var an=V(),Ou;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=an.MessageDirection.serverToClient,e.type=new an.ProtocolRequestType0(e.method),e.capabilities=an.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Ou||(un.WorkspaceFoldersRequest=Ou={}));var xu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=an.MessageDirection.clientToServer,e.type=new an.ProtocolNotificationType(e.method),e.capabilities=an.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(xu||(un.DidChangeWorkspaceFoldersNotification=xu={}))});var Au=I(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ConfigurationRequest=void 0;var rc=V(),Eu;(function(e){e.method="workspace/configuration",e.messageDirection=rc.MessageDirection.serverToClient,e.type=new rc.ProtocolRequestType(e.method),e.capabilities=rc.CM.create("workspace.configuration",void 0)})(Eu||(Hr.ConfigurationRequest=Eu={}))});var Fu=I(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.ColorPresentationRequest=dn.DocumentColorRequest=void 0;var ln=V(),qu;(function(e){e.method="textDocument/documentColor",e.messageDirection=ln.MessageDirection.clientToServer,e.type=new ln.ProtocolRequestType(e.method),e.capabilities=ln.CM.create("textDocument.colorProvider","colorProvider")})(qu||(dn.DocumentColorRequest=qu={}));var Nu;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=ln.MessageDirection.clientToServer,e.type=new ln.ProtocolRequestType(e.method),e.capabilities=ln.CM.create("textDocument.colorProvider","colorProvider")})(Nu||(dn.ColorPresentationRequest=Nu={}))});var ju=I(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.FoldingRangeRefreshRequest=mn.FoldingRangeRequest=void 0;var fn=V(),Gu;(function(e){e.method="textDocument/foldingRange",e.messageDirection=fn.MessageDirection.clientToServer,e.type=new fn.ProtocolRequestType(e.method),e.capabilities=fn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Gu||(mn.FoldingRangeRequest=Gu={}));var Hu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=fn.MessageDirection.serverToClient,e.type=new fn.ProtocolRequestType0(e.method),e.capabilities=fn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Hu||(mn.FoldingRangeRefreshRequest=Hu={}))});var Wu=I(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.DeclarationRequest=void 0;var oc=V(),Lu;(function(e){e.method="textDocument/declaration",e.messageDirection=oc.MessageDirection.clientToServer,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("textDocument.declaration","declarationProvider")})(Lu||(jr.DeclarationRequest=Lu={}))});var Qu=I(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.SelectionRangeRequest=void 0;var ic=V(),Uu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Uu||(Lr.SelectionRangeRequest=Uu={}))});var Vu=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.WorkDoneProgressCancelNotification=_t.WorkDoneProgressCreateRequest=_t.WorkDoneProgress=void 0;var Ig=tt(),Wn=V(),Bu;(function(e){e.type=new Ig.ProgressType;function t(n){return n===e.type}e.is=t})(Bu||(_t.WorkDoneProgress=Bu={}));var $u;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Wn.MessageDirection.serverToClient,e.type=new Wn.ProtocolRequestType(e.method),e.capabilities=Wn.CM.create("window.workDoneProgress",void 0)})($u||(_t.WorkDoneProgressCreateRequest=$u={}));var zu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Wn.MessageDirection.clientToServer,e.type=new Wn.ProtocolNotificationType(e.method)})(zu||(_t.WorkDoneProgressCancelNotification=zu={}))});var Yu=I(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.CallHierarchyOutgoingCallsRequest=bt.CallHierarchyIncomingCallsRequest=bt.CallHierarchyPrepareRequest=void 0;var rt=V(),Ku;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ku||(bt.CallHierarchyPrepareRequest=Ku={}));var Xu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Xu||(bt.CallHierarchyIncomingCallsRequest=Xu={}));var Zu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Zu||(bt.CallHierarchyOutgoingCallsRequest=Zu={}))});var ol=I(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Oe=V(),Ju;(function(e){e.Relative="relative"})(Ju||(De.TokenFormat=Ju={}));var Un;(function(e){e.method="textDocument/semanticTokens",e.type=new Oe.RegistrationType(e.method)})(Un||(De.SemanticTokensRegistrationType=Un={}));var el;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Un.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(el||(De.SemanticTokensRequest=el={}));var tl;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Un.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(tl||(De.SemanticTokensDeltaRequest=tl={}));var nl;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Un.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(nl||(De.SemanticTokensRangeRequest=nl={}));var rl;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Oe.MessageDirection.serverToClient,e.type=new Oe.ProtocolRequestType0(e.method),e.capabilities=Oe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(rl||(De.SemanticTokensRefreshRequest=rl={}))});var sl=I(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ShowDocumentRequest=void 0;var sc=V(),il;(function(e){e.method="window/showDocument",e.messageDirection=sc.MessageDirection.serverToClient,e.type=new sc.ProtocolRequestType(e.method),e.capabilities=sc.CM.create("window.showDocument.support",void 0)})(il||(Wr.ShowDocumentRequest=il={}))});var al=I(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.LinkedEditingRangeRequest=void 0;var cc=V(),cl;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=cc.MessageDirection.clientToServer,e.type=new cc.ProtocolRequestType(e.method),e.capabilities=cc.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(cl||(Ur.LinkedEditingRangeRequest=cl={}))});var pl=I(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.WillDeleteFilesRequest=ge.DidDeleteFilesNotification=ge.DidRenameFilesNotification=ge.WillRenameFilesRequest=ge.DidCreateFilesNotification=ge.WillCreateFilesRequest=ge.FileOperationPatternKind=void 0;var se=V(),ul;(function(e){e.file="file",e.folder="folder"})(ul||(ge.FileOperationPatternKind=ul={}));var ll;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(ll||(ge.WillCreateFilesRequest=ll={}));var dl;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(dl||(ge.DidCreateFilesNotification=dl={}));var fl;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(fl||(ge.WillRenameFilesRequest=fl={}));var ml;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(ml||(ge.DidRenameFilesNotification=ml={}));var hl;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(hl||(ge.DidDeleteFilesNotification=hl={}));var gl;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(gl||(ge.WillDeleteFilesRequest=gl={}))});var bl=I(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.MonikerRequest=vt.MonikerKind=vt.UniquenessLevel=void 0;var ac=V(),yl;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(yl||(vt.UniquenessLevel=yl={}));var Tl;(function(e){e.$import="import",e.$export="export",e.local="local"})(Tl||(vt.MonikerKind=Tl={}));var _l;(function(e){e.method="textDocument/moniker",e.messageDirection=ac.MessageDirection.clientToServer,e.type=new ac.ProtocolRequestType(e.method),e.capabilities=ac.CM.create("textDocument.moniker","monikerProvider")})(_l||(vt.MonikerRequest=_l={}))});var Il=I(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.TypeHierarchySubtypesRequest=Ct.TypeHierarchySupertypesRequest=Ct.TypeHierarchyPrepareRequest=void 0;var qt=V(),vl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method),e.capabilities=qt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(vl||(Ct.TypeHierarchyPrepareRequest=vl={}));var Cl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(Cl||(Ct.TypeHierarchySupertypesRequest=Cl={}));var Sl;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(Sl||(Ct.TypeHierarchySubtypesRequest=Sl={}))});var kl=I(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.InlineValueRefreshRequest=gn.InlineValueRequest=void 0;var hn=V(),Dl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=hn.MessageDirection.clientToServer,e.type=new hn.ProtocolRequestType(e.method),e.capabilities=hn.CM.create("textDocument.inlineValue","inlineValueProvider")})(Dl||(gn.InlineValueRequest=Dl={}));var wl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=hn.MessageDirection.serverToClient,e.type=new hn.ProtocolRequestType0(e.method),e.capabilities=hn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(wl||(gn.InlineValueRefreshRequest=wl={}))});var xl=I(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.InlayHintRefreshRequest=St.InlayHintResolveRequest=St.InlayHintRequest=void 0;var ot=V(),Pl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint","inlayHintProvider")})(Pl||(St.InlayHintRequest=Pl={}));var Rl;(function(e){e.method="inlayHint/resolve",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method),e.capabilities=ot.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Rl||(St.InlayHintResolveRequest=Rl={}));var Ol;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=ot.MessageDirection.serverToClient,e.type=new ot.ProtocolRequestType0(e.method),e.capabilities=ot.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Ol||(St.InlayHintRefreshRequest=Ol={}))});var Gl=I(ce=>{"use strict";var Dg=ce&&ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),wg=ce&&ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kg=ce&&ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";var Rg=U&&U.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Og=U&&U.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xg=U&&U.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.InlineCompletionRequest=void 0;var dc=V(),$l;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=dc.MessageDirection.clientToServer,e.type=new dc.ProtocolRequestType(e.method),e.capabilities=dc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})($l||(Br.InlineCompletionRequest=$l={}))});var Xl=I(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.TextDocumentContentRefreshRequest=yn.TextDocumentContentRequest=void 0;var Bn=V(),Vl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Bn.MessageDirection.clientToServer,e.type=new Bn.ProtocolRequestType(e.method),e.capabilities=Bn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Vl||(yn.TextDocumentContentRequest=Vl={}));var Kl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Bn.MessageDirection.serverToClient,e.type=new Bn.ProtocolRequestType(e.method)})(Kl||(yn.TextDocumentContentRefreshRequest=Kl={}))});var df=I(a=>{"use strict";var Mg=a&&a.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eg=a&&a.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ag=a&&a.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o0}e.hasId=t})(od||(a.StaticRegistrationOptions=od={}));var id;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||gc.is(r.documentSelector))}e.is=t})(id||(a.TextDocumentRegistrationOptions=id={}));var sd;(function(e){function t(r){let o=r;return ae.objectLiteral(o)&&(o.workDoneProgress===void 0||ae.boolean(o.workDoneProgress))}e.is=t;function n(r){let o=r;return o&&ae.boolean(o.workDoneProgress)}e.hasWorkDoneProgress=n})(sd||(a.WorkDoneProgressOptions=sd={}));var cd;(function(e){e.method="initialize",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method)})(cd||(a.InitializeRequest=cd={}));var ad;(function(e){e.unknownProtocolVersion=1})(ad||(a.InitializeErrorCodes=ad={}));var ud;(function(e){e.method="initialized",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method)})(ud||(a.InitializedNotification=ud={}));var ld;(function(e){e.method="shutdown",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType0(e.method)})(ld||(a.ShutdownRequest=ld={}));var dd;(function(e){e.method="exit",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType0(e.method)})(dd||(a.ExitNotification=dd={}));var fd;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeConfiguration",void 0)})(fd||(a.DidChangeConfigurationNotification=fd={}));var md;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(md||(a.MessageType=md={}));var hd;(function(e){e.method="window/showMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(hd||(a.ShowMessageNotification=hd={}));var gd;(function(e){e.method="window/showMessageRequest",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(gd||(a.ShowMessageRequest=gd={}));var pd;(function(e){e.method="window/logMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(pd||(a.LogMessageNotification=pd={}));var yd;(function(e){e.method="telemetry/event",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(yd||(a.TelemetryEventNotification=yd={}));var Td;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Td||(a.TextDocumentSyncKind=Td={}));var _d;(function(e){e.method="textDocument/didOpen",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(_d||(a.DidOpenTextDocumentNotification=_d={}));var bd;(function(e){function t(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}e.isIncremental=t;function n(r){let o=r;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}e.isFull=n})(bd||(a.TextDocumentContentChangeEvent=bd={}));var vd;(function(e){e.method="textDocument/didChange",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync")})(vd||(a.DidChangeTextDocumentNotification=vd={}));var Cd;(function(e){e.method="textDocument/didClose",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Cd||(a.DidCloseTextDocumentNotification=Cd={}));var Sd;(function(e){e.method="textDocument/didSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Sd||(a.DidSaveTextDocumentNotification=Sd={}));var Id;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Id||(a.TextDocumentSaveReason=Id={}));var Dd;(function(e){e.method="textDocument/willSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Dd||(a.WillSaveTextDocumentNotification=Dd={}));var wd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(wd||(a.WillSaveTextDocumentWaitUntilRequest=wd={}));var kd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeWatchedFiles",void 0)})(kd||(a.DidChangeWatchedFilesNotification=kd={}));var Pd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Pd||(a.FileChangeType=Pd={}));var pc;(function(e){function t(n){let r=n;return ae.objectLiteral(r)&&(Zl.URI.is(r.baseUri)||Zl.WorkspaceFolder.is(r.baseUri))&&ae.string(r.pattern)}e.is=t})(pc||(a.RelativePattern=pc={}));var yc;(function(e){function t(n){let r=n;return ae.string(r)||pc.is(r)}e.is=t})(yc||(a.GlobPattern=yc={}));var Rd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Rd||(a.WatchKind=Rd={}));var Od;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.publishDiagnostics",void 0)})(Od||(a.PublishDiagnosticsNotification=Od={}));var xd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(xd||(a.CompletionTriggerKind=xd={}));var Md;(function(e){e.method="textDocument/completion",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion","completionProvider")})(Md||(a.CompletionRequest=Md={}));var Ed;(function(e){e.method="completionItem/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Ed||(a.CompletionResolveRequest=Ed={}));var Ad;(function(e){e.method="textDocument/hover",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.hover","hoverProvider")})(Ad||(a.HoverRequest=Ad={}));var qd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(qd||(a.SignatureHelpTriggerKind=qd={}));var Nd;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Nd||(a.SignatureHelpRequest=Nd={}));var Fd;(function(e){e.method="textDocument/definition",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.definition","definitionProvider")})(Fd||(a.DefinitionRequest=Fd={}));var Gd;(function(e){e.method="textDocument/references",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.references","referencesProvider")})(Gd||(a.ReferencesRequest=Gd={}));var Hd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Hd||(a.DocumentHighlightRequest=Hd={}));var jd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(jd||(a.DocumentSymbolRequest=jd={}));var Ld;(function(e){e.method="textDocument/codeAction",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction","codeActionProvider")})(Ld||(a.CodeActionRequest=Ld={}));var Wd;(function(e){e.method="codeAction/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Wd||(a.CodeActionResolveRequest=Wd={}));var Ud;(function(e){e.method="workspace/symbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol","workspaceSymbolProvider")})(Ud||(a.WorkspaceSymbolRequest=Ud={}));var Qd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Qd||(a.WorkspaceSymbolResolveRequest=Qd={}));var Bd;(function(e){e.method="textDocument/codeLens",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens","codeLensProvider")})(Bd||(a.CodeLensRequest=Bd={}));var $d;(function(e){e.method="codeLens/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})($d||(a.CodeLensResolveRequest=$d={}));var zd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType0(e.method),e.capabilities=_.CM.create("workspace.codeLens",void 0)})(zd||(a.CodeLensRefreshRequest=zd={}));var Vd;(function(e){e.method="textDocument/documentLink",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider")})(Vd||(a.DocumentLinkRequest=Vd={}));var Kd;(function(e){e.method="documentLink/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Kd||(a.DocumentLinkResolveRequest=Kd={}));var Xd;(function(e){e.method="textDocument/formatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.formatting","documentFormattingProvider")})(Xd||(a.DocumentFormattingRequest=Xd={}));var Zd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Zd||(a.DocumentRangeFormattingRequest=Zd={}));var Yd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Yd||(a.DocumentRangesFormattingRequest=Yd={}));var Jd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Jd||(a.DocumentOnTypeFormattingRequest=Jd={}));var ef;(function(e){e.Identifier=1})(ef||(a.PrepareSupportDefaultBehavior=ef={}));var tf;(function(e){e.method="textDocument/rename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename","renameProvider")})(tf||(a.RenameRequest=tf={}));var nf;(function(e){e.method="textDocument/prepareRename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(nf||(a.PrepareRenameRequest=nf={}));var rf;(function(e){e.method="workspace/executeCommand",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.executeCommand","executeCommandProvider")})(rf||(a.ExecuteCommandRequest=rf={}));var of;(function(e){e.method="workspace/applyEdit",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType("workspace/applyEdit"),e.capabilities=_.CM.create("workspace.applyEdit",void 0)})(of||(a.ApplyWorkspaceEditRequest=of={}))});var mf=I(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.createProtocolConnection=Ug;var ff=tt();function Ug(e,t,n,r){return ff.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,ff.createMessageConnection)(e,t,n,r)}});var te=I(we=>{"use strict";var Qg=we&&we.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$r=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qg(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;$r(tt(),we);$r((qr(),ar(Ar)),we);$r(V(),we);$r(df(),we);var Bg=mf();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return Bg.createProtocolConnection}});var hf;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(hf||(we.LSPErrorCodes=hf={}))});var Dc=I(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.empty=void 0;It.v4=gf;It.isUUID=pf;It.parse=zg;It.generateUuid=Vg;var zn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Ic=class e extends zn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};It.empty=new zn("00000000-0000-0000-0000-000000000000");function gf(){return new Ic}var $g=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function pf(e){return $g.test(e)}function zg(e){if(!pf(e))throw new Error("invalid uuid");return new zn(e)}function Vg(){return gf().asHex()}});var yf=I(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ProgressFeature=void 0;bn.attachWorkDone=Xg;bn.attachPartialResult=Yg;var Dt=te(),Kg=Dc(),_n=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,o){let i={kind:"begin",title:t,message:r,cancellable:o};typeof n=="number"&&(i.percentage=Math.round(n)),this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,i)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,{kind:"end"})}},zr=class extends _n{_source;constructor(t,n){super(t,n),this._source=new Dt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Vn=class{constructor(){}begin(){}report(){}done(){}},Vr=class extends Vn{_source;constructor(){super(),this._source=new Dt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Xg(e,t){if(t===void 0||t.workDoneToken===void 0)return new Vn;let n=t.workDoneToken;return delete t.workDoneToken,new _n(e,n)}var Zg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Dt.WorkDoneProgressCancelNotification.type,n=>{let r=_n.Instances.get(n.token);(r instanceof zr||r instanceof Vr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Vn:new _n(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,Kg.generateUuid)();return this.connection.sendRequest(Dt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new zr(this.connection,t))}else return Promise.resolve(new Vr)}};bn.ProgressFeature=Zg;var wc;(function(e){e.type=new Dt.ProgressType})(wc||(wc={}));var kc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(wc.type,this._token,t)}};function Yg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new kc(e,n)}});var Tf=I(Xe=>{"use strict";var Jg=Xe&&Xe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ep=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tp=Xe&&Xe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oclass extends e{getConfiguration(t){return t?rp.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(np.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Xe.ConfigurationFeature=op});var _f=I(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.WorkspaceFoldersFeature=void 0;var Kr=te(),ip=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Kr.Emitter,this.connection.onNotification(Kr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Kr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Kr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Xr.WorkspaceFoldersFeature=ip});var bf=I(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.CallHierarchyFeature=void 0;var Pc=te(),sp=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Pc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Pc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Pc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Zr.CallHierarchyFeature=sp});var Oc=I(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.SemanticTokensBuilder=wt.SemanticTokensDiff=wt.SemanticTokensFeature=void 0;var Yr=te(),cp=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Yr.SemanticTokensRefreshRequest.type),on:t=>{let n=Yr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Yr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Yr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};wt.SemanticTokensFeature=cp;var Jr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&i>=r&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o0&&(s-=this._prevLine,s===0&&(c-=this._prevChar));let g=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;g[this._dataLen++]=s,g[this._dataLen++]=c,g[this._dataLen++]=r,g[this._dataLen++]=o,g[this._dataLen++]=i,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,o=0,i=[];for(let s=0;s{let d=t[5*c],h=t[5*g];if(d===h){let b=t[5*c+1],m=t[5*g+1];return b-m}return d-h});let o=[],i=0,s=0;for(let c=0;c{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.ShowDocumentFeature=void 0;var ap=te(),up=e=>class extends e{showDocument(t){return this.connection.sendRequest(ap.ShowDocumentRequest.type,t)}};eo.ShowDocumentFeature=up});var Cf=I(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.FileOperationsFeature=void 0;var vn=te(),lp=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(vn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(vn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(vn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(vn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(vn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(vn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};to.FileOperationsFeature=lp});var Sf=I(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.LinkedEditingRangeFeature=void 0;var dp=te(),fp=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(dp.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};no.LinkedEditingRangeFeature=fp});var If=I(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.TypeHierarchyFeature=void 0;var xc=te(),mp=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(xc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=xc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=xc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ro.TypeHierarchyFeature=mp});var wf=I(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.InlineValueFeature=void 0;var Df=te(),hp=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Df.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Df.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};oo.InlineValueFeature=hp});var Pf=I(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.FoldingRangeFeature=void 0;var kf=te(),gp=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(kf.FoldingRangeRefreshRequest.type),on:t=>{let n=kf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};io.FoldingRangeFeature=gp});var Rf=I(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.InlayHintFeature=void 0;var Mc=te(),pp=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Mc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Mc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Mc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};so.InlayHintFeature=pp});var Of=I(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.DiagnosticFeature=void 0;var Kn=te(),yp=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Kn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Kn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Kn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Kn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Kn.WorkspaceDiagnosticRequest.partialResult,n)))}}};co.DiagnosticFeature=yp});var Ac=I(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.TextDocuments=void 0;var Ft=te(),Ec=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Ft.Emitter,this._onDidOpen=new Ft.Emitter,this._onDidClose=new Ft.Emitter,this._onDidSave=new Ft.Emitter,this._onWillSave=new Ft.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Ft.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let o=r.textDocument,i=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,i);let s=Object.freeze({document:i});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let o=r.textDocument,i=r.contentChanges;if(i.length===0)return;let{version:s}=o;if(s==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let c=this._syncedDocuments.get(o.uri);c!==void 0&&(c=this._configuration.update(c,i,s),this._syncedDocuments.set(o.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),n.push(t.onDidCloseTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),n.push(t.onWillSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,o)=>{let i=this._syncedDocuments.get(r.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),o):[]})),n.push(t.onDidSaveTextDocument(r=>{let o=this._syncedDocuments.get(r.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),Ft.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};ao.TextDocuments=Ec});var Fc=I(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.NotebookDocuments=Cn.NotebookSyncFeature=void 0;var Ee=te(),xf=Ac(),Tp=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Ee.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Ee.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Ee.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Ee.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};Cn.NotebookSyncFeature=Tp;var qc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Ee.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Ee.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Ee.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Nc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof xf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new xf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Ee.Emitter,this._onDidChange=new Ee.Emitter,this._onDidSave=new Ee.Emitter,this._onDidClose=new Ee.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new qc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let i of o.cellTextDocuments)await n.openTextDocument({textDocument:i});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i===void 0)return;i.version=o.notebookDocument.version;let s=i.metadata,c=!1,g=o.change;g.metadata!==void 0&&(c=!0,i.metadata=g.metadata);let d=[],h=[],b=[],m=[];if(g.cells!==void 0){let x=g.cells;if(x.structure!==void 0){let p=x.structure.array;if(i.cells.splice(p.start,p.deleteCount,...p.cells!==void 0?p.cells:[]),x.structure.didOpen!==void 0)for(let l of x.structure.didOpen)await n.openTextDocument({textDocument:l}),d.push(l.uri);if(x.structure.didClose)for(let l of x.structure.didClose)await n.closeTextDocument({textDocument:l}),h.push(l.uri)}if(x.data!==void 0){let p=new Map(x.data.map(l=>[l.document,l]));for(let l=0;l<=i.cells.length;l++){let C=p.get(i.cells[l].document);if(C!==void 0){let k=i.cells.splice(l,1,C);if(b.push({old:k[0],new:C}),p.delete(C.document),p.size===0)break}}}if(x.textContent!==void 0)for(let p of x.textContent)await n.changeTextDocument({textDocument:p.document,contentChanges:p.changes}),m.push(p.document.uri)}this.updateCellMap(i);let T={notebookDocument:i};c&&(T.metadata={old:s,new:i.metadata});let D=[];for(let x of d)D.push(this.getNotebookCell(x));let q=[];for(let x of h)q.push(this.getNotebookCell(x));let N=[];for(let x of m)N.push(this.getNotebookCell(x));(D.length>0||q.length>0||b.length>0||N.length>0)&&(T.cells={added:D,removed:q,changed:{data:b,textContent:N}}),(T.metadata!==void 0||T.cells!==void 0)&&this._onDidChange.fire(T)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);i!==void 0&&this._onDidSave.fire(i)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async o=>{let i=this.notebookDocuments.get(o.notebookDocument.uri);if(i!==void 0){this._onDidClose.fire(i);for(let s of o.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(o.notebookDocument.uri);for(let s of i.cells)this.notebookCellMap.delete(s.document)}})),Ee.Disposable.create(()=>{r.forEach(o=>o.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};Cn.NotebookDocuments=Nc});var Mf=I(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.MonikerFeature=void 0;var _p=te(),bp=e=>class extends e{get moniker(){return{on:t=>{let n=_p.MonikerRequest.type;return this.connection.onRequest(n,(r,o)=>t(r,o,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};uo.MonikerFeature=bp});var Ef=I(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.InlineCompletionFeature=void 0;var vp=te(),Cp=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(vp.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};lo.InlineCompletionFeature=Cp});var qf=I(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TextDocumentContentFeature=void 0;var Af=te(),Sp=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(Af.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(Af.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};fo.TextDocumentContentFeature=Sp});var Uc=I(Q=>{"use strict";var Ip=Q&&Q.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Dp=Q&&Q.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wf=Q&&Q.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{t.window.showErrorMessage(n)})}};Q.ErrorMessageTracker=jc;var mo=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(w.MessageType.Error,t)}warn(t){this.send(w.MessageType.Warning,t)}info(t){this.send(w.MessageType.Info,t)}log(t){this.send(w.MessageType.Log,t)}debug(t){this.send(w.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(w.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,w.RAL)().console.error("Sending log message failed")})}},Lc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:w.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Gc)}showWarningMessage(t,...n){let r={type:w.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Gc)}showInformationMessage(t,...n){let r={type:w.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(Gc)}},Nf=(0,Op.ShowDocumentFeature)((0,A.ProgressFeature)(Lc)),Ff;(function(e){function t(){return new ho}e.create=t})(Ff||(Q.BulkRegistration=Ff={}));var ho=class{_registrations=[];_registered=new Set;add(t,n){let r=Ae.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let o=Hc.generateUuid();this._registrations.push({id:o,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Gf;(function(e){function t(){return new Xn(void 0,[])}e.create=t})(Gf||(Q.BulkUnregistration=Gf={}));var Xn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(w.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=Ae.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(w.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(n)},i=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},go=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof ho?this.registerMany(t):t instanceof Xn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let o=Ae.string(n)?n:n.method,i=Hc.generateUuid(),s={registrations:[{id:i,method:o,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(w.RegistrationRequest.type,s).then(c=>(t.add({id:i,method:o}),t),c=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(c)))}registerSingle2(t,n){let r=Ae.string(t)?t:t.method,o=Hc.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(w.RegistrationRequest.type,i).then(s=>w.Disposable.create(()=>{this.unregisterSingle(o,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(w.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(w.RegistrationRequest.type,n).then(()=>new Xn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Wc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(o){return o&&!!o.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(w.ApplyWorkspaceEditRequest.type,r)}},Hf=(0,Lp.TextDocumentContentFeature)((0,xp.FileOperationsFeature)((0,kp.WorkspaceFoldersFeature)((0,wp.ConfigurationFeature)(Wc)))),po=class{_trace;_connection;constructor(){this._trace=w.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==w.Trace.Off&&this.connection.sendNotification(w.LogTraceNotification.type,{message:t,verbose:this._trace===w.Trace.Verbose?n:void 0}).catch(()=>{})}},yo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(w.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},To=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._LanguagesImpl=To;var jf=(0,jp.InlineCompletionFeature)((0,qp.FoldingRangeFeature)((0,Hp.MonikerFeature)((0,Fp.DiagnosticFeature)((0,Np.InlayHintFeature)((0,Ap.InlineValueFeature)((0,Ep.TypeHierarchyFeature)((0,Mp.LinkedEditingRangeFeature)((0,Rp.SemanticTokensFeature)((0,Pp.CallHierarchyFeature)(To)))))))))),_o=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,A.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,A.attachPartialResult)(this.connection,n)}};Q._NotebooksImpl=_o;var Lf=(0,Gp.NotebookSyncFeature)(_o);function Uf(e,t){return function(n){return t(e(n))}}function Qf(e,t){return function(n){return t(e(n))}}function Bf(e,t){return function(n){return t(e(n))}}function $f(e,t){return function(n){return t(e(n))}}function zf(e,t){return function(n){return t(e(n))}}function Vf(e,t){return function(n){return t(e(n))}}function Kf(e,t){return function(n){return t(e(n))}}function Xf(e,t){return function(n){return t(e(n))}}function Wp(e,t){function n(o,i,s){return o&&i?s(o,i):o||i}return{__brand:"features",console:n(e.console,t.console,Uf),tracer:n(e.tracer,t.tracer,Bf),telemetry:n(e.telemetry,t.telemetry,Qf),client:n(e.client,t.client,$f),window:n(e.window,t.window,zf),workspace:n(e.workspace,t.workspace,Vf),languages:n(e.languages,t.languages,Kf),notebooks:n(e.notebooks,t.notebooks,Xf)}}function Up(e,t,n){let r=n&&n.console?new(n.console(mo)):new mo,o=e(r);r.rawAttach(o);let i=n&&n.tracer?new(n.tracer(po)):new po,s=n&&n.telemetry?new(n.telemetry(yo)):new yo,c=n&&n.client?new(n.client(go)):new go,g=n&&n.window?new(n.window(Nf)):new Nf,d=n&&n.workspace?new(n.workspace(Hf)):new Hf,h=n&&n.languages?new(n.languages(jf)):new jf,b=n&&n.notebooks?new(n.notebooks(Lf)):new Lf,m=[r,i,s,c,g,d,h,b];function T(p){return p instanceof Promise?p:Ae.thenable(p)?new Promise((l,C)=>{p.then(k=>l(k),k=>C(k))}):Promise.resolve(p)}let D,q,N,x={listen:()=>o.listen(),sendRequest:(p,...l)=>o.sendRequest(Ae.string(p)?p:p.method,...l),onRequest:(p,l)=>o.onRequest(p,l),sendNotification:(p,l)=>{let C=Ae.string(p)?p:p.method;return o.sendNotification(C,l)},onNotification:(p,l)=>o.onNotification(p,l),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:p=>(q=p,{dispose:()=>{q=void 0}}),onInitialized:p=>o.onNotification(w.InitializedNotification.type,p),onShutdown:p=>(D=p,{dispose:()=>{D=void 0}}),onExit:p=>(N=p,{dispose:()=>{N=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return c},get window(){return g},get workspace(){return d},get languages(){return h},get notebooks(){return b},onDidChangeConfiguration:p=>o.onNotification(w.DidChangeConfigurationNotification.type,p),onDidChangeWatchedFiles:p=>o.onNotification(w.DidChangeWatchedFilesNotification.type,p),__textDocumentSync:void 0,onDidOpenTextDocument:p=>o.onNotification(w.DidOpenTextDocumentNotification.type,p),onDidChangeTextDocument:p=>o.onNotification(w.DidChangeTextDocumentNotification.type,p),onDidCloseTextDocument:p=>o.onNotification(w.DidCloseTextDocumentNotification.type,p),onWillSaveTextDocument:p=>o.onNotification(w.WillSaveTextDocumentNotification.type,p),onWillSaveTextDocumentWaitUntil:p=>o.onRequest(w.WillSaveTextDocumentWaitUntilRequest.type,p),onDidSaveTextDocument:p=>o.onNotification(w.DidSaveTextDocumentNotification.type,p),sendDiagnostics:p=>o.sendNotification(w.PublishDiagnosticsNotification.type,p),onHover:p=>o.onRequest(w.HoverRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onCompletion:p=>o.onRequest(w.CompletionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCompletionResolve:p=>o.onRequest(w.CompletionResolveRequest.type,p),onSignatureHelp:p=>o.onRequest(w.SignatureHelpRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDeclaration:p=>o.onRequest(w.DeclarationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDefinition:p=>o.onRequest(w.DefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onTypeDefinition:p=>o.onRequest(w.TypeDefinitionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onImplementation:p=>o.onRequest(w.ImplementationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onReferences:p=>o.onRequest(w.ReferencesRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentHighlight:p=>o.onRequest(w.DocumentHighlightRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentSymbol:p=>o.onRequest(w.DocumentSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbol:p=>o.onRequest(w.WorkspaceSymbolRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onWorkspaceSymbolResolve:p=>o.onRequest(w.WorkspaceSymbolResolveRequest.type,p),onCodeAction:p=>o.onRequest(w.CodeActionRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeActionResolve:p=>o.onRequest(w.CodeActionResolveRequest.type,(l,C)=>p(l,C)),onCodeLens:p=>o.onRequest(w.CodeLensRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onCodeLensResolve:p=>o.onRequest(w.CodeLensResolveRequest.type,(l,C)=>p(l,C)),onDocumentFormatting:p=>o.onRequest(w.DocumentFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentRangeFormatting:p=>o.onRequest(w.DocumentRangeFormattingRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onDocumentOnTypeFormatting:p=>o.onRequest(w.DocumentOnTypeFormattingRequest.type,(l,C)=>p(l,C)),onRenameRequest:p=>o.onRequest(w.RenameRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),onPrepareRename:p=>o.onRequest(w.PrepareRenameRequest.type,(l,C)=>p(l,C)),onDocumentLinks:p=>o.onRequest(w.DocumentLinkRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onDocumentLinkResolve:p=>o.onRequest(w.DocumentLinkResolveRequest.type,(l,C)=>p(l,C)),onDocumentColor:p=>o.onRequest(w.DocumentColorRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onColorPresentation:p=>o.onRequest(w.ColorPresentationRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onFoldingRanges:p=>o.onRequest(w.FoldingRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onSelectionRanges:p=>o.onRequest(w.SelectionRangeRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),(0,A.attachPartialResult)(o,l))),onExecuteCommand:p=>o.onRequest(w.ExecuteCommandRequest.type,(l,C)=>p(l,C,(0,A.attachWorkDone)(o,l),void 0)),dispose:()=>o.dispose()};for(let p of m)p.attach(x);return o.onRequest(w.InitializeRequest.type,p=>{t.initialize(p),Ae.string(p.trace)&&(i.trace=w.Trace.fromString(p.trace));for(let l of m)l.initialize(p.capabilities);if(q){let l=q(p,new w.CancellationTokenSource().token,(0,A.attachWorkDone)(o,p),void 0);return T(l).then(C=>{if(C instanceof w.ResponseError)return C;let k=C;k||(k={capabilities:{}});let M=k.capabilities;M||(M={},k.capabilities=M),M.textDocumentSync===void 0||M.textDocumentSync===null?M.textDocumentSync=Ae.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None:!Ae.number(M.textDocumentSync)&&!Ae.number(M.textDocumentSync.change)&&(M.textDocumentSync.change=Ae.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None);for(let L of m)L.fillServerCapabilities(M);return k})}else{let l={capabilities:{textDocumentSync:w.TextDocumentSyncKind.None}};for(let C of m)C.fillServerCapabilities(l.capabilities);return l}}),o.onRequest(w.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,D)return D(new w.CancellationTokenSource().token)}),o.onNotification(w.ExitNotification.type,()=>{try{if(N)return N()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(w.SetTraceNotification.type,p=>{i.trace=w.Trace.fromString(p.value)}),x}});var Zf=I(ve=>{"use strict";var Qp=ve&&ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Bp=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vc=ve&&ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o1){let r=n[0],o=n[1];r.length===0&&o.length>1&&o[1]===":"&&n.shift()}return We.normalize(n.join("/"))}function Bc(){return process.platform==="win32"}function bo(e,t,n,r){let o="NODE_PATH",i=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,c)=>{let g=process.env,d=Object.create(null);Object.keys(g).forEach(h=>d[h]=g[h]),t&&Qc.existsSync(t)&&(d[o]?d[o]=t+We.delimiter+d[o]:d[o]=t,r&&r(`NODE_PATH value is: ${d[o]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let h=(0,Kc.fork)("",[],{cwd:n,env:d,execArgv:["-e",i]});if(h.pid===void 0){c(new Error(`Starting process to resolve node module ${e} failed`));return}h.on("error",m=>{c(m)}),h.on("message",m=>{m.c==="r"&&(h.send({c:"e"}),m.s?s(m.r):c(new Error(`Failed to resolve module: ${e}`)))});let b={c:"rs",a:e};h.send(b)}catch(h){c(h)}})}function $c(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(i=>n[i]=process.env[i]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Bc()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,Kc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!i){e&&e("'npm config get prefix' didn't return a value.");return}let s=i.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Bc()?We.join(s,"node_modules"):We.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}function Vp(e){let t="yarn",n={encoding:"utf8"};Bc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,Kc.spawnSync)(t,["global","dir","--json"],n),i=o.stdout;if(!i){e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr));return}let s=i.trim().split(/\r?\n/);for(let c of s)try{let g=JSON.parse(c);if(g.type==="log")return We.join(g.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var zc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Qc.existsSync(__filename.toUpperCase())||!Qc.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(o,i){return n()?We.normalize(i).indexOf(We.normalize(o))===0:We.normalize(i).toLowerCase().indexOf(We.normalize(o).toLowerCase())===0}e.isParent=r})(zc||(ve.FileSystem=zc={}));function Kp(e,t,n,r){return n?(We.isAbsolute(n)||(n=We.join(e,n)),bo(t,n,n,r).then(o=>zc.isParent(n,o)?o:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,o=>bo(t,$c(r),e,r))):bo(t,$c(r),e,r)}});var em=I(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var Yf=require("util"),st=tt(),Xc=class e extends st.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Yf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Zc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),st.Disposable.create(()=>this.stream.off("data",t))}},Yc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,o)=>{let i=s=>{s==null?r():o(s)};typeof t=="string"?this.stream.write(t,n,i):this.stream.write(t,i)})}end(){this.stream.end()}},Jf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Xc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Yf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Zc(e),asWritableStream:e=>new Yc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Jc(){return Jf}(function(e){function t(){st.RAL.install(Jf)}e.install=t})(Jc||(Jc={}));ea.default=Jc});var sa=I(F=>{"use strict";var nm=F&&F.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Xp=F&&F.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ia=F&&F.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;othis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),xe.Disposable.create(()=>this.process.off("message",t))}};F.IPCMessageReader=ta;var na=class extends xe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.IPCMessageWriter=na;var ra=class extends xe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new xe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};F.PortMessageReader=ra;var oa=class extends xe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};F.PortMessageWriter=oa;var Gt=class extends xe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Zn.default)().stream.asReadableStream(t),n)}};F.SocketMessageReader=Gt;var Ht=class extends xe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Zn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};F.SocketMessageWriter=Ht;var vo=class extends xe.ReadableStreamMessageReader{constructor(t,n){super((0,Zn.default)().stream.asReadableStream(t),n)}};F.StreamMessageReader=vo;var Co=class extends xe.WriteableStreamMessageWriter{constructor(t,n){super((0,Zn.default)().stream.asWritableStream(t),n)}};F.StreamMessageWriter=Co;var ny=process.env.XDG_RUNTIME_DIR,ry=new Map([["linux",107],["darwin",102]]);function oy(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,tm.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=ty.realpathSync(ny??ey.tmpdir()),r=ry.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let o=(0,tm.randomBytes)(Math.floor(e/2)).toString("hex");return Jp.join(n,`lsp-${o}.sock`)}function iy(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,So.createServer)(c=>{s.close(),n([new Gt(c,t),new Ht(c,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function sy(e,t="utf-8"){let n=(0,So.createConnection)(e);return[new Gt(n,t),new Ht(n,t)]}function cy(e,t="utf-8"){let n,r=new Promise((o,i)=>{n=o});return new Promise((o,i)=>{let s=(0,So.createServer)(c=>{s.close(),n([new Gt(c,t),new Ht(c,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>r})})})}function ay(e,t="utf-8"){let n=(0,So.createConnection)(e,"127.0.0.1");return[new Gt(n,t),new Ht(n,t)]}function uy(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function ly(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function dy(e,t,n,r){n||(n=xe.NullLogger);let o=uy(e)?new vo(e):e,i=ly(t)?new Co(t):t;return xe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,xe.createMessageConnection)(o,i,n,r)}});var ca=I(ct=>{"use strict";var fy=ct&&ct.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rm=ct&&ct.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&fy(t,e,n)};Object.defineProperty(ct,"__esModule",{value:!0});ct.createProtocolConnection=hy;var my=sa();rm(sa(),ct);rm(te(),ct);function hy(e,t,n,r){return(0,my.createMessageConnection)(e,t,n,r)}});var aa=I(pe=>{"use strict";var gy=pe&&pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),im=pe&&pe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&gy(t,e,n)};Object.defineProperty(pe,"__esModule",{value:!0});pe.ProposedFeatures=pe.NotebookDocuments=pe.TextDocuments=pe.SemanticTokensBuilder=void 0;var py=Oc();Object.defineProperty(pe,"SemanticTokensBuilder",{enumerable:!0,get:function(){return py.SemanticTokensBuilder}});im(te(),pe);var yy=Ac();Object.defineProperty(pe,"TextDocuments",{enumerable:!0,get:function(){return yy.TextDocuments}});var Ty=Fc();Object.defineProperty(pe,"NotebookDocuments",{enumerable:!0,get:function(){return Ty.NotebookDocuments}});im(Uc(),pe);var om;(function(e){e.all={__brand:"features"}})(om||(pe.ProposedFeatures=om={}))});var la=I(Ce=>{"use strict";var um=Ce&&Ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),_y=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lm=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o{try{process.kill(r,0)}catch{Io(),process.exit(Sn?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;ua.number(t)&&fm===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(Sn?0:1)}},3e3)},get shutdownReceived(){return Sn},set shutdownReceived(e){Sn=e},exit:e=>{Io(),process.exit(e)}};function Sy(e,t,n,r){let o,i,s,c;return e!==void 0&&e.__brand==="features"&&(o=e,e=t,t=n,n=r),jt.ConnectionStrategy.is(e)||jt.ConnectionOptions.is(e)?c=e:(i=e,s=t,c=n),Iy(i,s,c,o)}function Iy(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let c,g,d=process.argv.slice(2);for(let h=0;h{Io(),process.exit(Sn?0:1)}),c.on("close",()=>{Io(),process.exit(Sn?0:1)})}let s=c=>{let g=(0,jt.createProtocolConnection)(e,t,c,n);return o&&Dy(c),g};return(0,by.createConnection)(s,Cy,r)}function Dy(e){function t(r){return r.map(o=>typeof o=="string"?o:(0,sm.inspect)(o)).join(" ")}let n=new Map;console.assert=function(o,...i){if(!o)if(i.length===0)e.error("Assertion failed");else{let[s,...c]=i;e.error(`Assertion failed: ${s} ${t(c)}`)}},console.count=function(o="default"){let i=String(o),s=n.get(i)??0;s+=1,n.set(i,s),e.log(`${i}: ${i}`)},console.countReset=function(o){o===void 0?n.clear():n.delete(String(o))},console.debug=function(...o){e.log(t(o))},console.dir=function(o,i){e.log((0,sm.inspect)(o,i))},console.log=function(...o){e.log(t(o))},console.error=function(...o){e.error(t(o))},console.trace=function(...o){let i=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";o.length!==0&&(s+=`: ${t(o)}`),e.log(`${s} -${i}`)},console.warn=function(...o){e.warn(t(o))}}});var pm={};Xa(pm,{TextDocument:()=>da});function fa(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);fa(r,t),fa(o,t);let i=0,s=0,c=0;for(;in.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function wy(e){let t=gm(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Do,da,ym=Ka(()=>{"use strict";Do=class e{constructor(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let o=gm(r.range),i=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(s,this._content.length);let c=Math.max(o.start.line,0),g=Math.max(o.end.line,0),d=this._lineOffsets,h=mm(r.text,!1,i);if(g-c===h.length)for(let m=0,T=h.length;mt?o=s:r=s+1}let i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let o=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],o=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&hm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(o,i,s,c){return new Do(o,i,s,c)}e.create=t;function n(o,i,s){if(o instanceof Do)return o.update(i,s),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(o,i){let s=o.getText(),c=fa(i.map(wy),(h,b)=>{let m=h.range.start.line-b.range.start.line;return m===0?h.range.start.character-b.range.start.character:m}),g=0,d=[];for(let h of c){let b=o.offsetAt(h.range.start);if(bg&&d.push(s.substring(g,b)),h.newText.length&&d.push(h.newText),g=o.offsetAt(h.range.end)}return d.push(s.substr(g)),d.join("")}e.applyEdits=r})(da||(da={}))});var Jn=I(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.DATATYPE_SET=ye.KEYWORD_SET=ye.PUNCTUATION=ye.OPERATORS=ye.DATATYPES=ye.KEYWORDS=void 0;ye.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ye.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ye.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ye.PUNCTUATION=["(",")","[","]",";",",",":","."];ye.KEYWORD_SET=new Set(ye.KEYWORDS);ye.DATATYPE_SET=new Set(ye.DATATYPES)});var tr=I(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.positionAt=ha;er.offsetAt=Py;er.sourceRange=Ry;function ma(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Tm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function _m(e){let t=[0];for(let n=0;n{let m=h.range.start.line-v.range.start.line;return m===0?h.range.start.character-v.range.start.character:m}),d=c.length;for(let h=g.length-1;h>=0;h--){let v=g[h],m=o.offsetAt(v.range.start),T=o.offsetAt(v.range.end);if(T<=d)c=c.substring(0,m)+v.newText+c.substring(T,c.length);else throw new Error("Overlapping edit");d=m}return c}e.applyEdits=r;function i(o,s){if(o.length<=1)return o;let c=o.length/2|0,g=o.slice(0,c),d=o.slice(c);i(g,s),i(d,s);let h=0,v=0,m=0;for(;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Me.create(0,t);for(;rt?i=s:r=s+1}let o=r-1;return Me.create(o,t-n[o])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1"u"}e.undefined=r;function i(T){return T===!0||T===!1}e.boolean=i;function o(T){return t.call(T)==="[object String]"}e.string=o;function s(T){return t.call(T)==="[object Number]"}e.number=s;function c(T,D,N){return t.call(T)==="[object Number]"&&D<=T&&T<=N}e.numberRange=c;function g(T){return t.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}e.integer=g;function d(T){return t.call(T)==="[object Number]"&&0<=T&&T<=2147483647}e.uinteger=d;function h(T){return t.call(T)==="[object Function]"}e.func=h;function v(T){return T!==null&&typeof T=="object"}e.objectLiteral=v;function m(T,D){return Array.isArray(T)&&T.every(D)}e.typedArray=m})(f||(f={}))});var V=S(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CM=he.ProtocolNotificationType=he.ProtocolNotificationType0=he.ProtocolRequestType=he.ProtocolRequestType0=he.RegistrationType=he.MessageDirection=void 0;var cn=tt(),Cu;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Cu||(he.MessageDirection=Cu={}));var Xs=class{____;method;constructor(t){this.method=t}};he.RegistrationType=Xs;var Ys=class extends cn.RequestType0{__;___;____;_pr;constructor(t){super(t)}};he.ProtocolRequestType0=Ys;var Js=class extends cn.RequestType{__;___;____;_pr;constructor(t){super(t,cn.ParameterStructures.byName)}};he.ProtocolRequestType=Js;var Zs=class extends cn.NotificationType0{___;____;constructor(t){super(t)}};he.ProtocolNotificationType0=Zs;var ec=class extends cn.NotificationType{___;____;constructor(t){super(t,cn.ParameterStructures.byName)}};he.ProtocolNotificationType=ec;var Iu;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(Iu||(he.CM=Iu={}))});var Ar=S(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.boolean=yg;Le.string=Su;Le.number=Tg;Le.error=_g;Le.func=vg;Le.array=Du;Le.stringArray=bg;Le.typedArray=Cg;Le.objectLiteral=Ig;function yg(e){return e===!0||e===!1}function Su(e){return typeof e=="string"||e instanceof String}function Tg(e){return typeof e=="number"||e instanceof Number}function _g(e){return e instanceof Error}function vg(e){return typeof e=="function"}function Du(e){return Array.isArray(e)}function bg(e){return Du(e)&&e.every(t=>Su(t))}function Cg(e,t){return Array.isArray(e)&&e.every(t)}function Ig(e){return e!==null&&typeof e=="object"}});var Pu=S(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.ImplementationRequest=void 0;var tc=V(),wu;(function(e){e.method="textDocument/implementation",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.implementation","implementationProvider")})(wu||(Gr.ImplementationRequest=wu={}))});var Ru=S(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.TypeDefinitionRequest=void 0;var nc=V(),ku;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(ku||(jr.TypeDefinitionRequest=ku={}))});var Mu=S(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.DidChangeWorkspaceFoldersNotification=un.WorkspaceFoldersRequest=void 0;var an=V(),Ou;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=an.MessageDirection.serverToClient,e.type=new an.ProtocolRequestType0(e.method),e.capabilities=an.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Ou||(un.WorkspaceFoldersRequest=Ou={}));var xu;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=an.MessageDirection.clientToServer,e.type=new an.ProtocolNotificationType(e.method),e.capabilities=an.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(xu||(un.DidChangeWorkspaceFoldersNotification=xu={}))});var qu=S(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.ConfigurationRequest=void 0;var rc=V(),Eu;(function(e){e.method="workspace/configuration",e.messageDirection=rc.MessageDirection.serverToClient,e.type=new rc.ProtocolRequestType(e.method),e.capabilities=rc.CM.create("workspace.configuration",void 0)})(Eu||(Fr.ConfigurationRequest=Eu={}))});var Gu=S(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.ColorPresentationRequest=dn.DocumentColorRequest=void 0;var ln=V(),Nu;(function(e){e.method="textDocument/documentColor",e.messageDirection=ln.MessageDirection.clientToServer,e.type=new ln.ProtocolRequestType(e.method),e.capabilities=ln.CM.create("textDocument.colorProvider","colorProvider")})(Nu||(dn.DocumentColorRequest=Nu={}));var Au;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=ln.MessageDirection.clientToServer,e.type=new ln.ProtocolRequestType(e.method),e.capabilities=ln.CM.create("textDocument.colorProvider","colorProvider")})(Au||(dn.ColorPresentationRequest=Au={}))});var Lu=S(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.FoldingRangeRefreshRequest=mn.FoldingRangeRequest=void 0;var fn=V(),ju;(function(e){e.method="textDocument/foldingRange",e.messageDirection=fn.MessageDirection.clientToServer,e.type=new fn.ProtocolRequestType(e.method),e.capabilities=fn.CM.create("textDocument.foldingRange","foldingRangeProvider")})(ju||(mn.FoldingRangeRequest=ju={}));var Fu;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=fn.MessageDirection.serverToClient,e.type=new fn.ProtocolRequestType0(e.method),e.capabilities=fn.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Fu||(mn.FoldingRangeRefreshRequest=Fu={}))});var Uu=S(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.DeclarationRequest=void 0;var ic=V(),Wu;(function(e){e.method="textDocument/declaration",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.declaration","declarationProvider")})(Wu||(Lr.DeclarationRequest=Wu={}))});var $u=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.SelectionRangeRequest=void 0;var oc=V(),Hu;(function(e){e.method="textDocument/selectionRange",e.messageDirection=oc.MessageDirection.clientToServer,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Hu||(Wr.SelectionRangeRequest=Hu={}))});var Vu=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.WorkDoneProgressCancelNotification=_t.WorkDoneProgressCreateRequest=_t.WorkDoneProgress=void 0;var Sg=tt(),Un=V(),zu;(function(e){e.type=new Sg.ProgressType;function t(n){return n===e.type}e.is=t})(zu||(_t.WorkDoneProgress=zu={}));var Bu;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Un.MessageDirection.serverToClient,e.type=new Un.ProtocolRequestType(e.method),e.capabilities=Un.CM.create("window.workDoneProgress",void 0)})(Bu||(_t.WorkDoneProgressCreateRequest=Bu={}));var Qu;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Un.MessageDirection.clientToServer,e.type=new Un.ProtocolNotificationType(e.method)})(Qu||(_t.WorkDoneProgressCancelNotification=Qu={}))});var Ju=S(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.CallHierarchyOutgoingCallsRequest=vt.CallHierarchyIncomingCallsRequest=vt.CallHierarchyPrepareRequest=void 0;var rt=V(),Ku;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Ku||(vt.CallHierarchyPrepareRequest=Ku={}));var Xu;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Xu||(vt.CallHierarchyIncomingCallsRequest=Xu={}));var Yu;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=rt.MessageDirection.clientToServer,e.type=new rt.ProtocolRequestType(e.method),e.capabilities=rt.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Yu||(vt.CallHierarchyOutgoingCallsRequest=Yu={}))});var il=S(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.SemanticTokensRefreshRequest=De.SemanticTokensRangeRequest=De.SemanticTokensDeltaRequest=De.SemanticTokensRequest=De.SemanticTokensRegistrationType=De.TokenFormat=void 0;var Oe=V(),Zu;(function(e){e.Relative="relative"})(Zu||(De.TokenFormat=Zu={}));var Hn;(function(e){e.method="textDocument/semanticTokens",e.type=new Oe.RegistrationType(e.method)})(Hn||(De.SemanticTokensRegistrationType=Hn={}));var el;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Hn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(el||(De.SemanticTokensRequest=el={}));var tl;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Hn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(tl||(De.SemanticTokensDeltaRequest=tl={}));var nl;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Oe.MessageDirection.clientToServer,e.type=new Oe.ProtocolRequestType(e.method),e.registrationMethod=Hn.method,e.capabilities=Oe.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(nl||(De.SemanticTokensRangeRequest=nl={}));var rl;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Oe.MessageDirection.serverToClient,e.type=new Oe.ProtocolRequestType0(e.method),e.capabilities=Oe.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(rl||(De.SemanticTokensRefreshRequest=rl={}))});var sl=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.ShowDocumentRequest=void 0;var sc=V(),ol;(function(e){e.method="window/showDocument",e.messageDirection=sc.MessageDirection.serverToClient,e.type=new sc.ProtocolRequestType(e.method),e.capabilities=sc.CM.create("window.showDocument.support",void 0)})(ol||(Ur.ShowDocumentRequest=ol={}))});var al=S(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.LinkedEditingRangeRequest=void 0;var cc=V(),cl;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=cc.MessageDirection.clientToServer,e.type=new cc.ProtocolRequestType(e.method),e.capabilities=cc.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(cl||(Hr.LinkedEditingRangeRequest=cl={}))});var pl=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.WillDeleteFilesRequest=ge.DidDeleteFilesNotification=ge.DidRenameFilesNotification=ge.WillRenameFilesRequest=ge.DidCreateFilesNotification=ge.WillCreateFilesRequest=ge.FileOperationPatternKind=void 0;var se=V(),ul;(function(e){e.file="file",e.folder="folder"})(ul||(ge.FileOperationPatternKind=ul={}));var ll;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(ll||(ge.WillCreateFilesRequest=ll={}));var dl;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(dl||(ge.DidCreateFilesNotification=dl={}));var fl;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(fl||(ge.WillRenameFilesRequest=fl={}));var ml;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(ml||(ge.DidRenameFilesNotification=ml={}));var hl;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolNotificationType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(hl||(ge.DidDeleteFilesNotification=hl={}));var gl;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=se.MessageDirection.clientToServer,e.type=new se.ProtocolRequestType(e.method),e.capabilities=se.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(gl||(ge.WillDeleteFilesRequest=gl={}))});var vl=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.MonikerRequest=bt.MonikerKind=bt.UniquenessLevel=void 0;var ac=V(),yl;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(yl||(bt.UniquenessLevel=yl={}));var Tl;(function(e){e.$import="import",e.$export="export",e.local="local"})(Tl||(bt.MonikerKind=Tl={}));var _l;(function(e){e.method="textDocument/moniker",e.messageDirection=ac.MessageDirection.clientToServer,e.type=new ac.ProtocolRequestType(e.method),e.capabilities=ac.CM.create("textDocument.moniker","monikerProvider")})(_l||(bt.MonikerRequest=_l={}))});var Sl=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.TypeHierarchySubtypesRequest=Ct.TypeHierarchySupertypesRequest=Ct.TypeHierarchyPrepareRequest=void 0;var Nt=V(),bl;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Nt.MessageDirection.clientToServer,e.type=new Nt.ProtocolRequestType(e.method),e.capabilities=Nt.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(bl||(Ct.TypeHierarchyPrepareRequest=bl={}));var Cl;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Nt.MessageDirection.clientToServer,e.type=new Nt.ProtocolRequestType(e.method)})(Cl||(Ct.TypeHierarchySupertypesRequest=Cl={}));var Il;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Nt.MessageDirection.clientToServer,e.type=new Nt.ProtocolRequestType(e.method)})(Il||(Ct.TypeHierarchySubtypesRequest=Il={}))});var Pl=S(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.InlineValueRefreshRequest=gn.InlineValueRequest=void 0;var hn=V(),Dl;(function(e){e.method="textDocument/inlineValue",e.messageDirection=hn.MessageDirection.clientToServer,e.type=new hn.ProtocolRequestType(e.method),e.capabilities=hn.CM.create("textDocument.inlineValue","inlineValueProvider")})(Dl||(gn.InlineValueRequest=Dl={}));var wl;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=hn.MessageDirection.serverToClient,e.type=new hn.ProtocolRequestType0(e.method),e.capabilities=hn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(wl||(gn.InlineValueRefreshRequest=wl={}))});var xl=S(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.InlayHintRefreshRequest=It.InlayHintResolveRequest=It.InlayHintRequest=void 0;var it=V(),kl;(function(e){e.method="textDocument/inlayHint",e.messageDirection=it.MessageDirection.clientToServer,e.type=new it.ProtocolRequestType(e.method),e.capabilities=it.CM.create("textDocument.inlayHint","inlayHintProvider")})(kl||(It.InlayHintRequest=kl={}));var Rl;(function(e){e.method="inlayHint/resolve",e.messageDirection=it.MessageDirection.clientToServer,e.type=new it.ProtocolRequestType(e.method),e.capabilities=it.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Rl||(It.InlayHintResolveRequest=Rl={}));var Ol;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=it.MessageDirection.serverToClient,e.type=new it.ProtocolRequestType0(e.method),e.capabilities=it.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Ol||(It.InlayHintRefreshRequest=Ol={}))});var jl=S(ce=>{"use strict";var Dg=ce&&ce.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),wg=ce&&ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Pg=ce&&ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{"use strict";var Rg=H&&H.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Og=H&&H.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xg=H&&H.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.InlineCompletionRequest=void 0;var dc=V(),Bl;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=dc.MessageDirection.clientToServer,e.type=new dc.ProtocolRequestType(e.method),e.capabilities=dc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Bl||(zr.InlineCompletionRequest=Bl={}))});var Xl=S(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.TextDocumentContentRefreshRequest=yn.TextDocumentContentRequest=void 0;var zn=V(),Vl;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=zn.MessageDirection.clientToServer,e.type=new zn.ProtocolRequestType(e.method),e.capabilities=zn.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Vl||(yn.TextDocumentContentRequest=Vl={}));var Kl;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=zn.MessageDirection.serverToClient,e.type=new zn.ProtocolRequestType(e.method)})(Kl||(yn.TextDocumentContentRefreshRequest=Kl={}))});var df=S(a=>{"use strict";var Mg=a&&a.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Eg=a&&a.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qg=a&&a.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i0}e.hasId=t})(id||(a.StaticRegistrationOptions=id={}));var od;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||gc.is(r.documentSelector))}e.is=t})(od||(a.TextDocumentRegistrationOptions=od={}));var sd;(function(e){function t(r){let i=r;return ae.objectLiteral(i)&&(i.workDoneProgress===void 0||ae.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&ae.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(sd||(a.WorkDoneProgressOptions=sd={}));var cd;(function(e){e.method="initialize",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method)})(cd||(a.InitializeRequest=cd={}));var ad;(function(e){e.unknownProtocolVersion=1})(ad||(a.InitializeErrorCodes=ad={}));var ud;(function(e){e.method="initialized",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method)})(ud||(a.InitializedNotification=ud={}));var ld;(function(e){e.method="shutdown",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType0(e.method)})(ld||(a.ShutdownRequest=ld={}));var dd;(function(e){e.method="exit",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType0(e.method)})(dd||(a.ExitNotification=dd={}));var fd;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeConfiguration",void 0)})(fd||(a.DidChangeConfigurationNotification=fd={}));var md;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(md||(a.MessageType=md={}));var hd;(function(e){e.method="window/showMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(hd||(a.ShowMessageNotification=hd={}));var gd;(function(e){e.method="window/showMessageRequest",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("window.showMessage",void 0)})(gd||(a.ShowMessageRequest=gd={}));var pd;(function(e){e.method="window/logMessage",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(pd||(a.LogMessageNotification=pd={}));var yd;(function(e){e.method="telemetry/event",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method)})(yd||(a.TelemetryEventNotification=yd={}));var Td;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Td||(a.TextDocumentSyncKind=Td={}));var _d;(function(e){e.method="textDocument/didOpen",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(_d||(a.DidOpenTextDocumentNotification=_d={}));var vd;(function(e){function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}e.isIncremental=t;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}e.isFull=n})(vd||(a.TextDocumentContentChangeEvent=vd={}));var bd;(function(e){e.method="textDocument/didChange",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync")})(bd||(a.DidChangeTextDocumentNotification=bd={}));var Cd;(function(e){e.method="textDocument/didClose",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Cd||(a.DidCloseTextDocumentNotification=Cd={}));var Id;(function(e){e.method="textDocument/didSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Id||(a.DidSaveTextDocumentNotification=Id={}));var Sd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Sd||(a.TextDocumentSaveReason=Sd={}));var Dd;(function(e){e.method="textDocument/willSave",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Dd||(a.WillSaveTextDocumentNotification=Dd={}));var wd;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(wd||(a.WillSaveTextDocumentWaitUntilRequest=wd={}));var Pd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("workspace.didChangeWatchedFiles",void 0)})(Pd||(a.DidChangeWatchedFilesNotification=Pd={}));var kd;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(kd||(a.FileChangeType=kd={}));var pc;(function(e){function t(n){let r=n;return ae.objectLiteral(r)&&(Yl.URI.is(r.baseUri)||Yl.WorkspaceFolder.is(r.baseUri))&&ae.string(r.pattern)}e.is=t})(pc||(a.RelativePattern=pc={}));var yc;(function(e){function t(n){let r=n;return ae.string(r)||pc.is(r)}e.is=t})(yc||(a.GlobPattern=yc={}));var Rd;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Rd||(a.WatchKind=Rd={}));var Od;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolNotificationType(e.method),e.capabilities=_.CM.create("textDocument.publishDiagnostics",void 0)})(Od||(a.PublishDiagnosticsNotification=Od={}));var xd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(xd||(a.CompletionTriggerKind=xd={}));var Md;(function(e){e.method="textDocument/completion",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion","completionProvider")})(Md||(a.CompletionRequest=Md={}));var Ed;(function(e){e.method="completionItem/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Ed||(a.CompletionResolveRequest=Ed={}));var qd;(function(e){e.method="textDocument/hover",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.hover","hoverProvider")})(qd||(a.HoverRequest=qd={}));var Nd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Nd||(a.SignatureHelpTriggerKind=Nd={}));var Ad;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Ad||(a.SignatureHelpRequest=Ad={}));var Gd;(function(e){e.method="textDocument/definition",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.definition","definitionProvider")})(Gd||(a.DefinitionRequest=Gd={}));var jd;(function(e){e.method="textDocument/references",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.references","referencesProvider")})(jd||(a.ReferencesRequest=jd={}));var Fd;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Fd||(a.DocumentHighlightRequest=Fd={}));var Ld;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Ld||(a.DocumentSymbolRequest=Ld={}));var Wd;(function(e){e.method="textDocument/codeAction",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction","codeActionProvider")})(Wd||(a.CodeActionRequest=Wd={}));var Ud;(function(e){e.method="codeAction/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Ud||(a.CodeActionResolveRequest=Ud={}));var Hd;(function(e){e.method="workspace/symbol",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol","workspaceSymbolProvider")})(Hd||(a.WorkspaceSymbolRequest=Hd={}));var $d;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})($d||(a.WorkspaceSymbolResolveRequest=$d={}));var zd;(function(e){e.method="textDocument/codeLens",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens","codeLensProvider")})(zd||(a.CodeLensRequest=zd={}));var Bd;(function(e){e.method="codeLens/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Bd||(a.CodeLensResolveRequest=Bd={}));var Qd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType0(e.method),e.capabilities=_.CM.create("workspace.codeLens",void 0)})(Qd||(a.CodeLensRefreshRequest=Qd={}));var Vd;(function(e){e.method="textDocument/documentLink",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider")})(Vd||(a.DocumentLinkRequest=Vd={}));var Kd;(function(e){e.method="documentLink/resolve",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Kd||(a.DocumentLinkResolveRequest=Kd={}));var Xd;(function(e){e.method="textDocument/formatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.formatting","documentFormattingProvider")})(Xd||(a.DocumentFormattingRequest=Xd={}));var Yd;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Yd||(a.DocumentRangeFormattingRequest=Yd={}));var Jd;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Jd||(a.DocumentRangesFormattingRequest=Jd={}));var Zd;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Zd||(a.DocumentOnTypeFormattingRequest=Zd={}));var ef;(function(e){e.Identifier=1})(ef||(a.PrepareSupportDefaultBehavior=ef={}));var tf;(function(e){e.method="textDocument/rename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename","renameProvider")})(tf||(a.RenameRequest=tf={}));var nf;(function(e){e.method="textDocument/prepareRename",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(nf||(a.PrepareRenameRequest=nf={}));var rf;(function(e){e.method="workspace/executeCommand",e.messageDirection=_.MessageDirection.clientToServer,e.type=new _.ProtocolRequestType(e.method),e.capabilities=_.CM.create("workspace.executeCommand","executeCommandProvider")})(rf||(a.ExecuteCommandRequest=rf={}));var of;(function(e){e.method="workspace/applyEdit",e.messageDirection=_.MessageDirection.serverToClient,e.type=new _.ProtocolRequestType("workspace/applyEdit"),e.capabilities=_.CM.create("workspace.applyEdit",void 0)})(of||(a.ApplyWorkspaceEditRequest=of={}))});var mf=S(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.createProtocolConnection=Hg;var ff=tt();function Hg(e,t,n,r){return ff.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,ff.createMessageConnection)(e,t,n,r)}});var te=S(we=>{"use strict";var $g=we&&we.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Br=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&$g(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.LSPErrorCodes=we.createProtocolConnection=void 0;Br(tt(),we);Br((Nr(),ar(qr)),we);Br(V(),we);Br(df(),we);var zg=mf();Object.defineProperty(we,"createProtocolConnection",{enumerable:!0,get:function(){return zg.createProtocolConnection}});var hf;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(hf||(we.LSPErrorCodes=hf={}))});var Dc=S(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.empty=void 0;St.v4=gf;St.isUUID=pf;St.parse=Qg;St.generateUuid=Vg;var Qn=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Sc=class e extends Qn{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};St.empty=new Qn("00000000-0000-0000-0000-000000000000");function gf(){return new Sc}var Bg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function pf(e){return Bg.test(e)}function Qg(e){if(!pf(e))throw new Error("invalid uuid");return new Qn(e)}function Vg(){return gf().asHex()}});var yf=S(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.ProgressFeature=void 0;vn.attachWorkDone=Xg;vn.attachPartialResult=Jg;var Dt=te(),Kg=Dc(),_n=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,i){let o={kind:"begin",title:t,message:r,cancellable:i};typeof n=="number"&&(o.percentage=Math.round(n)),this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,o)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Dt.WorkDoneProgress.type,this._token,{kind:"end"})}},Qr=class extends _n{_source;constructor(t,n){super(t,n),this._source=new Dt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Vn=class{constructor(){}begin(){}report(){}done(){}},Vr=class extends Vn{_source;constructor(){super(),this._source=new Dt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Xg(e,t){if(t===void 0||t.workDoneToken===void 0)return new Vn;let n=t.workDoneToken;return delete t.workDoneToken,new _n(e,n)}var Yg=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Dt.WorkDoneProgressCancelNotification.type,n=>{let r=_n.Instances.get(n.token);(r instanceof Qr||r instanceof Vr)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Vn:new _n(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,Kg.generateUuid)();return this.connection.sendRequest(Dt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new Qr(this.connection,t))}else return Promise.resolve(new Vr)}};vn.ProgressFeature=Yg;var wc;(function(e){e.type=new Dt.ProgressType})(wc||(wc={}));var Pc=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(wc.type,this._token,t)}};function Jg(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Pc(e,n)}});var Tf=S(Xe=>{"use strict";var Zg=Xe&&Xe.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ep=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tp=Xe&&Xe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;iclass extends e{getConfiguration(t){return t?rp.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(np.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};Xe.ConfigurationFeature=ip});var _f=S(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.WorkspaceFoldersFeature=void 0;var Kr=te(),op=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Kr.Emitter,this.connection.onNotification(Kr.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Kr.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Kr.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Xr.WorkspaceFoldersFeature=op});var vf=S(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.CallHierarchyFeature=void 0;var kc=te(),sp=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(kc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=kc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=kc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Yr.CallHierarchyFeature=sp});var Oc=S(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.SemanticTokensBuilder=wt.SemanticTokensDiff=wt.SemanticTokensFeature=void 0;var Jr=te(),cp=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Jr.SemanticTokensRefreshRequest.type),on:t=>{let n=Jr.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Jr.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Jr.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};wt.SemanticTokensFeature=cp;var Zr=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i0&&(s-=this._prevLine,s===0&&(c-=this._prevChar));let g=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;g[this._dataLen++]=s,g[this._dataLen++]=c,g[this._dataLen++]=r,g[this._dataLen++]=i,g[this._dataLen++]=o,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,i=0,o=[];for(let s=0;s{let d=t[5*c],h=t[5*g];if(d===h){let v=t[5*c+1],m=t[5*g+1];return v-m}return d-h});let i=[],o=0,s=0;for(let c=0;c{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.ShowDocumentFeature=void 0;var ap=te(),up=e=>class extends e{showDocument(t){return this.connection.sendRequest(ap.ShowDocumentRequest.type,t)}};ei.ShowDocumentFeature=up});var Cf=S(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.FileOperationsFeature=void 0;var bn=te(),lp=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(bn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(bn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(bn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(bn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(bn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(bn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};ti.FileOperationsFeature=lp});var If=S(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.LinkedEditingRangeFeature=void 0;var dp=te(),fp=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(dp.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};ni.LinkedEditingRangeFeature=fp});var Sf=S(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.TypeHierarchyFeature=void 0;var xc=te(),mp=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(xc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=xc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=xc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ri.TypeHierarchyFeature=mp});var wf=S(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.InlineValueFeature=void 0;var Df=te(),hp=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Df.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Df.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};ii.InlineValueFeature=hp});var kf=S(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.FoldingRangeFeature=void 0;var Pf=te(),gp=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(Pf.FoldingRangeRefreshRequest.type),on:t=>{let n=Pf.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};oi.FoldingRangeFeature=gp});var Rf=S(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.InlayHintFeature=void 0;var Mc=te(),pp=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Mc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Mc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Mc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};si.InlayHintFeature=pp});var Of=S(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.DiagnosticFeature=void 0;var Kn=te(),yp=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Kn.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Kn.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Kn.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Kn.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Kn.WorkspaceDiagnosticRequest.partialResult,n)))}}};ci.DiagnosticFeature=yp});var qc=S(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.TextDocuments=void 0;var Gt=te(),Ec=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Gt.Emitter,this._onDidOpen=new Gt.Emitter,this._onDidClose=new Gt.Emitter,this._onDidSave=new Gt.Emitter,this._onWillSave=new Gt.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Gt.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let c=this._syncedDocuments.get(i.uri);c!==void 0&&(c=this._configuration.update(c,o,s),this._syncedDocuments.set(i.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),n.push(t.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(t.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(t.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Gt.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};ai.TextDocuments=Ec});var Gc=S(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.NotebookDocuments=Cn.NotebookSyncFeature=void 0;var Ee=te(),xf=qc(),Tp=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(Ee.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(Ee.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(Ee.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(Ee.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};Cn.NotebookSyncFeature=Tp;var Nc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,Ee.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Ee.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Ee.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},Ac=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof xf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new xf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Ee.Emitter,this._onDidChange=new Ee.Emitter,this._onDidSave=new Ee.Emitter,this._onDidClose=new Ee.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Nc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)await n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,c=!1,g=i.change;g.metadata!==void 0&&(c=!0,o.metadata=g.metadata);let d=[],h=[],v=[],m=[];if(g.cells!==void 0){let x=g.cells;if(x.structure!==void 0){let p=x.structure.array;if(o.cells.splice(p.start,p.deleteCount,...p.cells!==void 0?p.cells:[]),x.structure.didOpen!==void 0)for(let l of x.structure.didOpen)await n.openTextDocument({textDocument:l}),d.push(l.uri);if(x.structure.didClose)for(let l of x.structure.didClose)await n.closeTextDocument({textDocument:l}),h.push(l.uri)}if(x.data!==void 0){let p=new Map(x.data.map(l=>[l.document,l]));for(let l=0;l<=o.cells.length;l++){let C=p.get(o.cells[l].document);if(C!==void 0){let P=o.cells.splice(l,1,C);if(v.push({old:P[0],new:C}),p.delete(C.document),p.size===0)break}}}if(x.textContent!==void 0)for(let p of x.textContent)await n.changeTextDocument({textDocument:p.document,contentChanges:p.changes}),m.push(p.document.uri)}this.updateCellMap(o);let T={notebookDocument:o};c&&(T.metadata={old:s,new:o.metadata});let D=[];for(let x of d)D.push(this.getNotebookCell(x));let N=[];for(let x of h)N.push(this.getNotebookCell(x));let A=[];for(let x of m)A.push(this.getNotebookCell(x));(D.length>0||N.length>0||v.length>0||A.length>0)&&(T.cells={added:D,removed:N,changed:{data:v,textContent:A}}),(T.metadata!==void 0||T.cells!==void 0)&&this._onDidChange.fire(T)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),Ee.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};Cn.NotebookDocuments=Ac});var Mf=S(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.MonikerFeature=void 0;var _p=te(),vp=e=>class extends e{get moniker(){return{on:t=>{let n=_p.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ui.MonikerFeature=vp});var Ef=S(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.InlineCompletionFeature=void 0;var bp=te(),Cp=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(bp.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};li.InlineCompletionFeature=Cp});var Nf=S(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.TextDocumentContentFeature=void 0;var qf=te(),Ip=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(qf.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(qf.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};di.TextDocumentContentFeature=Ip});var Hc=S($=>{"use strict";var Sp=$&&$.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Dp=$&&$.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Uf=$&&$.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{t.window.showErrorMessage(n)})}};$.ErrorMessageTracker=Lc;var fi=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(w.MessageType.Error,t)}warn(t){this.send(w.MessageType.Warning,t)}info(t){this.send(w.MessageType.Info,t)}log(t){this.send(w.MessageType.Log,t)}debug(t){this.send(w.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(w.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,w.RAL)().console.error("Sending log message failed")})}},Wc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:w.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(jc)}showWarningMessage(t,...n){let r={type:w.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(jc)}showInformationMessage(t,...n){let r={type:w.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(w.ShowMessageRequest.type,r).then(jc)}},Af=(0,Op.ShowDocumentFeature)((0,q.ProgressFeature)(Wc)),Gf;(function(e){function t(){return new mi}e.create=t})(Gf||($.BulkRegistration=Gf={}));var mi=class{_registrations=[];_registered=new Set;add(t,n){let r=qe.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Fc.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},jf;(function(e){function t(){return new Xn(void 0,[])}e.create=t})(jf||($.BulkUnregistration=jf={}));var Xn=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(w.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=qe.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(w.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},hi=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof mi?this.registerMany(t):t instanceof Xn?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=qe.string(n)?n:n.method,o=Fc.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(w.RegistrationRequest.type,s).then(c=>(t.add({id:o,method:i}),t),c=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(c)))}registerSingle2(t,n){let r=qe.string(t)?t:t.method,i=Fc.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(w.RegistrationRequest.type,o).then(s=>w.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(w.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(w.RegistrationRequest.type,n).then(()=>new Xn(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Uc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(i){return i&&!!i.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(w.ApplyWorkspaceEditRequest.type,r)}},Ff=(0,Wp.TextDocumentContentFeature)((0,xp.FileOperationsFeature)((0,Pp.WorkspaceFoldersFeature)((0,wp.ConfigurationFeature)(Uc)))),gi=class{_trace;_connection;constructor(){this._trace=w.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==w.Trace.Off&&this.connection.sendNotification(w.LogTraceNotification.type,{message:t,verbose:this._trace===w.Trace.Verbose?n:void 0}).catch(()=>{})}},pi=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(w.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},yi=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,q.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,q.attachPartialResult)(this.connection,n)}};$._LanguagesImpl=yi;var Lf=(0,Lp.InlineCompletionFeature)((0,Np.FoldingRangeFeature)((0,Fp.MonikerFeature)((0,Gp.DiagnosticFeature)((0,Ap.InlayHintFeature)((0,qp.InlineValueFeature)((0,Ep.TypeHierarchyFeature)((0,Mp.LinkedEditingRangeFeature)((0,Rp.SemanticTokensFeature)((0,kp.CallHierarchyFeature)(yi)))))))))),Ti=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,q.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,q.attachPartialResult)(this.connection,n)}};$._NotebooksImpl=Ti;var Wf=(0,jp.NotebookSyncFeature)(Ti);function Hf(e,t){return function(n){return t(e(n))}}function $f(e,t){return function(n){return t(e(n))}}function zf(e,t){return function(n){return t(e(n))}}function Bf(e,t){return function(n){return t(e(n))}}function Qf(e,t){return function(n){return t(e(n))}}function Vf(e,t){return function(n){return t(e(n))}}function Kf(e,t){return function(n){return t(e(n))}}function Xf(e,t){return function(n){return t(e(n))}}function Up(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,Hf),tracer:n(e.tracer,t.tracer,zf),telemetry:n(e.telemetry,t.telemetry,$f),client:n(e.client,t.client,Bf),window:n(e.window,t.window,Qf),workspace:n(e.workspace,t.workspace,Vf),languages:n(e.languages,t.languages,Kf),notebooks:n(e.notebooks,t.notebooks,Xf)}}function Hp(e,t,n){let r=n&&n.console?new(n.console(fi)):new fi,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(gi)):new gi,s=n&&n.telemetry?new(n.telemetry(pi)):new pi,c=n&&n.client?new(n.client(hi)):new hi,g=n&&n.window?new(n.window(Af)):new Af,d=n&&n.workspace?new(n.workspace(Ff)):new Ff,h=n&&n.languages?new(n.languages(Lf)):new Lf,v=n&&n.notebooks?new(n.notebooks(Wf)):new Wf,m=[r,o,s,c,g,d,h,v];function T(p){return p instanceof Promise?p:qe.thenable(p)?new Promise((l,C)=>{p.then(P=>l(P),P=>C(P))}):Promise.resolve(p)}let D,N,A,x={listen:()=>i.listen(),sendRequest:(p,...l)=>i.sendRequest(qe.string(p)?p:p.method,...l),onRequest:(p,l)=>i.onRequest(p,l),sendNotification:(p,l)=>{let C=qe.string(p)?p:p.method;return i.sendNotification(C,l)},onNotification:(p,l)=>i.onNotification(p,l),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:p=>(N=p,{dispose:()=>{N=void 0}}),onInitialized:p=>i.onNotification(w.InitializedNotification.type,p),onShutdown:p=>(D=p,{dispose:()=>{D=void 0}}),onExit:p=>(A=p,{dispose:()=>{A=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return c},get window(){return g},get workspace(){return d},get languages(){return h},get notebooks(){return v},onDidChangeConfiguration:p=>i.onNotification(w.DidChangeConfigurationNotification.type,p),onDidChangeWatchedFiles:p=>i.onNotification(w.DidChangeWatchedFilesNotification.type,p),__textDocumentSync:void 0,onDidOpenTextDocument:p=>i.onNotification(w.DidOpenTextDocumentNotification.type,p),onDidChangeTextDocument:p=>i.onNotification(w.DidChangeTextDocumentNotification.type,p),onDidCloseTextDocument:p=>i.onNotification(w.DidCloseTextDocumentNotification.type,p),onWillSaveTextDocument:p=>i.onNotification(w.WillSaveTextDocumentNotification.type,p),onWillSaveTextDocumentWaitUntil:p=>i.onRequest(w.WillSaveTextDocumentWaitUntilRequest.type,p),onDidSaveTextDocument:p=>i.onNotification(w.DidSaveTextDocumentNotification.type,p),sendDiagnostics:p=>i.sendNotification(w.PublishDiagnosticsNotification.type,p),onHover:p=>i.onRequest(w.HoverRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),void 0)),onCompletion:p=>i.onRequest(w.CompletionRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onCompletionResolve:p=>i.onRequest(w.CompletionResolveRequest.type,p),onSignatureHelp:p=>i.onRequest(w.SignatureHelpRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),void 0)),onDeclaration:p=>i.onRequest(w.DeclarationRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onDefinition:p=>i.onRequest(w.DefinitionRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onTypeDefinition:p=>i.onRequest(w.TypeDefinitionRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onImplementation:p=>i.onRequest(w.ImplementationRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onReferences:p=>i.onRequest(w.ReferencesRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onDocumentHighlight:p=>i.onRequest(w.DocumentHighlightRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onDocumentSymbol:p=>i.onRequest(w.DocumentSymbolRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onWorkspaceSymbol:p=>i.onRequest(w.WorkspaceSymbolRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onWorkspaceSymbolResolve:p=>i.onRequest(w.WorkspaceSymbolResolveRequest.type,p),onCodeAction:p=>i.onRequest(w.CodeActionRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onCodeActionResolve:p=>i.onRequest(w.CodeActionResolveRequest.type,(l,C)=>p(l,C)),onCodeLens:p=>i.onRequest(w.CodeLensRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onCodeLensResolve:p=>i.onRequest(w.CodeLensResolveRequest.type,(l,C)=>p(l,C)),onDocumentFormatting:p=>i.onRequest(w.DocumentFormattingRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),void 0)),onDocumentRangeFormatting:p=>i.onRequest(w.DocumentRangeFormattingRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),void 0)),onDocumentOnTypeFormatting:p=>i.onRequest(w.DocumentOnTypeFormattingRequest.type,(l,C)=>p(l,C)),onRenameRequest:p=>i.onRequest(w.RenameRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),void 0)),onPrepareRename:p=>i.onRequest(w.PrepareRenameRequest.type,(l,C)=>p(l,C)),onDocumentLinks:p=>i.onRequest(w.DocumentLinkRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onDocumentLinkResolve:p=>i.onRequest(w.DocumentLinkResolveRequest.type,(l,C)=>p(l,C)),onDocumentColor:p=>i.onRequest(w.DocumentColorRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onColorPresentation:p=>i.onRequest(w.ColorPresentationRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onFoldingRanges:p=>i.onRequest(w.FoldingRangeRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onSelectionRanges:p=>i.onRequest(w.SelectionRangeRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),(0,q.attachPartialResult)(i,l))),onExecuteCommand:p=>i.onRequest(w.ExecuteCommandRequest.type,(l,C)=>p(l,C,(0,q.attachWorkDone)(i,l),void 0)),dispose:()=>i.dispose()};for(let p of m)p.attach(x);return i.onRequest(w.InitializeRequest.type,p=>{t.initialize(p),qe.string(p.trace)&&(o.trace=w.Trace.fromString(p.trace));for(let l of m)l.initialize(p.capabilities);if(N){let l=N(p,new w.CancellationTokenSource().token,(0,q.attachWorkDone)(i,p),void 0);return T(l).then(C=>{if(C instanceof w.ResponseError)return C;let P=C;P||(P={capabilities:{}});let M=P.capabilities;M||(M={},P.capabilities=M),M.textDocumentSync===void 0||M.textDocumentSync===null?M.textDocumentSync=qe.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None:!qe.number(M.textDocumentSync)&&!qe.number(M.textDocumentSync.change)&&(M.textDocumentSync.change=qe.number(x.__textDocumentSync)?x.__textDocumentSync:w.TextDocumentSyncKind.None);for(let W of m)W.fillServerCapabilities(M);return P})}else{let l={capabilities:{textDocumentSync:w.TextDocumentSyncKind.None}};for(let C of m)C.fillServerCapabilities(l.capabilities);return l}}),i.onRequest(w.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,D)return D(new w.CancellationTokenSource().token)}),i.onNotification(w.ExitNotification.type,()=>{try{if(A)return A()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(w.SetTraceNotification.type,p=>{o.trace=w.Trace.fromString(p.value)}),x}});var Yf=S(be=>{"use strict";var $p=be&&be.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),zp=be&&be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vc=be&&be.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i1){let r=n[0],i=n[1];r.length===0&&i.length>1&&i[1]===":"&&n.shift()}return Ue.normalize(n.join("/"))}function zc(){return process.platform==="win32"}function _i(e,t,n,r){let i="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,c)=>{let g=process.env,d=Object.create(null);Object.keys(g).forEach(h=>d[h]=g[h]),t&&$c.existsSync(t)&&(d[i]?d[i]=t+Ue.delimiter+d[i]:d[i]=t,r&&r(`NODE_PATH value is: ${d[i]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let h=(0,Kc.fork)("",[],{cwd:n,env:d,execArgv:["-e",o]});if(h.pid===void 0){c(new Error(`Starting process to resolve node module ${e} failed`));return}h.on("error",m=>{c(m)}),h.on("message",m=>{m.c==="r"&&(h.send({c:"e"}),m.s?s(m.r):c(new Error(`Failed to resolve module: ${e}`)))});let v={c:"rs",a:e};h.send(v)}catch(h){c(h)}})}function Bc(e){let t="npm",n=Object.create(null);Object.keys(process.env).forEach(o=>n[o]=process.env[o]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};zc()&&(t="npm.cmd",r.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let o=(0,Kc.spawnSync)(t,["config","get","prefix"],r).stdout;if(!o){e&&e("'npm config get prefix' didn't return a value.");return}let s=o.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?zc()?Ue.join(s,"node_modules"):Ue.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",i)}}function Vp(e){let t="yarn",n={encoding:"utf8"};zc()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let i=(0,Kc.spawnSync)(t,["global","dir","--json"],n),o=i.stdout;if(!o){e&&(e("'yarn global dir' didn't return a value."),i.stderr&&e(i.stderr));return}let s=o.trim().split(/\r?\n/);for(let c of s)try{let g=JSON.parse(c);if(g.type==="log")return Ue.join(g.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var Qc;(function(e){let t;function n(){return t!==void 0||(process.platform==="win32"?t=!1:t=!$c.existsSync(__filename.toUpperCase())||!$c.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=n;function r(i,o){return n()?Ue.normalize(o).indexOf(Ue.normalize(i))===0:Ue.normalize(o).toLowerCase().indexOf(Ue.normalize(i).toLowerCase())===0}e.isParent=r})(Qc||(be.FileSystem=Qc={}));function Kp(e,t,n,r){return n?(Ue.isAbsolute(n)||(n=Ue.join(e,n)),_i(t,n,n,r).then(i=>Qc.isParent(n,i)?i:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,i=>_i(t,Bc(r),e,r))):_i(t,Bc(r),e,r)}});var em=S(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var Jf=require("util"),st=tt(),Xc=class e extends st.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,n){return t instanceof Buffer?t.toString(n):new Jf.TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}},Yc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),st.Disposable.create(()=>this.stream.off("data",t))}},Jc=class{stream;constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),st.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),st.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),st.Disposable.create(()=>this.stream.off("end",t))}write(t,n){return new Promise((r,i)=>{let o=s=>{s==null?r():i(s)};typeof t=="string"?this.stream.write(t,n,o):this.stream.write(t,o)})}end(){this.stream.end()}},Zf=Object.freeze({messageBuffer:Object.freeze({create:e=>new Xc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Jf.TextDecoder(t.charset).decode(e)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:e=>new Yc(e),asWritableStream:e=>new Jc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Zc(){return Zf}(function(e){function t(){st.RAL.install(Zf)}e.install=t})(Zc||(Zc={}));ea.default=Zc});var sa=S(G=>{"use strict";var nm=G&&G.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Xp=G&&G.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),oa=G&&G.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;ithis.fireError(r)),n.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),xe.Disposable.create(()=>this.process.off("message",t))}};G.IPCMessageReader=ta;var na=class extends xe.AbstractMessageWriter{process;errorCount;constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.IPCMessageWriter=na;var ra=class extends xe.AbstractMessageReader{onData;constructor(t){super(),this.onData=new xe.Emitter,t.on("close",()=>this.fireClose),t.on("error",n=>this.fireError(n)),t.on("message",n=>{this.onData.fire(n)})}listen(t){return this.onData.event(t)}};G.PortMessageReader=ra;var ia=class extends xe.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};G.PortMessageWriter=ia;var jt=class extends xe.ReadableStreamMessageReader{constructor(t,n="utf-8"){super((0,Yn.default)().stream.asReadableStream(t),n)}};G.SocketMessageReader=jt;var Ft=class extends xe.WriteableStreamMessageWriter{socket;constructor(t,n){super((0,Yn.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};G.SocketMessageWriter=Ft;var vi=class extends xe.ReadableStreamMessageReader{constructor(t,n){super((0,Yn.default)().stream.asReadableStream(t),n)}};G.StreamMessageReader=vi;var bi=class extends xe.WriteableStreamMessageWriter{constructor(t,n){super((0,Yn.default)().stream.asWritableStream(t),n)}};G.StreamMessageWriter=bi;var ny=process.env.XDG_RUNTIME_DIR,ry=new Map([["linux",107],["darwin",102]]);function iy(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,tm.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,n=ty.realpathSync(ny??ey.tmpdir()),r=ry.get(process.platform);if(r!==void 0&&(e=Math.min(r-n.length-t,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);let i=(0,tm.randomBytes)(Math.floor(e/2)).toString("hex");return Zp.join(n,`lsp-${i}.sock`)}function oy(e,t="utf-8"){let n,r=new Promise((i,o)=>{n=i});return new Promise((i,o)=>{let s=(0,Ci.createServer)(c=>{s.close(),n([new jt(c,t),new Ft(c,t)])});s.on("error",o),s.listen(e,()=>{s.removeListener("error",o),i({onConnected:()=>r})})})}function sy(e,t="utf-8"){let n=(0,Ci.createConnection)(e);return[new jt(n,t),new Ft(n,t)]}function cy(e,t="utf-8"){let n,r=new Promise((i,o)=>{n=i});return new Promise((i,o)=>{let s=(0,Ci.createServer)(c=>{s.close(),n([new jt(c,t),new Ft(c,t)])});s.on("error",o),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",o),i({onConnected:()=>r})})})}function ay(e,t="utf-8"){let n=(0,Ci.createConnection)(e,"127.0.0.1");return[new jt(n,t),new Ft(n,t)]}function uy(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function ly(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function dy(e,t,n,r){n||(n=xe.NullLogger);let i=uy(e)?new vi(e):e,o=ly(t)?new bi(t):t;return xe.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,xe.createMessageConnection)(i,o,n,r)}});var ca=S(ct=>{"use strict";var fy=ct&&ct.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),rm=ct&&ct.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&fy(t,e,n)};Object.defineProperty(ct,"__esModule",{value:!0});ct.createProtocolConnection=hy;var my=sa();rm(sa(),ct);rm(te(),ct);function hy(e,t,n,r){return(0,my.createMessageConnection)(e,t,n,r)}});var aa=S(pe=>{"use strict";var gy=pe&&pe.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),om=pe&&pe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&gy(t,e,n)};Object.defineProperty(pe,"__esModule",{value:!0});pe.ProposedFeatures=pe.NotebookDocuments=pe.TextDocuments=pe.SemanticTokensBuilder=void 0;var py=Oc();Object.defineProperty(pe,"SemanticTokensBuilder",{enumerable:!0,get:function(){return py.SemanticTokensBuilder}});om(te(),pe);var yy=qc();Object.defineProperty(pe,"TextDocuments",{enumerable:!0,get:function(){return yy.TextDocuments}});var Ty=Gc();Object.defineProperty(pe,"NotebookDocuments",{enumerable:!0,get:function(){return Ty.NotebookDocuments}});om(Hc(),pe);var im;(function(e){e.all={__brand:"features"}})(im||(pe.ProposedFeatures=im={}))});var la=S(Ce=>{"use strict";var um=Ce&&Ce.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),_y=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lm=Ce&&Ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i{try{process.kill(r,0)}catch{Ii(),process.exit(In?0:1)}},3e3))}catch{}}for(let n=2;n{let t=e.processId;ua.number(t)&&fm===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(In?0:1)}},3e3)},get shutdownReceived(){return In},set shutdownReceived(e){In=e},exit:e=>{Ii(),process.exit(e)}};function Iy(e,t,n,r){let i,o,s,c;return e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),Lt.ConnectionStrategy.is(e)||Lt.ConnectionOptions.is(e)?c=e:(o=e,s=t,c=n),Sy(o,s,c,i)}function Sy(e,t,n,r){let i=!1;if(!e&&!t&&process.argv.length>2){let c,g,d=process.argv.slice(2);for(let h=0;h{Ii(),process.exit(In?0:1)}),c.on("close",()=>{Ii(),process.exit(In?0:1)})}let s=c=>{let g=(0,Lt.createProtocolConnection)(e,t,c,n);return i&&Dy(c),g};return(0,vy.createConnection)(s,Cy,r)}function Dy(e){function t(r){return r.map(i=>typeof i=="string"?i:(0,sm.inspect)(i)).join(" ")}let n=new Map;console.assert=function(i,...o){if(!i)if(o.length===0)e.error("Assertion failed");else{let[s,...c]=o;e.error(`Assertion failed: ${s} ${t(c)}`)}},console.count=function(i="default"){let o=String(i),s=n.get(o)??0;s+=1,n.set(o,s),e.log(`${o}: ${o}`)},console.countReset=function(i){i===void 0?n.clear():n.delete(String(i))},console.debug=function(...i){e.log(t(i))},console.dir=function(i,o){e.log((0,sm.inspect)(i,o))},console.log=function(...i){e.log(t(i))},console.error=function(...i){e.error(t(i))},console.trace=function(...i){let o=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";i.length!==0&&(s+=`: ${t(i)}`),e.log(`${s} +${o}`)},console.warn=function(...i){e.warn(t(i))}}});var pm={};Xa(pm,{TextDocument:()=>da});function fa(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);fa(r,t),fa(i,t);let o=0,s=0,c=0;for(;on.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function wy(e){let t=gm(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Si,da,ym=Ka(()=>{"use strict";Si=class e{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let i=gm(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let c=Math.max(i.start.line,0),g=Math.max(i.end.line,0),d=this._lineOffsets,h=mm(r.text,!1,o);if(g-c===h.length)for(let m=0,T=h.length;mt?i=s:r=s+1}let o=r-1;return t=this.ensureBeforeEOL(t,n[o]),{line:o,character:t-n[o]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let i=t.line+1=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[t],i=t+1=n.length)return"";if(t<0)return"";let r=t+1n&&hm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(i,o,s,c){return new Si(i,o,s,c)}e.create=t;function n(i,o,s){if(i instanceof Si)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,o){let s=i.getText(),c=fa(o.map(wy),(h,v)=>{let m=h.range.start.line-v.range.start.line;return m===0?h.range.start.character-v.range.start.character:m}),g=0,d=[];for(let h of c){let v=i.offsetAt(h.range.start);if(vg&&d.push(s.substring(g,v)),h.newText.length&&d.push(h.newText),g=i.offsetAt(h.range.end)}return d.push(s.substr(g)),d.join("")}e.applyEdits=r})(da||(da={}))});var Zn=S(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.DATATYPE_SET=ye.KEYWORD_SET=ye.PUNCTUATION=ye.OPERATORS=ye.DATATYPES=ye.KEYWORDS=void 0;ye.KEYWORDS=["ABS","AND","AS","ATN","CALL","COS","DIM","EACH","ELSE","ENDIF","EOF","EXIT","EXP","FALSE","FOR","FRAC","IF","IN","INT","IS","LOG","MOD","NEXT","NOT","NULL","OR","RETURN","RND","ROUND","SHL","SHR","SIN","SQR","SQRT","STEP","TAN","THEN","TO","TRUE","WHILE","XOR"];ye.DATATYPES=["DISCRETE","INTEGER","MESSAGE","REAL"];ye.OPERATORS=["==","<>","<=",">=","->","=","+","-","<",">","*","/","%","!","~","|"];ye.PUNCTUATION=["(",")","[","]",";",",",":","."];ye.KEYWORD_SET=new Set(ye.KEYWORDS);ye.DATATYPE_SET=new Set(ye.DATATYPES)});var tr=S(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.positionAt=ha;er.offsetAt=ky;er.sourceRange=Ry;function ma(e,t){if(!Number.isInteger(t)||t<0||t>e.length)throw new RangeError(`Offset ${t} is outside the source.`)}function Tm(e,t){if(!Number.isInteger(t)||t<0)throw new RangeError(`${e} ${t} must be a non-negative integer.`)}function _m(e){let t=[0];for(let n=0;n=t.length)return e.length;let r=t[n+1];return e[r-1]===` -`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ha(e,t){ma(e,t);let n=_m(e),r=0,o=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],o=ky(e,n,t.line),i=r+t.character;if(i>o)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return i}function Ry(e,t){if(ma(e,t.start),ma(e,t.end),t.end{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.TokenKind=void 0;var bm;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(bm||(wo.TokenKind=bm={}))});var rr=I(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.tokenize=xy;var Po=Jn(),ke=at();function vm(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function nr(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function ko(e){return e!==void 0&&/[0-9]/.test(e)}function Oy(e){let t=e.toUpperCase();return Po.DATATYPE_SET.has(t)?ke.TokenKind.Datatype:Po.KEYWORD_SET.has(t)?ke.TokenKind.Keyword:ke.TokenKind.Identifier}function xy(e){let t=[],n=0,r=0,o=0,i=()=>({line:r,character:o}),s=d=>{for(;n{let b=n,m=i();s(h),t.push({kind:d,lexeme:e.slice(b,h),span:{start:b,end:h},range:{start:m,end:i()}})};for(;ne.startsWith(m,n));if(h!==void 0){c(ke.TokenKind.Operator,n+h.length);continue}if(Po.PUNCTUATION.includes(d)){c(ke.TokenKind.Punctuation,n+1);continue}let b=e.codePointAt(n);c(ke.TokenKind.Unknown,n+(b!==void 0&&b>65535?2:1))}let g=i();return t.push({kind:ke.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:g,end:{...g}}}),t}});var ya=I(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.extractDocumentMetadata=zy;var Wt=tr(),My=at(),Ey=rr(),Cm="[\\p{L}_$#][\\p{L}\\p{N}_$#-]*",Ay=/^[ \t]*@([A-Za-z]+)(?:[ \t]+([^\r\n]*?))?[ \t]*$/gmu,qy=/^[ \t]*(Type|Name|Description|Trigger|Event|Shortcut|Returns?|Tagname\[\.field\]|Condition|Condition Type)[ \t]*:[ \t]*([^\r\n]*?)[ \t]*$/gimu,Ny=new RegExp(`^[ \\t]*(DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${Cm})(?:[ \\t]+([^\\r\\n]*?))?[ \\t]*$`,"gimu"),Fy={quickfunction:"QuickFunction",datachange:"DataChange",condition:"Condition",conditionalscript:"Condition",application:"Application",applicationscript:"Application",window:"Window",windowscript:"Window",keyscript:"KeyScript",generic:"Generic"},Gy={onshow:"OnShow",whilerunning:"WhileRunning",onclose:"OnClose"},Hy=new Set(["scripttype","name","description","event","trigger","shortcut","param","returns"]);function ut(e,t,n,r="warning"){return{code:e,message:t,severity:r,range:n,source:"intouch-metadata"}}function or(e,t,n,r,o,i){let c=(n.index??0)+n[0].lastIndexOf(r),g=(0,Wt.sourceRange)(e,{start:t.span.start+c,end:t.span.start+c+r.length});return{value:o,raw:r,...g,source:i}}function Sm(e){return Fy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function jy(e){return Gy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Ly(e,t){return typeof e=="string"&&typeof t=="string"?e.localeCompare(t,"en",{sensitivity:"base"})===0:e===t}function Lt(e,t,n,r){let o=t[0]??n[0];if(o!==void 0){for(let i of[...t.slice(1),...n])Ly(o.value,i.value)||r.push(ut("metadata-conflict",`${e} '${i.raw}' conflicts with higher-priority ${o.source} metadata '${o.raw}'.`,i.range));return o}}function Wy(e,t,n,r){for(let o of t.lexeme.matchAll(Ay)){let i=o[1],s=(o[2]??"").trim(),c=i.toLowerCase(),g=t.span.start+(o.index??0)+o[0].indexOf(`@${i}`)+1,d=(0,Wt.sourceRange)(e,{start:g,end:g+i.length}).range;if(!Hy.has(c)){r.push(ut("unknown-metadata-field",`Unknown QuickScript metadata field '@${i}'.`,d,"information"));continue}if(s.length===0){r.push(ut("invalid-metadata-value",`Metadata field '@${i}' requires a value.`,d));continue}if(c==="scripttype"){let b=Sm(s),m=or(e,t,o,s,b??"Unknown","explicit");b===void 0?r.push(ut("invalid-script-type",`Unknown QuickScript script type '${s}'.`,m.range)):n.scriptTypes.push(m);continue}if(c==="param"){let b=s.match(new RegExp(`^(${Cm})[ \\t]+(DISCRETE|INTEGER|MESSAGE|REAL)(?:[ \\t]+([\\s\\S]*))?$`,"iu")),m=or(e,t,o,s,s,"explicit");if(b===null){r.push(ut("invalid-metadata-value","Metadata field '@Param' must use '@Param Name TYPE Description...'.",m.range));continue}let T=m.span.start+s.indexOf(b[1]),D=m.span.start+s.indexOf(b[2],b[1].length);n.explicitParameters.push({name:b[1],datatype:b[2].toUpperCase(),description:b[3]?.trim()||void 0,range:m.range,nameRange:(0,Wt.sourceRange)(e,{start:T,end:T+b[1].length}).range,datatypeRange:(0,Wt.sourceRange)(e,{start:D,end:D+b[2].length}).range});continue}let h=or(e,t,o,s,s,"explicit");switch(c){case"name":n.names.push(h);break;case"description":n.descriptions.push(h);break;case"event":n.events.push(h);break;case"trigger":n.triggers.push(h);break;case"shortcut":n.shortcuts.push(h);break;case"returns":n.returnTypes.push({...h,value:s.toUpperCase()});break}}}function Uy(e){let t=e.lexeme.match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu);if(t===null)return;let n=(t.index??0)+t[0].indexOf(t[1]);return{text:t[1],start:n}}function Qy(e,t,n){for(let o of t.lexeme.matchAll(qy)){let i=o[1].toLowerCase(),s=o[2].trim();if(s.length===0)continue;if(i==="type"){n.legacyScriptType??=s;let g=Sm(s);n.scriptTypes.push(or(e,t,o,s,g??"Unknown","legacy"));continue}let c=or(e,t,o,s,s,"legacy");switch(i){case"name":n.names.push(c);break;case"description":n.descriptions.push(c);break;case"event":n.events.push(c);break;case"trigger":n.triggers.push(c);break;case"shortcut":n.shortcuts.push(c);break;case"tagname[.field]":n.triggers.push(c);break;case"condition":n.triggers.push(c);break;case"condition type":n.events.push(c);break;case"return":case"returns":n.returnTypes.push({...c,value:s.toUpperCase()});break}}let r=Uy(t);if(r!==void 0)for(let o of r.text.matchAll(Ny)){let i=o[1],s=o[2],c=r.start+(o.index??0),g=t.span.start+c+o[0].indexOf(i),d=t.span.start+c+o[0].indexOf(s,o[0].indexOf(i)+i.length);n.legacyParameters.push({name:s,datatype:i.toUpperCase(),description:o[3]?.trim()||void 0,range:(0,Wt.sourceRange)(e,{start:g,end:t.span.start+c+o[0].trimEnd().length}).range,nameRange:(0,Wt.sourceRange)(e,{start:d,end:d+s.length}).range,datatypeRange:(0,Wt.sourceRange)(e,{start:g,end:g+i.length}).range})}}function By(e){if(/^[ \t]*Script[ \t]*:[ \t]*$/imu.test(e))return!0;let t=/^[ \t]*Type[ \t]*:[ \t]*[^\r\n]+$/imu.test(e),n=/^[ \t]*(?:Name|Tagname\[\.field\]|Condition)[ \t]*:[ \t]*[^\r\n]+$/imu.test(e);return t&&n}function $y(e){if(e===void 0)return;let t=e.replace(/^.*[\\/]/,"").replace(/\.(?:vbi|vi)$/i,"").replace(/_\d+(?:\.\d+){1,3}$/i,"");for(let[n,r]of[["QF_","QuickFunction"],["DCH_","DataChange"],["CS_","Condition"],["APP_","Application"],["KEY_","KeyScript"]])if(t.toUpperCase().startsWith(n))return{scriptType:r,name:t.slice(n.length)}}function zy(e,t={}){let n=[],r={scriptTypes:[],names:[],events:[],triggers:[],shortcuts:[],descriptions:[],returnTypes:[],explicitParameters:[],legacyParameters:[]},o=(t.tokens??(0,Ey.tokenize)(e)).filter(k=>k.kind===My.TokenKind.Comment);for(let k of o)Wy(e,k,r,n),By(k.lexeme)&&Qy(e,k,r);let i=k=>k.filter(M=>M.source==="explicit"),s=k=>k.filter(M=>M.source==="legacy"),c=Lt("Script type",i(r.scriptTypes),s(r.scriptTypes),n),g=Lt("Name",i(r.names),s(r.names),n),d=Lt("Event",i(r.events),s(r.events),n),h=Lt("Trigger",i(r.triggers),s(r.triggers),n),b=Lt("Shortcut",i(r.shortcuts),s(r.shortcuts),n),m=Lt("Description",i(r.descriptions),s(r.descriptions),n),T=Lt("Return type",i(r.returnTypes),s(r.returnTypes),n),D=r.explicitParameters.length>0?r.explicitParameters:r.legacyParameters;if(r.explicitParameters.length>0&&r.legacyParameters.length>0){let k=M=>M.map(L=>`${L.name.toUpperCase()}:${L.datatype.toUpperCase()}`).join(",");k(r.explicitParameters)!==k(r.legacyParameters)&&n.push(ut("metadata-conflict","Legacy parameter metadata conflicts with higher-priority explicit @Param metadata.",r.legacyParameters[0].range))}let q=$y(t.fileName),N=c?.value??q?.scriptType??"Generic",x=g?.value??q?.name,p=d?.value;if(N==="Window"&&d!==void 0){let k=jy(d.value);k===void 0?(n.push(ut("invalid-window-event",`Unknown Window script event '${d.value}'.`,d.range)),p=void 0):p=k}else d!==void 0&&!["Application","Condition"].includes(N)&&n.push(ut("metadata-conflict",`Event metadata is not supported for ${N} scripts.`,d.range));N==="Window"&&T!==void 0&&n.push(ut("metadata-conflict","Window scripts cannot declare a return type.",T.range));let l=[c,g,d,h,b,m,T].flatMap(k=>k===void 0?[]:[k.source]);r.explicitParameters.length>0?l.push("explicit"):r.legacyParameters.length>0&&l.push("legacy");let C=l.includes("explicit")?"explicit":l.includes("legacy")?"legacy":q===void 0?"none":"filename";return{scriptType:N,name:x,nameRange:g?.range,event:p,eventRange:d?.range,trigger:h?.value,triggerRange:h?.range,shortcut:b?.value,shortcutRange:b?.range,description:m?.value,descriptionRange:m?.range,parameters:D,returnType:T?.value,returnTypeRange:T?.range,metadataSource:C,legacyScriptType:r.legacyScriptType,diagnostics:n}}});var Oo=I(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.parseQuickScript=iT;var Vy=Jn(),Ro=tr(),ne=at(),Ky=rr(),Im=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),Dm=new Set(["+","-","NOT","!","~"]),Xy=new Set(["TRUE","FALSE","NULL","EOF"]),Zy=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),Yy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function Jy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function kt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function Se(e){return e?.kind===ne.TokenKind.Keyword?kt(e):void 0}function wm(e,t,n=t){return(0,Ro.sourceRange)(e,{start:t.span.start,end:n.span.end})}function eT(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,Ro.sourceRange)(e,{start:n,end:n}).range}function Te(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function Ue(e,t,n,r){return{code:t,message:n,severity:"error",range:eT(e,r)}}function tT(e,t){return e.filter(n=>n.range.start.line===t&&!Jy(n))}function km(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function Pm(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?kt(e):e.lexeme}var Ta=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;Dm.has(Pm(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(kt(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||Xy.has(kt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let o=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${o.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===ne.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!Zy.has(kt(t)??"")&&!Im.has(kt(t)??"")&&!Dm.has(kt(t)??"")}};function nT(e,t,n){return n.token===void 0?Ue(e,n.code,n.message,t):Te(n.code,n.message,n.token)}function qe(e,t,n){let r=new Ta(t).parse();return r===void 0?!0:(n.push(nT(e,t,r)),!1)}var _a=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positionc.lexeme==="(")&&this.diagnostics.push(Te("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",o[o.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let o=this.tokens.slice(this.position);this.diagnostics.push(Ue(this.source,"missing-then","IF requires 'THEN' after its condition.",o.length>0?o:[t])),this.position=this.tokens.length,r=o[o.length-1]??t}else qe(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?Ue(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):Te("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let i=this.current();this.diagnostics.push(i===void 0?Ue(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):Te("expected-equals","Expected '=' after FOR loop variable.",i)),i?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),o=n??t;if(r<0){let i=this.headerEnd(this.position),s=this.tokens.slice(this.position,i);this.diagnostics.push(Ue(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=i,o=s[s.length-1]??o}else{qe(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let i=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),c=i>=0&&i=0&&i0&&qe(this.source,r,this.diagnostics),this.position=n;let o=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:o})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),o=this.findTopLevelLexeme(this.position,"="),i=o>=this.position&&ob.lexeme==="=")&&r.some(b=>Se(b)==="TO");this.statements.push({kind:c,first:t,last:d,name:c==="direct-call"?t:void 0,recoveredLoop:h})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[ne.TokenKind.Identifier,ne.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((o,i)=>i>n&&o.lexeme==="]");if(r<0||!qe(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(Ue(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function rT(e,t){let n=0;for(let r=t;ro.lexeme===";"))return r}return e.length-1}function oT(e,t){let n=rT(e,t);if(n>t)return n;let r=e[t],o=Se(r[0])==="IF",i=Se(r[0])==="ELSE"&&Se(r[1])==="IF";if(!o&&!i||r.some(d=>Se(d)==="THEN"))return t;let s=o&&r.length===1,c=["AND","OR","NOT"].includes(Se(r[r.length-1])??""),g=["AND","OR"].includes(Se(e[t+1]?.[0])??"");if(!s&&!c&&!g)return t;for(let d=t+1;dSe(h)==="THEN"))return d;return t}function iT(e){let t=(0,Ky.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(m,T)=>tT(t,T)),o=[],i=[],s=[],c=new Array(n),g=[],d=[];for(let m=0;mT.kind==="dim"&&T.datatype!==void 0))if(!Vy.DATATYPE_SET.has(m.datatype.toUpperCase())){let T=m.datatypeRange??m.range,D=`${T.start.line}:${T.start.character}`;if(h.has(D))continue;h.add(D),s.push({code:"unknown-datatype",message:`Unknown datatype '${m.datatype}'.`,severity:"error",range:T})}let b=(0,Ro.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:o,blocks:i,diagnostics:s,lines:c,...b}}});var Am=I(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatQuickScriptLexically=Mm;sr.formatQuickScriptStructure=Em;sr.formatQuickScript=hT;var j=at(),Sa=rr(),sT=Oo();function Rm(e){return e===void 0||e.kind===j.TokenKind.Newline||e.kind===j.TokenKind.EOF}function Ca(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==j.TokenKind.Whitespace&&e[n].kind!==j.TokenKind.Newline)return e[n]}function xm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function va(e){ir(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` -`)&&!t.endsWith("\r")&&e.push(" ")}function cT(e,t){if(e[t].lexeme!=="-"||xm(e,t)?.kind!==j.TokenKind.Number)return!1;let n=Ca(e,t);return n===void 0||n.kind===j.TokenKind.Operator||n.kind===j.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function aT(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function Mm(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,Sa.tokenize)(r);if(o.some(d=>d.kind===j.TokenKind.String&&!d.lexeme.endsWith('"'))||o.some(d=>d.kind===j.TokenKind.Unknown&&d.lexeme==="}"))return{text:r,changed:r!==e};let i=[],s=!1,c=!1;for(let d=0;d")||_e(b,t.regionBlockCodeBegin??"{region"))&&(c=!0),T!==void 0&&(T.kind===j.TokenKind.Identifier||T.kind===j.TokenKind.Keyword||T.kind===j.TokenKind.Datatype)&&(i.push(" "),s=!0);continue}i.push(h.lexeme)}let g=aT(i.join(""),n);return{text:g,changed:g!==e}}function uT(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function lT(e){let t=(0,Sa.tokenize)(e),n=[];for(let r of t)r.kind===j.TokenKind.EOF||r.kind===j.TokenKind.Newline||(r.kind===j.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function _e(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function dT(e,t){return _e(e,t.blockCodeBegin??"{>")||_e(e,t.blockCodeEnd??"{<")||_e(e,t.blockCodeExclude??"{#")||_e(e,t.regionBlockCodeBegin??"{region")||_e(e,t.regionBlockCodeEnd??"{endregion")||_e(e,t.regionBlockCodeExclude??"{#")}function fT(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(o=>o.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let o of n.slice(1)){let i=o.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!i.startsWith(r);)r=r.slice(0,-1)}return r}function mT(e,t){let n=new Map;for(let r of(0,Sa.tokenize)(e)){if(r.kind!==j.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let o=e.lastIndexOf(` -`,r.span.start-1)+1,i=e.slice(o,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(i)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:dT(s,t),contentIndent:fT(r.lexeme)})}return n}function Om(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",o=t.targetIndent.length-t.originalIndent.length;return o<0?e.slice(Math.min(-o,r.length)):o>0?t.targetIndent.slice(0,o)+e:e}function Em(e,t={}){let n=t.lineEnding??`\r -`,r=e.replace(/\r\n|\r|\n/g,n),o=(0,sT.parseQuickScript)(r),i=r.split(n),s=mT(r,t),c=[],g=uT(t),d=0,h=0,b,m=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let D=0;D")||_e(x,t.regionBlockCodeBegin??"{region"))&&M?.directive!==!0&&(d+=1)}let T=c.join(n);return{text:T,changed:T!==e,diagnostics:o.diagnostics}}function hT(e,t={}){let n=Mm(e,t),r=Em(n.text,t);return{...r,changed:r.text!==e}}});var Mo=I(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.KNOWN_FUNCTIONS=void 0;xo.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"Alarmkommentare",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APAntriebStatistik",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"AppButonsConfig",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ApplicomToUAReference",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"BDEDatenLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDEDatenSuchen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDESchichtwerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteDatenOK",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteSchreiben",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BDETageswerteZuweisen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"BZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"BZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ExterneModuleUeberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FUWerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetFullTopic",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetSplittByIndex",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HDWExport",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerBACKUP",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYanzeigeAktualisieren",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYStatusLesen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"HerGATEWAYtriggerFreigabe",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerGATEWAYueberwachen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStart",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HerProViewStartV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideAllPLS",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hubbodensteuerung",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"KonfigLesen",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"KonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"loadVarFromDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MADatum",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MAKurvenProfileAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Mouse",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OnlineHilfeAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QFFilter",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFFilterRegler15Schritt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFLuftwerte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QFRinne",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Scripsnippets_Intouch",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SessionUserInfoAkt",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetReferenceBool",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINT",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceDINTs",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceINT",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetReferenceMerkerByte",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceString",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetReferenceWord",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetSMELAccessname",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTopicTest",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SetVarInputBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetVarToggleBoolsch",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SMELCPUPopup",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELEditorAufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfo",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELInfoView",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELSQL",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SmelUpdateDB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTaV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SMELUpdateDBWTnV",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"Sollwertaenderung",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SpecialAccessChangeGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessChangePw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpecialAccessCheckGUI",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SpeciallAccessCheckPw",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StartEP2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StartEP3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"StatusExtApp",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StatusleistenInfofelder",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SWReal",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"sysuhrzeitsynchron",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABAntrieb",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABCommentTo2z",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZ",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012AZS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EA",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAF",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAFB",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER012EAS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABHER062",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABResetPLSReferences",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TABWILO",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"VZMonatAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZMonatAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler1",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler2",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZTagAktualisierenZaehler3",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"VZZaehlerAbfragen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WBBetriebsstunden",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WebCPUaufrufen",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WVVerbrauchsdaten",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"wwalmdbtrigger",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"xAnlagenConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xAT01Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT02Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT03Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT04Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT05Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT06Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT07Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT08Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT09Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xAT10Config",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xBZVZSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xGatawaySettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebug",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerDebugL",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGATEWAYSettings",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xHerGatewayStart",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xKonfigSpeichern",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLoggingConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xLogoffOnTSMaster",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xLogoutFromStationTS",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetDateiPfade",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetDeverloper",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSetSQLConfig",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetTSStation",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetUhrzeitserver",category:"Hermes helper",sourceComment:"Hermes Own functions 1"},{name:"xSetupDeploymentMode",category:"Hermes helper",sourceComment:"Hermes ground-program QuickFunctions"},{name:"xSTATION1BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION2BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION3BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION4BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION5BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION6BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION7BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION8BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"},{name:"xSTATION9BiosName",category:"Hermes helper",sourceComment:"Hermes Own functions 2"}]});var Gm=I(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.completions=pT;cr.hoverAt=yT;cr.documentSymbols=TT;var Fm=Mo(),qm=Jn(),Nm=at();function gT(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let o=r.label.toUpperCase();t.has(o)||t.set(o,r)};for(let r of qm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of qm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of Fm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(o=>o.kind==="call"&&o.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,o)=>r.label.localeCompare(o.label,"en",{sensitivity:"base"}))}function yT(e,t){let n=e.document.tokens.find(i=>gT(i.range,t));if(n===void 0)return;if(n.kind===Nm.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Nm.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let o=Fm.KNOWN_FUNCTIONS.find(i=>i.name.toUpperCase()===n.lexeme.toUpperCase());if(o!==void 0)return{label:o.name,detail:o.sourceComment||o.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function TT(e){let t=e.document.blocks.map(s=>({name:s.kind.toUpperCase(),kind:s.kind,range:s.range,selectionRange:s.opener,children:[]})),n=[];for(let s of e.document.blocks)s.parentId===void 0?n.push(t[s.id]):t[s.parentId].children.push(t[s.id]);let r=[...e.symbols.map(s=>({name:s.name,kind:"variable",range:s.range,selectionRange:s.selectionRange,children:[]})),...n],o=e.metadata,i=o.nameRange??o.triggerRange??e.document.range;if(o.scriptType==="QuickFunction"&&o.name!==void 0)return[{name:o.name,kind:"function",range:e.document.range,selectionRange:i,children:r}];if(o.scriptType==="Window"&&o.name!==void 0){let s=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:o.name,kind:"window",range:e.document.range,selectionRange:i,children:s}]}if(o.scriptType==="Application"){let s=o.name??"Application",c=o.event===void 0?r:[{name:o.event,kind:"event",range:e.document.range,selectionRange:o.eventRange??i,children:r}];return[{name:s,kind:"application",range:e.document.range,selectionRange:i,children:c}]}if(o.scriptType==="DataChange"||o.scriptType==="Condition"){let s=o.scriptType==="DataChange"?"data-change":"condition";return[{name:o.name??o.trigger??o.scriptType,kind:s,range:e.document.range,selectionRange:i,children:r}]}if(o.scriptType==="KeyScript"){let s=o.name??"KeyScript",c=o.shortcut===void 0?r:[{name:o.shortcut,kind:"event",range:e.document.range,selectionRange:o.shortcutRange??i,children:r}];return[{name:s,kind:"key-script",range:e.document.range,selectionRange:i,children:c}]}return r}});var Hm=I(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.QUALITY_DIAGNOSTIC_CODES=void 0;Pt.qualityDiagnostics=DT;var In=at();Pt.QUALITY_DIAGNOSTIC_CODES={nonAsciiIdentifier:"quickscript.naming.nonAsciiIdentifier",windowWhitespace:"quickscript.naming.windowWhitespace",windowNonAscii:"quickscript.naming.windowNonAscii"};var _T=/^[A-Za-z0-9_$#-]+$/,bT=new Set(["HIDE","SHOW"]),vT=new Set(["HIDE","INFOAPPSTATUS","INFOAPPTITLEEXPAND","MOVEWINDOW","PRINTWINDOW","SHOW","SHOWAT","SHOWTOPLEFTAT","WINDOWSTATE"]);function CT(e){return e.document.tokens.filter(t=>![In.TokenKind.Whitespace,In.TokenKind.Newline,In.TokenKind.Comment,In.TokenKind.EOF].includes(t.kind))}function ST(e){return e.lexeme.startsWith('"')&&e.lexeme.endsWith('"')?e.lexeme.slice(1,-1):e.lexeme.slice(1)}function IT(e){let t=CT(e),n=[];for(let r=0;r")){if(bT.has(o)&&t[r+1]?.kind===In.TokenKind.String){n.push(t[r+1]);continue}vT.has(o)&&t[r+1]?.lexeme==="("&&t[r+2]?.kind===In.TokenKind.String&&n.push(t[r+2])}}return n}function Ia(e,t,n,r){if(n!=="off")return{code:e,message:t,severity:n,range:r.range,source:"intouch-quality"}}function DT(e,t={}){let n=[],r=new Set,o=t.nonAsciiIdentifiers??"warning";for(let i of e.identifiers){let s=i.name.toUpperCase();if(_T.test(i.name)||r.has(s))continue;r.add(s);let c=Ia(Pt.QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier,`Avoid non-ASCII characters in identifier '${i.name}'.`,o,i);c!==void 0&&n.push(c)}for(let i of IT(e)){let s=ST(i);if(/\s/u.test(s)){let c=Ia(Pt.QUALITY_DIAGNOSTIC_CODES.windowWhitespace,"Avoid whitespace in window names.",t.windowWhitespace??"warning",i);c!==void 0&&n.push(c)}if(/[^\x00-\x7f]/u.test(s)){let c=Ia(Pt.QUALITY_DIAGNOSTIC_CODES.windowNonAscii,"Avoid non-ASCII characters in window names.",t.windowNonAscii??"warning",i);c!==void 0&&n.push(c)}}return n}});var Qm=I(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.quickFunctionDeclarations=Um;Qt.quickFunctionNames=OT;Qt.analyzeQuickScript=xT;Qt.definitionAt=MT;Qt.referencesAt=ET;var wT=Oo(),jm=ya(),kT=Mo(),Da=tr(),Ut=at();function Lm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Ut.TokenKind.Whitespace,Ut.TokenKind.Newline,Ut.TokenKind.Comment].includes(e[n].kind))return e[n]}function RT(e,t){for(let n=t+1;n({name:n.name,kind:"parameter",range:n.nameRange})),metadata:t}]}function Um(e,t={}){return Wm(e,(0,jm.extractDocumentMetadata)(e,t))}function OT(e){let t=new Map;for(let n of Um(e))t.set(n.name.toUpperCase(),n.name);return[...t.values()]}function xT(e,t={}){let n=(0,wT.parseQuickScript)(e),r=(0,jm.extractDocumentMetadata)(e,{fileName:t.fileName,tokens:n.tokens}),o=[...n.diagnostics,...r.diagnostics],i=[],s=Wm(e,r),c=new Map,g=new Set(kT.KNOWN_FUNCTIONS.map(T=>T.name.toUpperCase()));for(let T of s)g.add(T.name.toUpperCase());for(let T of t.knownFunctionNames??[])g.add(T.toUpperCase());for(let T of n.statements.filter(D=>D.kind==="dim"&&D.name!==void 0&&D.nameRange!==void 0)){let D=T.name.toUpperCase();if(c.get(D)!==void 0){o.push({code:"duplicate-local",message:`Local variable '${T.name}' is already declared.`,severity:"error",range:T.nameRange});continue}let N={id:i.length,name:T.name,kind:"variable",range:T.range,selectionRange:T.nameRange,datatype:T.datatype,scopeId:0};i.push(N),c.set(D,N)}let d=new Map;for(let T of i)d.set((0,Da.offsetAt)(e,T.selectionRange.start),T);let h=new Set;for(let T of n.statements.filter(D=>D.kind==="call"&&D.name!==void 0&&D.nameRange!==void 0))h.add((0,Da.offsetAt)(e,T.nameRange.start));let b=r.trigger===void 0||r.triggerRange===void 0?[]:[{name:r.trigger,kind:"trigger",range:r.triggerRange}],m=s.flatMap(T=>[{name:T.name,kind:"function",range:T.nameRange},...T.parameters]);r.trigger!==void 0&&r.triggerRange!==void 0&&m.push({name:r.trigger,kind:"global",range:r.triggerRange});for(let T of i)m.push({name:T.name,kind:"local",range:T.selectionRange});for(let T=0;T"){m.push({name:D.lexeme,kind:"member",range:D.range});continue}let x=c.get(D.lexeme.toUpperCase()),p=RT(n.tokens,T),l=h.has(D.span.start)||p?.lexeme==="(";if(m.push({name:D.lexeme,kind:l?"function":x===void 0?"global":"local",range:D.range}),l&&!g.has(D.lexeme.toUpperCase())&&o.push({code:"unknown-function",message:`Unknown QuickScript function '${D.lexeme}'.`,severity:"warning",range:D.range}),x!==void 0||l){let C=l?"call":p?.lexeme==="="?"write":"read";b.push({name:D.lexeme,kind:C,range:D.range,declarationId:x?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:i.map(T=>T.id)}],symbols:i,references:b,identifiers:m,quickFunctions:s,metadata:r,diagnostics:o}}function MT(e,t){let n=e.references.find(r=>Lm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function ET(e,t,n=!0){let r=e.references.find(o=>Lm(o.range,t));return r?.declarationId===void 0?[]:e.references.filter(o=>o.declarationId===r.declarationId&&(n||o.kind!=="declaration")).map(o=>o.range)}});var wa=I(ue=>{"use strict";var AT=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Qe=ue&&ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&AT(t,e,n)};Object.defineProperty(ue,"__esModule",{value:!0});Qe(Jn(),ue);Qe(ya(),ue);Qe(Am(),ue);Qe(Mo(),ue);Qe(Gm(),ue);Qe(Oo(),ue);Qe(Hm(),ue);Qe(Qm(),ue);Qe(tr(),ue);Qe(at(),ue);Qe(rr(),ue)});var Ra=I(Pe=>{"use strict";var qT=Pe&&Pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),NT=Pe&&Pe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),FT=Pe&&Pe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;oe.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.linen.kind==="call"),symbols:jT(e.uri,t.metadata)}}var Ao=class{constructor(){this.workspaceDocuments=new Map,this.openDocuments=new Map}replaceWorkspaceDocuments(t){this.workspaceDocuments.clear();for(let n of t)this.workspaceDocuments.set(Bt(n.uri),Pa(n))}updateWorkspaceDocument(t){this.workspaceDocuments.set(Bt(t.uri),Pa(t))}removeWorkspaceDocument(t){this.workspaceDocuments.delete(Bt(t))}updateDocument(t){this.openDocuments.set(Bt(t.uri),Pa({uri:t.uri,text:t.getText()}))}removeDocument(t){this.openDocuments.delete(Bt(t))}entries(){let t=new Map(this.workspaceDocuments);for(let[n,r]of this.openDocuments)t.set(n,r);return[...t.values()].sort((n,r)=>n.uri.localeCompare(r.uri,"en"))}entry(t){let n=Bt(t);return this.openDocuments.get(n)??this.workspaceDocuments.get(n)}symbols(){return this.entries().flatMap(t=>t.symbols)}quickFunctions(t){let n=t?.toUpperCase();return this.symbols().filter(r=>r.kind==="QuickFunction"&&(n===void 0||r.name.toUpperCase()===n))}knownFunctionNames(){let t=new Map;for(let n of this.quickFunctions())t.set(n.name.toUpperCase(),n.name);return[...t.values()].sort((n,r)=>n.localeCompare(r,"en",{sensitivity:"base"}))}uniqueQuickFunction(t){let n=this.quickFunctions(t);return n.length===1?n[0]:void 0}symbolAt(t,n){return this.entry(t)?.symbols.find(r=>ka(r.definitionRange,n))}symbolNameAt(t,n){let r=this.entry(t),o=this.symbolAt(t,n);return o?.kind!=="QuickFunction"?r?.calls.find(i=>ka(i.range,n))?.name:o!==void 0?o.name:r?.calls.find(i=>ka(i.range,n))?.name}references(t,n){let r=t.toUpperCase(),o=n?this.quickFunctions(t).map(s=>({name:s.name,kind:"declaration",uri:s.uri,range:s.definitionRange})):[],i=this.entries().flatMap(s=>s.calls.filter(c=>c.name.toUpperCase()===r).map(c=>({name:c.name,kind:"call",uri:s.uri,range:c.range})));return[...o,...i].sort((s,c)=>s.uri.localeCompare(c.uri,"en")||s.range.start.line-c.range.start.line||s.range.start.character-c.range.start.character)}diagnostics(t){let n=this.entry(t);if(n===void 0)return[];let r=[];for(let o of n.symbols.filter(i=>i.kind==="QuickFunction"))this.quickFunctions(o.name).length>1&&r.push({code:"duplicate-quickfunction",message:`QuickFunction '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.definitionRange,source:"intouch-metadata"});for(let o of n.calls)this.quickFunctions(o.name).length>1&&r.push({code:"ambiguous-quickfunction",message:`QuickFunction call '${o.name}' has multiple workspace definitions.`,severity:"warning",range:o.range,source:"intouch-metadata"});return r}};Pe.WorkspaceSymbolIndex=Ao;Pe.WorkspaceFunctionIndex=Ao});var Km=I(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.serverCapabilities=LT;Ze.diagnosticsFor=$T;Ze.formattingEdits=zT;Ze.symbolsFor=VT;Ze.definitionFor=KT;Ze.referencesFor=XT;Ze.completionsFor=ZT;Ze.hoverFor=YT;var B=la(),Rt=wa(),$m=Ra();function LT(){return{capabilities:{textDocumentSync:B.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function WT(e){switch(e){case"keyword":return B.CompletionItemKind.Keyword;case"datatype":return B.CompletionItemKind.TypeParameter;case"variable":return B.CompletionItemKind.Variable;case"call-target":return B.CompletionItemKind.Method;default:return B.CompletionItemKind.Function}}function UT(e){switch(e){case"error":return B.DiagnosticSeverity.Error;case"information":return B.DiagnosticSeverity.Information;case"hint":return B.DiagnosticSeverity.Hint;default:return B.DiagnosticSeverity.Warning}}function zm(e){return e instanceof $m.WorkspaceSymbolIndex?e:void 0}function QT(e){let t=zm(e);return t===void 0?e:t.knownFunctionNames()}function Dn(e,t){return(0,Rt.analyzeQuickScript)(e.getText(),{knownFunctionNames:QT(t),fileName:(0,$m.documentFileName)(e.uri)})}function BT(e){let t=e.metadata.parameters.map(r=>`${r.name}: ${r.datatype}`).join(", "),n=e.metadata.returnType===void 0?"":`: ${e.metadata.returnType}`;return`${e.name}(${t})${n}`}function Vm(e){let t=BT(e);return e.metadata.description===void 0?t:`${t} +`)&&t.push(n+1);return t}function Py(e,t,n){if(n+1>=t.length)return e.length;let r=t[n+1];return e[r-1]===` +`&&(r-=1),e[r-1]==="\r"&&(r-=1),r}function ha(e,t){ma(e,t);let n=_m(e),r=0,i=n.length;for(;r+1=n.length)throw new RangeError(`Line ${t.line} is outside the source.`);let r=n[t.line],i=Py(e,n,t.line),o=r+t.character;if(o>i)throw new RangeError(`Character ${t.character} is outside line ${t.line}.`);return o}function Ry(e,t){if(ma(e,t.start),ma(e,t.end),t.end{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.TokenKind=void 0;var vm;(function(e){e.Identifier="Identifier",e.Keyword="Keyword",e.Datatype="Datatype",e.Number="Number",e.String="String",e.Operator="Operator",e.Punctuation="Punctuation",e.Comment="Comment",e.Whitespace="Whitespace",e.Newline="Newline",e.Unknown="Unknown",e.EOF="EOF"})(vm||(Di.TokenKind=vm={}))});var rr=S(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.tokenize=xy;var Pi=Zn(),Pe=at();function bm(e){return e!==void 0&&/[\p{L}_$#]/u.test(e)}function nr(e){return e!==void 0&&/[\p{L}\p{N}_$#]/u.test(e)}function wi(e){return e!==void 0&&/[0-9]/.test(e)}function Oy(e){let t=e.toUpperCase();return Pi.DATATYPE_SET.has(t)?Pe.TokenKind.Datatype:Pi.KEYWORD_SET.has(t)?Pe.TokenKind.Keyword:Pe.TokenKind.Identifier}function xy(e){let t=[],n=0,r=0,i=0,o=()=>({line:r,character:i}),s=d=>{for(;n{let v=n,m=o();s(h),t.push({kind:d,lexeme:e.slice(v,h),span:{start:v,end:h},range:{start:m,end:o()}})};for(;ne.startsWith(m,n));if(h!==void 0){c(Pe.TokenKind.Operator,n+h.length);continue}if(Pi.PUNCTUATION.includes(d)){c(Pe.TokenKind.Punctuation,n+1);continue}let v=e.codePointAt(n);c(Pe.TokenKind.Unknown,n+(v!==void 0&&v>65535?2:1))}let g=o();return t.push({kind:Pe.TokenKind.EOF,lexeme:"",span:{start:n,end:n},range:{start:g,end:{...g}}}),t}});var ya=S(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.extractDocumentMetadata=Qy;var Ut=tr(),My=at(),Ey=rr(),Cm="[\\p{L}_$#][\\p{L}\\p{N}_$#-]*",qy=/^[ \t]*@([A-Za-z]+)(?:[ \t]+([^\r\n]*?))?[ \t]*$/gmu,Ny=/^[ \t]*(Type|Name|Description|Trigger|Event|Shortcut|Returns?|Tagname\[\.field\]|Condition|Condition Type)[ \t]*:[ \t]*([^\r\n]*?)[ \t]*$/gimu,Ay=new RegExp(`^[ \\t]*(DISCRETE|INTEGER|MESSAGE|REAL)[ \\t]+(${Cm})(?:[ \\t]+([^\\r\\n]*?))?[ \\t]*$`,"gimu"),Gy={quickfunction:"QuickFunction",datachange:"DataChange",condition:"Condition",conditionalscript:"Condition",application:"Application",applicationscript:"Application",window:"Window",windowscript:"Window",keyscript:"KeyScript",generic:"Generic"},jy={onshow:"OnShow",whilerunning:"WhileRunning",onclose:"OnClose"},Fy=new Set(["scripttype","name","description","event","trigger","shortcut","param","returns"]);function ut(e,t,n,r="warning"){return{code:e,message:t,severity:r,range:n,source:"intouch-metadata"}}function ir(e,t,n,r,i,o){let c=(n.index??0)+n[0].lastIndexOf(r),g=(0,Ut.sourceRange)(e,{start:t.span.start+c,end:t.span.start+c+r.length});return{value:i,raw:r,...g,source:o}}function Im(e){return Gy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Ly(e){return jy[e.replace(/[ \t_-]+/g,"").toLowerCase()]}function Wy(e,t){return typeof e=="string"&&typeof t=="string"?e.localeCompare(t,"en",{sensitivity:"base"})===0:e===t}function Wt(e,t,n,r){let i=t[0]??n[0];if(i!==void 0){for(let o of[...t.slice(1),...n])Wy(i.value,o.value)||r.push(ut("metadata-conflict",`${e} '${o.raw}' conflicts with higher-priority ${i.source} metadata '${i.raw}'.`,o.range));return i}}function Uy(e,t,n,r){for(let i of t.lexeme.matchAll(qy)){let o=i[1],s=(i[2]??"").trim(),c=o.toLowerCase(),g=t.span.start+(i.index??0)+i[0].indexOf(`@${o}`)+1,d=(0,Ut.sourceRange)(e,{start:g,end:g+o.length}).range;if(!Fy.has(c)){r.push(ut("unknown-metadata-field",`Unknown QuickScript metadata field '@${o}'.`,d,"information"));continue}if(s.length===0){r.push(ut("invalid-metadata-value",`Metadata field '@${o}' requires a value.`,d));continue}if(c==="scripttype"){let v=Im(s),m=ir(e,t,i,s,v??"Unknown","explicit");v===void 0?r.push(ut("invalid-script-type",`Unknown QuickScript script type '${s}'.`,m.range)):n.scriptTypes.push(m);continue}if(c==="param"){let v=s.match(new RegExp(`^(${Cm})[ \\t]+(DISCRETE|INTEGER|MESSAGE|REAL)(?:[ \\t]+([\\s\\S]*))?$`,"iu")),m=ir(e,t,i,s,s,"explicit");if(v===null){r.push(ut("invalid-metadata-value","Metadata field '@Param' must use '@Param Name TYPE Description...'.",m.range));continue}let T=m.span.start+s.indexOf(v[1]),D=m.span.start+s.indexOf(v[2],v[1].length);n.explicitParameters.push({name:v[1],datatype:v[2].toUpperCase(),description:v[3]?.trim()||void 0,range:m.range,nameRange:(0,Ut.sourceRange)(e,{start:T,end:T+v[1].length}).range,datatypeRange:(0,Ut.sourceRange)(e,{start:D,end:D+v[2].length}).range});continue}let h=ir(e,t,i,s,s,"explicit");switch(c){case"name":n.names.push(h);break;case"description":n.descriptions.push(h);break;case"event":n.events.push(h);break;case"trigger":n.triggers.push(h);break;case"shortcut":n.shortcuts.push(h);break;case"returns":n.returnTypes.push({...h,value:s.toUpperCase()});break}}}function Hy(e){let t=e.lexeme.match(/\bParameters\s*:\s*([\s\S]*?)(?:\r?\n[ \t]*\r?\n|\bUsage\s*:|\bVersion\s+history\s*:|\{<|$)/iu);if(t===null)return;let n=(t.index??0)+t[0].indexOf(t[1]);return{text:t[1],start:n}}function $y(e,t,n){for(let i of t.lexeme.matchAll(Ny)){let o=i[1].toLowerCase(),s=i[2].trim();if(s.length===0)continue;if(o==="type"){n.legacyScriptType??=s;let g=Im(s);n.scriptTypes.push(ir(e,t,i,s,g??"Unknown","legacy"));continue}let c=ir(e,t,i,s,s,"legacy");switch(o){case"name":n.names.push(c);break;case"description":n.descriptions.push(c);break;case"event":n.events.push(c);break;case"trigger":n.triggers.push(c);break;case"shortcut":n.shortcuts.push(c);break;case"tagname[.field]":n.triggers.push(c);break;case"condition":n.triggers.push(c);break;case"condition type":n.events.push(c);break;case"return":case"returns":n.returnTypes.push({...c,value:s.toUpperCase()});break}}let r=Hy(t);if(r!==void 0)for(let i of r.text.matchAll(Ay)){let o=i[1],s=i[2],c=r.start+(i.index??0),g=t.span.start+c+i[0].indexOf(o),d=t.span.start+c+i[0].indexOf(s,i[0].indexOf(o)+o.length);n.legacyParameters.push({name:s,datatype:o.toUpperCase(),description:i[3]?.trim()||void 0,range:(0,Ut.sourceRange)(e,{start:g,end:t.span.start+c+i[0].trimEnd().length}).range,nameRange:(0,Ut.sourceRange)(e,{start:d,end:d+s.length}).range,datatypeRange:(0,Ut.sourceRange)(e,{start:g,end:g+o.length}).range})}}function zy(e){if(/^[ \t]*Script[ \t]*:[ \t]*$/imu.test(e))return!0;let t=/^[ \t]*Type[ \t]*:[ \t]*[^\r\n]+$/imu.test(e),n=/^[ \t]*(?:Name|Tagname\[\.field\]|Condition)[ \t]*:[ \t]*[^\r\n]+$/imu.test(e);return t&&n}function By(e){if(e===void 0)return;let t=e.replace(/^.*[\\/]/,"").replace(/\.(?:vbi|vi)$/i,"").replace(/_\d+(?:\.\d+){1,3}$/i,"");for(let[n,r]of[["QF_","QuickFunction"],["DCH_","DataChange"],["CS_","Condition"],["APP_","Application"],["KEY_","KeyScript"]])if(t.toUpperCase().startsWith(n))return{scriptType:r,name:t.slice(n.length)}}function Qy(e,t={}){let n=[],r={scriptTypes:[],names:[],events:[],triggers:[],shortcuts:[],descriptions:[],returnTypes:[],explicitParameters:[],legacyParameters:[]},i=(t.tokens??(0,Ey.tokenize)(e)).filter(P=>P.kind===My.TokenKind.Comment);for(let P of i)Uy(e,P,r,n),zy(P.lexeme)&&$y(e,P,r);let o=P=>P.filter(M=>M.source==="explicit"),s=P=>P.filter(M=>M.source==="legacy"),c=Wt("Script type",o(r.scriptTypes),s(r.scriptTypes),n),g=Wt("Name",o(r.names),s(r.names),n),d=Wt("Event",o(r.events),s(r.events),n),h=Wt("Trigger",o(r.triggers),s(r.triggers),n),v=Wt("Shortcut",o(r.shortcuts),s(r.shortcuts),n),m=Wt("Description",o(r.descriptions),s(r.descriptions),n),T=Wt("Return type",o(r.returnTypes),s(r.returnTypes),n),D=r.explicitParameters.length>0?r.explicitParameters:r.legacyParameters;if(r.explicitParameters.length>0&&r.legacyParameters.length>0){let P=M=>M.map(W=>`${W.name.toUpperCase()}:${W.datatype.toUpperCase()}`).join(",");P(r.explicitParameters)!==P(r.legacyParameters)&&n.push(ut("metadata-conflict","Legacy parameter metadata conflicts with higher-priority explicit @Param metadata.",r.legacyParameters[0].range))}let N=By(t.fileName),A=c?.value??N?.scriptType??"Generic",x=g?.value??N?.name,p=d?.value;if(A==="Window"&&d!==void 0){let P=Ly(d.value);P===void 0?(n.push(ut("invalid-window-event",`Unknown Window script event '${d.value}'.`,d.range)),p=void 0):p=P}else d!==void 0&&!["Application","Condition"].includes(A)&&n.push(ut("metadata-conflict",`Event metadata is not supported for ${A} scripts.`,d.range));A==="Window"&&T!==void 0&&n.push(ut("metadata-conflict","Window scripts cannot declare a return type.",T.range));let l=[c,g,d,h,v,m,T].flatMap(P=>P===void 0?[]:[P.source]);r.explicitParameters.length>0?l.push("explicit"):r.legacyParameters.length>0&&l.push("legacy");let C=l.includes("explicit")?"explicit":l.includes("legacy")?"legacy":N===void 0?"none":"filename";return{scriptType:A,name:x,nameRange:g?.range,event:p,eventRange:d?.range,trigger:h?.value,triggerRange:h?.range,shortcut:v?.value,shortcutRange:v?.range,description:m?.value,descriptionRange:m?.range,parameters:D,returnType:T?.value,returnTypeRange:T?.range,metadataSource:C,legacyScriptType:r.legacyScriptType,diagnostics:n}}});var Ri=S(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.parseQuickScript=oT;var Vy=Zn(),ki=tr(),ne=at(),Ky=rr(),Sm=new Map([["OR",1],["XOR",1],["|",1],["AND",2],["==",3],["<>",3],["<",3],["<=",3],[">",3],[">=",3],["IS",3],["SHL",4],["SHR",4],["+",5],["-",5],["*",6],["/",6],["%",6],["MOD",6]]),Dm=new Set(["+","-","NOT","!","~"]),Xy=new Set(["TRUE","FALSE","NULL","EOF"]),Yy=new Set(["DIM","AS","CALL","IF","THEN","ELSE","ENDIF","FOR","TO","STEP","NEXT","WHILE","EXIT","RETURN"]),Jy=new Set(["ACTIVATEAPP","HIDE","PLAYSOUND","SENDKEYS","SHOW","STARTAPP"]);function Zy(e){return e.kind===ne.TokenKind.Whitespace||e.kind===ne.TokenKind.Newline||e.kind===ne.TokenKind.Comment||e.kind===ne.TokenKind.EOF}function Pt(e){return e===void 0?void 0:e.lexeme.toUpperCase()}function Ie(e){return e?.kind===ne.TokenKind.Keyword?Pt(e):void 0}function wm(e,t,n=t){return(0,ki.sourceRange)(e,{start:t.span.start,end:n.span.end})}function eT(e,t){let n=t.length===0?0:t[t.length-1].span.end;return(0,ki.sourceRange)(e,{start:n,end:n}).range}function Te(e,t,n){return{code:e,message:t,severity:"error",range:n.range}}function He(e,t,n,r){return{code:t,message:n,severity:"error",range:eT(e,r)}}function tT(e,t){return e.filter(n=>n.range.start.line===t&&!Zy(n))}function Pm(e,t){return e.some(n=>n.kind===ne.TokenKind.Comment&&n.range.end.line>n.range.start.line&&n.range.start.line<=t&&n.range.end.line>=t)}function km(e){return e===void 0?void 0:e.kind===ne.TokenKind.Keyword?Pt(e):e.lexeme}var Ta=class{constructor(t){this.tokens=t,this.position=0}parse(){if(this.tokens.length===0)return{code:"missing-expression",message:"Expected a QuickScript expression."};if(this.parseBinary(1),this.issue!==void 0)return this.issue;if(this.position=this.tokens.length){this.issue={code:"missing-expression",message:"Expected an expression after the operator."};return}this.parseBinary(n+1)}}parseUnary(){for(;Dm.has(km(this.tokens[this.position])??"");)this.position+=1;this.parsePostfix()}parsePostfix(){for(this.parsePrimary();this.issue===void 0&&this.position"||t===":"){if(this.position+=1,!this.isMemberName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${t}'.`,token:this.tokens[this.position]};return}this.position+=1;continue}return}}parsePrimary(){let t=this.tokens[this.position];if(t===void 0){this.issue={code:"missing-expression",message:"Expected a QuickScript expression."};return}if(Pt(t)==="CALL"){this.parseCallExpression(t);return}if(t.lexeme==="("){this.position+=1,this.parseBinary(1),this.expectClosing(")",t);return}if(t.kind===ne.TokenKind.Identifier||t.kind===ne.TokenKind.Number||t.kind===ne.TokenKind.String||this.isCallableKeyword(t)||Xy.has(Pt(t)??"")){this.position+=1;return}this.issue={code:"unexpected-token",message:`Unexpected token '${t.lexeme}' in expression.`,token:t}}parseCallExpression(t){this.position+=1;let n=this.tokens[this.position];if(!this.isName(n)){this.issue={code:"missing-call-target",message:"CALL requires a callable name.",token:n??t};return}for(this.position+=1;[".","->",":"].includes(this.tokens[this.position]?.lexeme??"");){let i=this.tokens[this.position];if(this.position+=1,!this.isName(this.tokens[this.position])){this.issue={code:"missing-expression",message:`Expected an identifier after '${i.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}let r=this.tokens[this.position];if(r?.lexeme!=="("){this.issue={code:"missing-call-arguments",message:"CALL requires '(' after the callable name.",token:r};return}this.parseArguments(r)}parseArguments(t){if(this.position+=1,this.tokens[this.position]?.lexeme!==")")for(;this.issue===void 0&&(this.parseBinary(1),this.tokens[this.position]?.lexeme===",");)this.position+=1;this.expectClosing(")",t)}expectClosing(t,n){if(this.issue===void 0){if(this.tokens[this.position]?.lexeme!==t){this.issue={code:"unclosed-delimiter",message:`Expected '${t}' to close '${n.lexeme}'.`,token:this.tokens[this.position]};return}this.position+=1}}isName(t){return t?.kind===ne.TokenKind.Identifier||this.isCallableKeyword(t)}isMemberName(t){return t?.kind===ne.TokenKind.Number||this.isName(t)}isCallableKeyword(t){return t?.kind===ne.TokenKind.Keyword&&!Yy.has(Pt(t)??"")&&!Sm.has(Pt(t)??"")&&!Dm.has(Pt(t)??"")}};function nT(e,t,n){return n.token===void 0?He(e,n.code,n.message,t):Te(n.code,n.message,n.token)}function Ne(e,t,n){let r=new Ta(t).parse();return r===void 0?!0:(n.push(nT(e,t,r)),!1)}var _a=class{constructor(t,n,r){this.source=t,this.tokens=n,this.diagnostics=r,this.position=0,this.statements=[]}parse(){for(;this.positionc.lexeme==="(")&&this.diagnostics.push(Te("missing-call-arguments","CALL requires '(' after the callable name.",n)),this.position=r;let s=this.consumeTerminator("CALL statement",i[i.length-1]??t);this.statements.push({kind:"call",first:t,last:s,name:n})}parseIf(){let t=this.consume(),n=this.findTopLevelKeyword(this.position,new Set(["THEN"])),r=t;if(n<0){let i=this.tokens.slice(this.position);this.diagnostics.push(He(this.source,"missing-then","IF requires 'THEN' after its condition.",i.length>0?i:[t])),this.position=this.tokens.length,r=i[i.length-1]??t}else Ne(this.source,this.tokens.slice(this.position,n),this.diagnostics),this.position=n,r=this.consume(),this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","IF header must not be terminated after THEN.",this.current())),this.consume());this.statements.push({kind:"if",first:t,last:r,open:"if"})}parseElse(){let t=this.consume();this.current()?.lexeme===";"&&(this.diagnostics.push(Te("unexpected-semicolon","ELSE must not be terminated with a semicolon.",this.current())),this.consume()),this.statements.push({kind:"else",first:t,last:t,middle:!0})}parseFor(){let t=this.consume(),n=this.current();if(n?.kind!==ne.TokenKind.Identifier?this.diagnostics.push(n===void 0?He(this.source,"missing-loop-variable","FOR requires a loop variable.",[t]):Te("missing-loop-variable","FOR requires a loop variable.",n)):this.consume(),this.current()?.lexeme!=="="){let o=this.current();this.diagnostics.push(o===void 0?He(this.source,"expected-equals","Expected '=' after FOR loop variable.",n===void 0?[t]:[t,n]):Te("expected-equals","Expected '=' after FOR loop variable.",o)),o?.lexeme==="=="&&this.consume()}else this.consume();let r=this.findTopLevelKeyword(this.position,new Set(["TO"])),i=n??t;if(r<0){let o=this.headerEnd(this.position),s=this.tokens.slice(this.position,o);this.diagnostics.push(He(this.source,"missing-to","FOR requires 'TO' after the initial expression.",s.length>0?s:[t])),this.position=o,i=s[s.length-1]??i}else{Ne(this.source,this.tokens.slice(this.position,r),this.diagnostics),this.position=r+1;let o=this.findTopLevelKeyword(this.position,new Set(["STEP"])),s=this.headerEnd(this.position),c=o>=0&&o=0&&o0&&Ne(this.source,r,this.diagnostics),this.position=n;let i=this.consumeTerminator("RETURN statement",r[r.length-1]??t);this.statements.push({kind:"return",first:t,last:i})}parseIdentifierStatement(){let t=this.current(),n=this.statementBoundary(this.position),r=this.tokens.slice(this.position,n),i=this.findTopLevelLexeme(this.position,"="),o=i>=this.position&&iv.lexeme==="=")&&r.some(v=>Ie(v)==="TO");this.statements.push({kind:c,first:t,last:d,name:c==="direct-call"?t:void 0,recoveredLoop:h})}statementBoundary(t){let n=0;for(let r=t;r",":"].includes(t[n].lexeme)&&[ne.TokenKind.Identifier,ne.TokenKind.Number].includes(t[n+1]?.kind)){n+=2;continue}if(t[n].lexeme==="["){let r=t.findIndex((i,o)=>o>n&&i.lexeme==="]");if(r<0||!Ne(this.source,t.slice(n+1,r),[]))return!1;n=r+1;continue}return!1}return!0}looksLikeDirectCall(t){return t.length<3||t[0].kind!==ne.TokenKind.Identifier&&t[0].kind!==ne.TokenKind.Keyword?!1:t.some(n=>n.lexeme==="(")}consumeTerminator(t,n){return this.current()?.lexeme===";"?this.consume():(this.diagnostics.push(He(this.source,"missing-semicolon",`${t} is missing the required semicolon.`,[n])),n)}current(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}};function rT(e,t){let n=0;for(let r=t;ri.lexeme===";"))return r}return e.length-1}function iT(e,t){let n=rT(e,t);if(n>t)return n;let r=e[t],i=Ie(r[0])==="IF",o=Ie(r[0])==="ELSE"&&Ie(r[1])==="IF";if(!i&&!o||r.some(d=>Ie(d)==="THEN"))return t;let s=i&&r.length===1,c=["AND","OR","NOT"].includes(Ie(r[r.length-1])??""),g=["AND","OR"].includes(Ie(e[t+1]?.[0])??"");if(!s&&!c&&!g)return t;for(let d=t+1;dIe(h)==="THEN"))return d;return t}function oT(e){let t=(0,Ky.tokenize)(e),n=e.length===0?1:e.split(/\r\n|\r|\n/).length,r=Array.from({length:n},(m,T)=>tT(t,T)),i=[],o=[],s=[],c=new Array(n),g=[],d=[];for(let m=0;mT.kind==="dim"&&T.datatype!==void 0))if(!Vy.DATATYPE_SET.has(m.datatype.toUpperCase())){let T=m.datatypeRange??m.range,D=`${T.start.line}:${T.start.character}`;if(h.has(D))continue;h.add(D),s.push({code:"unknown-datatype",message:`Unknown datatype '${m.datatype}'.`,severity:"error",range:T})}let v=(0,ki.sourceRange)(e,{start:0,end:e.length});return{source:e,tokens:t,statements:i,blocks:o,diagnostics:s,lines:c,...v}}});var qm=S(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatQuickScriptLexically=Mm;sr.formatQuickScriptStructure=Em;sr.formatQuickScript=hT;var L=at(),Ia=rr(),sT=Ri();function Rm(e){return e===void 0||e.kind===L.TokenKind.Newline||e.kind===L.TokenKind.EOF}function Ca(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].kind!==L.TokenKind.Whitespace&&e[n].kind!==L.TokenKind.Newline)return e[n]}function xm(e,t){for(let n=t+1;n0&&/^[ \t\f\v]+$/.test(e[e.length-1])&&e.pop()}function ba(e){or(e);let t=e[e.length-1];t!==void 0&&!t.endsWith(` +`)&&!t.endsWith("\r")&&e.push(" ")}function cT(e,t){if(e[t].lexeme!=="-"||xm(e,t)?.kind!==L.TokenKind.Number)return!1;let n=Ca(e,t);return n===void 0||n.kind===L.TokenKind.Operator||n.kind===L.TokenKind.Punctuation&&["(","[",",",";",":"].includes(n.lexeme)}function aT(e,t){return e.split(/\r\n|\r|\n/).map(r=>r.replace(/[ \t\f\v]+$/g,"")).join(t)}function Mm(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),i=(0,Ia.tokenize)(r);if(i.some(d=>d.kind===L.TokenKind.String&&!d.lexeme.endsWith('"'))||i.some(d=>d.kind===L.TokenKind.Unknown&&d.lexeme==="}"))return{text:r,changed:r!==e};let o=[],s=!1,c=!1;for(let d=0;d")||_e(v,t.regionBlockCodeBegin??"{region"))&&(c=!0),T!==void 0&&(T.kind===L.TokenKind.Identifier||T.kind===L.TokenKind.Keyword||T.kind===L.TokenKind.Datatype)&&(o.push(" "),s=!0);continue}o.push(h.lexeme)}let g=aT(o.join(""),n);return{text:g,changed:g!==e}}function uT(e){let t=Number.isInteger(e.indentSize)&&e.indentSize>=1&&e.indentSize<=10?e.indentSize:4;return e.insertSpaces===!1?" ":" ".repeat(t)}function lT(e){let t=(0,Ia.tokenize)(e),n=[];for(let r of t)r.kind===L.TokenKind.EOF||r.kind===L.TokenKind.Newline||(r.kind===L.TokenKind.Whitespace?n.length>0&&n[n.length-1]!==" "&&n.push(" "):n.push(r.lexeme));return n.join("").replace(/[ \t]+$/g,"")}function _e(e,t){return t!==void 0&&t.length>0&&e.toLowerCase().startsWith(t.toLowerCase())}function dT(e,t){return _e(e,t.blockCodeBegin??"{>")||_e(e,t.blockCodeEnd??"{<")||_e(e,t.blockCodeExclude??"{#")||_e(e,t.regionBlockCodeBegin??"{region")||_e(e,t.regionBlockCodeEnd??"{endregion")||_e(e,t.regionBlockCodeExclude??"{#")}function fT(e){let n=e.split(/\r\n|\r|\n/).slice(1,e.endsWith("}")?-1:void 0).filter(i=>i.trim().length>0);if(n.length===0)return"";let r=n[0].match(/^[ \t]*/)?.[0]??"";for(let i of n.slice(1)){let o=i.match(/^[ \t]*/)?.[0]??"";for(;r.length>0&&!o.startsWith(r);)r=r.slice(0,-1)}return r}function mT(e,t){let n=new Map;for(let r of(0,Ia.tokenize)(e)){if(r.kind!==L.TokenKind.Comment||r.range.end.line<=r.range.start.line)continue;let i=e.lastIndexOf(` +`,r.span.start-1)+1,o=e.slice(i,r.span.start),s=r.lexeme.trimStart();/^[ \t]*$/.test(o)&&s.startsWith("{")&&n.set(r.range.start.line,{token:r,directive:dT(s,t),contentIndent:fT(r.lexeme)})}return n}function Om(e,t,n){if(e.trim().length===0)return"";if(t.contentTargetIndent!==void 0&&t.contentOriginalIndent!==void 0)return t.alignClosingLine===!0&&n===t.endLine?t.targetIndent+e.trimStart():e.startsWith(t.contentOriginalIndent)?t.contentTargetIndent+e.slice(t.contentOriginalIndent.length):t.contentTargetIndent+e.trimStart();if(e.startsWith(t.originalIndent))return t.targetIndent+e.slice(t.originalIndent.length);let r=e.match(/^[ \t]*/)?.[0]??"",i=t.targetIndent.length-t.originalIndent.length;return i<0?e.slice(Math.min(-i,r.length)):i>0?t.targetIndent.slice(0,i)+e:e}function Em(e,t={}){let n=t.lineEnding??`\r +`,r=e.replace(/\r\n|\r|\n/g,n),i=(0,sT.parseQuickScript)(r),o=r.split(n),s=mT(r,t),c=[],g=uT(t),d=0,h=0,v,m=t.removeEmptyLines===!1?Number.POSITIVE_INFINITY:Math.max(0,t.allowedNumberOfEmptyLines??1);for(let D=0;D")||_e(x,t.regionBlockCodeBegin??"{region"))&&M?.directive!==!0&&(d+=1)}let T=c.join(n);return{text:T,changed:T!==e,diagnostics:i.diagnostics}}function hT(e,t={}){let n=Mm(e,t),r=Em(n.text,t);return{...r,changed:r.text!==e}}});var xi=S(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.KNOWN_FUNCTIONS=void 0;Oi.KNOWN_FUNCTIONS=[{name:"Abs",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Ack",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ActivateApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"AddPermission",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckRecent",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelect",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almAckTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almDefQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almMoveWindow",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectionCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectItem",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSelectTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSetQueryByName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almShowStats",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressDisplay",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressRetain",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelected",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedGroup",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressSelectedTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almSuppressTag",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnselectAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"almUnsuppressAll",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"AnnotateLayout",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindAlarmGroupInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindFileInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUFindPrinterInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetConfigurationFilePath",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetInstanceCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterJobCount",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterName",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetPrinterStatus",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryProcessingState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUGetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUIsInstanceUsed",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetAlarmGroupText",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryAlarmState",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryFromPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetQueryToPriority",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUSetTimeoutValues",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStartQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopInstance",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUStopQuery",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"APUTranslateErrorCode",category:"IT-functions Ground Teil 1",sourceComment:"IT-functions Ground Teil 1"},{name:"ArcCos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcSin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ArcTan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"AttemptInvisibleLogon",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangePassword",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ChangeWindowColor",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Clip_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ConvertTemp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Cos",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"CreateFilenameFromDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DateTimeGMT",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogStringEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DialogValueEntry",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"DText",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"EnableDisableKeys",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Exp",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"FileCopy",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileDelete",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileMove",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FilePrint",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileReadFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileReadMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileSelect",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"FileWriteFields",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"FileWriteMessage",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"GeoArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoEqualSideArea",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GeoVolume",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetAccountStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"GetDiscOffMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetDiscOnMsg",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetNodeName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyD",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyI",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetPropertyM",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"GetWindowName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"Hide_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"HideSelf",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetLastError",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetTimeStringAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValue",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtScooter",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTGetValueAtZone",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollLeft",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTScrollRight",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSelectTag",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTSetPenName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTUpdateToCurrentTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomIn",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"HTZoomOut",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppActive",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoAppTitle",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoAppTitleExpand",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InfoDisk",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoDosEnv",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoFile",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoInTouchAppDir",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoResources",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"InfoWinEnv",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"INIReadInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIReadString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteInteger",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"INIWriteString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"Int",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"InTouchVersion",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"InvisibleVerifyCredentials",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IODisableFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOForceFailover",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetAccessNameStatus",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetActiveSourceName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetApplication",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetNode",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOGetTopic",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOReinitialize",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IORRGetItemActiveState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRGetSystemInfo",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IORRWriteState",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"IOSetAccessName",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetItem",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOSetRemoteReferences",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IOStartUninitConversations",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAnyAsyncFunctionBusy",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsAssignedRole",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"IsNodeAppRunning",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXAppActivate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCheckDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDate",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTime",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXConvertDateTimeString",category:"IT-functions Ground Teil 2",sourceComment:"IT-functions Ground Teil 2"},{name:"ITXCreateDate",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDateTimeUTC",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXCreateDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXCreateSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXGetProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileInt",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXPutProfileString",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXRemoveSubDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXResizeApplication",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetLocalTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemDate",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXSetSystemTime",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXShowHelpByNumber",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXShowHelpByString",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ITXStartAppInDirectory",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"ITXWindowCtrl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"LaunchTagViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Log",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"LogMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogN",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Logoff",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"LogonCurrentUser",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MessageBox",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"MetFromStdFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MetFromStdWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"MoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"NumberRecipes",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"OpenWindowsList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Pi",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"PlaySound",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PostLogonDialog",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintHT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintScreen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PrintWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptGetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptLoadTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPanTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptPauseTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptRefreshTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSaveTrendCfg",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetPenEx",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxis",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTimeAxisToCurrent",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrend",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptSetTrendType",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomCurrentPen",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ptZoomTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserAdd",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserDelete",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserEdit",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserGetIndex",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"PwdUserRead",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"QueryGroupMembership",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RecipeDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeGetMessage",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeLoad",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSave",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectNextRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectPreviousRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectRecipe",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"RecipeSelectUnit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"ReloadWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"RestartWindowViewer",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Restore_clip",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Round",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SendKeys",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMail",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SendSMTPMailwAttachment",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetCursorPosition",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SetPropertyD",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyI",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetPropertyM",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetTagEU",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SetWindowPrinter",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sgn",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Show",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Show_cursor",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"ShowAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowHome",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"ShowTopLeftAt",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Sin",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"SPCEXSetDataset",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetEndTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetOutputFile",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetProduct",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SPCEXSetStartTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLAppendStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearParam",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLClearTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCommit",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLConnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLCreateTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDelete",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDisconnect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLDropTable",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLErrorMsg",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLFirst",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLGetRecord",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsert",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertEnd",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertExecute",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLInsertPrepare",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLast",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLLoadStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLManageDSN",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNext",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLNumRows",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrepareStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLPrev",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLRollback",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSelect",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamChar",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDateTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamDecimal",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamFloat",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamInt",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamLong",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamNull",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetParamTime",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLSetStatement",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLTransact",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdate",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"SQLUpdateCurrent",category:"Intouch AddOns functions",sourceComment:"Intouch AddOns functions"},{name:"Sqrt",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StartApp",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"StdFromMetFluid",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetLinear",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StdFromMetWeight",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"StringASCII",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringChar",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompare",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringCompareEncrypted",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"StringCompareNoCase",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromGMTTimeToLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringFromTimeLocal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringInString",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLeft",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLen",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringLower",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringMid",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringReplace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringRight",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringSpace",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTest",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToIntg",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringToReal",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringTrim",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"StringUpper",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"SwitchDisplayLanguage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SysBeep",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"SystemIsNT",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TagExists",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"Tan",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"Text",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"Trunc",category:"IT-functions-Math",sourceComment:"IT-functions-Math"},{name:"TseGetClientId",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseGetClientNodeName",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnClient",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"TseQueryRunningOnConsole",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"UTCDateTime",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcAddItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcClear",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcDeleteSelection",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcErrorMessage",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcFindItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcGetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcInsertItem",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcLoadText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveList",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSaveText",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wcSetItemData",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WindowState",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWAlwaysOnTop",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWBeep32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWCntx32",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWContext",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControl",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWControlPanel",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWDosCommand",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWExecute",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWGetServiceExeName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceName",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWGetServiceStatus",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWIsDayLightSaving",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMoveWindow",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWMultiMonitorNode",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPoke",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWPrimaryMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWRequest",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWServiceControl",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWServiceControlError",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWin95",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWShutDownWinNT40",category:"IT-functions-System",sourceComment:"IT-functions-System"},{name:"WWStartApp",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"wwStringFromTime",category:"Intouch String functions",sourceComment:"Intouch String functions"},{name:"WWVirtualMonitorHeight",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"},{name:"WWVirtualMonitorWidth",category:"IT-functions Ground Teil 3",sourceComment:"IT-functions Ground Teil 3"}]});var jm=S(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.completions=pT;cr.hoverAt=yT;cr.documentSymbols=TT;var Gm=xi(),Nm=Zn(),Am=at();function gT(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line{let i=r.label.toUpperCase();t.has(i)||t.set(i,r)};for(let r of Nm.KEYWORDS)n({label:r,kind:"keyword",detail:"QuickScript keyword"});for(let r of Nm.DATATYPES)n({label:r,kind:"datatype",detail:"QuickScript datatype"});for(let r of Gm.KNOWN_FUNCTIONS)n({label:r.name,kind:"function",detail:r.sourceComment||r.category});for(let r of e.symbols)n({label:r.name,kind:"variable",detail:r.datatype?`Local ${r.datatype} variable`:"Local variable"});for(let r of e.document.statements.filter(i=>i.kind==="call"&&i.name!==void 0))n({label:r.name,kind:"call-target",detail:"Document call target"});return[...t.values()].sort((r,i)=>r.label.localeCompare(i.label,"en",{sensitivity:"base"}))}function yT(e,t){let n=e.document.tokens.find(o=>gT(o.range,t));if(n===void 0)return;if(n.kind===Am.TokenKind.Keyword)return{label:n.lexeme.toUpperCase(),detail:"QuickScript keyword",range:n.range};if(n.kind===Am.TokenKind.Datatype)return{label:n.lexeme.toUpperCase(),detail:"QuickScript datatype",range:n.range};let r=e.symbols.find(o=>o.name.toUpperCase()===n.lexeme.toUpperCase());if(r!==void 0)return{label:r.name,detail:r.datatype?`Local ${r.datatype} variable`:"Local variable",range:n.range};let i=Gm.KNOWN_FUNCTIONS.find(o=>o.name.toUpperCase()===n.lexeme.toUpperCase());if(i!==void 0)return{label:i.name,detail:i.sourceComment||i.category,range:n.range};if(/^(SYS_|MA_|SMEL_|HER_)/i.test(n.lexeme))return{label:n.lexeme,detail:"Hermes system variable",range:n.range}}function TT(e){let t=e.document.blocks.map(s=>({name:s.kind.toUpperCase(),kind:s.kind,range:s.range,selectionRange:s.opener,children:[]})),n=[];for(let s of e.document.blocks)s.parentId===void 0?n.push(t[s.id]):t[s.parentId].children.push(t[s.id]);let r=[...e.symbols.map(s=>({name:s.name,kind:"variable",range:s.range,selectionRange:s.selectionRange,children:[]})),...n],i=e.metadata,o=i.nameRange??i.triggerRange??e.document.range;if(i.scriptType==="QuickFunction"&&i.name!==void 0)return[{name:i.name,kind:"function",range:e.document.range,selectionRange:o,children:r}];if(i.scriptType==="Window"&&i.name!==void 0){let s=i.event===void 0?r:[{name:i.event,kind:"event",range:e.document.range,selectionRange:i.eventRange??o,children:r}];return[{name:i.name,kind:"window",range:e.document.range,selectionRange:o,children:s}]}if(i.scriptType==="Application"){let s=i.name??"Application",c=i.event===void 0?r:[{name:i.event,kind:"event",range:e.document.range,selectionRange:i.eventRange??o,children:r}];return[{name:s,kind:"application",range:e.document.range,selectionRange:o,children:c}]}if(i.scriptType==="DataChange"||i.scriptType==="Condition"){let s=i.scriptType==="DataChange"?"data-change":"condition";return[{name:i.name??i.trigger??i.scriptType,kind:s,range:e.document.range,selectionRange:o,children:r}]}if(i.scriptType==="KeyScript"){let s=i.name??"KeyScript",c=i.shortcut===void 0?r:[{name:i.shortcut,kind:"event",range:e.document.range,selectionRange:i.shortcutRange??o,children:r}];return[{name:s,kind:"key-script",range:e.document.range,selectionRange:o,children:c}]}return r}});var Fm=S(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.QUALITY_DIAGNOSTIC_CODES=void 0;kt.qualityDiagnostics=DT;var Sn=at();kt.QUALITY_DIAGNOSTIC_CODES={nonAsciiIdentifier:"quickscript.naming.nonAsciiIdentifier",windowWhitespace:"quickscript.naming.windowWhitespace",windowNonAscii:"quickscript.naming.windowNonAscii"};var _T=/^[A-Za-z0-9_$#-]+$/,vT=new Set(["HIDE","SHOW"]),bT=new Set(["HIDE","INFOAPPSTATUS","INFOAPPTITLEEXPAND","MOVEWINDOW","PRINTWINDOW","SHOW","SHOWAT","SHOWTOPLEFTAT","WINDOWSTATE"]);function CT(e){return e.document.tokens.filter(t=>![Sn.TokenKind.Whitespace,Sn.TokenKind.Newline,Sn.TokenKind.Comment,Sn.TokenKind.EOF].includes(t.kind))}function IT(e){return e.lexeme.startsWith('"')&&e.lexeme.endsWith('"')?e.lexeme.slice(1,-1):e.lexeme.slice(1)}function ST(e){let t=CT(e),n=[];for(let r=0;r")){if(vT.has(i)&&t[r+1]?.kind===Sn.TokenKind.String){n.push(t[r+1]);continue}bT.has(i)&&t[r+1]?.lexeme==="("&&t[r+2]?.kind===Sn.TokenKind.String&&n.push(t[r+2])}}return n}function Sa(e,t,n,r){if(n!=="off")return{code:e,message:t,severity:n,range:r.range,source:"intouch-quality"}}function DT(e,t={}){let n=[],r=new Set,i=t.nonAsciiIdentifiers??"warning";for(let o of e.identifiers){let s=o.name.toUpperCase();if(_T.test(o.name)||r.has(s))continue;r.add(s);let c=Sa(kt.QUALITY_DIAGNOSTIC_CODES.nonAsciiIdentifier,`Avoid non-ASCII characters in identifier '${o.name}'.`,i,o);c!==void 0&&n.push(c)}for(let o of ST(e)){let s=IT(o);if(/\s/u.test(s)){let c=Sa(kt.QUALITY_DIAGNOSTIC_CODES.windowWhitespace,"Avoid whitespace in window names.",t.windowWhitespace??"warning",o);c!==void 0&&n.push(c)}if(/[^\x00-\x7f]/u.test(s)){let c=Sa(kt.QUALITY_DIAGNOSTIC_CODES.windowNonAscii,"Avoid non-ASCII characters in window names.",t.windowNonAscii??"warning",o);c!==void 0&&n.push(c)}}return n}});var $m=S($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.quickFunctionDeclarations=Hm;$t.quickFunctionNames=OT;$t.analyzeQuickScript=xT;$t.definitionAt=MT;$t.referencesAt=ET;var wT=Ri(),Lm=ya(),PT=xi(),Da=tr(),Ht=at();function Wm(e,t){return(t.line>e.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.line=0;n-=1)if(![Ht.TokenKind.Whitespace,Ht.TokenKind.Newline,Ht.TokenKind.Comment].includes(e[n].kind))return e[n]}function RT(e,t){for(let n=t+1;n({name:n.name,kind:"parameter",range:n.nameRange})),metadata:t}]}function Hm(e,t={}){return Um(e,(0,Lm.extractDocumentMetadata)(e,t))}function OT(e){let t=new Map;for(let n of Hm(e))t.set(n.name.toUpperCase(),n.name);return[...t.values()]}function xT(e,t={}){let n=(0,wT.parseQuickScript)(e),r=(0,Lm.extractDocumentMetadata)(e,{fileName:t.fileName,tokens:n.tokens}),i=[...n.diagnostics,...r.diagnostics],o=[],s=Um(e,r),c=new Map,g=new Set(PT.KNOWN_FUNCTIONS.map(T=>T.name.toUpperCase()));for(let T of s)g.add(T.name.toUpperCase());for(let T of t.knownFunctionNames??[])g.add(T.toUpperCase());for(let T of n.statements.filter(D=>D.kind==="dim"&&D.name!==void 0&&D.nameRange!==void 0)){let D=T.name.toUpperCase();if(c.get(D)!==void 0){i.push({code:"duplicate-local",message:`Local variable '${T.name}' is already declared.`,severity:"error",range:T.nameRange});continue}let A={id:o.length,name:T.name,kind:"variable",range:T.range,selectionRange:T.nameRange,datatype:T.datatype,scopeId:0};o.push(A),c.set(D,A)}let d=new Map;for(let T of o)d.set((0,Da.offsetAt)(e,T.selectionRange.start),T);let h=new Set;for(let T of n.statements.filter(D=>D.kind==="call"&&D.name!==void 0&&D.nameRange!==void 0))h.add((0,Da.offsetAt)(e,T.nameRange.start));let v=r.trigger===void 0||r.triggerRange===void 0?[]:[{name:r.trigger,kind:"trigger",range:r.triggerRange}],m=s.flatMap(T=>[{name:T.name,kind:"function",range:T.nameRange},...T.parameters]);r.trigger!==void 0&&r.triggerRange!==void 0&&m.push({name:r.trigger,kind:"global",range:r.triggerRange});for(let T of o)m.push({name:T.name,kind:"local",range:T.selectionRange});for(let T=0;T"){m.push({name:D.lexeme,kind:"member",range:D.range});continue}let x=c.get(D.lexeme.toUpperCase()),p=RT(n.tokens,T),l=h.has(D.span.start)||p?.lexeme==="(";if(m.push({name:D.lexeme,kind:l?"function":x===void 0?"global":"local",range:D.range}),l&&!g.has(D.lexeme.toUpperCase())&&i.push({code:"unknown-function",message:`Unknown QuickScript function '${D.lexeme}'.`,severity:"warning",range:D.range}),x!==void 0||l){let C=l?"call":p?.lexeme==="="?"write":"read";v.push({name:D.lexeme,kind:C,range:D.range,declarationId:x?.id})}}return{document:n,scopes:[{id:0,kind:"document",range:n.range,symbolIds:o.map(T=>T.id)}],symbols:o,references:v,identifiers:m,quickFunctions:s,metadata:r,diagnostics:i}}function MT(e,t){let n=e.references.find(r=>Wm(r.range,t));return n?.declarationId===void 0?void 0:e.symbols[n.declarationId]?.selectionRange}function ET(e,t,n=!0){let r=e.references.find(i=>Wm(i.range,t));return r?.declarationId===void 0?[]:e.references.filter(i=>i.declarationId===r.declarationId&&(n||i.kind!=="declaration")).map(i=>i.range)}});var wa=S(ue=>{"use strict";var qT=ue&&ue.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$e=ue&&ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&qT(t,e,n)};Object.defineProperty(ue,"__esModule",{value:!0});$e(Zn(),ue);$e(ya(),ue);$e(qm(),ue);$e(xi(),ue);$e(jm(),ue);$e(Ri(),ue);$e(Fm(),ue);$e($m(),ue);$e(tr(),ue);$e(at(),ue);$e(rr(),ue)});var Ra=S(ke=>{"use strict";var NT=ke&&ke.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),AT=ke&&ke.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),GT=ke&&ke.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;ie.start.line||t.line===e.start.line&&t.character>=e.start.character)&&(t.linen.kind==="call"),symbols:LT(e.uri,t.metadata)}}var Ei=class{constructor(){this.workspaceDocuments=new Map,this.openDocuments=new Map}replaceWorkspaceDocuments(t){this.workspaceDocuments.clear();for(let n of t)this.workspaceDocuments.set(zt(n.uri),ka(n))}updateWorkspaceDocument(t){this.workspaceDocuments.set(zt(t.uri),ka(t))}removeWorkspaceDocument(t){this.workspaceDocuments.delete(zt(t))}updateDocument(t){this.openDocuments.set(zt(t.uri),ka({uri:t.uri,text:t.getText()}))}removeDocument(t){this.openDocuments.delete(zt(t))}entries(){let t=new Map(this.workspaceDocuments);for(let[n,r]of this.openDocuments)t.set(n,r);return[...t.values()].sort((n,r)=>n.uri.localeCompare(r.uri,"en"))}entry(t){let n=zt(t);return this.openDocuments.get(n)??this.workspaceDocuments.get(n)}symbols(){return this.entries().flatMap(t=>t.symbols)}quickFunctions(t){let n=t?.toUpperCase();return this.symbols().filter(r=>r.kind==="QuickFunction"&&(n===void 0||r.name.toUpperCase()===n))}knownFunctionNames(){let t=new Map;for(let n of this.quickFunctions())t.set(n.name.toUpperCase(),n.name);return[...t.values()].sort((n,r)=>n.localeCompare(r,"en",{sensitivity:"base"}))}uniqueQuickFunction(t){let n=this.quickFunctions(t);return n.length===1?n[0]:void 0}symbolAt(t,n){return this.entry(t)?.symbols.find(r=>Pa(r.definitionRange,n))}symbolNameAt(t,n){let r=this.entry(t),i=this.symbolAt(t,n);return i?.kind!=="QuickFunction"?r?.calls.find(o=>Pa(o.range,n))?.name:i!==void 0?i.name:r?.calls.find(o=>Pa(o.range,n))?.name}references(t,n){let r=t.toUpperCase(),i=n?this.quickFunctions(t).map(s=>({name:s.name,kind:"declaration",uri:s.uri,range:s.definitionRange})):[],o=this.entries().flatMap(s=>s.calls.filter(c=>c.name.toUpperCase()===r).map(c=>({name:c.name,kind:"call",uri:s.uri,range:c.range})));return[...i,...o].sort((s,c)=>s.uri.localeCompare(c.uri,"en")||s.range.start.line-c.range.start.line||s.range.start.character-c.range.start.character)}diagnostics(t){let n=this.entry(t);if(n===void 0)return[];let r=[];for(let i of n.symbols.filter(o=>o.kind==="QuickFunction"))this.quickFunctions(i.name).length>1&&r.push({code:"duplicate-quickfunction",message:`QuickFunction '${i.name}' has multiple workspace definitions.`,severity:"warning",range:i.definitionRange,source:"intouch-metadata"});for(let i of n.calls)this.quickFunctions(i.name).length>1&&r.push({code:"ambiguous-quickfunction",message:`QuickFunction call '${i.name}' has multiple workspace definitions.`,severity:"warning",range:i.range,source:"intouch-metadata"});return r}};ke.WorkspaceSymbolIndex=Ei;ke.WorkspaceFunctionIndex=Ei});var Km=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.serverCapabilities=WT;Ye.diagnosticsFor=BT;Ye.formattingEdits=QT;Ye.symbolsFor=VT;Ye.definitionFor=KT;Ye.referencesFor=XT;Ye.completionsFor=YT;Ye.hoverFor=JT;var z=la(),Rt=wa(),Bm=Ra();function WT(){return{capabilities:{textDocumentSync:z.TextDocumentSyncKind.Incremental,documentFormattingProvider:!0,documentSymbolProvider:!0,definitionProvider:!0,referencesProvider:!0,completionProvider:{resolveProvider:!1},hoverProvider:!0}}}function UT(e){switch(e){case"keyword":return z.CompletionItemKind.Keyword;case"datatype":return z.CompletionItemKind.TypeParameter;case"variable":return z.CompletionItemKind.Variable;case"call-target":return z.CompletionItemKind.Method;default:return z.CompletionItemKind.Function}}function HT(e){switch(e){case"error":return z.DiagnosticSeverity.Error;case"information":return z.DiagnosticSeverity.Information;case"hint":return z.DiagnosticSeverity.Hint;default:return z.DiagnosticSeverity.Warning}}function Qm(e){return e instanceof Bm.WorkspaceSymbolIndex?e:void 0}function $T(e){let t=Qm(e);return t===void 0?e:t.knownFunctionNames()}function Dn(e,t){return(0,Rt.analyzeQuickScript)(e.getText(),{knownFunctionNames:$T(t),fileName:(0,Bm.documentFileName)(e.uri)})}function zT(e){let t=e.metadata.parameters.map(r=>`${r.name}: ${r.datatype}`).join(", "),n=e.metadata.returnType===void 0?"":`: ${e.metadata.returnType}`;return`${e.name}(${t})${n}`}function Vm(e){let t=zT(e);return e.metadata.description===void 0?t:`${t} -${e.metadata.description}`}function $T(e,t,n={}){let r=Dn(e,t),o=zm(t)?.diagnostics(e.uri)??[];return[...r.diagnostics,...o,...(0,Rt.qualityDiagnostics)(r,n.qualityDiagnostics)].map(i=>({code:i.code,message:i.message,range:i.range,severity:UT(i.severity),source:i.source??"intouch-language"}))}function zT(e,t){let n=(0,Rt.formatQuickScript)(e.getText(),t);return n.changed?[B.TextEdit.replace(B.Range.create(B.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function VT(e){let t=r=>{switch(r){case"variable":return B.SymbolKind.Variable;case"function":return B.SymbolKind.Function;case"window":return B.SymbolKind.Namespace;case"event":return B.SymbolKind.Event;case"application":return B.SymbolKind.Module;case"data-change":return B.SymbolKind.Event;case"condition":return B.SymbolKind.Event;case"key-script":return B.SymbolKind.Event;default:return B.SymbolKind.Struct}},n=r=>B.DocumentSymbol.create(r.name,void 0,t(r.kind),r.range,r.selectionRange,r.children.map(n));return(0,Rt.documentSymbols)(Dn(e)).map(n)}function KT(e,t,n){let r=(0,Rt.definitionAt)(Dn(e,n),t);if(r!==void 0)return B.Location.create(e.uri,r);if(n===void 0)return;let o=n.symbolNameAt(e.uri,t);if(o===void 0)return;let i=n.uniqueQuickFunction(o);return i===void 0?void 0:B.Location.create(i.uri,i.definitionRange)}function XT(e,t,n,r){let o=(0,Rt.referencesAt)(Dn(e,r),t,n);if(o.length>0)return o.map(s=>B.Location.create(e.uri,s));if(r===void 0)return[];let i=r.symbolNameAt(e.uri,t);return i===void 0?[]:r.references(i,n).map(s=>B.Location.create(s.uri,s.range))}function ZT(e,t){let n=new Set((t?.symbols()??[]).filter(i=>!i.callable).map(i=>i.name.toUpperCase())),r=(0,Rt.completions)(Dn(e,t)).filter(i=>i.kind!=="call-target"||!n.has(i.label.toUpperCase())),o=new Map(r.map(i=>[i.label.toUpperCase(),{label:i.label,kind:WT(i.kind),detail:i.detail}]));for(let i of t?.quickFunctions()??[]){let s=t?.quickFunctions(i.name).length??0;o.set(i.name.toUpperCase(),{label:i.name,kind:B.CompletionItemKind.Function,detail:s>1?`Ambiguous workspace QuickFunction (${s} definitions)`:Vm(i)})}return[...o.values()].sort((i,s)=>i.label.localeCompare(s.label,"en",{sensitivity:"base"}))}function YT(e,t,n){let r=n?.symbolAt(e.uri,t);if(r!==void 0&&r.kind!=="QuickFunction"){let s=r.metadata.event??r.metadata.shortcut??r.metadata.trigger,c=s===void 0?r.kind:`${r.kind}: ${s}`;return{contents:{kind:"markdown",value:`**${r.name}** +${e.metadata.description}`}function BT(e,t,n={}){let r=Dn(e,t),i=Qm(t)?.diagnostics(e.uri)??[];return[...r.diagnostics,...i,...(0,Rt.qualityDiagnostics)(r,n.qualityDiagnostics)].map(o=>({code:o.code,message:o.message,range:o.range,severity:HT(o.severity),source:o.source??"intouch-language"}))}function QT(e,t){let n=(0,Rt.formatQuickScript)(e.getText(),t);return n.changed?[z.TextEdit.replace(z.Range.create(z.Position.create(0,0),e.positionAt(e.getText().length)),n.text)]:[]}function VT(e){let t=r=>{switch(r){case"variable":return z.SymbolKind.Variable;case"function":return z.SymbolKind.Function;case"window":return z.SymbolKind.Namespace;case"event":return z.SymbolKind.Event;case"application":return z.SymbolKind.Module;case"data-change":return z.SymbolKind.Event;case"condition":return z.SymbolKind.Event;case"key-script":return z.SymbolKind.Event;default:return z.SymbolKind.Struct}},n=r=>z.DocumentSymbol.create(r.name,void 0,t(r.kind),r.range,r.selectionRange,r.children.map(n));return(0,Rt.documentSymbols)(Dn(e)).map(n)}function KT(e,t,n){let r=(0,Rt.definitionAt)(Dn(e,n),t);if(r!==void 0)return z.Location.create(e.uri,r);if(n===void 0)return;let i=n.symbolNameAt(e.uri,t);if(i===void 0)return;let o=n.uniqueQuickFunction(i);return o===void 0?void 0:z.Location.create(o.uri,o.definitionRange)}function XT(e,t,n,r){let i=(0,Rt.referencesAt)(Dn(e,r),t,n);if(i.length>0)return i.map(s=>z.Location.create(e.uri,s));if(r===void 0)return[];let o=r.symbolNameAt(e.uri,t);return o===void 0?[]:r.references(o,n).map(s=>z.Location.create(s.uri,s.range))}function YT(e,t){let n=new Set((t?.symbols()??[]).filter(o=>!o.callable).map(o=>o.name.toUpperCase())),r=(0,Rt.completions)(Dn(e,t)).filter(o=>o.kind!=="call-target"||!n.has(o.label.toUpperCase())),i=new Map(r.map(o=>[o.label.toUpperCase(),{label:o.label,kind:UT(o.kind),detail:o.detail}]));for(let o of t?.quickFunctions()??[]){let s=t?.quickFunctions(o.name).length??0;i.set(o.name.toUpperCase(),{label:o.name,kind:z.CompletionItemKind.Function,detail:s>1?`Ambiguous workspace QuickFunction (${s} definitions)`:Vm(o)})}return[...i.values()].sort((o,s)=>o.label.localeCompare(s.label,"en",{sensitivity:"base"}))}function JT(e,t,n){let r=n?.symbolAt(e.uri,t);if(r!==void 0&&r.kind!=="QuickFunction"){let s=r.metadata.event??r.metadata.shortcut??r.metadata.trigger,c=s===void 0?r.kind:`${r.kind}: ${s}`;return{contents:{kind:"markdown",value:`**${r.name}** -${c}`},range:r.definitionRange}}let o=n?.symbolNameAt(e.uri,t);if(o!==void 0){let s=n.quickFunctions(o);if(s.length>1)return{contents:{kind:"markdown",value:`**${o}** +${c}`},range:r.definitionRange}}let i=n?.symbolNameAt(e.uri,t);if(i!==void 0){let s=n.quickFunctions(i);if(s.length>1)return{contents:{kind:"markdown",value:`**${i}** Ambiguous workspace QuickFunction (${s.length} definitions).`}};if(s.length===1)return{contents:{kind:"markdown",value:`**${s[0].name}** -${Vm(s[0])}`},range:n?.entry(e.uri)?.calls.find(c=>c.name.toUpperCase()===o.toUpperCase()&&c.range.start.line===t.line&&c.range.start.character<=t.character&&c.range.end.character>t.character)?.range}}let i=(0,Rt.hoverAt)(Dn(e,n),t);return i===void 0?void 0:{contents:{kind:"markdown",value:`**${i.label}** +${Vm(s[0])}`},range:n?.entry(e.uri)?.calls.find(c=>c.name.toUpperCase()===i.toUpperCase()&&c.range.start.line===t.line&&c.range.start.character<=t.character&&c.range.end.character>t.character)?.range}}let o=(0,Rt.hoverAt)(Dn(e,n),t);return o===void 0?void 0:{contents:{kind:"markdown",value:`**${o.label}** -${i.detail}`},range:i.range}}});var Zm=I(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.readSettings=JT;qo.formattingSettings=e_;function lt(e){return typeof e=="object"&&e!==null?e:{}}function Xm(e){return typeof e=="number"?e:void 0}function Oa(e){return typeof e=="boolean"?e:void 0}function $t(e){return typeof e=="string"?e:void 0}function xa(e){let t=$t(e)?.toLowerCase();return t!==void 0&&["off","hint","information","warning","error"].includes(t)?t:void 0}function JT(e){let t=lt(e),n=t.VBI===void 0?t:lt(t.VBI),r=lt(n.formatter),o=lt(r.EmptyLine),i=lt(r.BC),s=lt(r.Region),c=lt(r.Misc),g=lt(n.diagnostics),d=lt(g.naming);return{allowedNumberOfEmptyLines:Xm(o.allowedNumberOfEmptyLines),removeEmptyLines:Oa(o.RemoveEmptyLines),removeEmptyLinesInComments:Oa(o.EmptyLinesAlsoInComment),blockCodeBegin:$t(i.BlockCodeBegin),blockCodeEnd:$t(i.BlockCodeEnd),blockCodeExclude:$t(i.BlockCodeExclude),regionBlockCodeBegin:$t(s.BlockCodeBegin),regionBlockCodeEnd:$t(s.BlockCodeEnd),regionBlockCodeExclude:$t(s.BlockCodeExclude),insertSpaces:Oa(c.ReplaceTabToSpaces),indentSize:Xm(c.IndentSize),qualityDiagnostics:{nonAsciiIdentifiers:xa(d.nonAsciiIdentifiers),windowWhitespace:xa(d.windowWhitespace),windowNonAscii:xa(d.windowNonAscii)}}}function e_(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var t_=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n_=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r_=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o(Ym=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,Aa.fileURLToPath)(n)),await u_(Ym),(0,Ot.serverCapabilities)()));be.onInitialized(async()=>{let e=await be.workspace.getConfiguration({section:"VBI"});No=(0,qa.readSettings)({VBI:e}),zt()});be.onDidChangeConfiguration(e=>{No=(0,qa.readSettings)(e.settings),zt()});be.onDidChangeWatchedFiles(e=>{(async()=>{for(let t of e.changes.filter(n=>/\.(?:vbi|vi)$/i.test(n.uri))){if(t.type===Ma.FileChangeType.Deleted){Ne.removeWorkspaceDocument(t.uri);continue}try{Ne.updateWorkspaceDocument({uri:t.uri,text:await Ea.promises.readFile((0,Aa.fileURLToPath)(t.uri),"utf8")})}catch{Ne.removeWorkspaceDocument(t.uri)}}zt()})()});Be.onDidOpen(e=>{Ne.updateDocument(e.document),zt()});Be.onDidChangeContent(e=>{Ne.updateDocument(e.document),zt()});Be.onDidClose(e=>{Ne.removeDocument(e.document.uri),be.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),zt()});be.onDocumentFormatting(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.formattingEdits)(t,(0,qa.formattingSettings)(No,e.options))});be.onDocumentSymbol(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.symbolsFor)(t)});be.onDefinition(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?void 0:(0,Ot.definitionFor)(t,e.position,Ne)});be.onReferences(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.referencesFor)(t,e.position,e.context.includeDeclaration,Ne)});be.onCompletion(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.completionsFor)(t,Ne)});be.onHover(e=>{let t=Be.get(e.textDocument.uri);return t===void 0?void 0:(0,Ot.hoverFor)(t,e.position,Ne)});be.onShutdown(()=>{});Be.listen(be);be.listen(); +${o.detail}`},range:o.range}}});var Ym=S(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.readSettings=ZT;qi.formattingSettings=e_;function lt(e){return typeof e=="object"&&e!==null?e:{}}function Xm(e){return typeof e=="number"?e:void 0}function Oa(e){return typeof e=="boolean"?e:void 0}function Bt(e){return typeof e=="string"?e:void 0}function xa(e){let t=Bt(e)?.toLowerCase();return t!==void 0&&["off","hint","information","warning","error"].includes(t)?t:void 0}function ZT(e){let t=lt(e),n=t.VBI===void 0?t:lt(t.VBI),r=lt(n.formatter),i=lt(r.EmptyLine),o=lt(r.BC),s=lt(r.Region),c=lt(r.Misc),g=lt(n.diagnostics),d=lt(g.naming);return{allowedNumberOfEmptyLines:Xm(i.allowedNumberOfEmptyLines),removeEmptyLines:Oa(i.RemoveEmptyLines),removeEmptyLinesInComments:Oa(i.EmptyLinesAlsoInComment),blockCodeBegin:Bt(o.BlockCodeBegin),blockCodeEnd:Bt(o.BlockCodeEnd),blockCodeExclude:Bt(o.BlockCodeExclude),regionBlockCodeBegin:Bt(s.BlockCodeBegin),regionBlockCodeEnd:Bt(s.BlockCodeEnd),regionBlockCodeExclude:Bt(s.BlockCodeExclude),insertSpaces:Oa(c.ReplaceTabToSpaces),indentSize:Xm(c.IndentSize),qualityDiagnostics:{nonAsciiIdentifiers:xa(d.nonAsciiIdentifiers),windowWhitespace:xa(d.windowWhitespace),windowNonAscii:xa(d.windowNonAscii)}}}function e_(e,t){return{...e,insertSpaces:e.insertSpaces??t.insertSpaces,indentSize:e.indentSize??t.tabSize}}});var t_=exports&&exports.__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:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n_=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r_=exports&&exports.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i(Jm=(e.workspaceFolders?.map(n=>n.uri)??(e.rootUri===null||e.rootUri===void 0?[]:[e.rootUri])).filter(n=>n.startsWith("file:")).map(n=>(0,qa.fileURLToPath)(n)),await u_(Jm),(0,Ot.serverCapabilities)()));ve.onInitialized(async()=>{let e=await ve.workspace.getConfiguration({section:"VBI"});Ni=(0,Na.readSettings)({VBI:e}),Qt()});ve.onDidChangeConfiguration(e=>{Ni=(0,Na.readSettings)(e.settings),Qt()});ve.onDidChangeWatchedFiles(e=>{(async()=>{for(let t of e.changes.filter(n=>/\.(?:vbi|vi)$/i.test(n.uri))){if(t.type===Ma.FileChangeType.Deleted){Ae.removeWorkspaceDocument(t.uri);continue}try{Ae.updateWorkspaceDocument({uri:t.uri,text:await Ea.promises.readFile((0,qa.fileURLToPath)(t.uri),"utf8")})}catch{Ae.removeWorkspaceDocument(t.uri)}}Qt()})()});ze.onDidOpen(e=>{Ae.updateDocument(e.document),Qt()});ze.onDidChangeContent(e=>{Ae.updateDocument(e.document),Qt()});ze.onDidClose(e=>{Ae.removeDocument(e.document.uri),ve.sendDiagnostics({uri:e.document.uri,diagnostics:[]}),Qt()});ve.onDocumentFormatting(e=>{let t=ze.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.formattingEdits)(t,(0,Na.formattingSettings)(Ni,e.options))});ve.onDocumentSymbol(e=>{let t=ze.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.symbolsFor)(t)});ve.onDefinition(e=>{let t=ze.get(e.textDocument.uri);return t===void 0?void 0:(0,Ot.definitionFor)(t,e.position,Ae)});ve.onReferences(e=>{let t=ze.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.referencesFor)(t,e.position,e.context.includeDeclaration,Ae)});ve.onCompletion(e=>{let t=ze.get(e.textDocument.uri);return t===void 0?[]:(0,Ot.completionsFor)(t,Ae)});ve.onHover(e=>{let t=ze.get(e.textDocument.uri);return t===void 0?void 0:(0,Ot.hoverFor)(t,e.position,Ae)});ve.onShutdown(()=>{});ze.listen(ve);ve.listen(); //# sourceMappingURL=server.js.map diff --git a/docs/language/quickscript.md b/docs/language/quickscript.md index da2d4e9..544e186 100644 --- a/docs/language/quickscript.md +++ b/docs/language/quickscript.md @@ -12,15 +12,14 @@ semantic approximation. Language knowledge is divided by responsibility: - `syntaxes/intouch.tmLanguage.json` provides lexical highlighting patterns, - built-in functions, Hermes helpers, dot fields, and presentation scopes. + native InTouch functions, dot fields, and presentation scopes. - `packages/core/src/languageData.ts` provides canonical lexical keywords, datatypes, operators, and punctuation. - `packages/core/src/tokenizer.ts` and `parser.ts` provide canonical lexical and structural interpretation. - `packages/core/src/generatedFunctionCatalog.ts` is generated from the TextMate grammar for completion, hover, and known-function diagnostics; it - preserves the distinction between native InTouch functions and Hermes - helpers and is not edited manually. + contains public native InTouch knowledge only and is not edited manually. - `language-configuration.json` and `snippets/vbi.json` provide editor behavior and authoring templates. - core tests and `src/test/suite/testfiles/` capture parser and formatter @@ -36,8 +35,8 @@ describes ownership and architecture; it does not define a second grammar. ## Tooling boundary -Serena excludes QuickScript because it does not natively support this language. -ProjectAtlas may index `.vbi` and `.vi` as neutral text for repository +Serena uses the thin QuickScript adapter to connect to the native language +server. ProjectAtlas may index `.vbi` and `.vi` structurally for repository navigation and lexical search. The extension's native language server supplies QuickScript symbols, local and QuickFunction cross-file definitions/references, completion, hover, formatting, and diagnostics. @@ -79,13 +78,12 @@ including a later `{<}` closing line, is comment trivia and cannot contribute parser or semantic diagnostics. The formatter indents that metadata comment as one block while preserving relative indentation inside it. -Known callable resolution combines the generated native InTouch and Hermes -catalog entries with QuickFunction declarations discovered in the current -document and workspace. The generated entries retain their catalog category; -workspace declarations remain a separate, richer source and take precedence -for definition and hover. Configurable activation of -additional project-specific catalogs is planned rather than inferred from -individual call sites. +Known callable resolution combines the generated public native InTouch catalog +with QuickFunction declarations discovered in the current document and +workspace. Workspace declarations remain a separate, richer source and take +precedence for definition and hover. Project-specific function catalogs must be +supplied externally or locally by a workspace and are not bundled by default; +isolated files may therefore report project calls as unresolved. Document/script classification comes from the canonical comment-based metadata model described in [QuickScript Document Metadata](document-metadata.md). diff --git a/packages/core/src/generatedFunctionCatalog.ts b/packages/core/src/generatedFunctionCatalog.ts index 390e46f..8d39d3c 100644 --- a/packages/core/src/generatedFunctionCatalog.ts +++ b/packages/core/src/generatedFunctionCatalog.ts @@ -28,11 +28,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 1", "sourceComment": "IT-functions Ground Teil 1" }, - { - "name": "Alarmkommentare", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "almAckAll", "category": "IT-functions Ground Teil 1", @@ -203,51 +198,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 1", "sourceComment": "IT-functions Ground Teil 1" }, - { - "name": "APAntriebStatistik", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "APMonatAktualisierenZaehler1", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "APMonatAktualisierenZaehler2", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "APMonatAktualisierenZaehler3", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "AppButonsConfig", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "ApplicomToUAReference", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "APTagAktualisierenZaehler1", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "APTagAktualisierenZaehler2", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "APTagAktualisierenZaehler3", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "APUFindAlarmGroupInstance", "category": "IT-functions Ground Teil 1", @@ -368,11 +318,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 1", "sourceComment": "IT-functions Ground Teil 1" }, - { - "name": "APZaehlerAbfragen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "ArcCos", "category": "IT-functions-Math", @@ -393,91 +338,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, - { - "name": "BDEDatenLesen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDEDatenSpeichern", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDEDatenSuchen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDESchichtSchreiben", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDESchichtwerteDatenOK", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDESchichtwerteZuweisen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDETageswerteDatenOK", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDETageswerteSchreiben", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BDETageswerteZuweisen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BZBetriebsstunden", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "BZMonatAktualisierenZaehler1", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "BZMonatAktualisierenZaehler2", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "BZMonatAktualisierenZaehler3", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "BZTagAktualisierenZaehler1", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "BZTagAktualisierenZaehler2", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "BZTagAktualisierenZaehler3", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "BZZaehlerAbfragen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "ChangePassword", "category": "IT-functions Ground Teil 2", @@ -538,11 +398,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, - { - "name": "ExterneModuleUeberwachen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "FileCopy", "category": "IT-functions-System", @@ -588,11 +443,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-System", "sourceComment": "IT-functions-System" }, - { - "name": "FUWerte", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "GeoArea", "category": "IT-functions-Math", @@ -628,11 +478,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, - { - "name": "GetFullTopic", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "GetNodeName", "category": "IT-functions Ground Teil 2", @@ -653,56 +498,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, - { - "name": "GetSplittByIndex", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "GetWindowName", "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, - { - "name": "HDWExport", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "HerBACKUP", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "HerGATEWAYanzeigeAktualisieren", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "HerGATEWAYStatusLesen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "HerGATEWAYtriggerFreigabe", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "HerGATEWAYueberwachen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "HerProViewStart", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "HerProViewStartV", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "Hide", "category": "IT-functions Ground Teil 2", @@ -713,11 +513,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, - { - "name": "HideAllPLS", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "HideSelf", "category": "IT-functions Ground Teil 2", @@ -793,11 +588,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 2", "sourceComment": "IT-functions Ground Teil 2" }, - { - "name": "Hubbodensteuerung", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "InfoAppActive", "category": "IT-functions-System", @@ -1103,26 +893,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-System", "sourceComment": "IT-functions-System" }, - { - "name": "KonfigLesen", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "KonfigSpeichern", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "LaunchTagViewer", "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "loadVarFromDB", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "Log", "category": "IT-functions-Math", @@ -1148,21 +923,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "MADatum", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "MAKurvenAbfragen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "MAKurvenProfileAbfragen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "MessageBox", "category": "IT-functions Ground Teil 3", @@ -1183,11 +943,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, - { - "name": "Mouse", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "MoveWindow", "category": "IT-functions Ground Teil 3", @@ -1198,11 +953,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "OnlineHilfeAufrufen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "OpenWindowsList", "category": "IT-functions Ground Teil 3", @@ -1343,26 +1093,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "QFFilter", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "QFFilterRegler15Schritt", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "QFLuftwerte", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "QFRinne", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "QueryGroupMembership", "category": "IT-functions Ground Teil 3", @@ -1428,11 +1158,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, - { - "name": "Scripsnippets_Intouch", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "SendKeys", "category": "IT-functions Ground Teil 3", @@ -1453,11 +1178,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "SessionUserInfoAkt", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "SetCursorPosition", "category": "IT-functions-Math", @@ -1478,76 +1198,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "SetReferenceBool", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetReferenceByte", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetReferenceDINT", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetReferenceDINTs", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetReferenceINT", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SetReferenceMerkerByte", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetReferenceReal", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetReferenceString", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetReferenceWord", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetSMELAccessname", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "SetTagEU", "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "SetTopicTest", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SetVarInputBoolsch", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "SetVarToggleBoolsch", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "SetWindowPrinter", "category": "IT-functions Ground Teil 3", @@ -1588,51 +1243,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-Math", "sourceComment": "IT-functions-Math" }, - { - "name": "SMELCPUPopup", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SMELEditorAufrufen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SMELInfo", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SMELInfoView", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SMELSQL", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SmelUpdateDB", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SMELUpdateDBWTaV", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SMELUpdateDBWTnV", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "Sollwertaenderung", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "SPCEXSetDataset", "category": "Intouch AddOns functions", @@ -1668,26 +1278,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "Intouch AddOns functions", "sourceComment": "Intouch AddOns functions" }, - { - "name": "SpecialAccessChangeGUI", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SpecialAccessChangePw", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SpecialAccessCheckGUI", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "SpeciallAccessCheckPw", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "SQLAppendStatement", "category": "Intouch AddOns functions", @@ -1903,26 +1493,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions-System", "sourceComment": "IT-functions-System" }, - { - "name": "StartEP2", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "StartEP3", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "StatusExtApp", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "StatusleistenInfofelder", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "StdFromMetFluid", "category": "IT-functions-Math", @@ -2058,11 +1628,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "SWReal", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "SysBeep", "category": "IT-functions Ground Teil 3", @@ -2073,66 +1638,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "sysuhrzeitsynchron", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABAntrieb", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABCommentTo2z", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABHER012AZ", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABHER012AZS", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABHER012EA", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABHER012EAF", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABHER012EAFB", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABHER012EAS", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABHER062", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABResetPLSReferences", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "TABWILO", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "TagExists", "category": "IT-functions Ground Teil 3", @@ -2178,51 +1683,6 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "VZMonatAktualisierenZaehler1", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "VZMonatAktualisierenZaehler2", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "VZMonatAktualisierenZaehler3", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "VZTagAktualisierenZaehler1", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "VZTagAktualisierenZaehler2", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "VZTagAktualisierenZaehler3", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "VZVerbrauchsdaten", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "VZZaehlerAbfragen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "WBBetriebsstunden", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "wcAddItem", "category": "IT-functions Ground Teil 3", @@ -2293,26 +1753,11 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "WebCPUaufrufen", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, { "name": "WindowState", "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" }, - { - "name": "WVVerbrauchsdaten", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "wwalmdbtrigger", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, { "name": "WWAlwaysOnTop", "category": "IT-functions Ground Teil 3", @@ -2442,185 +1887,5 @@ export const KNOWN_FUNCTIONS: readonly KnownFunction[] = [ "name": "WWVirtualMonitorWidth", "category": "IT-functions Ground Teil 3", "sourceComment": "IT-functions Ground Teil 3" - }, - { - "name": "xAnlagenConfig", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xAT01Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT02Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT03Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT04Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT05Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT06Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT07Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT08Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT09Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xAT10Config", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xBZVZSettings", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xGatawaySettings", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xHerDebug", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xHerDebugL", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xHerGATEWAYSettings", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xHerGatewayStart", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xKonfigSpeichern", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xLoggingConfig", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xLogoffOnTSMaster", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xLogoutFromStationTS", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xSetDateiPfade", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xSetDeverloper", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xSetSQLConfig", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xSetTSStation", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xSetUhrzeitserver", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 1" - }, - { - "name": "xSetupDeploymentMode", - "category": "Hermes helper", - "sourceComment": "Hermes ground-program QuickFunctions" - }, - { - "name": "xSTATION1BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION2BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION3BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION4BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION5BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION6BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION7BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION8BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" - }, - { - "name": "xSTATION9BiosName", - "category": "Hermes helper", - "sourceComment": "Hermes Own functions 2" } ] as const; diff --git a/packages/core/test/fixtures/representative.vbi b/packages/core/test/fixtures/representative.vbi index b1d2c4e..c785662 100644 --- a/packages/core/test/fixtures/representative.vbi +++ b/packages/core/test/fixtures/representative.vbi @@ -6,6 +6,6 @@ IF Index >= 1 THEN LogMessage("IF and { braces } stay in this string"); ELSE FOR Index = 1 TO 2 STEP 1 - CALL xGatawaySettings(); ' Hermes-specific function call + CALL WorkspaceFunction(); ' Workspace QuickFunction call target NEXT; ENDIF; diff --git a/packages/core/test/languageService.test.ts b/packages/core/test/languageService.test.ts index 85ee34d..6a8e341 100644 --- a/packages/core/test/languageService.test.ts +++ b/packages/core/test/languageService.test.ts @@ -4,27 +4,24 @@ import { completions, documentSymbols, hoverAt } from '../src/languageService'; import { analyzeQuickScript } from '../src/semantics'; suite('QuickScript language service', () => { - const source = 'DIM Counter AS INTEGER;\nIF Counter > 0 THEN\nCALL LogMessage("ok");\nCALL xGatawaySettings();\nENDIF;'; + const source = 'DIM Counter AS INTEGER;\nIF Counter > 0 THEN\nCALL LogMessage("ok");\nCALL WorkspaceFunction();\nENDIF;'; const model = analyzeQuickScript(source); - test('offers keywords, datatypes, sourced functions, Hermes helpers, locals, and call targets', () => { + test('offers keywords, datatypes, native functions, locals, and call targets', () => { const entries = completions(model); const byLabel = new Map(entries.map(entry => [entry.label.toUpperCase(), entry])); assert.strictEqual(byLabel.get('IF')?.kind, 'keyword'); assert.strictEqual(byLabel.get('INTEGER')?.kind, 'datatype'); assert.strictEqual(byLabel.get('LOGMESSAGE')?.kind, 'function'); - assert.strictEqual(byLabel.get('XGATAWAYSETTINGS')?.kind, 'function'); + assert.strictEqual(byLabel.get('WORKSPACEFUNCTION')?.kind, 'call-target'); assert.strictEqual(byLabel.get('COUNTER')?.kind, 'variable'); }); test('returns hover only for facts backed by language or document data', () => { assert.strictEqual(hoverAt(model, { line: 0, character: 5 })?.detail, 'Local INTEGER variable'); assert.match(hoverAt(model, { line: 2, character: 8 })?.detail ?? '', /IT-functions/); - assert.match( - hoverAt(analyzeQuickScript('Value = CALL GetSplittByIndex(Source, ".", 1);'), { line: 0, character: 15 })?.detail ?? '', - /Hermes Own functions/, - ); + assert.strictEqual(hoverAt(analyzeQuickScript('Value = CALL WorkspaceFunction();'), { line: 0, character: 15 }), undefined); assert.strictEqual(hoverAt(analyzeQuickScript('UnknownName;'), { line: 0, character: 2 }), undefined); }); diff --git a/packages/core/test/semantics.test.ts b/packages/core/test/semantics.test.ts index da7205b..b5ae370 100644 --- a/packages/core/test/semantics.test.ts +++ b/packages/core/test/semantics.test.ts @@ -71,16 +71,12 @@ suite('QuickScript semantic model', () => { assert.deepStrictEqual(model.diagnostics.map(item => item.code), ['unknown-datatype', 'unknown-function']); }); - test('classifies ground-program functions as Hermes helpers without accepting misspellings', () => { - const catalogEntries = ['xHerDebugL', 'Alarmkommentare', 'AppButonsConfig'] + test('preserves native function knowledge without accepting misspellings', () => { + const catalogEntries = ['LogMessage', 'StringLeft', 'TagExists'] .map(name => KNOWN_FUNCTIONS.find(item => item.name === name)); - const model = analyzeQuickScript('CALL xHerDebugL("ok", 10);\nCALL xHerDebugLX("ok", 10);'); + const model = analyzeQuickScript('CALL LogMessage("ok");\nCALL LogMessageX("ok");'); - assert.deepStrictEqual(catalogEntries.map(item => item?.category), [ - 'Hermes helper', - 'Hermes helper', - 'Hermes helper', - ]); + assert.ok(catalogEntries.every(item => item !== undefined)); assert.deepStrictEqual( model.diagnostics.filter(item => item.code === 'unknown-function').map(item => item.range.start), [{ line: 1, character: 5 }], @@ -89,11 +85,11 @@ suite('QuickScript semantic model', () => { test('separates CALL expression syntax from known-function resolution', () => { const known = analyzeQuickScript([ - 'X = CALL GetSplittByIndex(Source, ".", 1);', - 'Object.Field = CALL SetReferenceBool(Topic, 1, Bit);', - 'X = StringLower(CALL GetSplittByIndex(Source, ".", 1));', + 'X = CALL StringLeft(Source, 1);', + 'Object.Field = CALL StringRight(Topic, 1);', + 'X = StringLower(CALL StringLeft(Source, 1));', ].join('\n')); - const unknown = analyzeQuickScript('X = CALL GetSplittByIndeXx(Source, ".", 1);'); + const unknown = analyzeQuickScript('X = CALL StringLeftX(Source, 1);'); assert.deepStrictEqual(known.diagnostics, []); assert.deepStrictEqual(unknown.diagnostics.map(item => [item.code, item.range.start]), [ diff --git a/packages/core/test/tokenizer.test.ts b/packages/core/test/tokenizer.test.ts index 859895a..21c8f64 100644 --- a/packages/core/test/tokenizer.test.ts +++ b/packages/core/test/tokenizer.test.ts @@ -38,11 +38,11 @@ suite('QuickScript tokenizer', () => { ]); }); - test('preserves case and treats InTouch and Hermes function names as identifiers', () => { - const tokens = significant(tokenize('CALL LogMessage(); CALL xGatawaySettings();')); + test('preserves case and treats native and workspace function names as identifiers', () => { + const tokens = significant(tokenize('CALL LogMessage(); CALL WorkspaceFunction();')); const identifiers = tokens.filter(token => token.kind === TokenKind.Identifier); - assert.deepStrictEqual(identifiers.map(token => token.lexeme), ['LogMessage', 'xGatawaySettings']); + assert.deepStrictEqual(identifiers.map(token => token.lexeme), ['LogMessage', 'WorkspaceFunction']); }); test('recognizes established identifier forms without splitting instance prefixes', () => { diff --git a/packages/language-server/test/features.test.ts b/packages/language-server/test/features.test.ts index a3541d2..8d7cabb 100644 --- a/packages/language-server/test/features.test.ts +++ b/packages/language-server/test/features.test.ts @@ -205,23 +205,23 @@ suite('QuickScript language server features', () => { '{>', ' Script:', ' Type: QuickFunction', - ' Name: TABHER012EA', + ' Name: WorkspaceFunctionA', '', ' Parameters:', ' No formal parameters.', '', ' Usage:', - ' CALL TABHER012EA( );', + ' CALL WorkspaceFunctionA( );', '{<}', '', '{>', ' Version history:', ' V2.0.0 16.10.2020 ViRu Irgend etwas passt da vorn und Hinten nicht!', ' V2.1.0 03.02.2022 ViRu Typ (typ + 10 = ohne PLS --> PLSActive AS Memory Discrete --> Als Globale Variable festlegen!)', - ' V2.2.0 30.10.2024 ViRu debug mit xHerDebugL', + ' V2.2.0 30.10.2024 ViRu debug with workspace function', '{<}', ].join('\r\n'); - const document = TextDocument.create('file:///TABHER012EA.vbi', 'intouch', 1, source); + const document = TextDocument.create('file:///WorkspaceFunctionA.vbi', 'intouch', 1, source); assert.deepStrictEqual(diagnosticsFor(document), []); }); @@ -240,10 +240,10 @@ suite('QuickScript language server features', () => { test('diagnoses unresolved CALL and expression functions while resolving catalogs and QuickFunctions', () => { const source = [ - 'CALL xHerDebuga(Funkt + " ", 40);', + 'CALL UnknownFunctionA(Funkt + " ", 40);', 'a = StringLaft(Test, 4);', 'a = StringLeft(Test, StringInString(Test, ".", 1, 0) - 1);', - 'CALL xHerDebug(Funkt, 40);', + 'CALL UnknownFunctionB(Funkt, 40);', '{>', 'Type: QuickFunction', 'Name: GetFullTopic', @@ -258,6 +258,7 @@ suite('QuickScript language server features', () => { assert.deepStrictEqual(unknown.map(diagnostic => [diagnostic.range.start.line, diagnostic.range.start.character]), [ [0, 5], [1, 4], + [3, 5], [9, 5], ]); assert.ok(unknown.every(diagnostic => diagnostic.severity === 2)); @@ -283,9 +284,9 @@ suite('QuickScript language server features', () => { test('publishes only semantic diagnostics for syntactically valid CALL expressions', () => { const source = [ - 'TAB_HandF.Reference = CALL SetReferenceBool(tTopic, 1, BitS1);', - 'tTopic = StringLower(CALL GetSplittByIndex(TAB_AAFF.Reference, ".", 1));', - 'Value = CALL GetSplittByIndeXx(Source, ".", 1);', + 'TAB_HandF.Reference = CALL StringRight(tTopic, 1);', + 'tTopic = StringLower(CALL StringLeft(TAB_AAFF.Reference, 1));', + 'Value = CALL StringLeftX(Source, 1);', ].join('\n'); const calls = TextDocument.create('file:///call-expressions.vbi', 'intouch', 1, source); @@ -293,7 +294,7 @@ suite('QuickScript language server features', () => { ['unknown-function', { line: 2, character: 13 }], ]); assert.ok(hoverFor(calls, { line: 1, character: 34 })); - assert.ok(completionsFor(calls).some(item => item.label === 'GetSplittByIndex')); + assert.ok(completionsFor(calls).some(item => item.label === 'StringLeft')); }); test('uses existing definition and references for CALL expression targets', () => { @@ -410,13 +411,13 @@ suite('QuickScript language server features', () => { }); test('replaces one physical Windows QuickFunction across scan and open-document lifecycle', () => { - const scanUri = 'file:///C:/HIL/QF_StartEP3_1.0.1.vbi'; - const openUri = 'file:///c:/HIL/QF_StartEP3_1.0.1.vbi'; - const source = '{>\n@ScriptType QuickFunction\n@Name StartEP3\n{<}'; - const caller = TextDocument.create('file:///C:/HIL/caller.vbi', 'intouch', 1, 'CALL StartEP3();'); + const scanUri = 'file:///C:/HIL/QF_WorkspaceFunctionB_1.0.1.vbi'; + const openUri = 'file:///c:/HIL/QF_WorkspaceFunctionB_1.0.1.vbi'; + const source = '{>\n@ScriptType QuickFunction\n@Name WorkspaceFunctionB\n{<}'; + const caller = TextDocument.create('file:///C:/HIL/caller.vbi', 'intouch', 1, 'CALL WorkspaceFunctionB();'); const workspace = new WorkspaceSymbolIndex(); const assertPhase = (expectedUri: string): void => { - assert.strictEqual(workspace.quickFunctions('StartEP3').length, 1); + assert.strictEqual(workspace.quickFunctions('WorkspaceFunctionB').length, 1); assert.strictEqual( workspace.diagnostics(expectedUri).filter(diagnostic => diagnostic.code === 'duplicate-quickfunction').length, 0, @@ -447,25 +448,25 @@ suite('QuickScript language server features', () => { assert.deepStrictEqual(workspace.knownFunctionNames(), ['CanonicalName', 'FallbackOnly']); }); - test('keeps static Hermes catalog entries out of workspace definition counts', () => { + test('keeps workspace QuickFunctions out of static definition counts', () => { const workspace = new WorkspaceSymbolIndex(); - const definition = TextDocument.create('file:///StartEP3.vbi', 'intouch', 1, [ + const definition = TextDocument.create('file:///WorkspaceFunctionC.vbi', 'intouch', 1, [ '{>', '@ScriptType QuickFunction', - '@Name StartEP3', + '@Name WorkspaceFunctionC', '@Description Workspace implementation.', '{<}', ].join('\n')); - const caller = TextDocument.create('file:///hermes-caller.vbi', 'intouch', 1, 'CALL StartEP3();'); + const caller = TextDocument.create('file:///workspace-caller.vbi', 'intouch', 1, 'CALL WorkspaceFunctionC();'); workspace.updateDocument(definition); workspace.updateDocument(caller); - assert.strictEqual(KNOWN_FUNCTIONS.filter(entry => entry.name.toUpperCase() === 'STARTEP3').length, 1); - assert.strictEqual(workspace.quickFunctions('StartEP3').length, 1); + assert.strictEqual(KNOWN_FUNCTIONS.filter(entry => entry.name.toUpperCase() === 'WORKSPACEFUNCTIONC').length, 0); + assert.strictEqual(workspace.quickFunctions('WorkspaceFunctionC').length, 1); assert.ok(!diagnosticsFor(definition, workspace).some(diagnostic => diagnostic.code === 'duplicate-quickfunction')); assert.strictEqual(definitionFor(caller, { line: 0, character: 7 }, workspace)?.uri, definition.uri); assert.match(JSON.stringify(hoverFor(caller, { line: 0, character: 7 }, workspace)?.contents), /Workspace implementation/); - assert.match(completionsFor(caller, workspace).find(item => item.label === 'StartEP3')?.detail ?? '', /Workspace implementation/); + assert.match(completionsFor(caller, workspace).find(item => item.label === 'WorkspaceFunctionC')?.detail ?? '', /Workspace implementation/); }); test('keeps the positive HIL datatype and function diagnostics', () => { diff --git a/syntaxes/intouch.tmLanguage.json b/syntaxes/intouch.tmLanguage.json index 8325ed3..8381824 100644 --- a/syntaxes/intouch.tmLanguage.json +++ b/syntaxes/intouch.tmLanguage.json @@ -11,7 +11,7 @@ { "include": "#keywords" }, { "include": "#dotfields" }, { "include": "#strings" }, - { "include": "#HermesKeywords" }, + { "include": "#systemVariables" }, { "include": "#variables" }, { "include": "#var_declaration" }, { "include": "#numbers_simple" }, @@ -19,7 +19,6 @@ ], "repository": { "Ground-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx": {}, - "keywords": { "patterns": [ { @@ -121,28 +120,12 @@ ] }, - "HermesKeywords": { + "systemVariables": { "patterns": [ { "match": "(?i:\\b(SYS_|MA_|SMEL_|HER_)\\w*)", "name": "variable.other", - "comment": "Systemvariablen (Hermes - OWN)" - }, - - { - "match": "(?i:\\s*\\b(GetSplittByIndex|HerGATEWAYanzeigeAktualisieren|HerGATEWAYtriggerFreigabe|HerGATEWAYueberwachen|SetReferenceBool|SetReferenceByte|SetReferenceDINT|SetReferenceDINTs|SetReferenceMerkerByte|SetReferenceReal|SetReferenceString|SetReferenceWord|SetVarInputBoolsch|SetVarToggleBoolsch|BDEDatenLesen|BDEDatenSpeichern|BDEDatenSuchen|BDESchichtSchreiben|BDESchichtwerteDatenOK|BDESchichtwerteZuweisen|BDETageswerteDatenOK|BDETageswerteSchreiben|BDETageswerteZuweisen|BZBetriebsstunden|BZZaehlerAbfragen|ExterneModuleUeberwachen|FUWerte|GetSplittByIndex|HerBACKUP|HerProViewStart|HideAllPLS|KonfigLesen|KonfigSpeichern|QFFilter|QFFilterRegler15Schritt|QFLuftwerte|QFRinne|SessionUserInfoAkt|Sollwertaenderung|StatusExtApp|StatusleistenInfofelder|SWReal|wwalmdbtrigger|xAnlagenConfig|xBZVZSettings|xGatawaySettings|xHerDebug|xHerDebugL|xHerGATEWAYSettings|xLoggingConfig|xSetDateiPfade|xSetSQLConfig|xSetTSStation|xSetUhrzeitserver)\\b\\s*)", - "name": "keyword.other", - "comment": "Hermes Own functions 1" - }, - { - "match": "(?i:\\s*\\b(xSTATION9BiosName|xSTATION8BiosName|xSTATION7BiosName|xSTATION6BiosName|xSTATION5BiosName|xSTATION4BiosName|xSTATION3BiosName|xSTATION2BiosName|xSTATION1BiosName)\\b\\s*)", - "name": "support.function", - "comment": "Hermes Own functions 2" - }, - { - "match": "(?i:\\s*\\b(Alarmkommentare|APAntriebStatistik|APMonatAktualisierenZaehler1|APMonatAktualisierenZaehler2|APMonatAktualisierenZaehler3|ApplicomToUAReference|APTagAktualisierenZaehler1|APTagAktualisierenZaehler2|APTagAktualisierenZaehler3|APZaehlerAbfragen|BZMonatAktualisierenZaehler1|BZMonatAktualisierenZaehler2|BZMonatAktualisierenZaehler3|BZTagAktualisierenZaehler1|BZTagAktualisierenZaehler2|BZTagAktualisierenZaehler3|GetFullTopic|HDWExport|HerGATEWAYStatusLesen|Hubbodensteuerung|loadVarFromDB|MADatum|MAKurvenAbfragen|MAKurvenProfileAbfragen|Mouse|OnlineHilfeAufrufen|Scripsnippets_Intouch|SetReferenceINT|SetSMELAccessname|SetTopicTest|SMELCPUPopup|SMELEditorAufrufen|SMELInfo|SMELInfoView|SMELSQL|SmelUpdateDB|SMELUpdateDBWTaV|SMELUpdateDBWTnV|SpecialAccessChangeGUI|SpecialAccessChangePw|SpecialAccessCheckGUI|SpeciallAccessCheckPw|sysuhrzeitsynchron|TABAntrieb|TABCommentTo2z|TABHER012AZ|TABHER012AZS|TABHER012EA|TABHER012EAF|TABHER012EAFB|TABHER012EAS|TABHER062|TABResetPLSReferences|TABWILO|VZMonatAktualisierenZaehler1|VZMonatAktualisierenZaehler2|VZMonatAktualisierenZaehler3|VZTagAktualisierenZaehler1|VZTagAktualisierenZaehler2|VZTagAktualisierenZaehler3|VZVerbrauchsdaten|VZZaehlerAbfragen|WBBetriebsstunden|WVVerbrauchsdaten|xKonfigSpeichern|AppButonsConfig|HerProViewStartV|StartEP2|StartEP3|WebCPUaufrufen|xAT01Config|xAT02Config|xAT03Config|xAT04Config|xAT05Config|xAT06Config|xAT07Config|xAT08Config|xAT09Config|xAT10Config|xHerGatewayStart|xLogoffOnTSMaster|xLogoutFromStationTS|xSetDeverloper|xSetupDeploymentMode)\\b\\s*)", - "name": "support.function", - "comment": "Hermes ground-program QuickFunctions" + "comment": "Known QuickScript system-variable prefixes" } ] }, From 457e4601eadc09d44725e2df2e29a9b8139adf19 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 21:36:27 +0200 Subject: [PATCH 37/40] chore(release): prepare QuickScript language server 1.6.0 --- CHANGELOG.md | 6 +++--- README.md | 18 +++++++++++++++++- docs/testing/manual-hil.md | 3 ++- package-lock.json | 4 ++-- package.json | 12 ++++++------ 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b4e85d..3267244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ -## Unreleased +## 1.6.0 - Replace the legacy formatter lexers with the shared QuickScript tokenizer and recoverable structure parser. @@ -17,8 +17,8 @@ a manual `.vbi`/`.vi` HIL gate. - Keep unclosed `{>` metadata blocks inside one multiline brace-comment token while preserving diagnostics between same-line-closed nesting markers. -- Complete the generated Hermes helper catalog from the validated ground-program - QuickFunctions without reclassifying project helpers as native InTouch built-ins. +- Keep project-specific QuickFunctions external to the public static catalog; + workspace declarations remain dynamically discoverable. - Accept corpus-evidenced Unicode and digit-prefixed identifiers, numeric dotfields, and multiline `IF` continuation forms. - Add configurable QuickScript quality diagnostics for non-ASCII identifiers diff --git a/README.md b/README.md index da02263..7a24ab4 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,25 @@ # Intouch-Language -- **Intouch-Language** is an open source extension created for **Visual Studio Code** (**Not official!**). It provides syntax highlighting, snippets, parser-based formatting, diagnostics, metadata-aware symbols, completion, hover, and local plus QuickFunction cross-file definition/reference support for Intouch Basic. It also includes the Intouch Dark theme. +- **Intouch-Language** is an open source extension created for **Visual Studio Code** (**Not official!**). It provides native QuickScript language-server support for `.vbi` and `.vi` files, including formatting, diagnostics, document metadata, QuickFunction discovery, cross-file definition and references, hover, completion, and document symbols. It also includes the Intouch Dark theme. - **Intouch** is a programming language for AVEVA (Wonderware) SCADA Intouch Applications. +## QuickScript Language Server + +The extension includes a native, editor-independent QuickScript language +server for `.vbi` and `.vi` files. It provides: + +- Parser-based formatting and diagnostics. +- Comment-based document metadata for QuickFunctions, Windows, Applications, + DataChanges, Conditions, and KeyScripts. +- Workspace QuickFunction discovery with cross-file definition and references. +- Hover, completion, and document symbols. +- Window event support for `OnShow`, `WhileRunning`, and `OnClose`. +- Non-callable Application, DataChange, Condition, and KeyScript symbols. + +Project-specific QuickFunctions are discovered from the current workspace; +private project catalogs are not bundled with the public extension. +


Intouch diff --git a/docs/testing/manual-hil.md b/docs/testing/manual-hil.md index ee38301..abaad1a 100644 --- a/docs/testing/manual-hil.md +++ b/docs/testing/manual-hil.md @@ -27,7 +27,8 @@ For each file: 3. Trigger completion in code and verify representative keywords, datatypes, InTouch functions, Hermes helpers, local variables, and existing `CALL` targets. -4. Hover a local variable, a known InTouch function, and a known Hermes helper; +4. Hover a local variable, a known native InTouch function, and a workspace + QuickFunction; verify that unknown project identifiers do not receive invented details. 5. Use Go to Definition and Find All References on a local `DIM` variable. Confirm that results stay within the document and do not jump to unrelated diff --git a/package-lock.json b/package-lock.json index 021e2cb..5c31798 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "intouch-language", - "version": "1.5.8", + "version": "1.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "intouch-language", - "version": "1.5.8", + "version": "1.6.0", "hasInstallScript": true, "license": "GPL-3.0-or-later", "workspaces": [ diff --git a/package.json b/package.json index a37a946..48d0692 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "intouch-language", "displayName": "Intouch-Language and Formatter for VSCode. (c)2021-2026 vitalyruhl", - "description": "Intouch-Language syntax highlighting, formatter and code snippets for VSCode", - "version": "1.5.8", + "description": "Native InTouch QuickScript language server, formatter and diagnostics for VS Code", + "version": "1.6.0", "icon": "images/logo.png", "publisher": "Vitaly-ruhl", "engines": { @@ -28,12 +28,12 @@ ], "keywords": [ "Intouch", - "Invensys", + "QuickScript", + "AVEVA", "Wonderware", - "Aveva", "formatter", - "theme", - "dark" + "language-server", + "LSP" ], "main": "./dist/extension.js", "activationEvents": [ From c1dd71df808789f9c04ac8ae58d37d97d4335804 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 21:50:50 +0200 Subject: [PATCH 38/40] fix(formatter): preserve input line endings --- packages/core/src/formatter.ts | 9 +++++++-- packages/core/test/formatter.test.ts | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/packages/core/src/formatter.ts b/packages/core/src/formatter.ts index 9da2aab..9808ee0 100644 --- a/packages/core/src/formatter.ts +++ b/packages/core/src/formatter.ts @@ -69,6 +69,11 @@ function isUnaryMinus(tokens: readonly Token[], index: number): boolean { || (previous.kind === TokenKind.Punctuation && ['(', '[', ',', ';', ':'].includes(previous.lexeme)); } +function preferredLineEnding(source: string, options: FormatOptions): '\n' | '\r\n' { + if (options.lineEnding !== undefined) return options.lineEnding; + return source.includes('\r\n') ? '\r\n' : '\n'; +} + function normalizeLineTails(text: string, lineEnding: '\n' | '\r\n'): string { const lines = text.split(/\r\n|\r|\n/).map(line => line.replace(/[ \t\f\v]+$/g, '')); return lines.join(lineEnding); @@ -79,7 +84,7 @@ function normalizeLineTails(text: string, lineEnding: '\n' | '\r\n'): string { * String and comment lexemes are emitted unchanged; all classification comes from the tokenizer. */ export function formatQuickScriptLexically(source: string, options: FormatOptions = {}): FormatResult { - const lineEnding = options.lineEnding ?? '\r\n'; + const lineEnding = preferredLineEnding(source, options); const normalizedSource = source.replace(/\r\n|\r|\n/g, lineEnding); const tokens = tokenize(normalizedSource); @@ -310,7 +315,7 @@ function shiftCommentLine(line: string, shift: MultilineCommentShift, lineNumber /** Apply parser-driven indentation to lexically normalized QuickScript. */ export function formatQuickScriptStructure(source: string, options: FormatOptions = {}): FormatResult { - const lineEnding = options.lineEnding ?? '\r\n'; + const lineEnding = preferredLineEnding(source, options); const normalizedSource = source.replace(/\r\n|\r|\n/g, lineEnding); const document = parseQuickScript(normalizedSource); const sourceLines = normalizedSource.split(lineEnding); diff --git a/packages/core/test/formatter.test.ts b/packages/core/test/formatter.test.ts index 76996c4..7035203 100644 --- a/packages/core/test/formatter.test.ts +++ b/packages/core/test/formatter.test.ts @@ -31,6 +31,14 @@ suite('QuickScript lexical formatter', () => { assert.strictEqual(twice, once); }); + test('preserves input line endings by default', () => { + const lf = formatQuickScript('IF Ready THEN\nLogMessage("ok");\nENDIF;').text; + const crlf = formatQuickScript('IF Ready THEN\r\nLogMessage("ok");\r\nENDIF;').text; + + assert.ok(!lf.includes('\r\n')); + assert.ok(crlf.includes('\r\n')); + }); + test('returns normalized but otherwise unchanged malformed source', () => { const source = 'Message = "unfinished\nIF Value>1 THEN'; const result = formatQuickScriptLexically(source); @@ -83,7 +91,7 @@ suite('QuickScript lexical formatter', () => { const once = formatQuickScript(source).text; const twice = formatQuickScript(once).text; - assert.strictEqual(once, source.replace(/\n/g, '\r\n')); + assert.strictEqual(once, source); assert.strictEqual(twice, once); }); @@ -111,7 +119,7 @@ suite('QuickScript lexical formatter', () => { ' PLSActive=sys_true;', ' CALL TABHER012EA( );', '}', - ].join('\r\n'); + ].join('\n'); const once = formatQuickScript(source).text; const twice = formatQuickScript(once).text; @@ -183,7 +191,7 @@ suite('QuickScript lexical formatter', () => { ].join('\n'); const once = formatQuickScript(source).text; - assert.strictEqual(once, source.replace(/\n/g, '\r\n')); + assert.strictEqual(once, source); assert.strictEqual(formatQuickScript(once).text, once); }); @@ -207,7 +215,7 @@ suite('QuickScript lexical formatter', () => { ' @Param Index INTEGER Requested index.', ' @Returns MESSAGE', '{<}', - ].join('\r\n'); + ].join('\n'); const once = formatQuickScript(source).text; assert.strictEqual(once, expected); From 46d061155605f01ea93a6af6b415a36329dad230 Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 21:56:27 +0200 Subject: [PATCH 39/40] fix(language-server): preserve document line endings --- packages/core/src/formatter.ts | 9 ++------- packages/core/test/formatter.test.ts | 16 ++++------------ packages/language-server/src/features.ts | 3 ++- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/packages/core/src/formatter.ts b/packages/core/src/formatter.ts index 9808ee0..9da2aab 100644 --- a/packages/core/src/formatter.ts +++ b/packages/core/src/formatter.ts @@ -69,11 +69,6 @@ function isUnaryMinus(tokens: readonly Token[], index: number): boolean { || (previous.kind === TokenKind.Punctuation && ['(', '[', ',', ';', ':'].includes(previous.lexeme)); } -function preferredLineEnding(source: string, options: FormatOptions): '\n' | '\r\n' { - if (options.lineEnding !== undefined) return options.lineEnding; - return source.includes('\r\n') ? '\r\n' : '\n'; -} - function normalizeLineTails(text: string, lineEnding: '\n' | '\r\n'): string { const lines = text.split(/\r\n|\r|\n/).map(line => line.replace(/[ \t\f\v]+$/g, '')); return lines.join(lineEnding); @@ -84,7 +79,7 @@ function normalizeLineTails(text: string, lineEnding: '\n' | '\r\n'): string { * String and comment lexemes are emitted unchanged; all classification comes from the tokenizer. */ export function formatQuickScriptLexically(source: string, options: FormatOptions = {}): FormatResult { - const lineEnding = preferredLineEnding(source, options); + const lineEnding = options.lineEnding ?? '\r\n'; const normalizedSource = source.replace(/\r\n|\r|\n/g, lineEnding); const tokens = tokenize(normalizedSource); @@ -315,7 +310,7 @@ function shiftCommentLine(line: string, shift: MultilineCommentShift, lineNumber /** Apply parser-driven indentation to lexically normalized QuickScript. */ export function formatQuickScriptStructure(source: string, options: FormatOptions = {}): FormatResult { - const lineEnding = preferredLineEnding(source, options); + const lineEnding = options.lineEnding ?? '\r\n'; const normalizedSource = source.replace(/\r\n|\r|\n/g, lineEnding); const document = parseQuickScript(normalizedSource); const sourceLines = normalizedSource.split(lineEnding); diff --git a/packages/core/test/formatter.test.ts b/packages/core/test/formatter.test.ts index 7035203..76996c4 100644 --- a/packages/core/test/formatter.test.ts +++ b/packages/core/test/formatter.test.ts @@ -31,14 +31,6 @@ suite('QuickScript lexical formatter', () => { assert.strictEqual(twice, once); }); - test('preserves input line endings by default', () => { - const lf = formatQuickScript('IF Ready THEN\nLogMessage("ok");\nENDIF;').text; - const crlf = formatQuickScript('IF Ready THEN\r\nLogMessage("ok");\r\nENDIF;').text; - - assert.ok(!lf.includes('\r\n')); - assert.ok(crlf.includes('\r\n')); - }); - test('returns normalized but otherwise unchanged malformed source', () => { const source = 'Message = "unfinished\nIF Value>1 THEN'; const result = formatQuickScriptLexically(source); @@ -91,7 +83,7 @@ suite('QuickScript lexical formatter', () => { const once = formatQuickScript(source).text; const twice = formatQuickScript(once).text; - assert.strictEqual(once, source); + assert.strictEqual(once, source.replace(/\n/g, '\r\n')); assert.strictEqual(twice, once); }); @@ -119,7 +111,7 @@ suite('QuickScript lexical formatter', () => { ' PLSActive=sys_true;', ' CALL TABHER012EA( );', '}', - ].join('\n'); + ].join('\r\n'); const once = formatQuickScript(source).text; const twice = formatQuickScript(once).text; @@ -191,7 +183,7 @@ suite('QuickScript lexical formatter', () => { ].join('\n'); const once = formatQuickScript(source).text; - assert.strictEqual(once, source); + assert.strictEqual(once, source.replace(/\n/g, '\r\n')); assert.strictEqual(formatQuickScript(once).text, once); }); @@ -215,7 +207,7 @@ suite('QuickScript lexical formatter', () => { ' @Param Index INTEGER Requested index.', ' @Returns MESSAGE', '{<}', - ].join('\n'); + ].join('\r\n'); const once = formatQuickScript(source).text; assert.strictEqual(once, expected); diff --git a/packages/language-server/src/features.ts b/packages/language-server/src/features.ts index 0452677..5f5e075 100644 --- a/packages/language-server/src/features.ts +++ b/packages/language-server/src/features.ts @@ -111,7 +111,8 @@ export function diagnosticsFor( } export function formattingEdits(document: TextDocument, settings: ServerSettings): TextEdit[] { - const result = formatQuickScript(document.getText(), settings); + const lineEnding = settings.lineEnding ?? (document.getText().includes('\r\n') ? '\r\n' : '\n'); + const result = formatQuickScript(document.getText(), { ...settings, lineEnding }); if (!result.changed) { return []; } From 276d7744d5d97579394fcd74d6b73ab9808bb95d Mon Sep 17 00:00:00 2001 From: Vitaly Ruhl <66111567+vitalyruhl@users.noreply.github.com> Date: Thu, 20 Aug 2026 21:59:06 +0200 Subject: [PATCH 40/40] test: allow extension host startup on slower runners --- src/test/suite/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts index 68c9009..227975b 100644 --- a/src/test/suite/index.ts +++ b/src/test/suite/index.ts @@ -6,7 +6,8 @@ export function run(): Promise { // Create the mocha test const mocha = new Mocha({ ui: 'tdd', - reporter: 'list' + reporter: 'list', + timeout: 10000, }); // mocha.useColors(true); //ui: 'tdd',