diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7de14658..59b7ab966a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,81 @@ +#### 5.0.0-beta.3: Beta Release + + - UX updates for beta 3 (#5498) @knolleary + - Update Monaco to latest (0.55.1) (#5508) @Steve-Mcl + - Move location of new creds files to be next to flows (if they don't exist already in userdir) (#4951) @dceejay + +#### 5.0.0-beta.2: Beta Release + +Editor + + - UX updates for next beta (#5444) @knolleary + +Nodes + + - Add pause button to debug sidebar (#5390) @dceejay + - Add burst mode to delay node (#5391) @dceejay + - Add TLS certs/keys from Env Vars (#5376) @hardillb + +#### 5.0.0-beta.1: Beta Release + +Editor + + - Allow sidebar to be split into two panels (#5378) @knolleary + +#### 5.0.0-beta.0: Beta Release + +Editor + + - Update Sidebar UX (#5318) @knolleary + - Workspace pan/zoom updates (#5312) @knolleary + - Fix panning workspace on touchscreens (#5371) @knolleary + - Update tour for 5-beta (#5370) @knolleary + +Runtime + + - Prep dev branch for beta releases (#5367) @knolleary + +Nodes + + - Add ability to use pfx or p12 file for TLS connection settings option (#4907) @dceejay + +#### 4.1.7: Maintenance Release + + - Do not block touch events on ports (#5527) @knolleary + - Allow palette.categories to be set via theme plugin (#5526) @knolleary + - Bump i18next version (#5519) @knolleary + - Suppress i18n notice in frontend (#5528) @knolleary + - Set showSupportNotice option on i18n (#5520) @knolleary + - Do not cache subflow colors as each subflow can have its own (#5518) @knolleary + - Update tar/multer deps (#5515) @knolleary + - Remove IE7 CSS hacks (#5511) @bonanitech + +#### 4.1.6: Maintenance Release + + - Allow palette.theme to be set via theme plugin and include icons (#5500) @knolleary + - Ensure config sidebar tooltip handles html content (#5501) @knolleary + - Allow node-red integrator access to available updates (#5499) @Steve-Mcl + - Add frontend pre and post debug message hooks (#5495) @Steve-Mcl + - Fix: allow middle-click panning over links and ports (#5496) @lklivingstone + - Support ctrl key to select configuration nodes (#5486) @kazuhitoyokoi + - Add § as shortcut meta-key (#5482) @gorenje + - Update dependencies (#5502) @knolleary + +#### 4.1.5: Maintenance Release + + - chore: bump tar to 7.5.7 (#5472) @bryopsida + - Update node-red-admin dependency @knolleary + +#### 4.1.4: Maintenance Release + + - Update tar dependency @knolleary + - Revert overflow fix in editableList (#5467) @knolleary + - registry: fix importModule base dir for exports subpaths (#5465) @yuan-cloud + - fix: prevent race condition in localfilesystem context store during shutdown (#5462) @Dennis-SEG + - fix: prevent double resolve in node close callback (#5461) @Dennis-SEG + - fix: prevent incorrect array modification in delay node (#5457) @Dennis-SEG + - fix: prevent uncaught exceptions in core node event handlers (#5438) @Dennis-SEG + #### 4.1.3: Maintenance Release Editor diff --git a/Gruntfile.js b/Gruntfile.js index 73b03f6ea3..701686c35c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -173,6 +173,8 @@ module.exports = function(grunt) { "packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js", "packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js", "packages/node_modules/@node-red/editor-client/src/js/ui/view.js", + "packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-constants.js", + "packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-animator.js", "packages/node_modules/@node-red/editor-client/src/js/ui/view-annotations.js", "packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js", "packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js", diff --git a/package-lock.json b/package-lock.json index 155f837e6f..fb276aa279 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,21 @@ { "name": "node-red", - "version": "4.1.3", + "version": "5.0.0-beta.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "node-red", - "version": "4.1.3", + "version": "5.0.0-beta.3", "license": "Apache-2.0", "dependencies": { - "acorn": "8.15.0", - "acorn-walk": "8.3.4", - "ajv": "8.17.1", + "@node-rs/bcrypt": "^1.10.7", + "acorn": "8.16.0", + "acorn-walk": "8.3.5", + "ajv": "8.18.0", "async-mutex": "0.5.0", "basic-auth": "2.0.1", - "bcryptjs": "3.0.2", + "bcryptjs": "3.0.3", "body-parser": "1.20.4", "chalk": "^4.1.2", "cheerio": "1.0.0-rc.10", @@ -33,7 +34,7 @@ "hash-sum": "2.0.0", "hpagent": "1.2.0", "https-proxy-agent": "5.0.1", - "i18next": "24.2.3", + "i18next": "25.8.14", "iconv-lite": "0.6.3", "is-utf8": "0.2.1", "js-yaml": "4.1.1", @@ -45,10 +46,10 @@ "mime": "3.0.0", "moment": "2.30.1", "moment-timezone": "0.5.48", - "mqtt": "5.11.0", - "multer": "2.0.2", + "mqtt": "5.15.0", + "multer": "2.1.1", "mustache": "4.2.0", - "node-red-admin": "^4.1.2", + "node-red-admin": "^4.1.3", "node-watch": "0.7.4", "nopt": "5.0.0", "oauth2orize": "1.12.0", @@ -57,9 +58,9 @@ "passport-http-bearer": "1.0.1", "passport-oauth2-client-password": "0.1.2", "raw-body": "3.0.0", - "rfdc": "^1.3.1", - "semver": "7.7.1", - "tar": "7.4.3", + "rfdc": "1.4.1", + "semver": "7.7.4", + "tar": "7.5.10", "tough-cookie": "5.1.2", "uglify-js": "3.19.3", "uuid": "9.0.1", @@ -91,11 +92,11 @@ "jquery-i18next": "1.2.1", "jsdoc-nr-template": "github:node-red/jsdoc-nr-template", "marked": "4.3.0", - "mermaid": "11.9.0", + "mermaid": "11.12.3", "minami": "1.2.3", "mocha": "9.2.2", "node-red-node-test-helper": "^0.3.3", - "nodemon": "3.1.9", + "nodemon": "3.1.14", "proxy": "^1.0.2", "sass": "1.62.1", "should": "13.2.3", @@ -107,7 +108,7 @@ "node": ">=18.5" }, "optionalDependencies": { - "@node-rs/bcrypt": "1.10.7" + "@node-rs/bcrypt": "^1.10.7" } }, "node_modules/@antfu/install-pkg": { @@ -124,16 +125,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/@antfu/utils": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-8.1.1.tgz", - "integrity": "sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", @@ -213,9 +204,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -302,60 +293,46 @@ "license": "MIT" }, "node_modules/@chevrotain/cst-dts-gen": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", - "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.1.1.tgz", + "integrity": "sha512-fRHyv6/f542qQqiRGalrfJl/evD39mAvbJLCekPazhiextEatq1Jx1K/i9gSd5NNO0ds03ek0Cbo/4uVKmOBcw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@chevrotain/gast": "11.0.3", - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" + "@chevrotain/gast": "11.1.1", + "@chevrotain/types": "11.1.1", + "lodash-es": "4.17.23" } }, - "node_modules/@chevrotain/cst-dts-gen/node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "dev": true, - "license": "MIT" - }, "node_modules/@chevrotain/gast": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", - "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.1.1.tgz", + "integrity": "sha512-Ko/5vPEYy1vn5CbCjjvnSO4U7GgxyGm+dfUZZJIWTlQFkXkyym0jFYrWEU10hyCjrA7rQtiHtBr0EaZqvHFZvg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" + "@chevrotain/types": "11.1.1", + "lodash-es": "4.17.23" } }, - "node_modules/@chevrotain/gast/node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "dev": true, - "license": "MIT" - }, "node_modules/@chevrotain/regexp-to-ast": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", - "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.1.1.tgz", + "integrity": "sha512-ctRw1OKSXkOrR8VTvOxrQ5USEc4sNrfwXHa1NuTcR7wre4YbjPcKw+82C2uylg/TEwFRgwLmbhlln4qkmDyteg==", "dev": true, "license": "Apache-2.0" }, "node_modules/@chevrotain/types": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", - "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.1.1.tgz", + "integrity": "sha512-wb2ToxG8LkgPYnKe9FH8oGn3TMCBdnwiuNC5l5y+CtlaVRbCytU0kbVsk6CGrqTL4ZN4ksJa0TXOYbxpbthtqw==", "dev": true, "license": "Apache-2.0" }, "node_modules/@chevrotain/utils": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", - "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.1.1.tgz", + "integrity": "sha512-71eTYMzYXYSFPrbg/ZwftSaSDld7UYlS8OQa3lNnn9jzNtpFbaReRRyghzqS7rI3CDaorqpPJJcXGHK+FE1TVQ==", "dev": true, "license": "Apache-2.0" }, @@ -398,47 +375,17 @@ "license": "MIT" }, "node_modules/@iconify/utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.3.0.tgz", - "integrity": "sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.0.tgz", + "integrity": "sha512-Zlzem1ZXhI1iHeeERabLNzBHdOa4VhQbqAcOQaMKuTuyZCpwKbC2R4Dd0Zo3g9EAc+Y4fiarO8HIHRAth7+skw==", "dev": true, "license": "MIT", "dependencies": { - "@antfu/install-pkg": "^1.0.0", - "@antfu/utils": "^8.1.0", + "@antfu/install-pkg": "^1.1.0", "@iconify/types": "^2.0.0", - "debug": "^4.4.0", - "globals": "^15.14.0", - "kolorist": "^1.8.0", - "local-pkg": "^1.0.0", - "mlly": "^1.7.4" + "mlly": "^1.8.0" } }, - "node_modules/@iconify/utils/node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@iconify/utils/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -504,13 +451,13 @@ } }, "node_modules/@mermaid-js/parser": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.6.3.tgz", - "integrity": "sha512-lnjOhe7zyHjc+If7yT4zoedx2vo4sHaTmtkl1+or8BRTnCtDmcTpAjpzDSfCZrshM5bCoz0GyidzadJAH1xobA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.0.0.tgz", + "integrity": "sha512-vvK0Hi/VWndxoh03Mmz6wa1KDriSPjS2XMZL/1l19HFwygiObEEoEwSDxOqyLzzAI6J2PU3261JjTMTO7x+BPw==", "dev": true, "license": "MIT", "dependencies": { - "langium": "3.3.1" + "langium": "^4.0.0" } }, "node_modules/@napi-rs/wasm-runtime": { @@ -860,6 +807,23 @@ "node": ">= 14" } }, + "node_modules/@prantlf/jsonlint/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@sindresorhus/is": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", @@ -1329,9 +1293,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.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -1341,9 +1305,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", "license": "MIT", "dependencies": { "acorn": "^8.11.0" @@ -1398,9 +1362,9 @@ "license": "MIT" }, "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -1767,16 +1731,32 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", - "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1823,9 +1803,9 @@ "dev": true }, "node_modules/bcryptjs": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.2.tgz", - "integrity": "sha512-k38b3XOZKv60C4E2hVsXTolJWfkGRMbILBIe2IBITXciy5bOsTKot5kDrf3ZfufQtQOUN5mXceUEpU1rTl9Uog==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.3.tgz", + "integrity": "sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==", "license": "BSD-3-Clause", "bin": { "bcrypt": "bin/bcrypt" @@ -2000,6 +1980,18 @@ "node": ">=8" } }, + "node_modules/broker-factory": { + "version": "3.1.13", + "resolved": "https://registry.npmjs.org/broker-factory/-/broker-factory-3.1.13.tgz", + "integrity": "sha512-H2VALe31mEtO/SRcNp4cUU5BAm1biwhc/JaF77AigUuni/1YT0FLCJfbUxwIEs9y6Kssjk2fmXgf+Y9ALvmKlw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.6", + "fast-unique-numbers": "^9.0.26", + "tslib": "^2.8.1", + "worker-factory": "^7.0.48" + } + }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -2251,18 +2243,18 @@ } }, "node_modules/chevrotain": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", - "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.1.1.tgz", + "integrity": "sha512-f0yv5CPKaFxfsPTBzX7vGuim4oIC1/gcS7LUGdBSwl2dU6+FON6LVUksdOo1qJjoUvXNn45urgh8C+0a24pACQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@chevrotain/cst-dts-gen": "11.0.3", - "@chevrotain/gast": "11.0.3", - "@chevrotain/regexp-to-ast": "11.0.3", - "@chevrotain/types": "11.0.3", - "@chevrotain/utils": "11.0.3", - "lodash-es": "4.17.21" + "@chevrotain/cst-dts-gen": "11.1.1", + "@chevrotain/gast": "11.1.1", + "@chevrotain/regexp-to-ast": "11.1.1", + "@chevrotain/types": "11.1.1", + "@chevrotain/utils": "11.1.1", + "lodash-es": "4.17.23" } }, "node_modules/chevrotain-allstar": { @@ -2278,13 +2270,6 @@ "chevrotain": "^11.0.0" } }, - "node_modules/chevrotain/node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "dev": true, - "license": "MIT" - }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -2608,9 +2593,9 @@ } }, "node_modules/confbox": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", - "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", "dev": true, "license": "MIT" }, @@ -3168,9 +3153,9 @@ } }, "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", "dev": true, "license": "ISC", "engines": { @@ -3426,9 +3411,9 @@ } }, "node_modules/dagre-d3-es": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.11.tgz", - "integrity": "sha512-tvlJLyQf834SylNKax8Wkzco/1ias1OPw8DcUMDE7oUIoSEW25riQVuiu/0OWEFqT0cxHT3Pa9/D82Jr47IONw==", + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.13.tgz", + "integrity": "sha512-efEhnxpSuwpYOKRm/L5KbqoZmNNukHa/Flty4Wp62JRvgH2ojwVgPgdYyr4twpieZnyRDdIH7PY2mopX26+j2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -4109,13 +4094,6 @@ ], "license": "MIT" }, - "node_modules/exsolve": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.8.tgz", - "integrity": "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==", - "dev": true, - "license": "MIT" - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -4154,16 +4132,16 @@ "license": "MIT" }, "node_modules/fast-unique-numbers": { - "version": "8.0.13", - "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-8.0.13.tgz", - "integrity": "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g==", + "version": "9.0.26", + "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-9.0.26.tgz", + "integrity": "sha512-3Mtq8p1zQinjGyWfKeuBunbuFoixG72AUkk4VvzbX4ykCW9Q4FzRaNyIlfQhUjnKw2ARVP+/CKnoyr6wfHftig==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.8", - "tslib": "^2.6.2" + "@babel/runtime": "^7.28.6", + "tslib": "^2.8.1" }, "engines": { - "node": ">=16.1.0" + "node": ">=18.2.0" } }, "node_modules/fast-uri": { @@ -4761,19 +4739,6 @@ "which": "bin/which" } }, - "node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globule": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", @@ -5678,9 +5643,9 @@ "license": "MIT" }, "node_modules/i18next": { - "version": "24.2.3", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.2.3.tgz", - "integrity": "sha512-lfbf80OzkocvX7nmZtu7nSTNbrTYR52sLWxPtlXX1zAhVw8WEnFk4puUkCR4B1dNQwbSpEHHHemcZu//7EcB7A==", + "version": "25.8.14", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-25.8.14.tgz", + "integrity": "sha512-paMUYkfWJMsWPeE/Hejcw+XLhHrQPehem+4wMo+uELnvIwvCG019L9sAIljwjCmEMtFQQO3YeitJY8Kctei3iA==", "funding": [ { "type": "individual", @@ -5697,7 +5662,7 @@ ], "license": "MIT", "dependencies": { - "@babel/runtime": "^7.26.10" + "@babel/runtime": "^7.28.4" }, "peerDependencies": { "typescript": "^5" @@ -6383,9 +6348,9 @@ } }, "node_modules/jsdoc-api/node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", "dev": true, "license": "MIT", "dependencies": { @@ -6756,28 +6721,22 @@ "graceful-fs": "^4.1.9" } }, - "node_modules/kolorist": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", - "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", - "dev": true, - "license": "MIT" - }, "node_modules/langium": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/langium/-/langium-3.3.1.tgz", - "integrity": "sha512-QJv/h939gDpvT+9SiLVlY7tZC3xB2qK57v0J04Sh9wpMb6MP1q8gB21L3WIo8T5P1MSMg3Ep14L7KkDCFG3y4w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/langium/-/langium-4.2.1.tgz", + "integrity": "sha512-zu9QWmjpzJcomzdJQAHgDVhLGq5bLosVak1KVa40NzQHXfqr4eAHupvnPOVXEoLkg6Ocefvf/93d//SB7du4YQ==", "dev": true, "license": "MIT", "dependencies": { - "chevrotain": "~11.0.3", - "chevrotain-allstar": "~0.3.0", + "chevrotain": "~11.1.1", + "chevrotain-allstar": "~0.3.1", "vscode-languageserver": "~9.0.1", "vscode-languageserver-textdocument": "~1.0.11", - "vscode-uri": "~3.0.8" + "vscode-uri": "~3.1.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=20.10.0", + "npm": ">=10.2.3" } }, "node_modules/layout-base": { @@ -6936,24 +6895,6 @@ "node": ">=4" } }, - "node_modules/local-pkg": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.2.tgz", - "integrity": "sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "mlly": "^1.7.4", - "pkg-types": "^2.3.0", - "quansync": "^0.2.11" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -6971,16 +6912,16 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "dev": true, "license": "MIT" }, "node_modules/lodash-es": { - "version": "4.17.22", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.22.tgz", - "integrity": "sha512-XEawp1t0gxSi9x01glktRZ5HDy0HXqrM0x5pXQM98EaI0NxO6jVM7omDOxsuEo5UIASAnm2bRp1Jt/e0a2XU8Q==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.23.tgz", + "integrity": "sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg==", "dev": true, "license": "MIT" }, @@ -7311,28 +7252,28 @@ } }, "node_modules/mermaid": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.9.0.tgz", - "integrity": "sha512-YdPXn9slEwO0omQfQIsW6vS84weVQftIyyTGAZCwM//MGhPzL1+l6vO6bkf0wnP4tHigH1alZ5Ooy3HXI2gOag==", + "version": "11.12.3", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.12.3.tgz", + "integrity": "sha512-wN5ZSgJQIC+CHJut9xaKWsknLxaFBwCPwPkGTSUYrTiHORWvpT8RxGk849HPnpUAQ+/9BPRqYb80jTpearrHzQ==", "dev": true, "license": "MIT", "dependencies": { - "@braintree/sanitize-url": "^7.0.4", - "@iconify/utils": "^2.1.33", - "@mermaid-js/parser": "^0.6.2", + "@braintree/sanitize-url": "^7.1.1", + "@iconify/utils": "^3.0.1", + "@mermaid-js/parser": "^1.0.0", "@types/d3": "^7.4.3", "cytoscape": "^3.29.3", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", - "dagre-d3-es": "7.0.11", - "dayjs": "^1.11.13", + "dagre-d3-es": "7.0.13", + "dayjs": "^1.11.18", "dompurify": "^3.2.5", "katex": "^0.16.22", "khroma": "^2.1.0", - "lodash-es": "^4.17.21", - "marked": "^16.0.0", + "lodash-es": "^4.17.23", + "marked": "^16.2.1", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0", @@ -7516,25 +7457,6 @@ "ufo": "^1.6.1" } }, - "node_modules/mlly/node_modules/confbox": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", - "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/mlly/node_modules/pkg-types": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", - "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "confbox": "^0.1.8", - "mlly": "^1.7.4", - "pathe": "^2.0.1" - } - }, "node_modules/mocha": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", @@ -7650,9 +7572,9 @@ } }, "node_modules/mocha/node_modules/glob/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": { @@ -7733,28 +7655,27 @@ } }, "node_modules/mqtt": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.11.0.tgz", - "integrity": "sha512-VDqfADTNvohwcY02NgxPb7OojIeDrNQ1q62r/DcM+bnIWY8LBi3nMTvdEaFEp6Bu4ejBIpHjJVthUEgnvGLemA==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.15.0.tgz", + "integrity": "sha512-KC+wAssYk83Qu5bT8YDzDYgUJxPhbLeVsDvpY2QvL28PnXYJzC2WkKruyMUgBAZaQ7h9lo9k2g4neRNUUxzgMw==", "license": "MIT", "dependencies": { - "@types/readable-stream": "^4.0.18", - "@types/ws": "^8.5.14", + "@types/readable-stream": "^4.0.21", + "@types/ws": "^8.18.1", "commist": "^3.2.0", "concat-stream": "^2.0.0", - "debug": "^4.4.0", + "debug": "^4.4.1", "help-me": "^5.0.0", "lru-cache": "^10.4.3", "minimist": "^1.2.8", "mqtt-packet": "^9.0.2", "number-allocator": "^1.0.14", "readable-stream": "^4.7.0", - "reinterval": "^1.1.0", "rfdc": "^1.4.1", - "socks": "^2.8.3", + "socks": "^2.8.6", "split2": "^4.2.0", - "worker-timers": "^7.1.8", - "ws": "^8.18.0" + "worker-timers": "^8.0.23", + "ws": "^8.18.3" }, "bin": { "mqtt": "build/bin/mqtt.js", @@ -7882,33 +7803,22 @@ "license": "MIT" }, "node_modules/multer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz", - "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.1.1.tgz", + "integrity": "sha512-mo+QTzKlx8R7E5ylSXxWzGoXoZbOsRMpyitcht8By2KHvMbf3tjwosZ/Mu/XYU6UuJ3VZnODIrak5ZrPiPyB6A==", "license": "MIT", "dependencies": { "append-field": "^1.0.0", "busboy": "^1.6.0", "concat-stream": "^2.0.0", - "mkdirp": "^0.5.6", - "object-assign": "^4.1.1", - "type-is": "^1.6.18", - "xtend": "^4.0.2" + "type-is": "^1.6.18" }, "engines": { "node": ">= 10.16.0" - } - }, - "node_modules/multer/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" }, - "bin": { - "mkdirp": "bin/cmd.js" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/mustache": { @@ -8028,13 +7938,13 @@ } }, "node_modules/node-red-admin": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/node-red-admin/-/node-red-admin-4.1.2.tgz", - "integrity": "sha512-Yqe3dREfZZmc/BqT3Ntg0DEXivbP3HBNYCbjDkUaakkIIrapNR8TK1vj3RgkSW6FMtpfcVXBcLGI4cA0I1zbOw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/node-red-admin/-/node-red-admin-4.1.3.tgz", + "integrity": "sha512-Kb3uF59389eZh78SmhN8eiUT1uUMCoH2dC60KOQKsHx3R9qHGBpJu0nozi9E4odnCJMLFOe+n4ENjEeRF+etwQ==", "license": "Apache-2.0", "dependencies": { "ansi-colors": "^4.1.3", - "axios": "1.12.2", + "axios": "^1.13.5", "bcryptjs": "3.0.2", "cli-table": "^0.3.11", "enquirer": "^2.3.6", @@ -8061,6 +7971,15 @@ "node": ">=6" } }, + "node_modules/node-red-admin/node_modules/bcryptjs": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.2.tgz", + "integrity": "sha512-k38b3XOZKv60C4E2hVsXTolJWfkGRMbILBIe2IBITXciy5bOsTKot5kDrf3ZfufQtQOUN5mXceUEpU1rTl9Uog==", + "license": "BSD-3-Clause", + "bin": { + "bcrypt": "bin/bcrypt" + } + }, "node_modules/node-red-node-test-helper": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/node-red-node-test-helper/-/node-red-node-test-helper-0.3.5.tgz", @@ -8210,16 +8129,16 @@ } }, "node_modules/nodemon": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", - "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", + "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", @@ -8238,6 +8157,29 @@ "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": "5.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz", + "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, "node_modules/nodemon/node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -8267,16 +8209,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.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.3.tgz", + "integrity": "sha512-Rwi3pnapEqirPSbWbrZaa6N3nmqq4Xer/2XooiOKyV3q12ML06f7MOuc5DVH8ONZIFhwIYQ3yzPH4nt7iWHaTg==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^5.0.2" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/nodemon/node_modules/ms": { @@ -9332,15 +9277,15 @@ } }, "node_modules/pkg-types": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", - "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", "dev": true, "license": "MIT", "dependencies": { - "confbox": "^0.2.2", - "exsolve": "^1.0.7", - "pathe": "^2.0.3" + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" } }, "node_modules/points-on-curve": { @@ -9495,9 +9440,9 @@ } }, "node_modules/qs": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", - "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -9509,23 +9454,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/quansync": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", - "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/antfu" - }, - { - "type": "individual", - "url": "https://github.com/sponsors/sxzz" - } - ], - "license": "MIT" - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -9769,9 +9697,9 @@ } }, "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", "dev": true, "license": "ISC", "dependencies": { @@ -9867,12 +9795,6 @@ "node": ">=0.10.0" } }, - "node_modules/reinterval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", - "integrity": "sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ==", - "license": "MIT" - }, "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", @@ -10113,9 +10035,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -10996,16 +10918,15 @@ "dev": true }, "node_modules/tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "license": "ISC", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.10.tgz", + "integrity": "sha512-8mOPs1//5q/rlkNSPcCegA6hiHJYDmSLEI8aMH/CdSQJNWztHC9WHNam5zdQlfpTwB9Xp7IBEsHfV5LKMJGVAw==", + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", + "minizlib": "^3.1.0", "yallist": "^5.0.0" }, "engines": { @@ -11066,21 +10987,6 @@ "ieee754": "^1.1.13" } }, - "node_modules/tar/node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/tar/node_modules/yallist": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", @@ -11357,9 +11263,9 @@ "license": "MIT" }, "node_modules/ufo": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.2.tgz", - "integrity": "sha512-heMioaxBcG9+Znsda5Q8sQbWnLJSl98AFDXTO80wELWEzX3hordXsTdxrIfMQoO9IY1MEnoGoPjpoKpMj+Yx0Q==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", + "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==", "dev": true, "license": "MIT" }, @@ -11572,9 +11478,9 @@ "license": "MIT" }, "node_modules/vscode-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", "dev": true, "license": "MIT" }, @@ -11685,38 +11591,51 @@ "node": ">=0.10.0" } }, + "node_modules/worker-factory": { + "version": "7.0.48", + "resolved": "https://registry.npmjs.org/worker-factory/-/worker-factory-7.0.48.tgz", + "integrity": "sha512-CGmBy3tJvpBPjUvb0t4PrpKubUsfkI1Ohg0/GGFU2RvA9j/tiVYwKU8O7yu7gH06YtzbeJLzdUR29lmZKn5pag==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.6", + "fast-unique-numbers": "^9.0.26", + "tslib": "^2.8.1" + } + }, "node_modules/worker-timers": { - "version": "7.1.8", - "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-7.1.8.tgz", - "integrity": "sha512-R54psRKYVLuzff7c1OTFcq/4Hue5Vlz4bFtNEIarpSiCYhpifHU3aIQI29S84o1j87ePCYqbmEJPqwBTf+3sfw==", + "version": "8.0.30", + "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-8.0.30.tgz", + "integrity": "sha512-8P7YoMHWN0Tz7mg+9oEhuZdjBIn2z6gfjlJqFcHiDd9no/oLnMGCARCDkV1LR3ccQus62ZdtIp7t3aTKrMLHOg==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.24.5", - "tslib": "^2.6.2", - "worker-timers-broker": "^6.1.8", - "worker-timers-worker": "^7.0.71" + "@babel/runtime": "^7.28.6", + "tslib": "^2.8.1", + "worker-timers-broker": "^8.0.15", + "worker-timers-worker": "^9.0.13" } }, "node_modules/worker-timers-broker": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-6.1.8.tgz", - "integrity": "sha512-FUCJu9jlK3A8WqLTKXM9E6kAmI/dR1vAJ8dHYLMisLNB/n3GuaFIjJ7pn16ZcD1zCOf7P6H62lWIEBi+yz/zQQ==", + "version": "8.0.15", + "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-8.0.15.tgz", + "integrity": "sha512-Te+EiVUMzG5TtHdmaBZvBrZSFNauym6ImDaCAnzQUxvjnw+oGjMT2idmAOgDy30vOZMLejd0bcsc90Axu6XPWA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.24.5", - "fast-unique-numbers": "^8.0.13", - "tslib": "^2.6.2", - "worker-timers-worker": "^7.0.71" + "@babel/runtime": "^7.28.6", + "broker-factory": "^3.1.13", + "fast-unique-numbers": "^9.0.26", + "tslib": "^2.8.1", + "worker-timers-worker": "^9.0.13" } }, "node_modules/worker-timers-worker": { - "version": "7.0.71", - "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-7.0.71.tgz", - "integrity": "sha512-ks/5YKwZsto1c2vmljroppOKCivB/ma97g9y77MAAz2TBBjPPgpoOiS1qYQKIgvGTr2QYPT3XhJWIB6Rj2MVPQ==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-9.0.13.tgz", + "integrity": "sha512-qjn18szGb1kjcmh2traAdki1eiIS5ikFo+L90nfMOvSRpuDw1hAcR1nzkP2+Hkdqz5thIRnfuWx7QSpsEUsA6Q==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.24.5", - "tslib": "^2.6.2" + "@babel/runtime": "^7.28.6", + "tslib": "^2.8.1", + "worker-factory": "^7.0.48" } }, "node_modules/workerpool": { @@ -11817,6 +11736,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.4" @@ -11969,9 +11889,9 @@ } }, "node_modules/zip-stream/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": { diff --git a/package.json b/package.json index 9f06f871a5..27b031cd47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red", - "version": "4.1.3", + "version": "5.0.0-beta.3", "description": "Low-code programming for event-driven applications", "homepage": "https://nodered.org", "license": "Apache-2.0", @@ -26,12 +26,12 @@ } ], "dependencies": { - "acorn": "8.15.0", - "acorn-walk": "8.3.4", - "ajv": "8.17.1", + "acorn": "8.16.0", + "acorn-walk": "8.3.5", + "ajv": "8.18.0", "async-mutex": "0.5.0", "basic-auth": "2.0.1", - "bcryptjs": "3.0.2", + "bcryptjs": "3.0.3", "body-parser": "1.20.4", "chalk": "^4.1.2", "cheerio": "1.0.0-rc.10", @@ -50,7 +50,7 @@ "hash-sum": "2.0.0", "hpagent": "1.2.0", "https-proxy-agent": "5.0.1", - "i18next": "24.2.3", + "i18next": "25.8.14", "iconv-lite": "0.6.3", "is-utf8": "0.2.1", "js-yaml": "4.1.1", @@ -62,10 +62,10 @@ "mime": "3.0.0", "moment": "2.30.1", "moment-timezone": "0.5.48", - "mqtt": "5.11.0", - "multer": "2.0.2", + "mqtt": "5.15.0", + "multer": "2.1.1", "mustache": "4.2.0", - "node-red-admin": "^4.1.2", + "node-red-admin": "^4.1.3", "node-watch": "0.7.4", "nopt": "5.0.0", "oauth2orize": "1.12.0", @@ -74,9 +74,9 @@ "passport-http-bearer": "1.0.1", "passport-oauth2-client-password": "0.1.2", "raw-body": "3.0.0", - "rfdc": "^1.3.1", - "semver": "7.7.1", - "tar": "7.4.3", + "rfdc": "1.4.1", + "semver": "7.7.4", + "tar": "7.5.10", "tough-cookie": "5.1.2", "uglify-js": "3.19.3", "uuid": "9.0.1", @@ -111,11 +111,11 @@ "jquery-i18next": "1.2.1", "jsdoc-nr-template": "github:node-red/jsdoc-nr-template", "marked": "4.3.0", - "mermaid": "11.9.0", + "mermaid": "11.12.3", "minami": "1.2.3", "mocha": "9.2.2", "node-red-node-test-helper": "^0.3.3", - "nodemon": "3.1.9", + "nodemon": "3.1.14", "proxy": "^1.0.2", "sass": "1.62.1", "should": "13.2.3", diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/settings.js b/packages/node_modules/@node-red/editor-api/lib/admin/settings.js index 425d42415e..6939fdfd10 100644 --- a/packages/node_modules/@node-red/editor-api/lib/admin/settings.js +++ b/packages/node_modules/@node-red/editor-api/lib/admin/settings.js @@ -53,10 +53,10 @@ module.exports = { var opts = { user: req.user } - runtimeAPI.settings.getRuntimeSettings(opts).then(function(result) { + runtimeAPI.settings.getRuntimeSettings(opts).then(async function(result) { if (!settings.disableEditor) { result.editorTheme = result.editorTheme||{}; - var themeSettings = theme.settings(); + const themeSettings = await theme.settings(); if (themeSettings) { // result.editorTheme may already exist with the palette // disabled. Need to merge that into the receive settings diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js index 1917b55fdc..be8cb356c9 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js @@ -31,7 +31,7 @@ var defaultContext = { }, header: { title: "Node-RED", - image: "red/images/node-red.svg" + image: "red/images/node-red-icon.svg" }, asset: { red: "red/red.min.js", @@ -42,7 +42,13 @@ var defaultContext = { var settings; var theme = null; +/** + * themeContext is an object passed to the mustache template to generate the editor index.html. +*/ var themeContext = clone(defaultContext); +/** + * themeSettings is an object passed to the editor client as the "editorTheme" property of the settings object + */ var themeSettings = null; var activeTheme = null; @@ -91,6 +97,123 @@ function serveFilesFromTheme(themeValue, themeApp, directory, baseDirectory) { return result } +/** + * Check if a theme is enabled and load its settings. + * This is done lazily as it has to happen after the plugins have been loaded, but before the editor is served. + */ +async function loadThemePlugin () { + if (activeTheme && !activeThemeInitialised) { + const themePlugin = await runtimeAPI.plugins.getPlugin({ + id:activeTheme + }); + if (themePlugin) { + if (themePlugin.css) { + const cssFiles = serveFilesFromTheme( + themePlugin.css, + themeApp, + "/css/", + themePlugin.path + ); + themeContext.page.css = cssFiles.concat(themeContext.page.css || []) + // Mutating `theme` is not ideal, but currently necessary as debug (packages/node_modules/@node-red/nodes/core/common/21-debug.js) + // accesses RED.settings.editorTheme.page._.css directly to apply theme to the debug pop-out window. + theme.page = theme.page || {_:{}} + theme.page._.css = cssFiles.concat(theme.page._.css || []) + } + if (themePlugin.scripts) { + const scriptFiles = serveFilesFromTheme( + themePlugin.scripts, + themeApp, + "/scripts/", + themePlugin.path + ) + themeContext.page.scripts = scriptFiles.concat(themeContext.page.scripts || []) + theme.page = theme.page || {_:{}} + theme.page._.scripts = scriptFiles.concat(theme.page._.scripts || []) + } + // check and load page settings from theme + if (themePlugin.page) { + if (themePlugin.page.favicon && !theme.page.favicon) { + const result = serveFilesFromTheme( + [themePlugin.page.favicon], + themeApp, + "/", + themePlugin.path + ) + if(result && result.length > 0) { + // update themeContext page favicon + themeContext.page.favicon = result[0] + } + } + if (themePlugin.page.tabicon && themePlugin.page.tabicon.icon && !theme.page.tabicon) { + const result = serveFilesFromTheme( + [themePlugin.page.tabicon.icon], + themeApp, + "/page/", + themePlugin.path + ) + if(result && result.length > 0) { + // update themeContext page tabicon + themeContext.page.tabicon.icon = result[0] + themeContext.page.tabicon.colour = themeContext.page.tabicon.colour || themeContext.page.tabicon.colour + } + } + // if the plugin has a title AND the users settings.js does NOT + if (themePlugin.page.title && !theme.page.title) { + themeContext.page.title = themePlugin.page.title || themeContext.page.title + } + } + // check and load header settings from theme + if (themePlugin.header) { + if (themePlugin.header.image && !theme.header.image) { + const result = serveFilesFromTheme( + [themePlugin.header.image], + themeApp, + "/header/", + themePlugin.path + ) + if(result && result.length > 0) { + // update themeContext header image + themeContext.header.image = result[0] + } + } + // if the plugin has a title AND the users settings.js does NOT have a title + if (themePlugin.header.title && !theme.header.title) { + themeContext.header.title = themePlugin.header.title || themeContext.header.title + } + // if the plugin has a header url AND the users settings.js does NOT + if (themePlugin.header.url && !theme.header.url) { + themeContext.header.url = themePlugin.header.url || themeContext.header.url + } + } + + if (Array.isArray(themePlugin.palette?.theme)) { + themeSettings.palette = themeSettings.palette || {}; + themeSettings.palette.theme = themePlugin.palette.theme; + // The theme is providing its own palette theme. It *might* include icons that need namespacing + // to the theme plugin module. + themePlugin.palette.theme.forEach(themeRule => { + if (themeRule.icon && themeRule.icon.indexOf("/") === -1) { + themeRule.icon = `${themePlugin.module}/${themeRule.icon}`; + } + }) + } + if (Array.isArray(themePlugin.palette?.categories)) { + themeSettings.palette = themeSettings.palette || {}; + themeSettings.palette.categories = themePlugin.palette.categories; + } + + // These settings are not exposed under `editorTheme`, so we don't have a merge strategy for them + // If they're defined in the theme plugin, they replace any settings.js values. + // But, this direct manipulation of `theme` is not ideal and relies on mutating a passed-in object + theme.codeEditor = theme.codeEditor || {} + theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options); + theme.mermaid = Object.assign({}, themePlugin.mermaid, theme.mermaid) + } + activeThemeInitialised = true; + } +} + module.exports = { init: function(_settings, _runtimeAPI) { settings = _settings; @@ -232,6 +355,7 @@ module.exports = { res.json(themeContext); }) + // Copy the settings that need passing to the editor into themeSettings. if (theme.hasOwnProperty("menu")) { themeSettings.menu = theme.menu; } @@ -263,104 +387,11 @@ module.exports = { return themeApp; }, context: async function() { - if (activeTheme && !activeThemeInitialised) { - const themePlugin = await runtimeAPI.plugins.getPlugin({ - id:activeTheme - }); - if (themePlugin) { - if (themePlugin.css) { - const cssFiles = serveFilesFromTheme( - themePlugin.css, - themeApp, - "/css/", - themePlugin.path - ); - themeContext.page.css = cssFiles.concat(themeContext.page.css || []) - theme.page = theme.page || {_:{}} - theme.page._.css = cssFiles.concat(theme.page._.css || []) - } - if (themePlugin.scripts) { - const scriptFiles = serveFilesFromTheme( - themePlugin.scripts, - themeApp, - "/scripts/", - themePlugin.path - ) - themeContext.page.scripts = scriptFiles.concat(themeContext.page.scripts || []) - theme.page = theme.page || {_:{}} - theme.page._.scripts = scriptFiles.concat(theme.page._.scripts || []) - } - // check and load page settings from theme - if (themePlugin.page) { - if (themePlugin.page.favicon && !theme.page.favicon) { - const result = serveFilesFromTheme( - [themePlugin.page.favicon], - themeApp, - "/", - themePlugin.path - ) - if(result && result.length > 0) { - // update themeContext page favicon - themeContext.page.favicon = result[0] - theme.page = theme.page || {_:{}} - theme.page._.favicon = result[0] - } - } - if (themePlugin.page.tabicon && themePlugin.page.tabicon.icon && !theme.page.tabicon) { - const result = serveFilesFromTheme( - [themePlugin.page.tabicon.icon], - themeApp, - "/page/", - themePlugin.path - ) - if(result && result.length > 0) { - // update themeContext page tabicon - themeContext.page.tabicon.icon = result[0] - themeContext.page.tabicon.colour = themeContext.page.tabicon.colour || themeContext.page.tabicon.colour - theme.page = theme.page || {_:{}} - theme.page._.tabicon = theme.page._.tabicon || {} - theme.page._.tabicon.icon = themeContext.page.tabicon.icon - theme.page._.tabicon.colour = themeContext.page.tabicon.colour - } - } - // if the plugin has a title AND the users settings.js does NOT - if (themePlugin.page.title && !theme.page.title) { - themeContext.page.title = themePlugin.page.title || themeContext.page.title - } - } - // check and load header settings from theme - if (themePlugin.header) { - if (themePlugin.header.image && !theme.header.image) { - const result = serveFilesFromTheme( - [themePlugin.header.image], - themeApp, - "/header/", - themePlugin.path - ) - if(result && result.length > 0) { - // update themeContext header image - themeContext.header.image = result[0] - } - } - // if the plugin has a title AND the users settings.js does NOT have a title - if (themePlugin.header.title && !theme.header.title) { - themeContext.header.title = themePlugin.header.title || themeContext.header.title - } - // if the plugin has a header url AND the users settings.js does NOT - if (themePlugin.header.url && !theme.header.url) { - themeContext.header.url = themePlugin.header.url || themeContext.header.url - } - } - theme.codeEditor = theme.codeEditor || {} - theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options); - - theme.mermaid = Object.assign({}, themePlugin.mermaid, theme.mermaid) - } - activeThemeInitialised = true; - } + await loadThemePlugin(); return themeContext; }, - settings: function() { + settings: async function() { + await loadThemePlugin(); return themeSettings; }, serveFile: function(baseUrl,file) { diff --git a/packages/node_modules/@node-red/editor-api/package.json b/packages/node_modules/@node-red/editor-api/package.json index 587b6e2259..4dbc36d557 100644 --- a/packages/node_modules/@node-red/editor-api/package.json +++ b/packages/node_modules/@node-red/editor-api/package.json @@ -1,6 +1,6 @@ { "name": "@node-red/editor-api", - "version": "4.1.3", + "version": "5.0.0-beta.3", "license": "Apache-2.0", "main": "./lib/index.js", "repository": { @@ -16,9 +16,9 @@ } ], "dependencies": { - "@node-red/util": "4.1.3", - "@node-red/editor-client": "4.1.3", - "bcryptjs": "3.0.2", + "@node-red/util": "5.0.0-beta.3", + "@node-red/editor-client": "5.0.0-beta.3", + "bcryptjs": "3.0.3", "body-parser": "1.20.4", "clone": "2.1.2", "cors": "2.8.5", @@ -26,7 +26,7 @@ "express": "4.22.1", "memorystore": "1.6.7", "mime": "3.0.0", - "multer": "2.0.2", + "multer": "2.1.1", "mustache": "4.2.0", "oauth2orize": "1.12.0", "passport-http-bearer": "1.0.1", diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index c1c9316d81..8018b745f8 100644 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -169,6 +169,7 @@ "zoom-out": "Zoom out", "zoom-reset": "Reset zoom", "zoom-in": "Zoom in", + "zoom-fit": "Zoom to fit", "search-flows": "Search flows", "search-prev": "Previous", "search-next": "Next", diff --git a/packages/node_modules/@node-red/editor-client/package.json b/packages/node_modules/@node-red/editor-client/package.json index 848603ffd1..f9348cdf20 100644 --- a/packages/node_modules/@node-red/editor-client/package.json +++ b/packages/node_modules/@node-red/editor-client/package.json @@ -1,6 +1,6 @@ { "name": "@node-red/editor-client", - "version": "4.1.3", + "version": "5.0.0-beta.3", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg index 0b00692721..5c153a029c 100644 --- a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg @@ -1 +1,56 @@ - \ No newline at end of file + + + + + + + + + + + diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg index e4448e10f2..79e756bf68 100644 --- a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg @@ -1 +1,53 @@ - \ No newline at end of file + + + + + + + + + + diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg index 12d4c8972e..a013f94153 100644 --- a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg @@ -1 +1,54 @@ - \ No newline at end of file + + + + + + + + + diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg index 00f3190145..f84a005fb0 100644 --- a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg @@ -1 +1,47 @@ - \ No newline at end of file + + + + + + + + + diff --git a/packages/node_modules/@node-red/editor-client/src/images/explorer.svg b/packages/node_modules/@node-red/editor-client/src/images/explorer.svg new file mode 100644 index 0000000000..555efcc92b --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/explorer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/node-red.svg b/packages/node_modules/@node-red/editor-client/src/images/node-red.svg index b74a46a4c3..3cd3cc8ee5 100644 --- a/packages/node_modules/@node-red/editor-client/src/images/node-red.svg +++ b/packages/node_modules/@node-red/editor-client/src/images/node-red.svg @@ -1,20 +1,77 @@ - - - - - image/svg+xml - - - - - - - - - - + + + + + + + + image/svg+xml + + + + + + + + + + - diff --git a/packages/node_modules/@node-red/editor-client/src/js/hooks.js b/packages/node_modules/@node-red/editor-client/src/js/hooks.js index 096c8e5b59..d7a3c1a97a 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/hooks.js +++ b/packages/node_modules/@node-red/editor-client/src/js/hooks.js @@ -1,135 +1,206 @@ -RED.hooks = (function() { +RED.hooks = (function () { + // At the time of writing this PR, VALID_HOOKS were not enforced. There may be a good reason for this + // so the below flag has been added to permit this behaviour. If desired, this can be set to false to + // enforce that only known hooks can be added/triggered. + const knownHooksOnly = false - var VALID_HOOKS = [ + const VALID_HOOKS = Object.freeze({ + viewRemoveNode: true, + viewAddNode: true, + viewRemovePort: true, + viewAddPort: true, + viewRedrawNode: true, + debugPreProcessMessage: true, + debugPostProcessMessage: true + }) - ] + /** + * @typedef {keyof typeof VALID_HOOKS} HookId - A string literal type representing a hook identifier (sans label). + * + * @typedef {Object} HookItem - An item in the linked list of hooks for a given HookId + * @property {function} cb - The callback function to be called when the hook is triggered + * @property {HookItem|null} previousHook - The previous hook in the linked list + * @property {HookItem|null} nextHook - The next hook in the linked list + * @property {boolean} removed - Flag indicating if the hook has been removed + * + * @typedef {Record} Hooks - A mapping of HookIds to the head of their linked list of HookItems + */ - var hooks = { } - var labelledHooks = { } + + /** @type {Hooks} - A mapping of HookIds to the head of their linked list of HookItems */ + let hooks = {} + + /** @type {Record>} - A mapping of labels to their hooks */ + let labelledHooks = {} function add(hookId, callback) { - var parts = hookId.split("."); - var id = parts[0], label = parts[1]; + const { label, id } = parseLabelledHook(hookId) - // if (VALID_HOOKS.indexOf(id) === -1) { - // throw new Error("Invalid hook '"+id+"'"); - // } + if (knownHooksOnly && !isKnownHook(id)) { + throw new Error("Invalid hook '" + id + "'") + } if (label && labelledHooks[label] && labelledHooks[label][id]) { - throw new Error("Hook "+hookId+" already registered") + throw new Error("Hook " + hookId + " already registered") + } + if (typeof callback !== "function") { + throw new Error("Invalid hook '" + hookId + "'. Callback must be a function") } - var hookItem = {cb:callback, previousHook: null, nextHook: null } - var tailItem = hooks[id]; + /** @type {HookItem} */ + const hookItem = { cb: callback, previousHook: null, nextHook: null } + + let tailItem = hooks[id] if (tailItem === undefined) { - hooks[id] = hookItem; + hooks[id] = hookItem } else { - while(tailItem.nextHook !== null) { + while (tailItem.nextHook !== null) { tailItem = tailItem.nextHook } - tailItem.nextHook = hookItem; - hookItem.previousHook = tailItem; + tailItem.nextHook = hookItem + hookItem.previousHook = tailItem } if (label) { - labelledHooks[label] = labelledHooks[label]||{}; - labelledHooks[label][id] = hookItem; + labelledHooks[label] = labelledHooks[label] || {} + labelledHooks[label][id] = hookItem } } + function remove(hookId) { - var parts = hookId.split("."); - var id = parts[0], label = parts[1]; - if ( !label) { - throw new Error("Cannot remove hook without label: "+hookId) + const { label, id } = parseLabelledHook(hookId) + if (!label) { + throw new Error("Cannot remove hook without label: " + hookId) } if (labelledHooks[label]) { if (id === "*") { // Remove all hooks for this label - var hookList = Object.keys(labelledHooks[label]); - for (var i=0;i { + invokeStack(hookItem, payload, function (err) { + if (err !== undefined && err !== false) { + if (!(err instanceof Error)) { + err = new Error(err) + } + err.hook = id + reject(err) + } else { + resolve(err) + } + }) + }) + } else { + invokeStack(hookItem, payload, done) + } + } + + /** + * @private + */ + function invokeStack(hookItem, payload, done) { function callNextHook(err) { if (!hookItem || err) { - if (done) { done(err) } - return err; + done(err) + return } if (hookItem.removed) { - hookItem = hookItem.nextHook; - return callNextHook(); + hookItem = hookItem.nextHook + callNextHook() + return } - var callback = hookItem.cb; + const callback = hookItem.cb if (callback.length === 1) { try { - let result = callback(payload); + let result = callback(payload) if (result === false) { // Halting the flow - if (done) { done(false) } - return result; + done(false) + return } - hookItem = hookItem.nextHook; - return callNextHook(); - } catch(e) { - console.warn(e); - if (done) { done(e);} - return e; + if (result && typeof result.then === 'function') { + result.then(handleResolve, callNextHook) + return + } + hookItem = hookItem.nextHook + callNextHook() + } catch (e) { + done(e) + return } } else { - // There is a done callback try { - callback(payload,function(result) { - if (result === undefined) { - hookItem = hookItem.nextHook; - callNextHook(); - } else { - if (done) { done(result)} - } - }) - } catch(e) { - console.warn(e); - if (done) { done(e) } - return e; + callback(payload, handleResolve) + } catch (e) { + done(e) + return } } } - - return callNextHook(); + function handleResolve(result) { + if (result === undefined) { + hookItem = hookItem.nextHook + callNextHook() + } else { + done(result) + } + } + callNextHook() } function clear() { @@ -137,20 +208,48 @@ RED.hooks = (function() { labelledHooks = {} } + /** + * Check if a hook with the given id exists + * @param {string} hookId The hook identifier, which may include a label (e.g. "viewAddNode.myLabel") + * @returns {boolean} + */ function has(hookId) { - var parts = hookId.split("."); - var id = parts[0], label = parts[1]; + const { label, id } = parseLabelledHook(hookId) if (label) { return !!(labelledHooks[label] && labelledHooks[label][id]) } return !!hooks[id] } + function isKnownHook(hookId) { + const { id } = parseLabelledHook(hookId) + return !!VALID_HOOKS[id] + } + + /** + * Split a hook identifier into its id and label components. + * @param {*} hookId A hook identifier, which may include a label (e.g. "viewAddNode.myLabel") + * @returns {{label: string, id: HookId}} + * @private + */ + function parseLabelledHook(hookId) { + if (typeof hookId !== "string") { + return { label: '', id: '' } + } + const parts = hookId.split(".") + const id = parts[0] + const label = parts[1] + return { label, id } + } + + VALID_HOOKS['all'] = true // Special wildcard to allow hooks to indicate they should be triggered for all ids + return { - has: has, - clear: clear, - add: add, - remove: remove, - trigger: trigger + has, + clear, + add, + remove, + trigger, + isKnownHook } -})(); +})() diff --git a/packages/node_modules/@node-red/editor-client/src/js/i18n.js b/packages/node_modules/@node-red/editor-client/src/js/i18n.js index e5b479ea5f..631be51ac5 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/i18n.js +++ b/packages/node_modules/@node-red/editor-client/src/js/i18n.js @@ -27,6 +27,7 @@ RED.i18n = (function() { apiRootUrl = options.apiRootUrl||""; var preferredLanguage = localStorage.getItem("editor-language") || detectLanguage(); var opts = { + showSupportNotice: false, backend: { loadPath: apiRootUrl+'locales/__ns__?lng=__lng__', }, diff --git a/packages/node_modules/@node-red/editor-client/src/js/keymap.json b/packages/node_modules/@node-red/editor-client/src/js/keymap.json index 4cf28d2279..697205f3aa 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/keymap.json +++ b/packages/node_modules/@node-red/editor-client/src/js/keymap.json @@ -91,7 +91,8 @@ "alt-shift-w": "core:show-last-hidden-flow", "ctrl-+": "core:zoom-in", "ctrl--": "core:zoom-out", - "ctrl-0": "core:zoom-reset" + "ctrl-0": "core:zoom-reset", + "ctrl-1": "core:zoom-fit" }, "red-ui-editor-stack": { "ctrl-enter": "core:confirm-edit-tray", diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js index 99cb8375b9..bbdf41765a 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/red.js +++ b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -538,7 +538,7 @@ var RED = (function() { node.dirty = true; RED.view.redrawStatus(node); } - }); + }) RED.comms.subscribe("notification/plugin/#",function(topic,msg) { if (topic == "notification/plugin/added") { RED.settings.refreshSettings(function(err, data) { @@ -669,12 +669,12 @@ var RED = (function() { RED.eventLog.log(id,payload); }); - $(".red-ui-header-toolbar").show(); + loader.end(); + $(".red-ui-header-toolbar").removeClass('hide'); RED.sidebar.show(":first", true); setTimeout(function() { - loader.end(); checkTelemetry(function () { checkFirstRun(function() { if (showProjectWelcome) { @@ -843,7 +843,7 @@ var RED = (function() { RED.user.init(); RED.notifications.init(); RED.library.init(); - RED.palette.init(); + RED.sidebar.init(); RED.eventLog.init(); if (RED.settings.get('externalModules.palette.allowInstall', true) !== false) { @@ -852,7 +852,6 @@ var RED = (function() { console.log("Palette editor disabled"); } - RED.sidebar.init(); if (RED.settings.theme("projects.enabled",false)) { RED.projects.init(); @@ -869,41 +868,63 @@ var RED = (function() { RED.diagnostics.init(); RED.diff.init(); - RED.deploy.init(RED.settings.theme("deployButton",null)); + RED.keyboard.init(() => { + buildMainMenu(); + + // Register the core set of sidebar panels now the menu is ready to receive items + RED.palette.init(); + RED.sidebar.info.init(); + RED.sidebar.info.outliner.init(); + RED.sidebar.help.init(); + RED.sidebar.config.init(); + RED.sidebar.context.init(); + // hide sidebar at start if screen rather narrow... + if ($("#red-ui-editor").width() < 600) { RED.menu.setSelected("menu-item-sidebar", false); } + + RED.envVar.init(); + + RED.nodes.init(); + RED.runtime.init() + + if (RED.settings.theme("multiplayer.enabled",false)) { + RED.multiplayer.init() + } + RED.comms.connect(); - RED.keyboard.init(buildMainMenu); - RED.envVar.init(); - - RED.nodes.init(); - RED.runtime.init() - - if (RED.settings.theme("multiplayer.enabled",false)) { - RED.multiplayer.init() - } - RED.comms.connect(); - - $("#red-ui-main-container").show(); + $("#red-ui-main-container").show(); + setTimeout(() => $("#red-ui-header-tabs").show(), 100) + RED.events.emit("sidebar:resize") - loadPluginList(); + loadPluginList(); + }); } function buildEditor(options) { - var header = $('
').appendTo(options.target); - var logo = $('').appendTo(header); + const header = $('
').appendTo(options.target); + const logoContainer = $('').appendTo(header); + let logo = $('').appendTo(logoContainer); + $('
').appendTo(header); $('
    ').appendTo(header); $('
    ').appendTo(header); - $('
    '+ + $('
    '+ + '
    '+ '
    '+ + '
    '+ + '
    '+ + '
    '+ '
    '+ - '
    '+ - '
    '+ - '
    '+ '
    ').appendTo(options.target); + + // Don't use the `hide` class on this container, as the show reverts it to block rather + // than the expected flex. So hide via jQuery as it'll track the show state internally. + options.target.find('#red-ui-main-container').hide() + $('
    ').appendTo(options.target); $('
    ').appendTo(options.target); $('
    ').appendTo(options.target); + $('
    ').appendTo(options.target); loader.init().appendTo("#red-ui-main-container"); loader.start("...",0); diff --git a/packages/node_modules/@node-red/editor-client/src/js/settings.js b/packages/node_modules/@node-red/editor-client/src/js/settings.js index 85c930bfbb..f7048df710 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/settings.js +++ b/packages/node_modules/@node-red/editor-client/src/js/settings.js @@ -29,7 +29,16 @@ RED.settings = (function () { } }; - var set = function (key, value) { + /** + * Set a setting in the user settings within the runtime. + * Calls to this function are debounced to avoid excessive calls to the runtime when multiple settings are changed in quick succession. + * The flush parameter can be set to true to bypass the debounce and immediately save the settings to the runtime. + * @param {string} key + * @param {*} value + * @param {boolean} flush + * @returns + */ + var set = function (key, value, flush) { if (!hasLocalStorage()) { return; } @@ -37,7 +46,7 @@ RED.settings = (function () { localStorage.setItem(key+this.authTokensSuffix, JSON.stringify(value)); } else { RED.utils.setMessageProperty(userSettings,key,value); - saveUserSettings(); + saveUserSettings(flush); } }; @@ -188,13 +197,12 @@ RED.settings = (function () { }); } - function saveUserSettings() { + function saveUserSettings(flush) { if (RED.user.hasPermission("settings.write")) { if (pendingSave) { clearTimeout(pendingSave); } - pendingSave = setTimeout(function() { - pendingSave = null; + const save = () => { $.ajax({ method: 'POST', contentType: 'application/json', @@ -206,7 +214,15 @@ RED.settings = (function () { console.log("Unexpected error saving user settings:",jqXHR.status,textStatus); } }); - },300); + } + if (flush) { + save() + } else { + pendingSave = setTimeout(function() { + pendingSave = null; + save(); + }, 300); + } } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js index d47a20f5d2..739d39d19a 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js @@ -43,7 +43,7 @@ RED.actionList = (function() { } function createDialog() { - dialog = $("
    ",{id:"red-ui-actionList",class:"red-ui-search"}).appendTo("#red-ui-main-container"); + dialog = $("
    ",{id:"red-ui-actionList",class:"red-ui-search"}).appendTo("#red-ui-global-dialog-container"); var searchDiv = $("
    ",{class:"red-ui-search-container"}).appendTo(dialog); searchInput = $('').appendTo(searchDiv).searchBox({ change: function() { @@ -151,11 +151,8 @@ RED.actionList = (function() { } if (!visible) { previousActiveElement = document.activeElement; - $("#red-ui-header-shade").show(); - $("#red-ui-editor-shade").show(); - $("#red-ui-palette-shade").show(); - $("#red-ui-sidebar-shade").show(); - $("#red-ui-sidebar-separator").hide(); + RED.notifications.shade.show(); + $("#red-ui-full-shade").one('mousedown.red-ui-actionList', hide) if (dialog === null) { createDialog(); } @@ -186,11 +183,9 @@ RED.actionList = (function() { function hide() { if (visible) { visible = false; - $("#red-ui-header-shade").hide(); - $("#red-ui-editor-shade").hide(); - $("#red-ui-palette-shade").hide(); - $("#red-ui-sidebar-shade").hide(); - $("#red-ui-sidebar-separator").show(); + RED.notifications.shade.hide(); + $("#red-ui-full-shade").off('mousedown.red-ui-actionList') + if (dialog !== null) { dialog.slideUp(200,function() { searchInput.searchBox('value',''); @@ -217,12 +212,6 @@ RED.actionList = (function() { RED.events.on("type-search:close",function() { disabled = false; }); RED.keyboard.add("red-ui-actionList","escape",function(){hide()}); - - - $("#red-ui-header-shade").on('mousedown',hide); - $("#red-ui-editor-shade").on('mousedown',hide); - $("#red-ui-palette-shade").on('mousedown',hide); - $("#red-ui-sidebar-shade").on('mousedown',hide); } return { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js index 8d0f1dbd33..3b3b1a0b93 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js @@ -15,9 +15,75 @@ **/ RED.menu = (function() { + var currentPortaledSubmenu = null; var menuItems = {}; let menuItemCount = 0 + /** + * Position a submenu relative to its parent item, handling viewport collisions. + * @param {HTMLElement} parentMenuEl - The parent menu item + * @param {HTMLElement} submenuEl - The submenu to position + * @param {string} preferredSide - 'left' or 'right' + * @returns {{x: number, y: number, placement: string}} + */ + function getSubmenuPosition(parentMenuEl, submenuEl, preferredSide) { + var parentMenuRect = parentMenuEl.getBoundingClientRect(); + var submenuWidth = submenuEl.offsetWidth || 230; + var submenuHeight = submenuEl.offsetHeight || 200; + var viewportWidth = window.innerWidth; + var viewportHeight = window.innerHeight; + var padding = 10; + + // Initial position variables + var x; + var y = parentMenuRect.top; + + // Shift y if it would overflow bottom of viewport + if (y + submenuHeight > viewportHeight - padding) { + y = viewportHeight - submenuHeight - padding; + } + + // Shift y if it would overflow top of viewport + if (y < padding) { + y = padding; + } + + // Calculate x position based on preferred side + if (preferredSide === 'left') { + x = parentMenuRect.left - submenuWidth; + // Flip to right if not enough space on left + if (x < padding) { + x = parentMenuRect.right; + // If still not enough space, shift to fit + if (x + submenuWidth > viewportWidth - padding) { + x = viewportWidth - submenuWidth - padding; + } + } + } else { + x = parentMenuRect.right; + // Flip to left if not enough space on right + if (x + submenuWidth > viewportWidth - padding) { + x = parentMenuRect.left - submenuWidth; + // If still not enough space, shift to fit + if (x < padding) { + x = padding; + } + } + } + + return { x: x, y: y }; + } + + /** + * Clean up the currently portaled submenu (return it to original position) + */ + function cleanupPortaledSubmenus() { + if (currentPortaledSubmenu && currentPortaledSubmenu.isPortaled) { + currentPortaledSubmenu.cleanUpSubmenu(); + } + currentPortaledSubmenu = null; + } + function createMenuItem(opt) { var item; @@ -162,6 +228,116 @@ RED.menu = (function() { submenu.addClass("red-ui-menu-dropdown-submenus") } + // Setup submenu portaling for scrollable parent menus + (function(item, submenu, direction) { + var isPortaled = false; + var originalParentItem = item; + + function doesSubmenuNeedPortaling() { + var parentMenu = item.closest(".red-ui-menu-dropdown"); + var overflowY = parentMenu.css("overflow-y"); + // If scroll, portal it + if (overflowY === "auto" || overflowY === "scroll") { + return true; + } + + var itemRect = item[0].getBoundingClientRect(); + var submenuWidth = submenu.outerWidth() || 230; + var viewportWidth = window.innerWidth; + var padding = 10; + + // If right overflow, portal it + if (itemRect.right + submenuWidth > viewportWidth - padding) { + return true; + } + return false; + } + + function portalSubmenu() { + if (!doesSubmenuNeedPortaling()) { + return; + } + if (isPortaled) { + updatePositionOfSubmenu(); + return; + } + + isPortaled = true; + submenu.appendTo('body'); + submenu.addClass('red-ui-menu-dropdown-portaled'); + updatePositionOfSubmenu(); + } + + function updatePositionOfSubmenu() { + if (!isPortaled) { + return; + } + var {x, y} = getSubmenuPosition(item[0], submenu[0], direction); + submenu.css({ + 'top': y + 'px', + 'left': x + 'px' + }); + } + + function cleanUpSubmenu() { + if (!isPortaled) { + return; + } + isPortaled = false; + submenu.removeClass('red-ui-menu-dropdown-portaled'); + submenu.appendTo(originalParentItem); + + if (currentPortaledSubmenu && currentPortaledSubmenu.submenu === submenu) { + currentPortaledSubmenu = null; + } + } + + var submenuInfo = { + submenu, + cleanUpSubmenu + }; + + Object.defineProperty(submenuInfo, 'isPortaled', { + get: function() { return isPortaled; } + }); + + item.on("mouseenter", function() { + if (currentPortaledSubmenu && currentPortaledSubmenu.isPortaled && currentPortaledSubmenu.submenu !== submenu) { + currentPortaledSubmenu.cleanUpSubmenu(); + } + + portalSubmenu(); + + if (isPortaled) { + currentPortaledSubmenu = submenuInfo; + } + }); + + item.on("mouseleave", function(e) { + if (!isPortaled) { + return; + } + // Check if mouse moved to the submenu + var related = e.relatedTarget; + if (related && (submenu[0].contains(related) || submenu[0] === related)) { + return; + } + cleanUpSubmenu(); + }); + + submenu.on("mouseleave", function(e) { + if (!isPortaled) { + return; + } + // Check if mouse moved back to parent item + var related = e.relatedTarget; + if (related && (item[0].contains(related) || item[0] === related)) { + return; + } + cleanUpSubmenu(); + }); + + })(item, submenu, opt.direction); } if (opt.disabled) { @@ -177,10 +353,11 @@ RED.menu = (function() { } function createMenu(options) { - var topMenu = $("
      ",{class:"red-ui-menu red-ui-menu-dropdown pull-right"}); + var topMenu = $("
        ",{class: "red-ui-menu red-ui-menu-dropdown pull-right"}); if (options.direction) { topMenu.addClass("red-ui-menu-dropdown-direction-"+options.direction) } + if (options.id) { topMenu.attr({id:options.id+"-submenu"}); var menuParent = $("#"+options.id); @@ -191,15 +368,31 @@ RED.menu = (function() { evt.preventDefault(); if (topMenu.is(":visible")) { $(document).off("click.red-ui-menu"); + cleanupPortaledSubmenus(); topMenu.hide(); + topMenu.css({ maxHeight: "", overflowY: "" }); } else { $(document).on("click.red-ui-menu", function(evt) { $(document).off("click.red-ui-menu"); activeMenu = null; + cleanupPortaledSubmenus(); topMenu.hide(); + topMenu.css({ maxHeight: "", overflowY: "" }); }); $(".red-ui-menu.red-ui-menu-dropdown").hide(); topMenu.show(); + + // Enable scrolling if menu exceeds viewport + var menuOffset = topMenu.offset(); + var menuHeight = topMenu.outerHeight(); + var windowHeight = $(window).height(); + var spaceBelow = windowHeight - menuOffset.top; + if (menuHeight > spaceBelow - 10) { + topMenu.css({ + maxHeight: (spaceBelow - 10) + "px", + overflowY: "auto" + }); + } } }) } @@ -323,7 +516,7 @@ RED.menu = (function() { } else { for (var i=0;i
    ').insertAfter(children[0]); + if (options.invisibleSeparator) { + if (!vertical) { + throw new Error("invisibleSeparator option is only valid for vertical panels"); + } + separator.addClass("red-ui-panels-separator-invisible"); + $('
    ').appendTo(separator) + } var startPosition; var panelSizes = []; var modifiedSizes = false; diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js index 7ae05e770f..16788bc74b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js @@ -30,6 +30,7 @@ RED.tabs = (function() { var currentActiveTabWidth = 0; var collapsibleMenu; var mousedownTab; + var mouseclickTab; var preferredOrder = options.order; var ul = options.element || $("#"+options.id); var wrapper = ul.wrap( "
    " ).parent(); @@ -39,6 +40,34 @@ RED.tabs = (function() { wrapper.addClass("red-ui-tabs-vertical"); } + var scrollLeft; + var scrollRight; + + if (options.scrollable) { + wrapper.addClass("red-ui-tabs-scrollable"); + scrollContainer.addClass("red-ui-tabs-scroll-container"); + scrollContainer.on("scroll",function(evt) { + // Generated by trackpads - not mousewheel + updateScroll(evt); + }); + scrollContainer.on("wheel", function(evt) { + if (evt.originalEvent.deltaX === 0) { + // Prevent the scroll event from firing + evt.preventDefault(); + + // Assume this is wheel event which might not trigger + // the scroll event, so do things manually + var sl = scrollContainer.scrollLeft(); + sl += evt.originalEvent.deltaY; + scrollContainer.scrollLeft(sl); + } + }) + scrollLeft = $('').prependTo(wrapper).find("a"); + scrollLeft.on('mousedown',function(evt) {scrollEventHandler(evt, evt.shiftKey?('-='+scrollContainer.scrollLeft()):'-=150') }).on('click',function(evt){ evt.preventDefault();}); + scrollRight = $('
    ').appendTo(wrapper).find("a"); + scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,evt.shiftKey?('+='+(scrollContainer[0].scrollWidth - scrollContainer.width()-scrollContainer.scrollLeft())):'+=150') }).on('click',function(evt){ evt.preventDefault();}); + } + if (options.addButton) { wrapper.addClass("red-ui-tabs-add"); var addButton = $('
    ').appendTo(wrapper); @@ -127,8 +156,9 @@ RED.tabs = (function() { }) menu.appendTo("body"); var elementPos = menuButton.offset(); + var top = elementPos.top + menuButton.height() - 2; menu.css({ - top: (elementPos.top+menuButton.height()-2)+"px", + top: top + "px", left: (elementPos.left - menu.width() + menuButton.width())+"px" }) $(".red-ui-menu.red-ui-menu-dropdown").hide(); @@ -138,6 +168,17 @@ RED.tabs = (function() { menu.remove(); }); menu.show(); + + // Enable scrolling if menu exceeds viewport + var menuHeight = menu.outerHeight(); + var windowHeight = $(window).height(); + var spaceBelow = windowHeight - top; + if (menuHeight > spaceBelow - 10) { + menu.css({ + maxHeight: (spaceBelow - 10) + "px", + overflowY: "auto" + }); + } }) } @@ -165,34 +206,6 @@ RED.tabs = (function() { }) } - var scrollLeft; - var scrollRight; - - if (options.scrollable) { - wrapper.addClass("red-ui-tabs-scrollable"); - scrollContainer.addClass("red-ui-tabs-scroll-container"); - scrollContainer.on("scroll",function(evt) { - // Generated by trackpads - not mousewheel - updateScroll(evt); - }); - scrollContainer.on("wheel", function(evt) { - if (evt.originalEvent.deltaX === 0) { - // Prevent the scroll event from firing - evt.preventDefault(); - - // Assume this is wheel event which might not trigger - // the scroll event, so do things manually - var sl = scrollContainer.scrollLeft(); - sl += evt.originalEvent.deltaY; - scrollContainer.scrollLeft(sl); - } - }) - scrollLeft = $('
    ').appendTo(wrapper).find("a"); - scrollLeft.on('mousedown',function(evt) {scrollEventHandler(evt, evt.shiftKey?('-='+scrollContainer.scrollLeft()):'-=150') }).on('click',function(evt){ evt.preventDefault();}); - scrollRight = $('
    ').appendTo(wrapper).find("a"); - scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,evt.shiftKey?('+='+(scrollContainer[0].scrollWidth - scrollContainer.width()-scrollContainer.scrollLeft())):'+=150') }).on('click',function(evt){ evt.preventDefault();}); - } - if (options.collapsible) { // var dropDown = $('
    ',{class:"red-ui-tabs-select"}).appendTo(wrapper); // ul.hide(); @@ -233,20 +246,36 @@ RED.tabs = (function() { collapsibleMenu.appendTo("body"); } var elementPos = selectButton.offset(); + var top = elementPos.top + selectButton.height() - 2; collapsibleMenu.css({ - top: (elementPos.top+selectButton.height()-2)+"px", + top: top + "px", left: (elementPos.left - collapsibleMenu.width() + selectButton.width())+"px" }) if (collapsibleMenu.is(":visible")) { $(document).off("click.red-ui-tabmenu"); + collapsibleMenu.css({ maxHeight: "", overflowY: "" }); } else { $(".red-ui-menu.red-ui-menu-dropdown").hide(); $(document).on("click.red-ui-tabmenu", function(evt) { $(document).off("click.red-ui-tabmenu"); collapsibleMenu.hide(); + collapsibleMenu.css({ maxHeight: "", overflowY: "" }); }); } collapsibleMenu.toggle(); + + // Enable scrolling if menu exceeds viewport + if (collapsibleMenu.is(":visible")) { + var menuHeight = collapsibleMenu.outerHeight(); + var windowHeight = $(window).height(); + var spaceBelow = windowHeight - top; + if (menuHeight > spaceBelow - 10) { + collapsibleMenu.css({ + maxHeight: (spaceBelow - 10) + "px", + overflowY: "auto" + }); + } + } }) } @@ -299,11 +328,12 @@ RED.tabs = (function() { return; } mousedownTab = null; - if (dblClickTime && Date.now()-dblClickTime < 400) { + if (dblClickTime && Date.now()-dblClickTime < 400 && evt.currentTarget === mouseclickTab) { dblClickTime = 0; dblClickArmed = true; return onTabDblClick.call(this,evt); } + mouseclickTab = evt.currentTarget dblClickTime = Date.now(); var currentTab = ul.find("li.red-ui-tab.active"); @@ -382,11 +412,12 @@ RED.tabs = (function() { var scWidth = scrollContainer.width(); var ulWidth = ul.width(); if (sl === 0) { - scrollLeft.hide(); + // We use the parent of the LH button so it doesn't take up space when hidden + scrollLeft.parent().hide(); } else { - scrollLeft.show(); + scrollLeft.parent().show(); } - if (sl === ulWidth-scWidth) { + if (Math.abs(sl - Math.round(ulWidth-scWidth)) < 5) { scrollRight.hide(); } else { scrollRight.show(); @@ -403,7 +434,6 @@ RED.tabs = (function() { } return false; } - function activateTab(link) { if (typeof link === "string") { link = ul.find("a[href='#"+link+"']"); @@ -418,6 +448,7 @@ RED.tabs = (function() { } } if (!link.parent().hasClass("active")) { + updateTabWidths(); ul.children().removeClass("active"); ul.children().css({"transition": "width 100ms"}); link.parent().addClass("active"); @@ -425,6 +456,8 @@ RED.tabs = (function() { wrapper.find(".red-ui-tab-link-button").removeClass("active selected"); $("#"+parentId+"-link-button").addClass("active selected"); if (options.scrollable) { + window.sc = scrollContainer; + window.at = link var pos = link.parent().position().left; if (pos-21 < 0) { scrollContainer.animate( { scrollLeft: '+='+(pos-50) }, 300); @@ -435,7 +468,6 @@ RED.tabs = (function() { if (options.onchange) { options.onchange(tabs[link.attr('href').slice(1)]); } - updateTabWidths(); setTimeout(function() { ul.children().css({"transition": ""}); },100); @@ -467,7 +499,7 @@ RED.tabs = (function() { var allTabs = ul.find("li.red-ui-tab"); var tabs = allTabs.filter(":not(.hide-tab)"); var hiddenTabs = allTabs.filter(".hide-tab"); - var width = wrapper.width(); + var width = options.scrollable ? scrollContainer.width() : wrapper.width(); var tabCount = tabs.length; var tabWidth; @@ -509,20 +541,20 @@ RED.tabs = (function() { tabs.css({width:tabWidth}); } else { - var tabWidth = (width-12-(tabCount*6))/tabCount; + var tabWidth = Math.round((width-12-(tabCount*6))/tabCount); currentTabWidth = (100*tabWidth/width)+"%"; currentActiveTabWidth = currentTabWidth+"%"; if (options.scrollable) { tabWidth = Math.max(tabWidth,140); currentTabWidth = tabWidth+"px"; currentActiveTabWidth = 0; - var listWidth = Math.max(wrapper.width(),12+(tabWidth+6)*tabCount); + var listWidth = Math.max(scrollContainer.width(),12+(tabWidth+6)*tabCount); ul.width(listWidth); updateScroll(); } else if (options.hasOwnProperty("minimumActiveTabWidth")) { if (tabWidth < options.minimumActiveTabWidth) { tabCount -= 1; - tabWidth = (width-12-options.minimumActiveTabWidth-(tabCount*6))/tabCount; + tabWidth = Math.round((width-12-options.minimumActiveTabWidth-(tabCount*6))/tabCount); currentTabWidth = (100*tabWidth/width)+"%"; currentActiveTabWidth = options.minimumActiveTabWidth+"px"; } else { @@ -551,7 +583,6 @@ RED.tabs = (function() { ul.find("li.red-ui-tab.active .red-ui-tab-label").css({paddingLeft:""}) } } - } ul.find("li.red-ui-tab a") @@ -965,7 +996,9 @@ RED.tabs = (function() { activateTab: activateTab, nextTab: activateNextTab, previousTab: activatePreviousTab, - resize: updateTabWidths, + resize: function () { + updateTabWidths() + }, count: function() { return ul.find("li.red-ui-tab:not(.hide)").length; }, @@ -1051,7 +1084,8 @@ RED.tabs = (function() { pinnedButtons["__menu__"].appendTo(collapsedButtonsRow); updateTabWidths(); } - } + }, + container: wrapper } return tabAPI; } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js index 71062a53a8..138728b675 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js @@ -28,6 +28,7 @@ * - autoSelect: boolean - default true - triggers item selection when navigating * list by keyboard. If the list has checkboxed items * you probably want to set this to false + * - expandOnLabel: boolean - default true - items expand when their label is clicked * * methods: * - data(items) - clears existing items and replaces with new data @@ -91,6 +92,7 @@ * * */ + const paddingPerDepth = 5; $.widget( "nodered.treeList", { _create: function() { @@ -345,11 +347,11 @@ if (child.depth !== parent.depth+1) { child.depth = parent.depth+1; // var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20)); - var labelPaddingWidth = (((child.gutter&&!child.gutter.hasClass("red-ui-treeList-gutter-float"))?child.gutter.width()+2:0)+(child.depth*20)); + var labelPaddingWidth = (((child.gutter&&!child.gutter.hasClass("red-ui-treeList-gutter-float"))?child.gutter.width()+2:0)+(child.depth*paddingPerDepth)); child.treeList.labelPadding.width(labelPaddingWidth+'px'); if (child.element) { $(child.element).css({ - width: "calc(100% - "+(labelPaddingWidth+20+(child.icon?20:0))+"px)" + width: "calc(100% - "+(labelPaddingWidth+paddingPerDepth+(child.icon?paddingPerDepth:0))+"px)" }) } // This corrects all child item depths @@ -478,7 +480,7 @@ if (!childrenAdded) { startTime = Date.now(); spinner = $('
    ').css({ - "background-position": (35+depth*20)+'px 50%' + "background-position": (35+depth*paddingPerDepth)+'px 50%' }).appendTo(container); } @@ -530,10 +532,10 @@ $(element).appendTo(item.treeList.label); // using the JQuery Object, the gutter width will // be wrong when the element is reattached the second time - var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (item.depth * 20); + var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (item.depth * paddingPerDepth); $(element).css({ - width: "calc(100% - "+(labelPaddingWidth+20+(item.icon?20:0))+"px)" + width: "calc(100% - "+(labelPaddingWidth+paddingPerDepth+(item.icon?paddingPerDepth:0))+"px)" }) } item.element = element; @@ -568,7 +570,7 @@ } - var labelPaddingWidth = ((item.gutter&&!item.gutter.hasClass("red-ui-treeList-gutter-float"))?item.gutter.width()+2:0)+(depth*20); + var labelPaddingWidth = ((item.gutter&&!item.gutter.hasClass("red-ui-treeList-gutter-float"))?item.gutter.width()+2:0)+(depth*paddingPerDepth); item.treeList.labelPadding = $('').css({ display: "inline-block", @@ -630,12 +632,14 @@ }); // $('').appendTo(label); label.on("click.red-ui-treeList-expand", function(e) { - if (container.hasClass("expanded")) { - if (item.hasOwnProperty('selected') || label.hasClass("selected")) { - item.treeList.collapse(); + if (that.options.expandOnLabel !== false || item.expandOnLabel === true) { + if (container.hasClass("expanded")) { + if (item.hasOwnProperty('selected') || label.hasClass("selected")) { + item.treeList.collapse(); + } + } else { + item.treeList.expand(); } - } else { - item.treeList.expand(); } }) if (!item.children) { @@ -773,7 +777,7 @@ } else if (item.element) { $(item.element).appendTo(label); $(item.element).css({ - width: "calc(100% - "+(labelPaddingWidth+20+(item.icon?20:0))+"px)" + width: "calc(100% - "+(labelPaddingWidth+paddingPerDepth+(item.icon?paddingPerDepth:0))+"px)" }) } if (item.children) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js index b528579ef8..0bcceadaa5 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js @@ -257,17 +257,11 @@ RED.contextMenu = (function () { }) menu.appendTo("body"); - // TODO: prevent the menu from overflowing the window. - var top = options.y var left = options.x + var windowHeight = $(window).height(); + var windowWidth = $(window).width(); - if (top + menu.height() - $(document).scrollTop() > $(window).height()) { - top -= (top + menu.height()) - $(window).height() + 22; - } - if (left + menu.width() - $(document).scrollLeft() > $(window).width()) { - left -= (left + menu.width()) - $(window).width() + 18; - } menu.css({ top: top + "px", left: left + "px" @@ -280,6 +274,41 @@ RED.contextMenu = (function () { disposeMenu() }); menu.show(); + + var menuHeight = menu.outerHeight(); + var menuWidth = menu.outerWidth(); + var spaceBelow = windowHeight - top; + var spaceAbove = top; + + // Adjust horizontal position if menu would overflow right edge + if (left + menuWidth > windowWidth - 10) { + left = windowWidth - menuWidth - 10; + menu.css({ left: left + "px" }); + } + + // Check if menu overflows below viewport + if (menuHeight > spaceBelow - 10) { + // Try repositioning above the click point first + if (spaceAbove > spaceBelow && menuHeight <= spaceAbove - 10) { + menu.css({ + top: (top - menuHeight) + "px" + }); + } else { + // Enable scrolling with max available space above or below + if (spaceAbove > spaceBelow) { + menu.css({ + top: "10px", + maxHeight: (top - 20) + "px", + overflowY: "auto" + }); + } else { + menu.css({ + maxHeight: (spaceBelow - 10) + "px", + overflowY: "auto" + }); + } + } + } // set focus to first item so that pressing escape key closes the menu $("#red-ui-workspace-context-menu :first(ul) > a").trigger("focus") diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js index d929e25601..606d0faa35 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -310,16 +310,10 @@ RED.deploy = (function() { } function shadeShow() { - $("#red-ui-header-shade").show(); - $("#red-ui-editor-shade").show(); - $("#red-ui-palette-shade").show(); - $("#red-ui-sidebar-shade").show(); + RED.notifications.shade.show(); } function shadeHide() { - $("#red-ui-header-shade").hide(); - $("#red-ui-editor-shade").hide(); - $("#red-ui-palette-shade").hide(); - $("#red-ui-sidebar-shade").hide(); + RED.notifications.shade.hide(); } function deployButtonSetBusy(){ $(".red-ui-deploy-button-content").css('opacity',0); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js index 26cdceb7e5..186a56fcca 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js @@ -1363,11 +1363,11 @@ RED.diff = (function() { diffTable.finish(); diffTable.list.show(); },300); - $("#red-ui-sidebar-shade").show(); + $(".red-ui-sidebar-shade").show(); }, close: function() { diffVisible = false; - $("#red-ui-sidebar-shade").hide(); + $(".red-ui-sidebar-shade").hide(); }, show: function() { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js index 2e85a5ef8d..0854debdd0 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js @@ -132,7 +132,7 @@ RED.editor.codeEditor.monaco = (function() { const def = modulesCache[libPath]; if( def ) { if(!preloadOnly) { - loadedLibs.JS[libModule] = monaco.languages.typescript.javascriptDefaults.addExtraLib(def, "file://types/" + libPackage + "/" + libModule + "/index.d.ts"); + loadedLibs.JS[libModule] = monaco.typescript.javascriptDefaults.addExtraLib(def, "file://types/" + libPackage + "/" + libModule + "/index.d.ts"); } if(cb) { setTimeout(function() { @@ -145,7 +145,7 @@ RED.editor.codeEditor.monaco = (function() { .done(function(data) { modulesCache[libPath] = data; if(!preloadOnly) { - loadedLibs.JS[libModule] = monaco.languages.typescript.javascriptDefaults.addExtraLib(data, "file://types/" + libPackage + "/" + libModule + "/index.d.ts"); + loadedLibs.JS[libModule] = monaco.typescript.javascriptDefaults.addExtraLib(data, "file://types/" + libPackage + "/" + libModule + "/index.d.ts"); } if(cb) { cb(null, _module) } }) @@ -161,7 +161,6 @@ RED.editor.codeEditor.monaco = (function() { function init(options) { - //Handles orphaned models //ensure loaded models that are not explicitly destroyed by a call to .destroy() are disposed RED.events.on("editor:close",function() { @@ -514,11 +513,13 @@ RED.editor.codeEditor.monaco = (function() { //Setup JSON options try { var diagnosticOptionsDefault = {validate: true}; - var diagnosticOptions = RED.settings.get('codeEditor.monaco.languages.json.jsonDefaults.diagnosticOptions'); - var modeConfiguration = RED.settings.get('codeEditor.monaco.languages.json.jsonDefaults.modeConfiguration'); + /** @see https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages_features_json_register.DiagnosticsOptions.html */ + var diagnosticOptions = RED.settings.get('codeEditor.monaco.json.jsonDefaults.diagnosticOptions'); + /** @see https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages_features_json_register.ModeConfiguration.html */ + var modeConfiguration = RED.settings.get('codeEditor.monaco.json.jsonDefaults.modeConfiguration'); diagnosticOptions = Object.assign({}, diagnosticOptionsDefault, (diagnosticOptions || {})); - _monaco.languages.json.jsonDefaults.setDiagnosticsOptions(diagnosticOptions); - if(modeConfiguration) { _monaco.languages.json.jsonDefaults.setModeConfiguration(modeConfiguration); } + _monaco.json.jsonDefaults.setDiagnosticsOptions(diagnosticOptions); + if(modeConfiguration) { _monaco.json.jsonDefaults.setModeConfiguration(modeConfiguration); } } catch (error) { console.warn("monaco - Error setting up json options", error) } @@ -527,10 +528,14 @@ RED.editor.codeEditor.monaco = (function() { function setupHTML(_monaco) { //Setup HTML / Handlebars options try { - var htmlDefaults = RED.settings.get('codeEditor.monaco.languages.html.htmlDefaults.options'); - var handlebarDefaults = RED.settings.get('codeEditor.monaco.languages.html.handlebarDefaults.options'); - if(htmlDefaults) { _monaco.languages.html.htmlDefaults.setOptions(htmlDefaults); } - if(handlebarDefaults) { _monaco.languages.html.handlebarDefaults.setOptions(handlebarDefaults); } + var htmlDefaults = RED.settings.get('codeEditor.monaco.html.htmlDefaults.options'); + var handlebarDefaults = RED.settings.get('codeEditor.monaco.html.handlebarDefaults.options'); + var htmlModeConfiguration = RED.settings.get('codeEditor.monaco.html.htmlDefaults.modeConfiguration'); + var handlebarModeConfiguration = RED.settings.get('codeEditor.monaco.html.handlebarDefaults.modeConfiguration'); + if(htmlDefaults) { _monaco.html.htmlDefaults.setOptions(htmlDefaults); } + if(handlebarDefaults) { _monaco.html.handlebarDefaults.setOptions(handlebarDefaults); } + if(htmlModeConfiguration) { _monaco.html.htmlDefaults.setModeConfiguration(htmlModeConfiguration); } + if(handlebarModeConfiguration) { _monaco.html.handlebarDefaults.setModeConfiguration(handlebarModeConfiguration); } } catch (error) { console.warn("monaco - Error setting up html options", error) } @@ -539,18 +544,18 @@ RED.editor.codeEditor.monaco = (function() { function setupCSS(_monaco) { //Setup CSS/SCSS/LESS options try { - var cssDefaults_diagnosticsOption = RED.settings.get('codeEditor.monaco.languages.css.cssDefaults.diagnosticsOptions'); - var lessDefaults_diagnosticsOption = RED.settings.get('codeEditor.monaco.languages.css.lessDefaults.diagnosticsOption'); - var scssDefaults_diagnosticsOption = RED.settings.get('codeEditor.monaco.languages.css.scssDefaults.diagnosticsOption'); - var cssDefaults_modeConfiguration = RED.settings.get('codeEditor.monaco.languages.css.cssDefaults.modeConfiguration'); - var lessDefaults_modeConfiguration = RED.settings.get('codeEditor.monaco.languages.css.lessDefaults.modeConfiguration'); - var scssDefaults_modeConfiguration = RED.settings.get('codeEditor.monaco.languages.css.scssDefaults.modeConfiguration'); - if(cssDefaults_diagnosticsOption) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(cssDefaults_diagnosticsOption); } - if(lessDefaults_diagnosticsOption) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(lessDefaults_diagnosticsOption); } - if(scssDefaults_diagnosticsOption) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(scssDefaults_diagnosticsOption); } - if(cssDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(cssDefaults_modeConfiguration); } - if(lessDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(lessDefaults_modeConfiguration); } - if(scssDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(scssDefaults_modeConfiguration); } + var cssDefaults_option = RED.settings.get('codeEditor.monaco.css.cssDefaults.options'); + var lessDefaults_option = RED.settings.get('codeEditor.monaco.css.lessDefaults.options'); + var scssDefaults_option = RED.settings.get('codeEditor.monaco.css.scssDefaults.options'); + var cssDefaults_modeConfiguration = RED.settings.get('codeEditor.monaco.css.cssDefaults.modeConfiguration'); + var lessDefaults_modeConfiguration = RED.settings.get('codeEditor.monaco.css.lessDefaults.modeConfiguration'); + var scssDefaults_modeConfiguration = RED.settings.get('codeEditor.monaco.css.scssDefaults.modeConfiguration'); + if(cssDefaults_option) { _monaco.css.cssDefaults.setOptions(cssDefaults_option); } + if(lessDefaults_option) { _monaco.css.lessDefaults.setOptions(lessDefaults_option); } + if(scssDefaults_option) { _monaco.css.scssDefaults.setOptions(scssDefaults_option); } + if(cssDefaults_modeConfiguration) { _monaco.css.cssDefaults.setModeConfiguration(cssDefaults_modeConfiguration); } + if(lessDefaults_modeConfiguration) { _monaco.css.lessDefaults.setModeConfiguration(lessDefaults_modeConfiguration); } + if(scssDefaults_modeConfiguration) { _monaco.css.scssDefaults.setModeConfiguration(scssDefaults_modeConfiguration); } } catch (error) { console.warn("monaco - Error setting up CSS/SCSS/LESS options", error) } @@ -661,22 +666,22 @@ RED.editor.codeEditor.monaco = (function() { allowJs: true, checkJs: true, allowNonTsExtensions: true, - target: monaco.languages.typescript.ScriptTarget.ESNext, + target: monaco.typescript.ScriptTarget.ESNext, strictNullChecks: false, strictPropertyInitialization: true, strictFunctionTypes: true, strictBindCallApply: true, useDefineForClassFields: true,//permit class static fields with private name to have initializer - moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs, - module: monaco.languages.typescript.ModuleKind.CommonJS, + moduleResolution: monaco.typescript.ModuleResolutionKind.NodeJs, + module: monaco.typescript.ModuleKind.CommonJS, typeRoots: ["types"], lib: ["esnext"] //dont load DOM by default, } - //apply overrides from codeEditor.monaco.languages.typescript.javascriptDefaults.compilerOptions in settings.js - var settingsComilerOptions = RED.settings.get('codeEditor.monaco.languages.typescript.javascriptDefaults.compilerOptions') || {}; + //apply overrides from codeEditor.monaco.typescript.javascriptDefaults.compilerOptions in settings.js + var settingsComilerOptions = RED.settings.get('codeEditor.monaco.typescript.javascriptDefaults.compilerOptions') || {}; compilerOptions = Object.assign({}, compilerOptions, settingsComilerOptions); - /** @see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.typescript.languageservicedefaults.html#setcompileroptions */ - _monaco.languages.typescript.javascriptDefaults.setCompilerOptions(compilerOptions); + /** @see https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages_features_typescript_register.LanguageServiceDefaults.html#setCompilerOptions */ + _monaco.typescript.javascriptDefaults.setCompilerOptions(compilerOptions); //prepare diagnostic options (defaults) var diagnosticOptions = { @@ -697,11 +702,11 @@ RED.editor.codeEditor.monaco = (function() { 80004, //JSDoc types may be moved to TypeScript types. ] }; - //apply overrides from codeEditor.monaco.languages.typescript.javascriptDefaults.diagnosticsOptions settings.js - var settingsDiagnosticsOptions = RED.settings.get('codeEditor.monaco.languages.typescript.javascriptDefaults.diagnosticsOptions') || {}; + //apply overrides from codeEditor.monaco.typescript.javascriptDefaults.diagnosticsOptions settings.js + var settingsDiagnosticsOptions = RED.settings.get('codeEditor.monaco.typescript.javascriptDefaults.diagnosticsOptions') || {}; diagnosticOptions = Object.assign({}, diagnosticOptions, settingsDiagnosticsOptions); - /** @see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.typescript.languageservicedefaults.html#setdiagnosticsoptions */ - _monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions(diagnosticOptions); + /** @see https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages_features_typescript_register.LanguageServiceDefaults.html#setDiagnosticsOptions */ + _monaco.typescript.javascriptDefaults.setDiagnosticsOptions(diagnosticOptions); } catch (error) { console.warn("monaco - Error setting javascriptDefaults", error) } @@ -827,7 +832,7 @@ RED.editor.codeEditor.monaco = (function() { if (editorOptions.suggestFontSize == null) { editorOptions.suggestFontSize = 12; } if (editorOptions.formatOnPaste == null) { editorOptions.formatOnPaste = true; } if (editorOptions.foldingHighlight == null) { editorOptions.foldingHighlight = true; } - if (editorOptions.foldStyle == null) { editorOptions.foldStyle = true; } //https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandaloneeditorconstructionoptions.html#folding + if (editorOptions.foldStyle == null) { editorOptions.foldStyle = true; } if (editorOptions.readOnly != null) { editorOptions.readOnly = editorOptions.readOnly; } if (editorOptions.lineNumbers === false) { editorOptions.lineNumbers = false; } if (editorOptions.theme == null) { editorOptions.theme = monacoThemes[0]; } @@ -853,7 +858,7 @@ RED.editor.codeEditor.monaco = (function() { //others editorOptions.roundedSelection = editorOptions.roundedSelection === false ? false : true; //default to true editorOptions.contextmenu = editorOptions.contextmenu === false ? false : true; //(context menu enable) default to true - editorOptions.snippetSuggestions = editorOptions.enableSnippets === false ? false : true; //default to true //https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandaloneeditorconstructionoptions.html#snippetsuggestions + editorOptions.snippetSuggestions = editorOptions.enableSnippets === false ? false : true; //default to true editorOptions.value = options.value || ""; @@ -909,7 +914,7 @@ RED.editor.codeEditor.monaco = (function() { } // compiler options - enable / disable server-side/client-side suggestions - var compilerOptions = monaco.languages.typescript.javascriptDefaults.getCompilerOptions(); + var compilerOptions = monaco.typescript.javascriptDefaults.getCompilerOptions(); if (serverSideSuggestions) { compilerOptions.lib = ["esnext"]; //dont include DOM defaultServerSideTypes.forEach(function(m) { @@ -919,7 +924,7 @@ RED.editor.codeEditor.monaco = (function() { compilerOptions.lib = ["esnext", "dom"]; } - monaco.languages.typescript.javascriptDefaults.setCompilerOptions(compilerOptions); + monaco.typescript.javascriptDefaults.setCompilerOptions(compilerOptions); //check if extraLibs are to be loaded (e.g. fs or os) refreshModuleLibs(editorOptions.extraLibs) @@ -930,7 +935,7 @@ RED.editor.codeEditor.monaco = (function() { const id = "extraModuleLibs/index.d.ts"; const file = 'file://types/extraModuleLibs/index.d.ts'; if(!extraModuleLibs || extraModuleLibs.length == 0) { - loadedLibs.JS[id] = monaco.languages.typescript.javascriptDefaults.addExtraLib(" ", file); + loadedLibs.JS[id] = monaco.typescript.javascriptDefaults.addExtraLib(" ", file); } else { var loadList = []; Array.prototype.push.apply(loadList, extraModuleLibs);//Use this instead of spread operator to prevent IE syntax error @@ -958,7 +963,7 @@ RED.editor.codeEditor.monaco = (function() { var _defs = "\ndeclare global {\n" + defs.join("") + "\n}"; var libSource = _imports + _defs; setTimeout(function() { - loadedLibs.JS[id] = monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, file); + loadedLibs.JS[id] = monaco.typescript.javascriptDefaults.addExtraLib(libSource, file); }, 500); } }); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js index 4311974584..de5c788ac6 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js @@ -43,6 +43,7 @@ RED.keyboard = (function() { "-":189, ".":190, "/":191, + "§":192, // <- top left key MacOS "\\":220, "'":222, "?":191, // <- QWERTY specific diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js b/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js index d68d03d3f6..33727e2ae4 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js @@ -43,10 +43,10 @@ RED.notifications = (function() { }); */ - var persistentNotifications = {}; + const persistentNotifications = {}; - var shade = (function() { - var shadeUsers = 0; + const shade = (function() { + let shadeUsers = 0; return { show: function() { shadeUsers++; @@ -324,6 +324,7 @@ RED.notifications = (function() { showPersistent(); }) }, - notify: notify + notify: notify, + shade: shade } })(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js index e2773f4f65..1a34d1927b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js @@ -40,6 +40,12 @@ RED.palette.editor = (function() { // Install tab - search input let searchInput; + // Core and Package Updates + /** @type {Array<{package: string, current: string, available: string}>} */ + const moduleUpdates = [] + const updateStatusState = { version: null, moduleCount: 0 } + + const SMALL_CATALOGUE_SIZE = 40 const typesInUse = {}; @@ -1825,8 +1831,6 @@ RED.palette.editor = (function() { const updateStatusWidget = $(''); let updateStatusWidgetPopover; - const updateStatusState = { moduleCount: 0 } - let updateAvailable = []; function addUpdateInfoToStatusBar() { updateStatusWidgetPopover = RED.popover.create({ @@ -1835,7 +1839,7 @@ RED.palette.editor = (function() { interactive: true, direction: "bottom", content: function () { - const count = updateAvailable.length || 0; + const count = moduleUpdates.length || 0 const content = $('
    '); if (updateStatusState.version) { $(`${RED._("telemetry.updateAvailableDesc", updateStatusState)}`).appendTo(content) @@ -1845,7 +1849,7 @@ RED.palette.editor = (function() { updateStatusWidgetPopover.close() RED.actions.invoke("core:manage-palette", { view: "nodes", - filter: '"' + updateAvailable.join('", "') + '"' + filter: '"' + moduleUpdates.map(u => u.package).join('", "') + '"' }); }).appendTo(content) } @@ -1867,7 +1871,7 @@ RED.palette.editor = (function() { function refreshUpdateStatus() { clearTimeout(pendingRefreshTimeout) pendingRefreshTimeout = setTimeout(() => { - updateAvailable = []; + moduleUpdates.length = 0 for (const module of Object.keys(nodeEntries)) { if (loadedIndex.hasOwnProperty(module)) { const moduleInfo = nodeEntries[module].info; @@ -1875,35 +1879,51 @@ RED.palette.editor = (function() { // Module updated continue; } + const current = moduleInfo.version + const latest = loadedIndex[module].version if (updateAllowed && - semVerCompare(loadedIndex[module].version, moduleInfo.version) > 0 && + semVerCompare(latest, current) > 0 && RED.utils.checkModuleAllowed(module, null, updateAllowList, updateDenyList) ) { - updateAvailable.push(module); + moduleUpdates.push({ package: module, current, latest }) } } } - updateStatusState.moduleCount = updateAvailable.length; + updateStatusState.moduleCount = moduleUpdates.length updateStatus(); }, 200) } function updateStatus() { - if (updateStatusState.moduleCount || updateStatusState.version) { + const updates = RED.palette.editor.getAvailableUpdates() + if (updates.count > 0) { updateStatusWidget.empty(); - let count = updateStatusState.moduleCount || 0; - if (updateStatusState.version) { - count ++ - } - $(` ${RED._("telemetry.updateAvailable", { count: count })}`).appendTo(updateStatusWidget); + $(` ${RED._("telemetry.updateAvailable", { count: updates.count })}`).appendTo(updateStatusWidget); RED.statusBar.show("red-ui-status-package-update"); } else { RED.statusBar.hide("red-ui-status-package-update"); } + RED.events.emit("registry:updates-available", updates) + } + + function getAvailableUpdates () { + const palette = [...moduleUpdates] + let core = null + let count = palette.length + if (updateStatusState.version) { + core = { current: RED.settings.version, latest: updateStatusState.version } + count ++ + } + return { + count, + core, + palette + } } return { - init: init, - install: install + init, + install, + getAvailableUpdates } })(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js index 89337e7c9e..44dec1f741 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js @@ -33,7 +33,6 @@ RED.palette = (function() { ]; var categoryContainers = {}; - var sidebarControls; let paletteState = { filter: "", collapsed: [] }; @@ -310,6 +309,7 @@ RED.palette = (function() { width: "300px", content: "hi", delay: { show: 750, hide: 50 } + // direction: "left" }); d.data('popover',popover); @@ -326,13 +326,15 @@ RED.palette = (function() { var paletteWidth; var paletteTop; var dropEnabled; + let chartOffset; $(d).draggable({ helper: 'clone', appendTo: '#red-ui-editor', revert: 'invalid', revertDuration: 200, containment:'#red-ui-main-container', - start: function() { + start: function(e, ui) { + ui.helper.css('z-index', 1000); dropEnabled = !(RED.nodes.workspace(RED.workspaces.active())?.locked); paletteWidth = $("#red-ui-palette").width(); paletteTop = $("#red-ui-palette").parent().position().top + $("#red-ui-palette-container").position().top; @@ -341,6 +343,7 @@ RED.palette = (function() { if (activeGroup) { document.getElementById("group_select_"+activeGroup.id).classList.add("red-ui-flow-group-active-hovered"); } + chartOffset = chart.offset() RED.view.focus(); }, stop: function() { @@ -358,10 +361,13 @@ RED.palette = (function() { }, drag: function(e,ui) { var paletteNode = getPaletteNode(nt); - ui.originalPosition.left = paletteNode.offset().left; + // console.log(ui.originalPosition.left, paletteNode.offset().left) + // ui.originalPosition.left = paletteNode.offset().left; + // console.log(paletteNode.offset()) if (dropEnabled) { - mouseX = ui.position.left - paletteWidth + (ui.helper.width()/2) + chart.scrollLeft(); - mouseY = ui.position.top - paletteTop + (ui.helper.height()/2) + chart.scrollTop() + 10; + mouseX = ui.offset.left - chartOffset.left + (ui.helper.width()/2) + chart.scrollLeft(); + mouseY = ui.offset.top - chartOffset.top + (ui.helper.height()/2) + chart.scrollTop() + 10; + // console.log(mouseX, mouseY) if (!groupTimer) { groupTimer = setTimeout(function() { var mx = mouseX / RED.view.scale(); @@ -607,11 +613,23 @@ RED.palette = (function() { function init() { + const content = $('
    ') + const toolbar = $('
    '); + RED.sidebar.addTab({ + target: 'secondary', + id: "palette", + label: "Palette", + name: "Palette", + icon: "red/images/subflow_tab.svg", + content, + toolbar, + pinned: true, + enableOnEdit: false + }); + $('').appendTo("#red-ui-palette"); $('').appendTo("#red-ui-palette"); $('
    ').appendTo("#red-ui-palette"); - $('').appendTo("#red-ui-palette"); - $('
    ').appendTo("#red-ui-palette"); $("#red-ui-palette > .red-ui-palette-spinner").show(); @@ -670,19 +688,6 @@ RED.palette = (function() { } }); - sidebarControls = $('
    ').appendTo($("#red-ui-palette")); - RED.popover.tooltip(sidebarControls,RED._("keyboard.togglePalette"),"core:toggle-palette"); - - sidebarControls.on("click", function() { - RED.menu.toggleSelected("menu-item-palette"); - }) - $("#red-ui-palette").on("mouseenter", function() { - sidebarControls.toggle("slide", { direction: "left" }, 200); - }) - $("#red-ui-palette").on("mouseleave", function() { - sidebarControls.stop(false,true); - sidebarControls.hide(); - }) var userCategories = []; if (RED.settings.paletteCategories) { userCategories = RED.settings.paletteCategories; @@ -704,7 +709,7 @@ RED.palette = (function() { } }); - var paletteFooterButtons = $('').appendTo("#red-ui-palette .red-ui-component-footer"); + var paletteFooterButtons = $('').appendTo(toolbar); var paletteCollapseAll = $('').appendTo(paletteFooterButtons); paletteCollapseAll.on("click", function(e) { e.preventDefault(); @@ -727,13 +732,7 @@ RED.palette = (function() { }); RED.popover.tooltip(paletteExpandAll,RED._('palette.actions.expand-all')); - RED.actions.add("core:toggle-palette", function(state) { - if (state === undefined) { - RED.menu.toggleSelected("menu-item-palette"); - } else { - togglePalette(state); - } - }); + try { paletteState = JSON.parse(RED.settings.getLocal("palette-state") || '{"filter":"", "collapsed": []}'); @@ -751,18 +750,6 @@ RED.palette = (function() { }, 10000) } - function togglePalette(state) { - if (!state) { - $("#red-ui-main-container").addClass("red-ui-palette-closed"); - sidebarControls.hide(); - sidebarControls.find("i").addClass("fa-chevron-right").removeClass("fa-chevron-left"); - } else { - $("#red-ui-main-container").removeClass("red-ui-palette-closed"); - sidebarControls.find("i").removeClass("fa-chevron-right").addClass("fa-chevron-left"); - } - setTimeout(function() { $(window).trigger("resize"); } ,200); - } - function getCategories() { var categories = []; $("#red-ui-palette-container .red-ui-palette-category").each(function(i,d) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js index b682a5f60e..0c47c45108 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js @@ -95,7 +95,7 @@ RED.projects.settings = (function() { }); settingsContent.i18n(); settingsTabs.activateTab("red-ui-project-settings-tab-"+(initialTab||'main')) - $("#red-ui-sidebar-shade").show(); + $(".red-ui-sidebar-shade").show(); }, close: function() { settingsVisible = false; @@ -104,7 +104,7 @@ RED.projects.settings = (function() { pane.close(); } }); - $("#red-ui-sidebar-shade").hide(); + $(".red-ui-sidebar-shade").hide(); }, show: function() {} diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/search.js b/packages/node_modules/@node-red/editor-client/src/js/ui/search.js index d57f05c3a4..1ae321a708 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/search.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/search.js @@ -271,7 +271,7 @@ RED.search = (function() { } function createDialog() { - dialog = $("
    ",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#red-ui-main-container"); + dialog = $("
    ",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#red-ui-global-dialog-container"); var searchDiv = $("
    ",{class:"red-ui-search-container"}).appendTo(dialog); searchInput = $('').appendTo(searchDiv).searchBox({ delay: 200, @@ -525,11 +525,8 @@ RED.search = (function() { } if (!visible) { previousActiveElement = document.activeElement; - $("#red-ui-header-shade").show(); - $("#red-ui-editor-shade").show(); - $("#red-ui-palette-shade").show(); - $("#red-ui-sidebar-shade").show(); - $("#red-ui-sidebar-separator").hide(); + RED.notifications.shade.show(); + $("#red-ui-full-shade").one('mousedown.red-ui-actionList', hide) if (dialog === null) { createDialog(); @@ -550,11 +547,8 @@ RED.search = (function() { function hide(el, keepSearchToolbar) { if (visible) { visible = false; - $("#red-ui-header-shade").hide(); - $("#red-ui-editor-shade").hide(); - $("#red-ui-palette-shade").hide(); - $("#red-ui-sidebar-shade").hide(); - $("#red-ui-sidebar-separator").show(); + RED.notifications.shade.hide(); + $("#red-ui-full-shade").off('mousedown.red-ui-actionList') if (dialog !== null) { dialog.slideUp(200,function() { searchInput.searchBox('value',''); @@ -585,7 +579,7 @@ RED.search = (function() { result: (currentIndex + 1), count: activeResults.length } - $("#red-ui-view-searchtools-counter").text(RED._('actions.search-counter', i18nSearchCounterData)); + $("#red-ui-view-searchtools-counter-label").text(RED._('actions.search-counter', i18nSearchCounterData)); $("#view-search-tools > :not(:first-child)").show(); //show other tools } else { clearActiveSearch(); @@ -651,11 +645,6 @@ RED.search = (function() { updateSearchToolbar(); }); - $("#red-ui-header-shade").on('mousedown',hide); - $("#red-ui-editor-shade").on('mousedown',hide); - $("#red-ui-palette-shade").on('mousedown',hide); - $("#red-ui-sidebar-shade").on('mousedown',hide); - $("#red-ui-view-searchtools-close").on("click", function close() { clearActiveSearch(); updateSearchToolbar(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js b/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js index eb10fe043d..ed3a540b67 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js @@ -14,18 +14,86 @@ * limitations under the License. **/ RED.sidebar = (function() { + const sidebarLayoutVersion = 3 + const sidebars = { + primary: { + id: 'primary', + direction: 'right', + menuToggle: 'menu-item-sidebar', + minimumWidth: 180, + maximumWidth: 800, + defaultWidth: 300, + defaultTopHeight: 0.7 + }, + secondary: { + id: 'secondary', + direction: 'left', + menuToggle: 'menu-item-palette', + minimumWidth: 180, + maximumWidth: 800, + // Make LH side slightly narrower by default as its the palette that doesn't require a lot of width + defaultWidth: 210, + defaultTopHeight: 0.5 + } + } + const defaultSidebarConfiguration = { + v: sidebarLayoutVersion, + primary: { top: { tabs: ['info','help','config','context'], active: 'info' }, bottom: { tabs: ['debug'], active: 'debug' } }, + secondary: { top: { tabs: ['explorer'], active: 'explorer' }, bottom: { tabs: ['palette'], active: 'palette' } } + } + + let lastSessionSelectedTabs = {} + + const knownTabs = {}; - //$('#sidebar').tabs(); - var sidebar_tabs; - var knownTabs = {}; + let sidebarsInitialised = false + + function exportSidebarState () { + if (!sidebars.secondary?.tabBars?.bottom?.container) { + // This has been called whilst setting up the sidebars + // We don't have all the state yet, so not nothing to export + return + } + const state = { + primary: { top: { tabs: [] }, bottom: { tabs: [] } }, + secondary: { top: { tabs: [] }, bottom: { tabs: [] } }, + v: sidebarLayoutVersion + } + function getTabButtons(tabBar) { + const result = [] + tabBar.children('button').each(function() { + const tabId = $(this).attr('data-tab-id'); + if (tabId) { + result.push(tabId); + } + }) + return result + } + state.primary.top.tabs = getTabButtons(sidebars.primary.tabBars.top.container); + state.primary.bottom.tabs = getTabButtons(sidebars.primary.tabBars.bottom.container); + state.secondary.top.tabs = getTabButtons(sidebars.secondary.tabBars.top.container); + state.secondary.bottom.tabs = getTabButtons(sidebars.secondary.tabBars.bottom.container); + + state.primary.top.hidden = !!sidebars.primary.sections.top.hidden + state.primary.bottom.hidden = !!sidebars.primary.sections.bottom.hidden + state.secondary.top.hidden = !!sidebars.secondary.sections.top.hidden + state.secondary.bottom.hidden = !!sidebars.secondary.sections.bottom.hidden + + state.primary.top.active = sidebars.primary.tabBars.top.active + state.primary.bottom.active = sidebars.primary.tabBars.bottom.active + state.secondary.top.active = sidebars.secondary.tabBars.top.active + state.secondary.bottom.active = sidebars.secondary.tabBars.bottom.active + + const newState = JSON.stringify(state) + const existingState = JSON.stringify(RED.settings.get('editor.sidebar.state')) + if (newState !== existingState) { + RED.settings.set('editor.sidebar.state', state) + } + if (state.secondary.top.tabs.length === 0) { + console.warn('wiped the floor') + } + } - // We store the current sidebar tab id in localStorage as 'last-sidebar-tab' - // This is restored when the editor is reloaded. - // We use sidebar_tabs.onchange to update localStorage. However that will - // also get triggered when the first tab gets added to the tabs - typically - // the 'info' tab. So we use the following variable to store the retrieved - // value from localStorage before we start adding the actual tabs - var lastSessionSelectedTab = null; function addTab(title,content,closeable,visible) { @@ -43,10 +111,55 @@ RED.sidebar = (function() { } else if (typeof title === "object") { options = title; } + options.target = options.target || 'primary'; + let targetTabButtonIndex = -1 // Append to end by default + + // Check the saved sidebar state to see if this tab should be added to the primary or secondary sidebar + let savedState = RED.settings.get('editor.sidebar.state', defaultSidebarConfiguration) + + let targetSidebar = null + let targetSection = null + let showSection = true + if (savedState) { + let sidebarState + if (savedState.secondary.top.tabs.includes(options.id)) { + options.target = 'secondary' + sidebarState = savedState.secondary.top + targetSidebar = sidebars.secondary + targetSection = 'top' + } else if (savedState.secondary.bottom.tabs.includes(options.id)) { + options.target = 'secondary' + sidebarState = savedState.secondary.bottom + targetSidebar = sidebars.secondary + targetSection = 'bottom' + } else if (savedState.primary.top.tabs.includes(options.id)) { + options.target = 'primary' + sidebarState = savedState.primary.top + targetSidebar = sidebars.primary + targetSection = 'top' + } else if (savedState.primary.bottom.tabs.includes(options.id)) { + options.target = 'primary' + sidebarState = savedState.primary.bottom + targetSidebar = sidebars.primary + targetSection = 'bottom' + } + if (targetSidebar) { + if (sidebarState.hidden) { + showSection = false + } + // This tab was found in the saved sidebar state. Now find the target position for the tab button + targetTabButtonIndex = sidebarState.tabs.indexOf(options.id) + } + } + + + targetSidebar = targetSidebar || (options.target === 'secondary' ? sidebars.secondary : sidebars.primary); + targetSection = targetSection || 'top' + options.targetSection = targetSection; delete options.closeable; - options.wrapper = $('
    ',{style:"height:100%"}).appendTo("#red-ui-sidebar-content") + options.wrapper = $('
    ',{style:"height:100%"}).appendTo(targetSidebar.sections[targetSection].content) options.wrapper.append(options.content); options.wrapper.hide(); @@ -55,11 +168,12 @@ RED.sidebar = (function() { } if (options.toolbar) { - $("#red-ui-sidebar-footer").append(options.toolbar); + targetSidebar.sections[targetSection].footer.append(options.toolbar); $(options.toolbar).hide(); } var id = options.id; + // console.log('menu', options.id, options.name) RED.menu.addItem("menu-item-view-menu",{ id:"menu-item-view-menu-"+options.id, label:options.name, @@ -72,208 +186,577 @@ RED.sidebar = (function() { options.iconClass = options.iconClass || "fa fa-square-o" knownTabs[options.id] = options; + options.tabButton = $('') + // Insert the tab button at the correct index + if (targetTabButtonIndex === -1) { + // Append to end + targetSidebar.tabBars[targetSection].addButton(options.tabButton) + } else { + // Insert before the item at targetTabButtonIndex + targetSidebar.tabBars[targetSection].addButton(options.tabButton, targetTabButtonIndex) + } + options.tabButton.attr('data-tab-id', options.id) - if (options.visible !== false) { - sidebar_tabs.addTab(knownTabs[options.id]); + options.tabButtonTooltip = RED.popover.tooltip(options.tabButton, options.name, options.action); + if (options.icon) { + $('',{class: 'red-ui-sidebar-tab-icon', style:"mask-image: url("+options.icon+"); -webkit-mask-image: url("+options.icon+");"}).appendTo(options.tabButton); + } else if (options.iconClass) { + $('',{class:options.iconClass}).appendTo(options.tabButton); } + options.tabButton.on('mouseup', function(evt) { + if (draggingTabButton) { + draggingTabButton = false + return + } + const targetSidebar = options.target === 'secondary' ? sidebars.secondary : sidebars.primary; + if (targetSidebar.tabBars[options.targetSection].active === options.id && RED.menu.isSelected(targetSidebar.menuToggle)) { + if (!targetSidebar.sections[options.targetSection].hidden) { + const otherSectionHidden = targetSidebar.sections[options.targetSection === 'top' ? 'bottom' : 'top'].hidden + if (otherSectionHidden) { + // Both sections are going to be hidden, so hide the sidebar first. + // We do this *before* hiding the last section so that we remember which the 'last' section was and it can be + // restored when the sidebar is shown again. + RED.menu.setSelected(targetSidebar.menuToggle, false); + } else { + // Hiding just one section, clear its active setting + targetSidebar.tabBars[targetSection].active = null + } + targetSidebar.hideSection(options.targetSection) + } else { + targetSidebar.showSection(options.targetSection) + } + exportSidebarState() + } else { + RED.sidebar.show(options.id) + } + }) } function removeTab(id) { - sidebar_tabs.removeTab(id); - $(knownTabs[id].wrapper).remove(); - if (knownTabs[id].footer) { - knownTabs[id].footer.remove(); + if (knownTabs[id]) { + const targetSidebar = knownTabs[id].target === 'secondary' ? sidebars.secondary : sidebars.primary; + $(knownTabs[id].wrapper).remove(); + if (knownTabs[id].footer) { + knownTabs[id].footer.remove(); + } + targetSidebar.tabBar.find('button[data-tab-id="'+id+'"]').remove() + RED.menu.removeItem("menu-item-view-menu-"+id); + if (knownTabs[id].onremove) { + knownTabs[id].onremove.call(knownTabs[id]); + } + delete knownTabs[id]; + const firstTab = targetSidebar.tabBar.find('button').first().attr('data-tab-id'); + if (firstTab) { + RED.sidebar.show(firstTab); + } } - delete knownTabs[id]; - RED.menu.removeItem("menu-item-view-menu-"+id); } - var sidebarSeparator = {}; - sidebarSeparator.dragging = false; - - function setupSidebarSeparator() { - $("#red-ui-sidebar-separator").draggable({ - axis: "x", - start:function(event,ui) { - sidebarSeparator.closing = false; - sidebarSeparator.opening = false; - var winWidth = $("#red-ui-editor").width(); - sidebarSeparator.start = ui.position.left; - sidebarSeparator.chartWidth = $("#red-ui-workspace").width(); - sidebarSeparator.chartRight = winWidth-$("#red-ui-workspace").width()-$("#red-ui-workspace").offset().left-2; - sidebarSeparator.dragging = true; - - if (!RED.menu.isSelected("menu-item-sidebar")) { - sidebarSeparator.opening = true; - var newChartRight = 7; - $("#red-ui-sidebar").addClass("closing"); - $("#red-ui-workspace").css("right",newChartRight); - $("#red-ui-editor-stack").css("right",newChartRight+1); - $("#red-ui-sidebar").width(0); - RED.menu.setSelected("menu-item-sidebar",true); - RED.events.emit("sidebar:resize"); - } - sidebarSeparator.width = $("#red-ui-sidebar").width(); - }, - drag: function(event,ui) { - var d = ui.position.left-sidebarSeparator.start; - var newSidebarWidth = sidebarSeparator.width-d; - if (sidebarSeparator.opening) { - newSidebarWidth -= 3; - } + function moveTab(id, srcSidebar, srcPosition, targetSidebar, targetPosition) { + const options = knownTabs[id]; + options.target = targetSidebar.id; + options.targetSection = targetPosition; - if (newSidebarWidth > 150) { - if (sidebarSeparator.chartWidth+d < 200) { - ui.position.left = 200+sidebarSeparator.start-sidebarSeparator.chartWidth; - d = ui.position.left-sidebarSeparator.start; - newSidebarWidth = sidebarSeparator.width-d; - } - } + $(options.wrapper).appendTo(targetSidebar.sections[targetPosition].content); + if (options.toolbar) { + targetSidebar.sections[targetPosition].footer.append(options.toolbar); + } + // Reset the tooltip so its left/right direction is recalculated + options.tabButtonTooltip.delete() + options.tabButtonTooltip = RED.popover.tooltip(options.tabButton, options.name, options.action); - if (newSidebarWidth < 150) { - if (!sidebarSeparator.closing) { - $("#red-ui-sidebar").addClass("closing"); - sidebarSeparator.closing = true; - } - if (!sidebarSeparator.opening) { - newSidebarWidth = 150; - ui.position.left = sidebarSeparator.width-(150 - sidebarSeparator.start); - d = ui.position.left-sidebarSeparator.start; - } - } else if (newSidebarWidth > 150 && (sidebarSeparator.closing || sidebarSeparator.opening)) { - sidebarSeparator.closing = false; - $("#red-ui-sidebar").removeClass("closing"); - } + if (targetSidebar.sections[targetPosition].content.children().length === 1) { + RED.sidebar.show(options.id) + } + if (srcSidebar.sections[srcPosition].content.children().length === 0) { + // src has been emptied + srcSidebar.hideSection(srcPosition) + srcSidebar.tabBars[srcPosition].container.addClass('red-ui-sidebar-tab-bar-empty') + } + if (targetSidebar.sections[targetPosition].content.children().length > 0) { + targetSidebar.tabBars[targetPosition].container.removeClass('red-ui-sidebar-tab-bar-empty') + } + + if (targetSidebar.sections[targetPosition].hidden) { + targetSidebar.showSection(targetPosition) + } + } - var newChartRight = sidebarSeparator.chartRight-d; - $("#red-ui-workspace").css("right",newChartRight); - $("#red-ui-editor-stack").css("right",newChartRight+1); - $("#red-ui-sidebar").width(newSidebarWidth); + let draggingTabButton = false - sidebar_tabs.resize(); - RED.events.emit("sidebar:resize"); - }, - stop:function(event,ui) { - sidebarSeparator.dragging = false; - if (sidebarSeparator.closing) { - $("#red-ui-sidebar").removeClass("closing"); - RED.menu.setSelected("menu-item-sidebar",false); - if ($("#red-ui-sidebar").width() < 180) { - $("#red-ui-sidebar").width(180); - $("#red-ui-workspace").css("right",187); - $("#red-ui-editor-stack").css("right",188); + function setupSidebarTabs(sidebar) { + const tabBar = $('
    ').addClass('red-ui-sidebar-' + sidebar.direction); + if (sidebar.direction === 'right') { + tabBar.appendTo("#red-ui-workspace-footer"); + } else if (sidebar.direction === 'left') { + tabBar.prependTo("#red-ui-workspace-footer"); + } + + // TODO: consider an explicit toggle button for the sidebars... + // const toggleSidebarButton = $('') + // toggleSidebarButton.on('click', function() { + // RED.menu.toggleSelected(sidebar.menuToggle); + // }) + sidebar.tabBars = { + top: setupTabSection(sidebar, tabBar, 'top'), + bottom: setupTabSection(sidebar, tabBar, 'bottom') + } + // if (sidebar.direction === 'right') { + // toggleSidebarButton.appendTo(tabBar); + // } else if (sidebar.direction === 'left') { + // toggleSidebarButton.prependTo(tabBar); + // } + + + + sidebar.tabBar = tabBar // sidebar.tabBars.top.container; + sidebar.hideSection = function (position) { + // Track the height of the top section as that is the one that will determine the layout - but only if the other section is visible. + const otherPosition = position === 'top' ? 'bottom' : 'top' + if (!sidebar.sections[otherPosition].hidden) { + sidebar.sections.top.height = sidebar.sections.top.container.height() || 300 + } + sidebar.sections[position].container.hide() + sidebar.sections[position].hidden = true + + sidebar.sections[otherPosition].container.css('flex-grow', '1') + if (otherPosition === 'bottom') { + sidebar.sections[otherPosition].container.css('margin-top', sidebar.direction === 'left' ? '0' : '4px') + } + sidebar.tabBars[position].clearSelected() + + sidebar.resizeSidebar() + } + sidebar.showSection = function (position) { + sidebar.sections[position].container.show() + sidebar.sections[position].hidden = false + const otherPosition = position === 'top' ? 'bottom' : 'top' + sidebar.sections[otherPosition].container.css('flex-grow', '0') + sidebar.sections.top.container.css('height', sidebar.sections.top.height + 'px') + sidebar.sections.bottom.container.css('height', '100%') + if (otherPosition === 'bottom') { + sidebar.sections[otherPosition].container.css('margin-top', '') + } + sidebar.tabBars[position].container.find('button[data-tab-id="'+sidebar.tabBars[position].active+'"]').addClass('selected') + sidebar.resizeSidebar() + } + sidebar.hideSection('top') + sidebar.hideSection('bottom') + } + + function setupTabSection(sidebar, tabBar, position) { + const tabBarButtonsContainer = $('
    ').appendTo(tabBar); + const tabOverflowButton = $('').appendTo(tabBarButtonsContainer); + tabOverflowButton.hide() + tabOverflowButton.on('click', function(evt) { + try { + const menuOptions = [] + tabBarButtonsContainer.find('button:not(.red-ui-sidebar-tab-bar-overflow-button)').each(function () { + if ($(this).is(':visible')) { + return + } + const tabId = $(this).attr('data-tab-id') + const tabOptions = knownTabs[tabId] + menuOptions.push({ + label: tabOptions.name, + onselect: function() { + RED.sidebar.show(tabId) } + }) + }) + if (menuOptions.length === 0) { + return + } + const menu = RED.menu.init({ options: menuOptions }); + menu.attr("id",sidebar.container.attr('id')+"-menu"); + menu.css({ + position: "absolute" + }) + menu.appendTo("body"); + var elementPos = tabOverflowButton.offset(); + menu.css({ + top: (elementPos.top+tabOverflowButton.height()- menu.height() - 10)+"px", + left: sidebar.direction === 'left' ? ((elementPos.left + tabOverflowButton.width() + 3)+"px") : ((elementPos.left - menu.width() - 3)+"px") + }) + $(".red-ui-menu.red-ui-menu-dropdown").hide(); + setTimeout(() => { + $(document).on("click.red-ui-sidebar-tabmenu", function(evt) { + $(document).off("click.red-ui-sidebar-tabmenu"); + menu.remove(); + }); + }, 0) + menu.show(); + } catch (err) { + console.log(err) + } + }) + tabBarButtonsContainer.data('sidebar', sidebar.id) + tabBarButtonsContainer.data('sidebar-position', position) + tabBarButtonsContainer.sortable({ + axis: 'x', + distance: 10, + cancel: false, + items: "button:not(.red-ui-sidebar-tab-bar-overflow-button)", + placeholder: "red-ui-sidebar-tab-bar-button-placeholder", + connectWith: ".red-ui-sidebar-tab-bar-buttons", + start: function(event, ui) { + const tabId = ui.item.attr('data-tab-id'); + const options = knownTabs[tabId]; + options.tabButtonTooltip.delete() + draggingTabButton = true + tabBar.css('z-index','inherit') + $(".red-ui-sidebar-tab-bar").addClass("red-ui-sidebar-dragging-tab"); + }, + stop: function(event, ui) { + // Restore the tooltip + const tabId = ui.item.attr('data-tab-id'); + const options = knownTabs[tabId]; + options.tabButtonTooltip.delete() + options.tabButtonTooltip = RED.popover.tooltip(options.tabButton, options.name, options.action); + // Save the sidebar state + exportSidebarState() + tabBar.css('z-index','') + $(".red-ui-sidebar-tab-bar").removeClass("red-ui-sidebar-dragging-tab"); + }, + receive: function(event, ui) { + // Tab has been moved from one sidebar to another + const src = sidebars[ui.sender.data('sidebar')] + const dest = sidebars[$(this).data('sidebar')] + const srcPosition = ui.sender.data('sidebar-position') + const destPosition = $(this).data('sidebar-position') + const tabId = ui.item.attr('data-tab-id'); + moveTab(tabId, src, srcPosition, dest, destPosition); + if (ui.item.hasClass('selected')) { + const firstTab = src.tabBars[srcPosition].container.find('button').first().attr('data-tab-id'); + if (firstTab) { + RED.sidebar.show(firstTab); } - $("#red-ui-sidebar-separator").css("left","auto"); - $("#red-ui-sidebar-separator").css("right",($("#red-ui-sidebar").width()+2)+"px"); - RED.events.emit("sidebar:resize"); } - }); - - var sidebarControls = $('
    ').appendTo($("#red-ui-sidebar-separator")); - sidebarControls.on("click", function() { - sidebarControls.hide(); - RED.menu.toggleSelected("menu-item-sidebar"); + RED.sidebar.show(tabId) + } }) - $("#red-ui-sidebar-separator").on("mouseenter", function() { - if (!sidebarSeparator.dragging) { - if (RED.menu.isSelected("menu-item-sidebar")) { - sidebarControls.find("i").addClass("fa-chevron-right").removeClass("fa-chevron-left"); + + return { + container: tabBarButtonsContainer, + addButton: function(button, position) { + if (position === undefined || position >= tabBarButtonsContainer.children().length) { + button.insertBefore(tabOverflowButton); } else { - sidebarControls.find("i").removeClass("fa-chevron-right").addClass("fa-chevron-left"); + button.insertBefore(tabBarButtonsContainer.children().eq(position)); } - sidebarControls.toggle("slide", { direction: "right" }, 200); + }, + clearSelected: function() { + tabBarButtonsContainer.children('button').removeClass('selected') } - }) - $("#red-ui-sidebar-separator").on("mouseleave", function() { - if (!sidebarSeparator.dragging) { - sidebarControls.stop(false,true); - sidebarControls.hide(); + } + } + function setupSidebarSeparator(sidebar) { + const separator = $('
    '); + separator.attr('id', sidebar.container.attr('id') + '-separator') + $('
    ').appendTo(separator); + $('
    ').appendTo(separator); + let scaleFactor = 1; + if (sidebar.direction === 'right') { + separator.insertBefore(sidebar.container); + } else if (sidebar.direction === 'left') { + scaleFactor = -1; + separator.insertAfter(sidebar.container); + } + // Track sidebar state whilst dragging + const sidebarSeparator = {} + separator.draggable({ + axis: "x", + start:function(event,ui) { + sidebarSeparator.closing = false; + sidebarSeparator.opening = false; + // var winWidth = $("#red-ui-editor").width(); + sidebarSeparator.start = ui.position.left; + sidebarSeparator.width = sidebar.container.width(); + sidebarSeparator.chartWidth = $("#red-ui-workspace").width(); + sidebarSeparator.dragging = true; + + if (!RED.menu.isSelected(sidebar.menuToggle)) { + sidebarSeparator.opening = true; + sidebar.container.width(0); + RED.menu.setSelected(sidebar.menuToggle,true); + RED.events.emit("sidebar:resize"); + } + sidebarSeparator.width = sidebar.container.width(); + }, + drag: function(event,ui) { + var d = scaleFactor * (ui.position.left-sidebarSeparator.start); + + var newSidebarWidth = sidebarSeparator.width - d; + if (newSidebarWidth > sidebar.maximumWidth) { + newSidebarWidth = sidebar.maximumWidth; + d = sidebarSeparator.width - sidebar.maximumWidth; + ui.position.left = sidebarSeparator.start + scaleFactor * d; + } + + if (newSidebarWidth > sidebar.minimumWidth) { + if (sidebarSeparator.chartWidth + d < 200) { + // Chart is now too small, but we have room to resize the sidebar + d += (200 - (sidebarSeparator.chartWidth + d)); + newSidebarWidth = sidebarSeparator.width - d; + ui.position.left = sidebarSeparator.start + scaleFactor * d; + } + } else if (newSidebarWidth < sidebar.minimumWidth) { + if (newSidebarWidth > 100) { + newSidebarWidth = sidebar.minimumWidth + sidebarSeparator.closing = false + } else { + newSidebarWidth = 0 + sidebarSeparator.closing = true + } + } else { + sidebarSeparator.closing = false + } + sidebar.container.width(newSidebarWidth); + ui.position.left -= scaleFactor * d + sidebar.tabBar.css('min-width', sidebar.container.width() - 5) + RED.events.emit("sidebar:resize"); + }, + stop:function(event,ui) { + sidebarSeparator.dragging = false; + if (sidebarSeparator.closing) { + sidebar.container.removeClass("closing"); + if (sidebar.menuToggle) { + RED.menu.setSelected(sidebar.menuToggle,false); + } + sidebar.sections.top.container.hide() + sidebar.sections.bottom.container.hide() + sidebar.separator.hide() + } else { + sidebar.width = sidebar.container.width(); + } + sidebar.tabBar.css('min-width', sidebar.container.width() - 5) + RED.events.emit("sidebar:resize"); } }); + return separator } - function toggleSidebar(state) { + function toggleSidebar(sidebar, state) { if (!state) { - $("#red-ui-main-container").addClass("red-ui-sidebar-closed"); + // sidebar.container.hide() + sidebar.separator.hide() + // Remember which sections were hidden (or not) before we hide the sidebar - so we can restore that state when we show the sidebar again + sidebar.sections.top.wasHidden = sidebar.sections.top.hidden + sidebar.sections.bottom.wasHidden = sidebar.sections.bottom.hidden + sidebar.hideSection('top') + sidebar.hideSection('bottom') + sidebar.container.width(0) + if (sidebarsInitialised) { + exportSidebarState() + } } else { - $("#red-ui-main-container").removeClass("red-ui-sidebar-closed"); - sidebar_tabs.resize(); + // sidebar.container.show() + if (!sidebar.sections.top.hidden) { + + sidebar.sections.top.container.show() + } + if (!sidebar.sections.bottom.hidden) { + sidebar.sections.bottom.container.show() + } + if (sidebar.sections.top.hidden && sidebar.sections.bottom.hidden) { + const topHasContent = sidebar.sections.top.content.children().length > 0 + const bottomHasContent = sidebar.sections.bottom.content.children().length > 0 + if (!topHasContent && !bottomHasContent) { + // Nothing to show - keep the sidebar hidden + return + } + if (sidebar.tabBars.top.active) { + showSidebar(sidebar.tabBars.top.active) + } + if (sidebar.tabBars.bottom.active) { + showSidebar(sidebar.tabBars.bottom.active) + } + } + sidebar.container.width(sidebar.width || sidebar.defaultWidth) + sidebar.tabBar.css('min-width', sidebar.container.width() - 5) + sidebar.separator.show() + if (sidebar.tabBars.top.active && !sidebar.sections.top.hidden) { + sidebar.tabBars.top.container.find('button[data-tab-id="'+sidebar.tabBars.top.active+'"]').addClass('selected') + } + if (sidebar.tabBars.bottom.active && !sidebar.sections.bottom.hidden) { + sidebar.tabBars.bottom.container.find('button[data-tab-id="'+sidebar.tabBars.bottom.active+'"]').addClass('selected') + } } RED.events.emit("sidebar:resize"); } function showSidebar(id, skipShowSidebar) { if (id === ":first") { - id = lastSessionSelectedTab || RED.settings.get("editor.sidebar.order",["info", "help", "version-control", "debug"])[0] + sidebarsInitialised = true + // Show the last selected tab for each sidebar + Object.keys(sidebars).forEach(function(sidebarKey) { + const sidebar = sidebars[sidebarKey]; + ['top','bottom'].forEach(function(position) { + if (lastSessionSelectedTabs[sidebarKey]?.[position]?.hidden !== true) { + let lastTabId = lastSessionSelectedTabs[sidebarKey]?.[position]?.active; + if (lastTabId) { + showSidebar(lastTabId) + } + } + }) + }) + return } if (id) { - if (!containsTab(id) && knownTabs[id]) { - sidebar_tabs.addTab(knownTabs[id]); - } - sidebar_tabs.activateTab(id); - if (!skipShowSidebar && !RED.menu.isSelected("menu-item-sidebar")) { - RED.menu.setSelected("menu-item-sidebar",true); + const tabOptions = knownTabs[id]; + if (tabOptions) { + const targetSidebar = tabOptions.target === 'secondary' ? sidebars.secondary : sidebars.primary; + const targetSection = tabOptions.targetSection || 'top' + targetSidebar.sections[targetSection].content.children().hide(); + targetSidebar.sections[targetSection].footer.children().hide(); + if (tabOptions.onchange) { + tabOptions.onchange.call(tabOptions); + } + $(tabOptions.wrapper).show(); + if (tabOptions.toolbar) { + $(tabOptions.toolbar).show(); + targetSidebar.sections[targetSection].footer.show(); + } else { + targetSidebar.sections[targetSection].footer.hide(); + } + targetSidebar.tabBars[targetSection].active = id + if (!skipShowSidebar && targetSidebar.sections[targetSection].hidden) { + targetSidebar.showSection(targetSection) + } + if (!skipShowSidebar && !RED.menu.isSelected(targetSidebar.menuToggle)) { + RED.menu.setSelected(targetSidebar.menuToggle,true); + } + if (!targetSidebar.sections[targetSection].hidden) { + targetSidebar.tabBars[targetSection].clearSelected() + targetSidebar.tabBars[targetSection].container.find('button[data-tab-id="'+id+'"]').addClass('selected') + } + exportSidebarState() } } } function containsTab(id) { - return sidebar_tabs.contains(id); + return sidebars.primary.tabs.contains(id); } - function init () { - setupSidebarSeparator(); - sidebar_tabs = RED.tabs.create({ - element: $('
      ').appendTo("#red-ui-sidebar"), - onchange:function(tab) { - $("#red-ui-sidebar-content").children().hide(); - $("#red-ui-sidebar-footer").children().hide(); - if (tab.onchange) { - tab.onchange.call(tab); - } - $(tab.wrapper).show(); - if (tab.toolbar) { - $(tab.toolbar).show(); - } - RED.settings.setLocal("last-sidebar-tab", tab.id) + function setupSidebar(sidebar) { + // Get the appropriate height for the sidebar - as the sidebar will be hidden at this point in time, we need to use + // the main-container height as a decent proxy + const sidebarHeight = $("#red-ui-main-container").height(); + sidebar.container.addClass("red-ui-sidebar").addClass('red-ui-sidebar-' + sidebar.direction); + sidebar.container.width(sidebar.defaultWidth); + if (sidebar.direction === 'right') { + $('
      ',{class:"red-ui-sidebar-shade hide"}).css("z-index", 0).appendTo(sidebar.container); + } + sidebar.sections = {}; + sidebar.sections.top = {} + sidebar.sections.top.container = $('
      ').appendTo(sidebar.container); + // sidebar.sections.top.banner = $('
      Head
      ').appendTo(sidebar.sections.top.container); + sidebar.sections.top.content = $('
      ').appendTo(sidebar.sections.top.container); + sidebar.sections.top.footer = $('').appendTo(sidebar.sections.top.container); + sidebar.sectionsSeparator = $('
      ').appendTo(sidebar.container); + sidebar.sections.bottom = {} + sidebar.sections.bottom.container = $('
      ').appendTo(sidebar.container); + // sidebar.sections.bottom.banner = $('
      Head
      ').appendTo(sidebar.sections.bottom.container); + sidebar.sections.bottom.content = $('
      ').appendTo(sidebar.sections.bottom.container); + sidebar.sections.bottom.footer = $('').appendTo(sidebar.sections.bottom.container); + + let startPosition + let startTopSectionHeight + let startTopTabSectionHeight + let startSidebarHeight + let lastSeparatorPosition + sidebar.sectionsSeparator.draggable({ + axis: "y", + containment: sidebar.container, + scroll: false, + start:function(event,ui) { + startPosition = ui.position.top + lastSeparatorPosition = ui.position.top + startTopSectionHeight = sidebar.sections.top.container.outerHeight() + startTopTabSectionHeight = sidebar.tabBars.top.container.outerHeight() + startSidebarHeight = sidebar.container.height() }, - onremove: function(tab) { - $(tab.wrapper).hide(); - if (tab.onremove) { - tab.onremove.call(tab); + drag: function(event,ui) { + const delta = ui.position.top - startPosition + const newTopHeight = startTopSectionHeight + delta + const newBottomHeight = startSidebarHeight - newTopHeight + if (newTopHeight < 100 || newBottomHeight < 100) { + ui.position.top = lastSeparatorPosition + return } + sidebar.sections.top.container.outerHeight(startTopSectionHeight + delta) + // sidebar.tabBars.top.container.outerHeight(startTopTabSectionHeight + delta) + ui.position.top -= delta + lastSeparatorPosition = ui.position.top + sidebar.resizeSidebar() }, - // minimumActiveTabWidth: 70, - collapsible: true, - onreorder: function(order) { - RED.settings.set("editor.sidebar.order",order); - }, - order: RED.settings.get("editor.sidebar.order",["info", "help", "version-control", "debug"]) - // scrollable: true + stop:function(event,ui) { + } }); - $('
      ').appendTo("#red-ui-sidebar"); - $('').appendTo("#red-ui-sidebar"); - $('
      ').appendTo("#red-ui-sidebar"); + // sidebar.shade = $('
      ').appendTo(sidebar.container); + + sidebar.separator = setupSidebarSeparator(sidebar); + sidebar.resizeSidebar = function () { + // Resize sidebar sections as needed + const topSectionHeight = sidebar.sections.top.container.outerHeight() + if (!sidebar.sections.bottom.hidden) { + const bottomSectionHeight = sidebar.sections.bottom.container.outerHeight() + + // Shrink the top section if the bottom section is too small + if (bottomSectionHeight < 90 && topSectionHeight > 90) { + sidebar.sections.top.container.outerHeight(topSectionHeight - (90 - bottomSectionHeight)); + } + } + // Trigger a resize of the tab bars to handle overflow + sidebar.tabBar.css('min-width', sidebar.container.width() - 5) + RED.events.emit("sidebar:resize"); + + } + $(window).on("resize", sidebar.resizeSidebar) + + setupSidebarTabs(sidebar) + sidebar.resizeSidebar() + + } + function init () { + sidebars.primary.container = $("#red-ui-sidebar"); + setupSidebar(sidebars.primary) + sidebars.secondary.container = $("#red-ui-sidebar-left"); + setupSidebar(sidebars.secondary) RED.actions.add("core:toggle-sidebar",function(state){ if (state === undefined) { - RED.menu.toggleSelected("menu-item-sidebar"); + RED.menu.toggleSelected(sidebars.primary.menuToggle); } else { - toggleSidebar(state); + toggleSidebar(sidebars.primary, state); } }); - RED.popover.tooltip($("#red-ui-sidebar-separator").find(".red-ui-sidebar-control-right"),RED._("keyboard.toggleSidebar"),"core:toggle-sidebar"); + RED.actions.add("core:toggle-palette", function(state) { + if (state === undefined) { + RED.menu.toggleSelected(sidebars.secondary.menuToggle); + } else { + toggleSidebar(sidebars.secondary, state); + } + }); - lastSessionSelectedTab = RED.settings.getLocal("last-sidebar-tab") + // Load any saved sidebar state + lastSessionSelectedTabs = RED.settings.get('editor.sidebar.state', defaultSidebarConfiguration) + if (typeof lastSessionSelectedTabs.primary[0] === 'string' || typeof lastSessionSelectedTabs.secondary[0] === 'string' || lastSessionSelectedTabs.v === undefined || lastSessionSelectedTabs.v !== sidebarLayoutVersion) { + // This is a beta.0/1 format. Reset it for beta.2 + lastSessionSelectedTabs = defaultSidebarConfiguration + // To migrate state format, we have to delete the old entry rather than try to merge settings + // RED.settings.set debounces calls made within 300ms - we need the above call to get flushed before setting the new state value. + RED.settings.set('editor.sidebar.state', null, true) + RED.settings.set('editor.sidebar.state', lastSessionSelectedTabs) + } - RED.sidebar.info.init(); - RED.sidebar.help.init(); - RED.sidebar.config.init(); - RED.sidebar.context.init(); - // hide info bar at start if screen rather narrow... - if ($("#red-ui-editor").width() < 600) { RED.menu.setSelected("menu-item-sidebar",false); } + // Restore the active flags so we know which sidebars to show when the :first option is used + sidebars.primary.tabBars.top.active = lastSessionSelectedTabs?.primary?.top?.active + sidebars.primary.tabBars.bottom.active = lastSessionSelectedTabs?.primary?.bottom?.active + sidebars.secondary.tabBars.top.active = lastSessionSelectedTabs?.secondary?.top?.active + sidebars.secondary.tabBars.bottom.active = lastSessionSelectedTabs?.secondary?.bottom?.active } return { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js b/packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js index 89682fb077..75d42c74c4 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js @@ -24,9 +24,9 @@ RED.statusBar = (function() { - var widgets = {}; - var leftBucket; - var rightBucket; + const widgets = {}; + let leftBucket; + let rightBucket; function addWidget(options) { widgets[options.id] = options; @@ -59,8 +59,9 @@ RED.statusBar = (function() { return { init: function() { - leftBucket = $('').appendTo("#red-ui-workspace-footer"); - rightBucket = $('').appendTo("#red-ui-workspace-footer"); + const widgetBar = $('
      ').appendTo("#red-ui-workspace-footer") + leftBucket = $('').appendTo(widgetBar); + rightBucket = $('').appendTo(widgetBar); }, add: addWidget, hide: hideWidget, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js index 3e1b9a4105..7d825e6c98 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js @@ -446,13 +446,13 @@ RED.subflow = (function() { refreshToolbar(activeSubflow); - $("#red-ui-workspace-chart").css({"margin-top": "40px"}); + $("#red-ui-workspace-chart").addClass('red-ui-workspace-toolbar-active'); $("#red-ui-workspace-toolbar").show(); } function hideWorkspaceToolbar() { $("#red-ui-workspace-toolbar").hide().empty(); - $("#red-ui-workspace-chart").css({"margin-top": "0"}); + $("#red-ui-workspace-chart").removeClass('red-ui-workspace-toolbar-active'); } function deleteSubflow(id) { const subflow = RED.nodes.subflow(id || RED.workspaces.active()); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js index 9af711e098..22ade35c90 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js @@ -210,7 +210,7 @@ RED.sidebar.config = (function() { nodeDiv.addClass("red-ui-palette-node-config-invalid"); RED.popover.tooltip(nodeDivAnnotations, function () { if (node.validationErrors && node.validationErrors.length > 0) { - return RED._("editor.errors.invalidProperties") + "
      - " + node.validationErrors.join("
      - "); + return $('' + RED._("editor.errors.invalidProperties") + "
      - " + node.validationErrors.join("
      - ") + '
      '); } }) } @@ -218,7 +218,7 @@ RED.sidebar.config = (function() { nodeDiv.on('click',function(e) { e.stopPropagation(); RED.view.select(false); - if (e.metaKey) { + if (e.metaKey || e.ctrlKey) { $(this).toggleClass("selected"); } else { $(content).find(".red-ui-palette-node").removeClass("selected"); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js index b3d06f7017..1454d4ff5a 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js @@ -142,6 +142,7 @@ RED.sidebar.help = (function() { $(window).on("resize", resizeStack); $(window).on("focus", resizeStack); + RED.events.on("sidebar:resize", resizeStack); RED.events.on('registry:node-type-added', queueRefresh); RED.events.on('registry:node-type-removed', queueRefresh); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js index bb9faa0a6f..f48e8568a7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js @@ -19,11 +19,13 @@ RED.sidebar.info.outliner = (function() { { label: RED._("menu.label.flows"), expanded: true, + expandOnLabel: true, children: [] }, { id: "__subflow__", label: RED._("menu.label.subflows"), + expandOnLabel: true, children: [ getEmptyItem("__subflow__") ] @@ -32,6 +34,7 @@ RED.sidebar.info.outliner = (function() { id: "__global__", flow: "__global__", label: RED._("sidebar.info.globalConfig"), + expandOnLabel: true, types: {}, children: [ getEmptyItem("__global__") @@ -43,7 +46,6 @@ RED.sidebar.info.outliner = (function() { subflowList = flowData[1]; globalConfigNodes = flowData[2]; configNodeTypes = { __global__: globalConfigNodes}; - return flowData; } @@ -222,8 +224,6 @@ RED.sidebar.info.outliner = (function() { } return RED._("common.label."+(((n.type==='tab' && n.disabled) || (n.type!=='tab' && n.d))?"enable":"disable")); }); - } else { - $('
      ').appendTo(controls) } if (n.type === 'tab') { var lockToggleButton = $('').appendTo(controls).on("click",function(evt) { @@ -238,7 +238,7 @@ RED.sidebar.info.outliner = (function() { RED.popover.tooltip(lockToggleButton,function() { return RED._("common.label."+(n.locked?"unlock":"lock")); }); - } else { + } else if (n.type !== 'subflow') { $('
      ').appendTo(controls) } controls.find("button").on("dblclick", function(evt) { @@ -297,12 +297,18 @@ RED.sidebar.info.outliner = (function() { //
      Space Monkey
      ').appendTo(container) treeList = $("
      ").css({width: "100%"}).appendTo(container).treeList({ - data:getFlowData() + data:getFlowData(), + expandOnLabel: false }) treeList.on('treelistselect', function(e,item) { var node = RED.nodes.node(item.id) || RED.nodes.group(item.id) || RED.nodes.workspace(item.id) || RED.nodes.subflow(item.id); if (node) { - RED.sidebar.info.refresh(node); + if (node.type === 'tab' || node.type === 'subflow') { + RED.workspaces.show(node.id) + } else { + RED.view.reveal(node.id); + } + // RED.sidebar.info.refresh(node); // if (node.type === 'group' || node._def.category !== "config") { // // RED.view.select({nodes:[node]}) // } else if (node._def.category === "config") { @@ -586,14 +592,15 @@ RED.sidebar.info.outliner = (function() { } } function getGutter(n) { - var span = $("",{class:"red-ui-info-outline-gutter red-ui-treeList-gutter-float"}); - var revealButton = $('').appendTo(span).on("click",function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - RED.view.reveal(n.id); - }) - RED.popover.tooltip(revealButton,RED._("sidebar.info.find")); - return span; + // var span = $("",{class:"red-ui-info-outline-gutter red-ui-treeList-gutter-float"}); + // var revealButton = $('').appendTo(span).on("click",function(evt) { + // evt.preventDefault(); + // evt.stopPropagation(); + // RED.view.reveal(n.id); + // }) + // RED.popover.tooltip(revealButton,RED._("sidebar.info.find")); + // return span; + return null; } function createFlowConfigNode(parent,type) { @@ -686,9 +693,30 @@ RED.sidebar.info.outliner = (function() { function onSelectionChanged(selection) { // treeList.treeList('clearSelection'); } + function show() { + RED.sidebar.show("explorer"); + } + function init() { + const content = build() + + RED.actions.add("core:show-explorer-tab",show); + + + RED.sidebar.addTab({ + id: "explorer", + // target: "secondary", + label: 'Explorer', // RED._("sidebar.info.label"), + name: 'Explorer', //RED._("sidebar.info.name"), + icon: "red/images/explorer.svg", + action:"core:show-explorer-tab", + content: content, + pinned: true, + enableOnEdit: true + }); + } return { - build: build, + init, search: function(val) { searchInput.searchBox('value',val) }, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js index fa9b98322b..2d1926ee08 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js @@ -52,57 +52,42 @@ RED.sidebar.info = (function() { var stackContainer = $("
      ",{class:"red-ui-sidebar-info-stack"}).appendTo(content); - var outlinerPanel = $("
      ").css({ - "overflow": "hidden", - "height": "calc(70%)" - }).appendTo(stackContainer); var propertiesPanel = $("
      ").css({ "overflow":"hidden", "height":"100%", "display": "flex", "flex-direction": "column" }).appendTo(stackContainer); - propertiesPanelHeader = $("
      ", {class:"red-ui-palette-header red-ui-info-header"}).css({ + propertiesPanelHeader = $("
      ", {class:"red-ui-sidebar-header"}).css({ "flex":"0 0 auto" }).appendTo(propertiesPanel); - propertiesPanelHeaderIcon = $("").appendTo(propertiesPanelHeader); - propertiesPanelHeaderLabel = $("").appendTo(propertiesPanelHeader); + propertiesPanelHeaderIcon = $('').appendTo(propertiesPanelHeader); + propertiesPanelHeaderLabel = $('').appendTo(propertiesPanelHeader); - propertiesPanelHeaderCopyLink = $('').css({ - position: 'absolute', - top: '12px', - right: '32px' - }).on("click", function(evt) { + const buttons = $('').appendTo(propertiesPanelHeader); + propertiesPanelHeaderCopyLink = $('').on("click", function(evt) { RED.actions.invoke('core:copy-item-url',selectedObject) - }).appendTo(propertiesPanelHeader); + }).appendTo(buttons); RED.popover.tooltip(propertiesPanelHeaderCopyLink,RED._("sidebar.info.copyItemUrl")); - propertiesPanelHeaderHelp = $('').css({ - position: 'absolute', - top: '12px', - right: '56px' - }).on("click", function(evt) { + propertiesPanelHeaderHelp = $('').on("click", function(evt) { evt.preventDefault(); evt.stopPropagation(); if (selectedObject) { RED.sidebar.help.show(selectedObject.type); } - }).appendTo(propertiesPanelHeader); + }).appendTo(buttons); RED.popover.tooltip(propertiesPanelHeaderHelp,RED._("sidebar.help.showHelp")); - propertiesPanelHeaderReveal = $('').css({ - position: 'absolute', - top: '12px', - right: '8px' - }).on("click", function(evt) { + propertiesPanelHeaderReveal = $('').on("click", function(evt) { evt.preventDefault(); evt.stopPropagation(); if (selectedObject) { RED.sidebar.info.outliner.reveal(selectedObject); RED.view.reveal(selectedObject.id); } - }).appendTo(propertiesPanelHeader); + }).appendTo(buttons); RED.popover.tooltip(propertiesPanelHeaderReveal,RED._("sidebar.help.showInOutline")); @@ -112,13 +97,13 @@ RED.sidebar.info = (function() { }).appendTo(propertiesPanel); - panels = RED.panels.create({container: stackContainer}) - panels.ratio(0.6); - RED.sidebar.info.outliner.build().appendTo(outlinerPanel); - + // panels = RED.panels.create({container: stackContainer}) + // panels.ratio(0.6); + // RED.sidebar.info.outliner.build().appendTo(outlinerPanel); RED.sidebar.addTab({ id: "info", + // target: "secondary", label: RED._("sidebar.info.label"), name: RED._("sidebar.info.name"), iconClass: "fa fa-info", @@ -157,6 +142,8 @@ RED.sidebar.info = (function() { tips.stop(); } + resizeStack(); + } function show() { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js index 30130d2d1b..808624dd07 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js @@ -435,10 +435,15 @@ RED.tourGuide = (function() { function listTour() { return [ + { + id: "5_0", + label: "5.0", + path: "./tours/welcome.js" + }, { id: "4_1", label: "4.1", - path: "./tours/welcome.js" + path: "./tours/4.1/welcome.js" }, { id: "4_0", diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js index b0f188457d..d17cf95faf 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js @@ -25,14 +25,14 @@ } function showTray(options) { var el = $('
      '); - // `editor-tray-header` is deprecated - use red-ui-tray-body instead - var header = $('
      ').appendTo(el); - var bodyWrapper = $('
      ').appendTo(el); - // `editor-tray-body` is deprecated - use red-ui-tray-body instead - var body = $('
      ').appendTo(bodyWrapper); - // `editor-tray-footer` is deprecated - use red-ui-tray-footer instead - var footer = $('').appendTo(el); var resizer = $('
      ').appendTo(el); + var wrapper = $('
      ').appendTo(el); + + var header = $('
      ').appendTo(wrapper); + var bodyWrapper = $('
      ').appendTo(wrapper); + var body = $('
      ').appendTo(bodyWrapper); + // `editor-tray-footer` is deprecated - use red-ui-tray-footer instead + var footer = $('').appendTo(wrapper); // var growButton = $('').appendTo(resizer); // var shrinkButton = $('').appendTo(resizer); if (options.title) { @@ -121,7 +121,6 @@ function finishBuild() { $("#red-ui-header-shade").show(); $("#red-ui-editor-shade").show(); - $("#red-ui-palette-shade").show(); $(".red-ui-sidebar-shade").show(); tray.preferredWidth = Math.max(el.width(),500); if (!options.maximized) { @@ -194,6 +193,8 @@ } function handleWindowResize() { + let sidebarWidth = $("#red-ui-sidebar").is(":visible") ? $("#red-ui-sidebar").outerWidth() : 0; + $("#red-ui-editor-stack").css('right', sidebarWidth + 4); if (stack.length > 0) { var tray = stack[stack.length-1]; if (tray.options.maximized || tray.width > $("#red-ui-editor-stack").position().left-8) { @@ -218,11 +219,11 @@ function raiseTrayZ() { setTimeout(function(){ $('#red-ui-editor-stack').css("zIndex","13"); - },300); + },100); } //lower tray z-index back to original place for correct slide animation (related to fix for editor context menu clipped by sidebar) function lowerTrayZ(){ - $('#red-ui-editor-stack').css("zIndex","9"); + $('#red-ui-editor-stack').css("zIndex","11"); } return { @@ -239,7 +240,6 @@ tray.tray.css({right:0}); $("#red-ui-header-shade").show(); $("#red-ui-editor-shade").show(); - $("#red-ui-palette-shade").show(); $(".red-ui-sidebar-shade").show(); stackHidden = false; } @@ -276,7 +276,6 @@ }); $("#red-ui-header-shade").hide(); $("#red-ui-editor-shade").hide(); - $("#red-ui-palette-shade").hide(); $(".red-ui-sidebar-shade").hide(); stackHidden = true; } @@ -320,7 +319,6 @@ if (stack.length === 0) { $("#red-ui-header-shade").hide(); $("#red-ui-editor-shade").hide(); - $("#red-ui-palette-shade").hide(); $(".red-ui-sidebar-shade").hide(); RED.events.emit("editor:close"); RED.view.focus(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js b/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js index 3bc99e6026..a1a1a56615 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js @@ -81,7 +81,7 @@ RED.userSettings = (function() { }); settingsContent.i18n(); settingsTabs.activateTab("red-ui-settings-tab-"+(initialTab||'view')) - $("#red-ui-sidebar-shade").show(); + $(".red-ui-sidebar-shade").show(); }, close: function() { settingsVisible = false; @@ -90,7 +90,7 @@ RED.userSettings = (function() { pane.close(); } }); - $("#red-ui-sidebar-shade").hide(); + $(".red-ui-sidebar-shade").hide(); }, show: function() {} diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js index fa91059db0..a70b36136d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js @@ -1110,20 +1110,36 @@ RED.utils = (function() { return result; } + /** + * Get the default icon for a given node based on its definition. + * @param {*} def + * @param {*} node + * @returns + */ function getDefaultNodeIcon(def,node) { def = def || {}; var icon_url; if (node && node.type === "subflow") { icon_url = "node-red/subflow.svg"; - } else if (typeof def.icon === "function") { - try { - icon_url = def.icon.call(node); - } catch(err) { - console.log("Definition error: "+def.type+".icon",err); - icon_url = "arrow-in.svg"; - } } else { - icon_url = def.icon; + let themeRule = nodeIconCache[def.type] + if (themeRule === undefined) { + // If undefined, we've not checked the theme yet + nodeIconCache[def.type] = getThemeOverrideForNode(def, 'icon') || null; + themeRule = nodeIconCache[def.type]; + } + if (themeRule) { + icon_url = themeRule.icon; + } else if (typeof def.icon === "function") { + try { + icon_url = def.icon.call(node); + } catch(err) { + console.log("Definition error: "+def.type+".icon",err); + icon_url = "arrow-in.svg"; + } + } else { + icon_url = def.icon; + } } var iconPath = separateIconPath(icon_url); @@ -1249,48 +1265,63 @@ RED.utils = (function() { return label } - var nodeColorCache = {}; + let nodeColorCache = {}; + let nodeIconCache = {} function clearNodeColorCache() { nodeColorCache = {}; } - function getNodeColor(type, def) { - def = def || {}; - var result = def.color; - var paletteTheme = RED.settings.theme('palette.theme') || []; + /** + * Checks if there is a theme override for the given node definition and property + * @param {*} def node definition + * @param {*} property either 'color' or 'icon' + * @returns the theme override value if there is a match, otherwise null + */ + function getThemeOverrideForNode(def, property) { + const paletteTheme = RED.settings.theme('palette.theme') || []; if (paletteTheme.length > 0) { - if (!nodeColorCache.hasOwnProperty(type)) { - nodeColorCache[type] = def.color; - var l = paletteTheme.length; - for (var i = 0; i < l; i++ ){ - var themeRule = paletteTheme[i]; - if (themeRule.hasOwnProperty('category')) { - if (!themeRule.hasOwnProperty('_category')) { - themeRule._category = new RegExp(themeRule.category); - } - if (!themeRule._category.test(def.category)) { - continue; - } + for (let i = 0; i < paletteTheme.length; i++ ){ + const themeRule = paletteTheme[i]; + if (themeRule.hasOwnProperty('category')) { + if (!themeRule.hasOwnProperty('_category')) { + themeRule._category = new RegExp(themeRule.category); } - if (themeRule.hasOwnProperty('type')) { - if (!themeRule.hasOwnProperty('_type')) { - themeRule._type = new RegExp(themeRule.type); - } - if (!themeRule._type.test(type)) { - continue; - } + if (!themeRule._category.test(def.category)) { + continue; + } + } + if (themeRule.hasOwnProperty('type')) { + if (!themeRule.hasOwnProperty('_type')) { + themeRule._type = new RegExp(themeRule.type); + } + if (!themeRule._type.test(def.type)) { + continue; } - nodeColorCache[type] = themeRule.color || def.color; - break; + } + // We have found a rule that matches - now see if it provides the requested property + if (themeRule.hasOwnProperty(property)) { + return themeRule; } } - result = nodeColorCache[type]; } - if (result) { - return result; - } else { - return "#ddd"; + return null; + } + + function getNodeColor(type, def) { + def = def || {}; + if (type === 'subflow') { + return def.color + } + if (!nodeColorCache.hasOwnProperty(type)) { + const paletteTheme = RED.settings.theme('palette.theme') || []; + if (paletteTheme.length > 0) { + const themeRule = getThemeOverrideForNode(def, 'color'); + nodeColorCache[type] = themeRule?.color || def.color; + } else { + nodeColorCache[type] = def.color; + } } + return nodeColorCache[type] || "#ddd"; } function addSpinnerOverlay(container,contain) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js index 6450d45bd9..b21ec0da79 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js @@ -15,139 +15,209 @@ **/ - RED.view.navigator = (function() { - - var nav_scale = 50; - var nav_width = 8000/nav_scale; - var nav_height = 8000/nav_scale; - - var navContainer; - var navBox; - var navBorder; - var navVis; - var scrollPos; - var scaleFactor; - var chartSize; - var dimensions; - var isDragging; - var isShowing = false; - - function refreshNodes() { - if (!isShowing) { - return; - } - var navNode = navVis.selectAll(".red-ui-navigator-node").data(RED.view.getActiveNodes(),function(d){return d.id}); - navNode.exit().remove(); - navNode.enter().insert("rect") - .attr('class','red-ui-navigator-node') - .attr("pointer-events", "none"); - navNode.each(function(d) { - d3.select(this).attr("x",function(d) { return (d.x-d.w/2)/nav_scale }) - .attr("y",function(d) { return (d.y-d.h/2)/nav_scale }) - .attr("width",function(d) { return Math.max(9,d.w/nav_scale) }) - .attr("height",function(d) { return Math.max(3,d.h/nav_scale) }) - .attr("fill",function(d) { return RED.utils.getNodeColor(d.type,d._def);}) - }); - } - function onScroll() { - if (!isDragging) { - resizeNavBorder(); - } - } - function resizeNavBorder() { - if (navBorder) { - scaleFactor = RED.view.scale(); - chartSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; - scrollPos = [$("#red-ui-workspace-chart").scrollLeft(),$("#red-ui-workspace-chart").scrollTop()]; - navBorder.attr('x',scrollPos[0]/nav_scale) - .attr('y',scrollPos[1]/nav_scale) - .attr('width',chartSize[0]/nav_scale/scaleFactor) - .attr('height',chartSize[1]/nav_scale/scaleFactor) - } - } - function toggle() { - if (!isShowing) { - isShowing = true; - $("#red-ui-view-navigate").addClass("selected"); - resizeNavBorder(); - refreshNodes(); - $("#red-ui-workspace-chart").on("scroll",onScroll); - navContainer.fadeIn(200); - } else { - isShowing = false; - navContainer.fadeOut(100); - $("#red-ui-workspace-chart").off("scroll",onScroll); - $("#red-ui-view-navigate").removeClass("selected"); - } - } - - return { - init: function() { - - $(window).on("resize", resizeNavBorder); - RED.events.on("sidebar:resize",resizeNavBorder); - RED.actions.add("core:toggle-navigator",toggle); - var hideTimeout; - - navContainer = $('
      ').css({ - "position":"absolute", - "bottom":$("#red-ui-workspace-footer").height(), - "right":0, - zIndex: 1 - }).appendTo("#red-ui-workspace").hide(); - - navBox = d3.select(navContainer[0]) - .append("svg:svg") - .attr("width", nav_width) - .attr("height", nav_height) - .attr("pointer-events", "all") - .attr("id","red-ui-navigator-canvas") - - navBox.append("rect").attr("x",0).attr("y",0).attr("width",nav_width).attr("height",nav_height).style({ - fill:"none", - stroke:"none", - pointerEvents:"all" - }).on("mousedown", function() { - // Update these in case they have changed - scaleFactor = RED.view.scale(); - chartSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; - dimensions = [chartSize[0]/nav_scale/scaleFactor, chartSize[1]/nav_scale/scaleFactor]; - var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); - var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); - navBorder.attr('x',newX).attr('y',newY); - isDragging = true; - $("#red-ui-workspace-chart").scrollLeft(newX*nav_scale*scaleFactor); - $("#red-ui-workspace-chart").scrollTop(newY*nav_scale*scaleFactor); - }).on("mousemove", function() { - if (!isDragging) { return } - if (d3.event.buttons === 0) { - isDragging = false; - return; - } - var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); - var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); - navBorder.attr('x',newX).attr('y',newY); - $("#red-ui-workspace-chart").scrollLeft(newX*nav_scale*scaleFactor); - $("#red-ui-workspace-chart").scrollTop(newY*nav_scale*scaleFactor); - }).on("mouseup", function() { - isDragging = false; - }) - - navBorder = navBox.append("rect").attr("class","red-ui-navigator-border") +RED.view.navigator = (function() { + var nav_scale = 80; + var nav_width = 8000/nav_scale; + var nav_height = 8000/nav_scale; + var navContainer; + var navBox; + var navBorder; + var navVis; + var scrollPos; + var scaleFactor; + var chartSize; + var dimensions; + var isDragging; + var isShowing = false; + var toggleTimeout; + var autoHideTimeout; + var isManuallyToggled = false; + var isTemporaryShow = false; + function refreshNodes() { + if (!isShowing) { + return; + } + var navNode = navVis.selectAll(".red-ui-navigator-node").data(RED.view.getActiveNodes(),function(d){return d.id}); + navNode.exit().remove(); + navNode.enter().insert("rect") + .attr('class','red-ui-navigator-node') + .attr("pointer-events", "none"); + navNode.each(function(d) { + d3.select(this).attr("x",function(d) { return (d.x-d.w/2)/nav_scale }) + .attr("y",function(d) { return (d.y-d.h/2)/nav_scale }) + .attr("width",function(d) { return Math.max(4,d.w/nav_scale) }) + .attr("height",function(d) { return Math.max(2,d.h/nav_scale) }) + .attr("fill",function(d) { return RED.utils.getNodeColor(d.type,d._def);}) + }); + } + function onScroll() { + if (!isDragging) { + resizeNavBorder(); + } + } + function resizeNavBorder() { + if (navBorder) { + scaleFactor = RED.view.scale(); + chartSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; + scrollPos = [$("#red-ui-workspace-chart").scrollLeft(),$("#red-ui-workspace-chart").scrollTop()]; + // Convert scroll position (in scaled pixels) to workspace coordinates, then to minimap coordinates + // scrollPos is in scaled canvas pixels, divide by scaleFactor to get workspace coords + if (chartSize[0] > 0 && chartSize[1] > 0) { + navBorder.attr('x',scrollPos[0]/scaleFactor/nav_scale) + .attr('y',scrollPos[1]/scaleFactor/nav_scale) + .attr('width',chartSize[0]/nav_scale/scaleFactor) + .attr('height',chartSize[1]/nav_scale/scaleFactor) + } + } + } + function show () { + if (!isShowing) { + isShowing = true; + clearTimeout(autoHideTimeout); + $("#red-ui-view-navigate").addClass("selected"); + resizeNavBorder(); + refreshNodes(); + $("#red-ui-workspace-chart").on("scroll",onScroll); + navContainer.addClass('red-ui-navigator-container'); + navContainer.show(); + clearTimeout(toggleTimeout) + toggleTimeout = setTimeout(function() { + navContainer.addClass('red-ui-navigator-visible'); + }, 10); + } + } + function hide () { + if (isShowing) { + isShowing = false; + isTemporaryShow = false; + isManuallyToggled = false; + clearTimeout(autoHideTimeout); + navContainer.removeClass('red-ui-navigator-visible'); + clearTimeout(toggleTimeout) + toggleTimeout = setTimeout(function() { + navContainer.hide(); + }, 300); + $("#red-ui-workspace-chart").off("scroll",onScroll); + $("#red-ui-view-navigate").removeClass("selected"); + } + } + function toggle() { + if (!isShowing) { + isManuallyToggled = true; + show() + } else { + isManuallyToggled = false; + hide() + } + } + function setupAutoHide () { + clearTimeout(autoHideTimeout); + autoHideTimeout = setTimeout(function() { + hide() + }, 2000) + } + function showTemporary() { + if (!isManuallyToggled) { + isTemporaryShow = true + clearTimeout(autoHideTimeout); + show() + setupAutoHide() + } + } + return { + init: function() { + $(window).on("resize", resizeNavBorder); + RED.events.on("sidebar:resize",resizeNavBorder); + RED.actions.add("core:toggle-navigator",toggle); + + RED.statusBar.add({ + id: "view-navigator", + align: "left", + element: $('') + }) - navVis = navBox.append("svg:g") + navContainer = $('
      ').css({ + "position":"absolute", + "bottom": 35, + "left": 0, + zIndex: 1 + }).addClass('red-ui-navigator-container').appendTo("#red-ui-view-navigator-widget").hide(); + navBox = d3.select(navContainer[0]) + .append("svg:svg") + .attr("width", nav_width) + .attr("height", nav_height) + .attr("pointer-events", "all") + .attr("id","red-ui-navigator-canvas") + navVis = navBox.append("svg:g") + + navBox.append("rect").attr("x",0).attr("y",0).attr("width",nav_width).attr("height",nav_height).style({ + fill:"none", + stroke:"none", + pointerEvents:"all" + }).on("mousedown", function() { + // Update these in case they have changed + scaleFactor = RED.view.scale(); + chartSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; + dimensions = [chartSize[0]/nav_scale/scaleFactor, chartSize[1]/nav_scale/scaleFactor]; + var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); + var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); + navBorder.attr('x',newX).attr('y',newY); + isDragging = true; + $("#red-ui-workspace-chart").scrollLeft(newX*nav_scale*scaleFactor); + $("#red-ui-workspace-chart").scrollTop(newY*nav_scale*scaleFactor); + }).on("mousemove", function() { + if (!isDragging) { return } + if (d3.event.buttons === 0) { + isDragging = false; + return; + } + var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); + var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); + navBorder.attr('x',newX).attr('y',newY); + $("#red-ui-workspace-chart").scrollLeft(newX*nav_scale*scaleFactor); + $("#red-ui-workspace-chart").scrollTop(newY*nav_scale*scaleFactor); + RED.events.emit("view:navigate"); + }).on("mouseup", function() { + isDragging = false; + }).on("mouseenter", function () { + if (isTemporaryShow) { + // If user hovers over the minimap while it's temporarily shown, keep it shown + clearTimeout(autoHideTimeout); + } + }).on("mouseleave", function () { + if (isTemporaryShow) { + // Restart the auto-hide timer after mouse leaves the minimap + setupAutoHide() + } + }) + navBorder = navBox.append("rect").attr("class","red-ui-navigator-border") - RED.statusBar.add({ - id: "view-navigator", - align: "right", - element: $('') - }) $("#red-ui-view-navigate").on("click", function(evt) { evt.preventDefault(); toggle(); }) RED.popover.tooltip($("#red-ui-view-navigate"),RED._('actions.toggle-navigator'),'core:toggle-navigator'); + + // Listen for canvas interactions to show minimap temporarily + // Only show on actual pan/zoom navigation, not selection changes + // RED.events.on("view:navigate", function() { + // showTemporary(); + // }); + + // Show minimap briefly when workspace changes (includes initial load) + // RED.events.on("workspace:change", function(event) { + // // Only show if there's an active workspace with nodes + // if (event.workspace && RED.nodes.getWorkspaceOrder().length > 0) { + // // Small delay to ensure nodes are rendered + // setTimeout(function() { + // var activeNodes = RED.nodes.filterNodes({z: event.workspace}); + // if (activeNodes.length > 0) { + // showTemporary(); + // } + // }, 100); + // } + // }); }, refresh: refreshNodes, resize: resizeNavBorder, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-animator.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-animator.js new file mode 100644 index 0000000000..cda28591cb --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-animator.js @@ -0,0 +1,257 @@ +/** + * Copyright JS Foundation and other contributors, http://js.foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + **/ + +RED.view.zoomAnimator = (function() { + + /** + * Easing function for smooth deceleration + * Creates natural-feeling animation curves + * @param {number} t - Progress from 0 to 1 + * @returns {number} - Eased value from 0 to 1 + */ + function easeOut(t) { + // Cubic ease-out for smooth deceleration + return 1 - Math.pow(1 - t, 3); + } + + /** + * Animate values using requestAnimationFrame with easing + * Based on Excalidraw's implementation for smooth zoom transitions + * + * @param {Object} options - Animation options + * @param {Object} options.fromValues - Starting values object + * @param {Object} options.toValues - Target values object + * @param {Function} options.onStep - Callback for each animation frame + * @param {number} [options.duration=250] - Animation duration in ms + * @param {Function} [options.interpolateValue] - Custom interpolation function + * @param {Function} [options.onStart] - Animation start callback + * @param {Function} [options.onEnd] - Animation end callback + * @param {Function} [options.onCancel] - Animation cancel callback + * @returns {Function} - Cancel function to stop animation + */ + function easeToValuesRAF(options) { + const { + fromValues, + toValues, + onStep, + duration = 250, + interpolateValue, + onStart, + onEnd, + onCancel + } = options; + + let startTime = null; + let animationId = null; + let cancelled = false; + + function step(timestamp) { + if (cancelled) { + return; + } + + if (!startTime) { + startTime = timestamp; + if (onStart) { + onStart(); + } + } + + const elapsed = timestamp - startTime; + const progress = Math.min(elapsed / duration, 1); + const easedProgress = easeOut(progress); + + const interpolatedValues = {}; + + for (const key in fromValues) { + if (fromValues.hasOwnProperty(key)) { + const from = fromValues[key]; + const to = toValues[key]; + + if (interpolateValue && key === 'zoom') { + // Special interpolation for zoom to feel more natural + // Exponential interpolation preserves relative zoom feel + interpolatedValues[key] = from * Math.pow(to / from, easedProgress); + } else { + // Linear interpolation for other values + interpolatedValues[key] = from + (to - from) * easedProgress; + } + } + } + + onStep(interpolatedValues); + + if (progress < 1) { + animationId = requestAnimationFrame(step); + } else { + if (onEnd) { + onEnd(); + } + } + } + + animationId = requestAnimationFrame(step); + + // Return cancel function + return function cancel() { + cancelled = true; + if (animationId) { + cancelAnimationFrame(animationId); + } + if (onCancel) { + onCancel(); + } + }; + } + + /** + * Calculate smooth zoom delta with acceleration + * Provides consistent zoom speed regardless of input device + * + * @param {number} currentScale - Current zoom scale + * @param {number} delta - Input delta (wheel, gesture, etc) + * @param {boolean} isTrackpad - Whether input is from trackpad + * @returns {number} - Calculated zoom delta + */ + function calculateZoomDelta(currentScale, delta, isTrackpad) { + // Normalize delta across different input devices + let normalizedDelta = delta; + + if (isTrackpad) { + // Trackpad deltas are typically smaller and more frequent + normalizedDelta = delta * 0.005; // Reduced from 0.01 for gentler zoom + } else { + // Mouse wheel deltas are larger and less frequent + // Reduce zoom out speed more than zoom in + normalizedDelta = delta > 0 ? 0.06 : -0.08; // Reduced from 0.1, asymmetric for gentler zoom out + } + + // Apply gentler acceleration based on current zoom level + // Less aggressive acceleration to prevent rapid zoom out + const acceleration = Math.max(0.7, Math.min(1.1, 1 / currentScale)); // Reduced from 0.5-1.2 to 0.7-1.1 + + return normalizedDelta * acceleration; + } + + /** + * Gesture state management for consistent focal points + */ + const gestureState = { + active: false, + initialFocalPoint: null, // Will store workspace coordinates + initialScale: 1, + currentScale: 1, + lastDistance: 0, + scrollPosAtStart: null, // Store initial scroll position + scaleFatorAtStart: 1 // Store initial scale factor + }; + + /** + * Start a zoom gesture with fixed focal point + * @param {Array} focalPoint - [x, y] coordinates of focal point in workspace + * @param {number} scale - Initial scale value + * @param {Array} scrollPos - Current scroll position [x, y] + * @param {number} currentScaleFactor - Current scale factor for coordinate conversion + */ + function startGesture(focalPoint, scale, scrollPos, currentScaleFactor) { + gestureState.active = true; + // Store the focal point in workspace coordinates for stability + // This ensures the point remains fixed even if scroll changes due to canvas edge constraints + if (focalPoint && scrollPos && currentScaleFactor) { + gestureState.initialFocalPoint = [ + (scrollPos[0] + focalPoint[0]) / currentScaleFactor, + (scrollPos[1] + focalPoint[1]) / currentScaleFactor + ]; + gestureState.scrollPosAtStart = [...scrollPos]; + gestureState.scaleFatorAtStart = currentScaleFactor; + } else { + gestureState.initialFocalPoint = focalPoint ? [...focalPoint] : null; + } + gestureState.initialScale = scale; + gestureState.currentScale = scale; + return gestureState; + } + + /** + * Update gesture maintaining fixed focal point + * @param {number} newScale - New scale value + * @returns {Object} - Gesture state with fixed focal point + */ + function updateGesture(newScale) { + if (!gestureState.active) { + return null; + } + + gestureState.currentScale = newScale; + + return { + scale: newScale, + focalPoint: gestureState.initialFocalPoint, + active: gestureState.active + }; + } + + /** + * End the current gesture + */ + function endGesture() { + gestureState.active = false; + gestureState.initialFocalPoint = null; + gestureState.lastDistance = 0; + } + + /** + * Check if a gesture is currently active + */ + function isGestureActive() { + return gestureState.active; + } + + /** + * Get the fixed focal point for the current gesture + * @param {Array} currentScrollPos - Current scroll position [x, y] + * @param {number} currentScaleFactor - Current scale factor + * @returns {Array} - Focal point in screen coordinates or null + */ + function getGestureFocalPoint(currentScrollPos, currentScaleFactor) { + if (!gestureState.initialFocalPoint) { + return null; + } + + // If we stored workspace coordinates, convert back to screen coordinates + if (gestureState.scrollPosAtStart && currentScrollPos && currentScaleFactor) { + // Convert workspace coordinates back to current screen coordinates + return [ + gestureState.initialFocalPoint[0] * currentScaleFactor - currentScrollPos[0], + gestureState.initialFocalPoint[1] * currentScaleFactor - currentScrollPos[1] + ]; + } + + return gestureState.initialFocalPoint; + } + + return { + easeOut: easeOut, + easeToValuesRAF: easeToValuesRAF, + calculateZoomDelta: calculateZoomDelta, + gestureState: gestureState, + startGesture: startGesture, + updateGesture: updateGesture, + endGesture: endGesture, + isGestureActive: isGestureActive, + getGestureFocalPoint: getGestureFocalPoint + }; +})(); \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-constants.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-constants.js new file mode 100644 index 0000000000..9b10afd82e --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view-zoom-constants.js @@ -0,0 +1,21 @@ +/** + * Zoom configuration constants + */ +RED.view.zoomConstants = { + // Zoom limits + MIN_ZOOM: 0.05, // Default minimum, will be dynamically calculated to fit canvas + MAX_ZOOM: 2.0, + + // Zoom step for keyboard/button controls + ZOOM_STEP: 0.2, + + // Animation settings + DEFAULT_ZOOM_DURATION: 125, // ms, faster animation + + // Gesture thresholds + PINCH_THRESHOLD: 10, // minimum pixel movement to trigger zoom + + // Momentum and friction for smooth scrolling + FRICTION: 0.92, + BOUNCE_DAMPING: 0.6 +}; \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index 53be89fb05..cf2b64ddc0 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -38,11 +38,29 @@ RED.view = (function() { node_height = 30, dblClickInterval = 650; + var cancelInProgressAnimation = null; // For smooth zoom animation + var touchLongPressTimeout = 1000, startTouchDistance = 0, startTouchCenter = [], moveTouchCenter = [], - touchStartTime = 0; + touchStartTime = 0, + gesture = {}; + + var spacebarPressed = false; + + // Momentum scrolling state + var scrollVelocity = { x: 0, y: 0 }; + var lastScrollTime = 0; + var lastScrollPos = { x: 0, y: 0 }; + var scrollAnimationId = null; + var momentumActive = false; + + // Bounce effect parameters + var BOUNCE_DAMPING = 0.6; + var BOUNCE_TENSION = 0.3; + var MIN_VELOCITY = 0.5; + var FRICTION = 0.95; var workspaceScrollPositions = {}; @@ -319,6 +337,24 @@ RED.view = (function() { function init() { chart = $("#red-ui-workspace-chart"); + + // Add invisible spacer div to ensure scrollable area matches canvas dimensions + // At minimum zoom with "cover" behavior, SVG may be smaller than viewport in one dimension + // This spacer forces the browser to calculate scrollWidth/Height based on full canvas size + // Browser's maxScroll = scrollWidth - viewport will then correctly show canvas edges + var scrollSpacer = $('
      ') + .css({ + position: 'absolute', + top: 0, + left: 0, + width: space_width + 'px', + height: space_height + 'px', + pointerEvents: 'none', + visibility: 'hidden' + }) + .attr('id', 'red-ui-workspace-scroll-spacer') + .appendTo(chart); + chart.on('contextmenu', function(evt) { if (RED.view.DEBUG) { console.warn("contextmenu", { mouse_mode, event: d3.event }); @@ -363,8 +399,9 @@ RED.view = (function() { lasso.remove(); lasso = null; } - } else if (mouse_mode === RED.state.PANNING && d3.event.buttons !== 4) { - resetMouseVars(); + } else if (mouse_mode === RED.state.PANNING) { + // ensure the cursor is set to grab when re-entering the canvas while panning + outer.style('cursor', 'grabbing'); } else if (slicePath) { if (d3.event.buttons !== 2) { slicePath.remove(); @@ -381,11 +418,15 @@ RED.view = (function() { if (RED.touch.radialMenu.active()) { return; } + // End gesture when touches end + RED.view.zoomAnimator.endGesture(); canvasMouseUp.call(this); }) .on("touchcancel", function() { if (RED.view.DEBUG) { console.warn("eventLayer.touchcancel", mouse_mode); } d3.event.preventDefault(); + // End gesture when touches are cancelled + RED.view.zoomAnimator.endGesture(); canvasMouseUp.call(this); }) .on("touchstart", function() { @@ -411,6 +452,20 @@ RED.view = (function() { touch1["pageY"]+(a/2) ] startTouchDistance = Math.sqrt((a*a)+(b*b)); + + // Store initial scale for ratio-based zoom calculation + gesture = { + initialScale: scaleFactor, + initialDistance: startTouchDistance, + mode: null // Will be determined on first significant move + }; + + // Start gesture with fixed focal point (store in workspace coordinates) + var focalPoint = [ + (touch0["pageX"] + touch1["pageX"]) / 2 - offset.left, + (touch0["pageY"] + touch1["pageY"]) / 2 - offset.top + ]; + RED.view.zoomAnimator.startGesture(focalPoint, scaleFactor, scrollPos, scaleFactor); } else { var obj = d3.select(document.body); touch0 = d3.event.touches.item(0); @@ -460,33 +515,93 @@ RED.view = (function() { var offset = chart.offset(); var scrollPos = [chart.scrollLeft(),chart.scrollTop()]; var moveTouchDistance = Math.sqrt((a*a)+(b*b)); - var touchCenter = [ - touch1["pageX"]+(b/2), - touch1["pageY"]+(a/2) + + // Calculate center point of two fingers + var currentTouchCenter = [ + (touch0["pageX"] + touch1["pageX"]) / 2, + (touch0["pageY"] + touch1["pageY"]) / 2 ]; if (!isNaN(moveTouchDistance)) { - oldScaleFactor = scaleFactor; - scaleFactor = Math.min(2,Math.max(0.3, scaleFactor + (Math.floor(((moveTouchDistance*100)-(startTouchDistance*100)))/10000))); - - var deltaTouchCenter = [ // Try to pan whilst zooming - not 100% - startTouchCenter[0]*(scaleFactor-oldScaleFactor),//-(touchCenter[0]-moveTouchCenter[0]), - startTouchCenter[1]*(scaleFactor-oldScaleFactor) //-(touchCenter[1]-moveTouchCenter[1]) - ]; - - startTouchDistance = moveTouchDistance; - moveTouchCenter = touchCenter; + // Determine gesture mode on first significant movement + if (!gesture.mode) { + var distanceChange = Math.abs(moveTouchDistance - startTouchDistance); + var centerChange = moveTouchCenter ? + Math.sqrt(Math.pow(currentTouchCenter[0] - moveTouchCenter[0], 2) + + Math.pow(currentTouchCenter[1] - moveTouchCenter[1], 2)) : 0; + + // Lock into zoom mode if distance changes significantly (>10px) + // Lock into pan mode if center moves significantly (>5px) without distance change + if (distanceChange > 10) { + gesture.mode = 'zoom'; + } else if (centerChange > 5) { + gesture.mode = 'pan'; + } + } + + // Once mode is determined, stay in that mode for the entire gesture + if (gesture.mode === 'zoom') { + oldScaleFactor = scaleFactor; + // Use smooth ratio-based scaling for natural pinch-to-zoom + var zoomRatio = moveTouchDistance / startTouchDistance; + var minZoom = calculateMinZoom(); + var newScaleFactor = Math.min(RED.view.zoomConstants.MAX_ZOOM, + Math.max(minZoom, gesture.initialScale * zoomRatio)); + + // Use gesture state management to maintain fixed focal point + var gestureState = RED.view.zoomAnimator.updateGesture(newScaleFactor); + + // Only call zoomView if scale is actually changing (not at limits) + if (Math.abs(scaleFactor - newScaleFactor) >= 0.001) { + // Get focal point converted back to current screen coordinates + var currentScrollPos = [chart.scrollLeft(), chart.scrollTop()]; + var focalPoint = RED.view.zoomAnimator.getGestureFocalPoint(currentScrollPos, scaleFactor); + + if (focalPoint) { + // Use the fixed focal point from gesture start (converted from workspace coords) + zoomView(newScaleFactor, focalPoint); + } else { + // Fallback to current behavior if gesture not active + var touchCenter = [ + touch1["pageX"]+(b/2), + touch1["pageY"]+(a/2) + ]; + var pinchCenter = [ + touchCenter[0] - offset.left, + touchCenter[1] - offset.top + ]; + zoomView(newScaleFactor, pinchCenter); + } + } + } else if (gesture.mode === 'pan' || !gesture.mode) { + // Two-finger pan: allow immediate panning even if mode not determined + // Clear touchStartTime to prevent issues with next gesture + if (touchStartTime) { + clearTimeout(touchStartTime); + touchStartTime = null; + } + if (moveTouchCenter) { + var dx = currentTouchCenter[0] - moveTouchCenter[0]; + var dy = currentTouchCenter[1] - moveTouchCenter[1]; + + // Pan the canvas + var currentScroll = [chart.scrollLeft(), chart.scrollTop()]; + chart.scrollLeft(currentScroll[0] - dx); + chart.scrollTop(currentScroll[1] - dy); + RED.events.emit("view:navigate"); + } + // Update the center for next move + moveTouchCenter = currentTouchCenter; + } - chart.scrollLeft(scrollPos[0]+deltaTouchCenter[0]); - chart.scrollTop(scrollPos[1]+deltaTouchCenter[1]); - redraw(); + // Don't update startTouchDistance - keep initial distance for ratio calculation } } d3.event.preventDefault(); }); - - - const handleAltToggle = (event) => { + + const handleChartKeyboardEvents = (event) => { + // Handle Alt toggle for pulling nodes out of groups if (mouse_mode === RED.state.MOVING_ACTIVE && event.key === 'Alt' && groupAddParentGroup) { RED.nodes.group(groupAddParentGroup).dirty = true for (let n = 0; n'+ - ''+ - ''+ - ''+ - '') - }) + // Modern wheel event handler for better trackpad support (pinch-to-zoom) and momentum + var momentumTimer = null; + var trackpadGestureTimer = null; + var lastWheelEventTime = 0; + var wheelEventContinuityThreshold = 100; // Events within 100ms are same gesture + var gestureEndThreshold = 500; // 500ms+ gap means gesture ended + + // Prevent browser zoom on non-canvas areas + document.addEventListener("wheel", function(e) { + if (e.ctrlKey && !e.target.closest('#red-ui-workspace-chart')) { + e.preventDefault(); + } + }, { passive: false }); + + chart.on("wheel", function(evt) { + if (mouse_mode === RED.state.PANNING) { + // Ignore wheel events while panning + return; + } + // ctrlKey is set during pinch gestures on trackpads + if (evt.ctrlKey || evt.altKey || spacebarPressed) { + evt.preventDefault(); + evt.stopPropagation(); + var currentTime = Date.now(); + var timeSinceLastEvent = currentTime - lastWheelEventTime; + + // Get cursor position relative to the chart + var offset = chart.offset(); + var cursorPos = [ + evt.originalEvent.pageX - offset.left, + evt.originalEvent.pageY - offset.top + ]; + var delta = evt.originalEvent.deltaY; + + // For trackpad pinch (Ctrl+wheel), use smooth proportional zoom + if (evt.ctrlKey && !evt.altKey && !spacebarPressed) { + // Detect input device: trackpad has small deltas, mouse wheel has large deltas + var isTrackpadInput = Math.abs(delta) < 50; + // Invert delta: spreading fingers (negative deltaY) should zoom in + var scaleDelta = RED.view.zoomAnimator.calculateZoomDelta(scaleFactor, -delta, isTrackpadInput); + var minZoom = calculateMinZoom(); + var newScale = Math.min(RED.view.zoomConstants.MAX_ZOOM, + Math.max(minZoom, scaleFactor + scaleDelta)); + // Session-based gesture tracking: + // - If no active gesture OR gap > gestureEndThreshold, start new gesture + // - If gap < wheelEventContinuityThreshold, continue current gesture + // - If gap between continuity and end threshold, keep current gesture but don't update focal point + + if (!RED.view.zoomAnimator.isGestureActive() || timeSinceLastEvent > gestureEndThreshold) { + // Start new gesture session - store focal point in workspace coordinates + var scrollPos = [chart.scrollLeft(), chart.scrollTop()]; + RED.view.zoomAnimator.startGesture(cursorPos, scaleFactor, scrollPos, scaleFactor); + } else if (timeSinceLastEvent <= wheelEventContinuityThreshold) { + // Events are continuous - this is the same gesture, focal point remains locked + // No need to update focal point + } + // For gaps between continuity and end threshold, keep existing gesture state + + // Update gesture with new scale, maintaining locked focal point + RED.view.zoomAnimator.updateGesture(newScale); + // Only call zoomView if scale is actually changing (not at limits) + if (Math.abs(scaleFactor - newScale) >= 0.001) { + // Get focal point converted back to current screen coordinates + var currentScrollPos = [chart.scrollLeft(), chart.scrollTop()]; + var focalPoint = RED.view.zoomAnimator.getGestureFocalPoint(currentScrollPos, scaleFactor); + zoomView(newScale, focalPoint); // Direct call, no animation + } else { + // At a limit - force a refresh to ensure UI elements are correctly updated + _redraw() + RED.events.emit("view:navigate"); + } + + // Update last event time for continuity tracking + lastWheelEventTime = currentTime; + + // Reset gesture timeout - end gesture when no more events come in for gestureEndThreshold + if (trackpadGestureTimer) { + clearTimeout(trackpadGestureTimer); + } + trackpadGestureTimer = setTimeout(function() { + RED.view.zoomAnimator.endGesture(); + trackpadGestureTimer = null; + // Store zoom level when gesture completes + if (RED.settings.get("editor.view.view-store-zoom")) { + RED.settings.setLocal('zoom-level', scaleFactor.toFixed(1)); + } + }, gestureEndThreshold); // Use 500ms timeout for gesture end detection + } else { + // Regular Alt+scroll or Space+scroll - use smooth zoom without animation + // Detect input device: trackpad has small deltas, mouse wheel has large deltas + var isTrackpadInput = Math.abs(delta) < 50; + var scaleDelta = RED.view.zoomAnimator.calculateZoomDelta(scaleFactor, -delta, isTrackpadInput); + var minZoom = calculateMinZoom(); + var newScale = Math.min(RED.view.zoomConstants.MAX_ZOOM, + Math.max(minZoom, scaleFactor + scaleDelta)); + + // Use gesture tracking for stable focal point like trackpad pinch + if (!RED.view.zoomAnimator.isGestureActive() || timeSinceLastEvent > gestureEndThreshold) { + // Start new gesture session - store focal point in workspace coordinates + var scrollPos = [chart.scrollLeft(), chart.scrollTop()]; + RED.view.zoomAnimator.startGesture(cursorPos, scaleFactor, scrollPos, scaleFactor); + } else if (timeSinceLastEvent <= wheelEventContinuityThreshold) { + // Events are continuous - same gesture, focal point remains locked + } + + // Update gesture with new scale, maintaining locked focal point + RED.view.zoomAnimator.updateGesture(newScale); + + // Only zoom if scale is actually changing + if (Math.abs(scaleFactor - newScale) >= 0.001) { + // Get focal point converted back to current screen coordinates + var currentScrollPos = [chart.scrollLeft(), chart.scrollTop()]; + var focalPoint = RED.view.zoomAnimator.getGestureFocalPoint(currentScrollPos, scaleFactor); + zoomView(newScale, focalPoint); + } else { + // At a limit - force a refresh to ensure UI elements are correctly updated + _redraw() + RED.events.emit("view:navigate"); - $("#red-ui-view-zoom-out").on("click", zoomOut); - RED.popover.tooltip($("#red-ui-view-zoom-out"),RED._('actions.zoom-out'),'core:zoom-out'); - $("#red-ui-view-zoom-zero").on("click", zoomZero); - RED.popover.tooltip($("#red-ui-view-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset'); - $("#red-ui-view-zoom-in").on("click", zoomIn); - RED.popover.tooltip($("#red-ui-view-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in'); - chart.on("DOMMouseScroll mousewheel", function (evt) { - if ( evt.altKey ) { + } + + // Update last event time for continuity tracking + lastWheelEventTime = currentTime; + + // Reset gesture timeout + if (trackpadGestureTimer) { + clearTimeout(trackpadGestureTimer); + } + trackpadGestureTimer = setTimeout(function() { + RED.view.zoomAnimator.endGesture(); + trackpadGestureTimer = null; + // Store zoom level when gesture completes + if (RED.settings.get("editor.view.view-store-zoom")) { + RED.settings.setLocal('zoom-level', scaleFactor.toFixed(1)); + } + }, gestureEndThreshold); + } + } else { + // Regular scroll - prevent default and manually handle both axes evt.preventDefault(); evt.stopPropagation(); - var move = -(evt.originalEvent.detail) || evt.originalEvent.wheelDelta; - if (move <= 0) { zoomOut(); } - else { zoomIn(); } + + // Apply scroll deltas directly to both axes + var deltaX = evt.originalEvent.deltaX; + var deltaY = evt.originalEvent.deltaY; + + chart.scrollLeft(chart.scrollLeft() + deltaX); + chart.scrollTop(chart.scrollTop() + deltaY); + + // Emit navigate event for minimap + RED.events.emit("view:navigate"); + + // Track velocity and apply momentum + handleScroll(); + + // Cancel previous momentum timer + if (momentumTimer) { + clearTimeout(momentumTimer); + } + + // Start momentum after scroll stops + momentumTimer = setTimeout(function() { + if (Math.abs(scrollVelocity.x) > MIN_VELOCITY || Math.abs(scrollVelocity.y) > MIN_VELOCITY) { + startMomentumScroll(); + } + }, 100); } }); - //add search to status-toolbar - RED.statusBar.add({ - id: "view-search-tools", - align: "left", - hidden: false, - element: $(''+ - '' + - '' + - '' + - '? of ?' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '') - }) - $("#red-ui-view-searchtools-search").on("click", searchFlows); - RED.popover.tooltip($("#red-ui-view-searchtools-search"),RED._('actions.search-flows'),'core:search'); - $("#red-ui-view-searchtools-prev").on("click", searchPrev); - RED.popover.tooltip($("#red-ui-view-searchtools-prev"),RED._('actions.search-prev'),'core:search-previous'); - $("#red-ui-view-searchtools-next").on("click", searchNext); - RED.popover.tooltip($("#red-ui-view-searchtools-next"),RED._('actions.search-next'),'core:search-next'); - RED.popover.tooltip($("#red-ui-view-searchtools-close"),RED._('common.label.close')); - // Handle nodes dragged from the palette chart.droppable({ accept:".red-ui-palette-node", @@ -786,6 +1075,12 @@ RED.view = (function() { }); chart.on("blur", function() { $("#red-ui-workspace-tabs").removeClass("red-ui-workspace-focussed"); + // Reset spacebar state when chart loses focus to prevent stuck state + if (spacebarPressed) { + spacebarPressed = false; + // Revert cursor when chart loses focus + outer.style('cursor', ''); + } }); RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection); @@ -850,6 +1145,7 @@ RED.view = (function() { RED.actions.add("core:zoom-in",zoomIn); RED.actions.add("core:zoom-out",zoomOut); RED.actions.add("core:zoom-reset",zoomZero); + RED.actions.add("core:zoom-fit",zoomToFitAll); RED.actions.add("core:enable-selected-nodes", function() { setSelectedNodeState(false)}); RED.actions.add("core:disable-selected-nodes", function() { setSelectedNodeState(true)}); @@ -886,6 +1182,55 @@ RED.view = (function() { RED.view.navigator.init(); RED.view.tools.init(); + RED.statusBar.add({ + id: "view-zoom-controls", + align: "left", + element: $(''+ + ''+ + ''+ + ''+ + ''+ + '') + }) + + $("#red-ui-view-zoom-out").on("click", function() { zoomOut(); }); + RED.popover.tooltip($("#red-ui-view-zoom-out"),RED._('actions.zoom-out'),'core:zoom-out'); + $("#red-ui-view-zoom-zero").on("click", zoomZero); + RED.popover.tooltip($("#red-ui-view-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset'); + $("#red-ui-view-zoom-in").on("click", function() { zoomIn(); }); + RED.popover.tooltip($("#red-ui-view-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in'); + $("#red-ui-view-zoom-fit").on("click", zoomToFitAll); + RED.popover.tooltip($("#red-ui-view-zoom-fit"),RED._('actions.zoom-fit'),'core:zoom-fit'); + + //add search to status-toolbar + RED.statusBar.add({ + id: "view-search-tools", + align: "left", + hidden: false, + element: $(''+ + '' + + '' + + '' + + '? of ?' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '') + }) + $("#red-ui-view-searchtools-search").on("click", searchFlows); + RED.popover.tooltip($("#red-ui-view-searchtools-search"),RED._('actions.search-flows'),'core:search'); + $("#red-ui-view-searchtools-prev").on("click", searchPrev); + RED.popover.tooltip($("#red-ui-view-searchtools-prev"),RED._('actions.search-prev'),'core:search-previous'); + $("#red-ui-view-searchtools-next").on("click", searchNext); + RED.popover.tooltip($("#red-ui-view-searchtools-next"),RED._('actions.search-next'),'core:search-next'); + RED.popover.tooltip($("#red-ui-view-searchtools-close"),RED._('common.label.close')); + + + RED.view.annotations.register("red-ui-flow-node-docs",{ type: "badge", class: "red-ui-flow-node-docs", @@ -965,6 +1310,9 @@ RED.view = (function() { RED.settings.setLocal('scroll-positions', JSON.stringify(workspaceScrollPositions) ) } chart.on("scroll", function() { + // Track scroll velocity for momentum + handleScroll(); + if (RED.settings.get("editor.view.view-store-position")) { if (onScrollTimer) { clearTimeout(onScrollTimer) @@ -1242,12 +1590,26 @@ RED.view = (function() { return; } + // Spacebar + left click for panning + if (spacebarPressed && d3.event.button === 0) { + d3.event.preventDefault(); + d3.event.stopPropagation(); + mouse_mode = RED.state.PANNING; + mouse_position = [d3.event.pageX,d3.event.pageY] + scroll_position = [chart.scrollLeft(),chart.scrollTop()]; + // Change cursor to grabbing while actively panning + outer.style('cursor', 'grabbing'); + return; + } + if (d3.event.button === 1) { // Middle Click pan d3.event.preventDefault(); mouse_mode = RED.state.PANNING; mouse_position = [d3.event.pageX,d3.event.pageY] scroll_position = [chart.scrollLeft(),chart.scrollTop()]; + // Change cursor to grabbing while actively panning + outer.style('cursor', 'grabbing'); return; } if (d3.event.button === 2) { @@ -1786,6 +2148,30 @@ RED.view = (function() { redraw(); } + function startPanning () { + + } + window.addEventListener('mousemove', windowMouseMove) + window.addEventListener('touchmove', windowMouseMove) + + function windowMouseMove (event) { + if (mouse_mode === RED.state.PANNING) { + let pos = [event.pageX, event.pageY] + if (event.touches) { + let touch0 = event.touches.item(0) + pos = [touch0.pageX, touch0.pageY] + } + const deltaPos = [ + mouse_position[0]-pos[0], + mouse_position[1]-pos[1] + ] + chart.scrollLeft(scroll_position[0]+deltaPos[0]) + chart.scrollTop(scroll_position[1]+deltaPos[1]) + RED.events.emit("view:navigate"); + return + } + } + function canvasMouseMove() { var i; var node; @@ -1800,18 +2186,8 @@ RED.view = (function() { //console.log(d3.mouse(this),container.offsetWidth,container.offsetHeight,container.scrollLeft,container.scrollTop); if (mouse_mode === RED.state.PANNING) { - var pos = [d3.event.pageX,d3.event.pageY]; - if (d3.event.touches) { - var touch0 = d3.event.touches.item(0); - pos = [touch0.pageX, touch0.pageY]; - } - var deltaPos = [ - mouse_position[0]-pos[0], - mouse_position[1]-pos[1] - ]; - - chart.scrollLeft(scroll_position[0]+deltaPos[0]) - chart.scrollTop(scroll_position[1]+deltaPos[1]) + // A window-level handler is used for panning so the mouse can leave the confines of the chart + // but continue panning return } @@ -2155,6 +2531,12 @@ RED.view = (function() { } if (mouse_mode === RED.state.PANNING) { resetMouseVars(); + // Revert to grab cursor if spacebar still held, otherwise clear cursor + if (spacebarPressed) { + outer.style('cursor', 'grab'); + } else { + outer.style('cursor', ''); + } return } if (mouse_mode === RED.state.SELECTING_NODE) { @@ -2486,39 +2868,463 @@ RED.view = (function() { } - function zoomIn() { - if (scaleFactor < 2) { - zoomView(scaleFactor+0.1); + function calculateMinZoom() { + // Calculate the minimum zoom to ensure canvas always fills the viewport (no empty space) + var viewportWidth = chart.width(); + var viewportHeight = chart.height(); + + // Canvas is 8000x8000, calculate zoom to cover viewport + var zoomToFitWidth = viewportWidth / space_width; + var zoomToFitHeight = viewportHeight / space_height; + + // Use the LARGER zoom to ensure canvas covers entire viewport (no empty space visible) + var calculatedMinZoom = Math.max(zoomToFitWidth, zoomToFitHeight); + + // Return the larger of the calculated min or the configured min + // This ensures canvas always fills the viewport + return Math.max(calculatedMinZoom, RED.view.zoomConstants.MIN_ZOOM); + } + + // Track focal point for sequential button/hotkey zoom operations + // Store in workspace coordinates so it remains valid after viewport shifts + var buttonZoomWorkspaceCenter = null; + var buttonZoomTimeout = null; + var BUTTON_ZOOM_FOCAL_TIMEOUT = 1000; // ms - time to keep same focal point + + function zoomIn(focalPoint) { + if (scaleFactor < RED.view.zoomConstants.MAX_ZOOM) { + var useFocalPoint = null; + + // If focalPoint is explicitly provided (e.g., from wheel/pinch), use it directly + if (focalPoint) { + useFocalPoint = focalPoint; + } else { + // For button/hotkey zoom, maintain the same workspace center across sequential zooms + if (!buttonZoomWorkspaceCenter) { + // First button zoom - calculate and store workspace center + var screenSize = [chart.width(), chart.height()]; + var scrollPos = [chart.scrollLeft(), chart.scrollTop()]; + // Convert viewport center to workspace coordinates + buttonZoomWorkspaceCenter = [ + (scrollPos[0] + screenSize[0]/2) / scaleFactor, + (scrollPos[1] + screenSize[1]/2) / scaleFactor + ]; + } + + // ALWAYS use viewport center as focal point (fixed screen position) + // The stored workspace center will be kept at this screen position + var screenSize = [chart.width(), chart.height()]; + useFocalPoint = [screenSize[0]/2, screenSize[1]/2]; + + // Reset timeout + clearTimeout(buttonZoomTimeout); + buttonZoomTimeout = setTimeout(function() { + buttonZoomWorkspaceCenter = null; + }, BUTTON_ZOOM_FOCAL_TIMEOUT); + } + + animatedZoomView(scaleFactor + RED.view.zoomConstants.ZOOM_STEP, useFocalPoint, buttonZoomWorkspaceCenter); } } - function zoomOut() { - if (scaleFactor > 0.3) { - zoomView(scaleFactor-0.1); + function zoomOut(focalPoint) { + var minZoom = calculateMinZoom(); + if (scaleFactor > minZoom) { + var useFocalPoint = null; + + if (focalPoint) { + useFocalPoint = focalPoint; + } else { + if (!buttonZoomWorkspaceCenter) { + var screenSize = [chart.width(), chart.height()]; + var scrollPos = [chart.scrollLeft(), chart.scrollTop()]; + buttonZoomWorkspaceCenter = [ + (scrollPos[0] + screenSize[0]/2) / scaleFactor, + (scrollPos[1] + screenSize[1]/2) / scaleFactor + ]; + } + + // ALWAYS use viewport center as focal point (fixed screen position) + var screenSize = [chart.width(), chart.height()]; + useFocalPoint = [screenSize[0]/2, screenSize[1]/2]; + + clearTimeout(buttonZoomTimeout); + buttonZoomTimeout = setTimeout(function() { + buttonZoomWorkspaceCenter = null; + }, BUTTON_ZOOM_FOCAL_TIMEOUT); + } + + animatedZoomView(Math.max(scaleFactor - RED.view.zoomConstants.ZOOM_STEP, minZoom), useFocalPoint, buttonZoomWorkspaceCenter); + } else { + // RED.events.emit("view:navigate"); // Ensure UI updates to reflect zoom limit reached } } - function zoomZero() { zoomView(1); } + function zoomZero() { + // Reset button zoom focal point for zoom reset + clearTimeout(buttonZoomTimeout); + buttonZoomWorkspaceCenter = null; + animatedZoomView(1); + } + + function zoomToFitAll() { + // Refresh active nodes to ensure we have the latest + updateActiveNodes(); + + // Get all nodes in active workspace + if (!activeNodes || activeNodes.length === 0) { + return; // No nodes to fit + } + + // Calculate bounding box of all nodes + var minX = Infinity, minY = Infinity; + var maxX = -Infinity, maxY = -Infinity; + + activeNodes.forEach(function(node) { + var nodeLeft = node.x - node.w / 2; + var nodeRight = node.x + node.w / 2; + var nodeTop = node.y - node.h / 2; + var nodeBottom = node.y + node.h / 2; + + minX = Math.min(minX, nodeLeft); + maxX = Math.max(maxX, nodeRight); + minY = Math.min(minY, nodeTop); + maxY = Math.max(maxY, nodeBottom); + }); + + // Add padding around nodes for visual breathing room + var padding = 80; + minX -= padding; + minY -= padding; + maxX += padding; + maxY += padding; + + // Calculate dimensions of bounding box + var boundingWidth = maxX - minX; + var boundingHeight = maxY - minY; + + // Get viewport dimensions + var viewportWidth = chart.width(); + var viewportHeight = chart.height(); + + // Calculate zoom level that fits bounding box in viewport + var zoomX = viewportWidth / boundingWidth; + var zoomY = viewportHeight / boundingHeight; + var targetZoom = Math.min(zoomX, zoomY); + + // Respect minimum and maximum zoom limits + var minZoom = calculateMinZoom(); + targetZoom = Math.max(minZoom, Math.min(RED.view.zoomConstants.MAX_ZOOM, targetZoom)); + + // Calculate center point of bounding box in workspace coordinates + var centerX = (minX + maxX) / 2; + var centerY = (minY + maxY) / 2; + + // Reset button zoom focal point for zoom-to-fit + clearTimeout(buttonZoomTimeout); + buttonZoomWorkspaceCenter = null; + + // Pass the bounding box center as workspace center + // This ensures the nodes are centered in viewport after zoom + var focalPoint = [viewportWidth / 2, viewportHeight / 2]; + + // If zoom level won't change significantly, animate just the pan + if (Math.abs(scaleFactor - targetZoom) < 0.01) { + var targetScrollLeft = centerX * scaleFactor - viewportWidth / 2; + var targetScrollTop = centerY * scaleFactor - viewportHeight / 2; + + // Calculate pan distance to determine duration (match zoom animation logic) + var startScrollLeft = chart.scrollLeft(); + var startScrollTop = chart.scrollTop(); + var panDistance = Math.sqrt( + Math.pow(targetScrollLeft - startScrollLeft, 2) + + Math.pow(targetScrollTop - startScrollTop, 2) + ); + + // Use similar duration calculation as zoom: scale with distance + // Normalize by viewport diagonal for consistent feel + var viewportDiagonal = Math.sqrt(viewportWidth * viewportWidth + viewportHeight * viewportHeight); + var relativeDistance = panDistance / viewportDiagonal; + // Duration scales with distance, matching zoom animation feel + var duration = Math.max(200, Math.min(350, relativeDistance * RED.view.zoomConstants.DEFAULT_ZOOM_DURATION * 4)); + + RED.view.zoomAnimator.easeToValuesRAF({ + fromValues: { + scrollLeft: startScrollLeft, + scrollTop: startScrollTop + }, + toValues: { + scrollLeft: targetScrollLeft, + scrollTop: targetScrollTop + }, + duration: duration, + onStep: function(values) { + chart.scrollLeft(values.scrollLeft); + chart.scrollTop(values.scrollTop); + RED.events.emit("view:navigate"); + }, + onStart: function() { + RED.events.emit("view:navigate"); + } + }); + } else { + animatedZoomView(targetZoom, focalPoint, [centerX, centerY]); + } + } + function searchFlows() { RED.actions.invoke("core:search", $(this).data("term")); } function searchPrev() { RED.actions.invoke("core:search-previous"); } function searchNext() { RED.actions.invoke("core:search-next"); } - function zoomView(factor) { + function zoomView(factor, focalPoint) { + // Early return if scale factor isn't actually changing + // This prevents focal point shifts when at zoom limits + if (Math.abs(scaleFactor - factor) < 0.001) { + return; + } + // Make scale 1 'sticky' + if (Math.abs(1.0 - factor) < 0.02) { + factor = 1 + } + var screenSize = [chart.width(),chart.height()]; var scrollPos = [chart.scrollLeft(),chart.scrollTop()]; - var center = [(scrollPos[0] + screenSize[0]/2)/scaleFactor,(scrollPos[1] + screenSize[1]/2)/scaleFactor]; + var oldScaleFactor = scaleFactor; + + // Calculate workspace coordinates of the point that should remain fixed + var center; + if (focalPoint) { + // focalPoint is in screen coordinates, convert to workspace coordinates + center = [(scrollPos[0] + focalPoint[0])/oldScaleFactor, (scrollPos[1] + focalPoint[1])/oldScaleFactor]; + } else { + // Default to viewport center in workspace coordinates + center = [(scrollPos[0] + screenSize[0]/2)/oldScaleFactor, (scrollPos[1] + screenSize[1]/2)/oldScaleFactor]; + } + scaleFactor = factor; - var newCenter = [(scrollPos[0] + screenSize[0]/2)/scaleFactor,(scrollPos[1] + screenSize[1]/2)/scaleFactor]; - var delta = [(newCenter[0]-center[0])*scaleFactor,(newCenter[1]-center[1])*scaleFactor] - chart.scrollLeft(scrollPos[0]-delta[0]); - chart.scrollTop(scrollPos[1]-delta[1]); + + // Calculate new scroll position to keep the center point at the same screen position + if (focalPoint) { + // Keep the focal point at the same screen position + chart.scrollLeft(center[0] * scaleFactor - focalPoint[0]); + chart.scrollTop(center[1] * scaleFactor - focalPoint[1]); + } else { + // Keep viewport center on the same workspace coordinates + var newScrollLeft = center[0] * scaleFactor - screenSize[0]/2; + var newScrollTop = center[1] * scaleFactor - screenSize[1]/2; + chart.scrollLeft(newScrollLeft); + chart.scrollTop(newScrollTop); + } RED.view.navigator.resize(); redraw(); + RED.events.emit("view:navigate"); if (RED.settings.get("editor.view.view-store-zoom")) { RED.settings.setLocal('zoom-level', factor.toFixed(1)) } } + function animatedZoomView(targetFactor, focalPoint, workspaceCenter) { + // Cancel any in-progress animation + if (cancelInProgressAnimation) { + cancelInProgressAnimation(); + cancelInProgressAnimation = null; + } + + // Calculate the actual minimum zoom to fit canvas + var minZoom = calculateMinZoom(); + + // Clamp target factor to valid range + targetFactor = Math.max(minZoom, + Math.min(RED.view.zoomConstants.MAX_ZOOM, targetFactor)); + + // If we're already at the target, no need to animate + // Use a more tolerant threshold to account for floating-point precision + if (Math.abs(scaleFactor - targetFactor) < 0.01) { + RED.events.emit("view:navigate"); + return; + } + // Make scale 1 'sticky' + if (Math.abs(1.0 - targetFactor) < 0.02) { + targetFactor = 1 + } + + + var startFactor = scaleFactor; + var screenSize = [chart.width(), chart.height()]; + var scrollPos = [chart.scrollLeft(), chart.scrollTop()]; + + // Calculate the focal point in workspace coordinates (will remain constant) + var center; + if (workspaceCenter) { + // Use the provided workspace center directly (for button zoom focal point locking) + center = workspaceCenter; + } else if (focalPoint) { + // focalPoint is in screen coordinates, convert to workspace coordinates + center = [(scrollPos[0] + focalPoint[0])/scaleFactor, (scrollPos[1] + focalPoint[1])/scaleFactor]; + } else { + // Default to viewport center + center = [(scrollPos[0] + screenSize[0]/2)/scaleFactor, (scrollPos[1] + screenSize[1]/2)/scaleFactor]; + } + + // Calculate duration based on relative zoom change to maintain consistent velocity + // Use logarithmic scaling since zoom feels exponential to the user + var zoomRatio = targetFactor / startFactor; + var logChange = Math.abs(Math.log(zoomRatio)); + // Scale duration more aggressively: multiply by 2 for stronger effect + // At extreme zoom levels, animation will be noticeably longer + var duration = Math.max(200, Math.min(350, logChange / 0.693 * RED.view.zoomConstants.DEFAULT_ZOOM_DURATION * 2)); + + // Start the animation + cancelInProgressAnimation = RED.view.zoomAnimator.easeToValuesRAF({ + fromValues: { + zoom: startFactor + }, + toValues: { + zoom: targetFactor + }, + duration: duration, + interpolateValue: true, // Use exponential interpolation for zoom + onStep: function(values) { + var currentFactor = values.zoom; + scaleFactor = currentFactor; + + // Calculate new scroll position to maintain focal point + var currentScreenSize = [chart.width(), chart.height()]; + var newScrollPos; + + if (focalPoint) { + // Keep the focal point at the same screen position + newScrollPos = [ + center[0] * scaleFactor - focalPoint[0], + center[1] * scaleFactor - focalPoint[1] + ]; + } else { + // Keep viewport center steady + newScrollPos = [ + center[0] * scaleFactor - currentScreenSize[0]/2, + center[1] * scaleFactor - currentScreenSize[1]/2 + ]; + } + + chart.scrollLeft(newScrollPos[0]); + chart.scrollTop(newScrollPos[1]); + + // During animation, only update the scale transform, not the full redraw + // This is much more performant with many nodes + eventLayer.attr("transform", "scale(" + scaleFactor + ")"); + outer.attr("width", space_width * scaleFactor).attr("height", space_height * scaleFactor); + RED.view.navigator.resize(); + _redraw() + RED.events.emit("view:navigate"); + }, + onStart: function() { + // Show minimap when zoom animation starts + RED.events.emit("view:navigate"); + }, + onEnd: function() { + cancelInProgressAnimation = null; + // Ensure scaleFactor is exactly the target to prevent precision issues + scaleFactor = targetFactor; + // Full redraw at the end to ensure everything is correct + _redraw(); + if (RED.settings.get("editor.view.view-store-zoom")) { + RED.settings.setLocal('zoom-level', targetFactor.toFixed(1)); + } + RED.events.emit("view:navigate"); + }, + onCancel: function() { + cancelInProgressAnimation = null; + // Ensure scaleFactor is set to current target on cancel + scaleFactor = targetFactor; + _redraw(); + RED.events.emit("view:navigate"); + } + }); + } + + // Momentum scrolling functions + function startMomentumScroll() { + if (scrollAnimationId) { + cancelAnimationFrame(scrollAnimationId); + } + momentumActive = true; + animateMomentumScroll(); + } + + function animateMomentumScroll() { + if (!momentumActive) { + return; + } + + var scrollX = chart.scrollLeft(); + var scrollY = chart.scrollTop(); + var maxScrollX = chart[0].scrollWidth - chart.width(); + var maxScrollY = chart[0].scrollHeight - chart.height(); + + // Apply friction + scrollVelocity.x *= FRICTION; + scrollVelocity.y *= FRICTION; + + // Check for edges and apply bounce + var newScrollX = scrollX + scrollVelocity.x; + var newScrollY = scrollY + scrollVelocity.y; + + // Bounce effect at edges + if (newScrollX < 0) { + newScrollX = 0; + scrollVelocity.x = -scrollVelocity.x * BOUNCE_DAMPING; + } else if (newScrollX > maxScrollX) { + newScrollX = maxScrollX; + scrollVelocity.x = -scrollVelocity.x * BOUNCE_DAMPING; + } + + if (newScrollY < 0) { + newScrollY = 0; + scrollVelocity.y = -scrollVelocity.y * BOUNCE_DAMPING; + } else if (newScrollY > maxScrollY) { + newScrollY = maxScrollY; + scrollVelocity.y = -scrollVelocity.y * BOUNCE_DAMPING; + } + + // Apply new scroll position + chart.scrollLeft(newScrollX); + chart.scrollTop(newScrollY); + RED.events.emit("view:navigate"); + + // Stop if velocity is too small + if (Math.abs(scrollVelocity.x) < MIN_VELOCITY && Math.abs(scrollVelocity.y) < MIN_VELOCITY) { + momentumActive = false; + scrollVelocity.x = 0; + scrollVelocity.y = 0; + } else { + scrollAnimationId = requestAnimationFrame(animateMomentumScroll); + } + } + + function handleScroll() { + var now = Date.now(); + var scrollX = chart.scrollLeft(); + var scrollY = chart.scrollTop(); + + if (lastScrollTime) { + var dt = now - lastScrollTime; + if (dt > 0 && dt < 100) { // Only calculate velocity for recent scrolls + scrollVelocity.x = (scrollX - lastScrollPos.x) / dt * 16; // Normalize to 60fps + scrollVelocity.y = (scrollY - lastScrollPos.y) / dt * 16; + } + } + + lastScrollTime = now; + lastScrollPos.x = scrollX; + lastScrollPos.y = scrollY; + + // Cancel any ongoing momentum animation + if (scrollAnimationId) { + cancelAnimationFrame(scrollAnimationId); + scrollAnimationId = null; + } + } + function selectNone() { if (mouse_mode === RED.state.MOVING || mouse_mode === RED.state.MOVING_ACTIVE) { return; @@ -3223,10 +4029,14 @@ RED.view = (function() { function portMouseDown(d,portType,portIndex, evt) { if (RED.view.DEBUG) { console.warn("portMouseDown", mouse_mode,d,portType,portIndex); } + if (spacebarPressed) { + return + } clearSuggestedFlow(); RED.contextMenu.hide(); evt = evt || d3.event; - if (evt === 1) { + + if (!evt.touches && evt.button !== 0) { return; } if (mouse_mode === RED.state.SELECTING_NODE) { @@ -3652,6 +4462,9 @@ RED.view = (function() { (d3.event || event).stopPropagation(); return; } + if (spacebarPressed) { + return + } clearTimeout(portLabelHoverTimeout); var active = (mouse_mode!=RED.state.JOINING && mouse_mode != RED.state.QUICK_JOINING) || // Not currently joining - all ports active ( @@ -3808,6 +4621,9 @@ RED.view = (function() { } function nodeMouseDown(d) { if (RED.view.DEBUG) { console.warn("nodeMouseDown", mouse_mode,d); } + if (spacebarPressed) { + return + } clearSuggestedFlow() focusView(); RED.contextMenu.hide(); @@ -3986,6 +4802,9 @@ RED.view = (function() { function nodeMouseOver(d) { if (RED.view.DEBUG) { console.warn("nodeMouseOver", mouse_mode,d); } + if (spacebarPressed) { + return + } if (mouse_mode === 0 || mouse_mode === RED.state.SELECTING_NODE) { if (mouse_mode === RED.state.SELECTING_NODE && selectNodesOptions && selectNodesOptions.filter) { if (selectNodesOptions.filter(d)) { @@ -4082,7 +4901,7 @@ RED.view = (function() { d3.event.stopPropagation(); return; } - if (d3.event.button === 2) { + if (!d3.event.touches && d3.event.button !== 0) { return } mousedown_link = d; @@ -4159,6 +4978,9 @@ RED.view = (function() { if (RED.view.DEBUG) { console.warn("groupMouseDown", { mouse_mode, point: mouse, event: d3.event }); } + if (spacebarPressed) { + return + } RED.contextMenu.hide(); focusView(); if (d3.event.button === 1) { @@ -4618,6 +5440,15 @@ RED.view = (function() { eventLayer.attr("transform","scale("+scaleFactor+")"); outer.attr("width", space_width*scaleFactor).attr("height", space_height*scaleFactor); + // Update scroll spacer to match scaled canvas size + // This ensures scrollable area = canvas area + // Browser calculates maxScroll = scrollWidth - viewport, which correctly + // allows scrolling to see the far edges of canvas without going beyond + $('#red-ui-workspace-scroll-spacer').css({ + width: (space_width * scaleFactor) + 'px', + height: (space_height * scaleFactor) + 'px' + }); + // Don't bother redrawing nodes if we're drawing links if (forceFullRedraw || showAllLinkPorts !== -1 || mouse_mode != RED.state.JOINING) { forceFullRedraw = false @@ -6980,8 +7811,7 @@ RED.view = (function() { }, selectNodes: function(options) { $("#red-ui-workspace-tabs-shade").show(); - $("#red-ui-palette-shade").show(); - $("#red-ui-sidebar-shade").show(); + $(".red-ui-sidebar-shade").show(); $("#red-ui-header-shade").show(); $("#red-ui-workspace").addClass("red-ui-workspace-select-mode"); @@ -7002,8 +7832,7 @@ RED.view = (function() { var closeNotification = function() { clearSelection(); $("#red-ui-workspace-tabs-shade").hide(); - $("#red-ui-palette-shade").hide(); - $("#red-ui-sidebar-shade").hide(); + $(".red-ui-sidebar-shade").hide(); $("#red-ui-header-shade").hide(); $("#red-ui-workspace").removeClass("red-ui-workspace-select-mode"); resetMouseVars(); @@ -7045,6 +7874,7 @@ RED.view = (function() { if (x !== undefined && y !== undefined) { chart.scrollLeft(chart.scrollLeft()+x); chart.scrollTop(chart.scrollTop()+y) + RED.events.emit("view:navigate"); } else { return [chart.scrollLeft(), chart.scrollTop()] } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js index 78e1399cd5..b0d653a0b8 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js @@ -497,17 +497,119 @@ RED.workspaces = (function() { $("#red-ui-workspace-footer").children().hide() } + const scrollbars = {} + function updateScrollbars() { + const scaleFactor = RED.view.scale(); + const chartWindowSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; + const chartSize = [ $("#red-ui-workspace-scroll-spacer").width(), $("#red-ui-workspace-scroll-spacer").height()]; + const scrollPos = [$("#red-ui-workspace-chart").scrollLeft(), $("#red-ui-workspace-chart").scrollTop()]; + const scrollRatio = [scrollPos[0]/(chartSize[0] - chartWindowSize[0]), scrollPos[1]/(chartSize[1] - chartWindowSize[1]) ]; + const scrollbarSize = [scrollbars.h.bar.width(), scrollbars.v.bar.height()] + // Set the height of the handles to be the same ratio of chartWindowSize to chartSize, with a minimum size to ensure they are always draggable + + scrollbars.v.handle.height(Math.max(40, scrollbarSize[1] * chartWindowSize[1] / chartSize[1])) + scrollbars.h.handle.width(Math.max(40, scrollbarSize[0] * chartWindowSize[0] / chartSize[0])) + if (isNaN(scrollRatio[0])) { + scrollbars.h.bar.hide() + } else { + scrollbars.h.bar.show() + const sbhWidth = scrollbars.h.bar.width() - scrollbars.h.handle.width() + scrollbars.h.handle.css({ left: sbhWidth * scrollRatio[0] }) + } + if (isNaN(scrollRatio[1])) { + scrollbars.v.bar.hide() + } else { + scrollbars.v.bar.show() + const sbvHeight = scrollbars.v.bar.height() - scrollbars.v.handle.height() + scrollbars.v.handle.css({ top: sbvHeight * scrollRatio[1] }) + } + } + + function setupScrollbar(scrollbar, direction) { + // direction: 'h' | 'v' + let isDragging = false; + let dragStartPos = 0; + let handleStartPos = 0; + function cancelScroll () { + isDragging = false; + $(document).off('mousemove.red-ui-workspace-scrollbar'); + $(document).off('mouseup.red-ui-workspace-scrollbar'); + } + // Update the following event handlers to also handle touch events + scrollbar.handle.on('mousedown', function(evt) { + isDragging = true; + dragStartPos = (direction === 'h' ? evt.pageX : evt.pageY); + handleStartPos = parseInt(scrollbar.handle.css(direction === 'h' ? 'left' : 'top')) || 0; + evt.preventDefault(); + $(document).on('mousemove.red-ui-workspace-scrollbar', function(evt) { + if (isDragging) { + const delta = (direction === 'h' ? evt.pageX : evt.pageY) - dragStartPos; + const newHandlePos = handleStartPos + delta; + const barSize = (direction === 'h' ? scrollbar.bar.width() : scrollbar.bar.height()) - (direction === 'h' ? scrollbar.handle.width() : scrollbar.handle.height()); + const clampedHandlePos = Math.max(0, Math.min(newHandlePos, barSize)); + const scrollRatio = clampedHandlePos / barSize; + const chartWindowSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; + const chartSize = [ $("#red-ui-workspace-scroll-spacer").width(), $("#red-ui-workspace-scroll-spacer").height()]; + if (direction === 'h') { + const newScrollLeft = scrollRatio * (chartSize[0] - chartWindowSize[0]); + $("#red-ui-workspace-chart").scrollLeft(newScrollLeft); + } else { + const newScrollTop = scrollRatio * (chartSize[1] - chartWindowSize[1]); + $("#red-ui-workspace-chart").scrollTop(newScrollTop); + } + updateScrollbars() + } else { + $(document).off('mousemove.red-ui-workspace-scrollbar'); + } + }) + $(document).on('mouseup.red-ui-workspace-scrollbar', function(evt) { + cancelScroll() + }) + }); + } + function init() { - $('
        ').appendTo("#red-ui-workspace"); - $('
        ').appendTo("#red-ui-workspace"); + $('
          ').appendTo("#red-ui-header-tabs"); + $('
          ').appendTo("#red-ui-header-tabs"); $('
          ').appendTo("#red-ui-workspace"); $('
          ').appendTo("#red-ui-workspace"); - $('').appendTo("#red-ui-workspace"); - $('
          ').appendTo("#red-ui-workspace"); + $('').insertAfter("#red-ui-workspace"); + scrollbars.v = { bar: $('
          ').appendTo("#red-ui-workspace") } + scrollbars.v.handle = scrollbars.v.bar.children().first(); + setupScrollbar(scrollbars.v, 'v') + scrollbars.h = { bar: $('
          ').appendTo("#red-ui-workspace") } + scrollbars.h.handle = scrollbars.h.bar.children().first(); + setupScrollbar(scrollbars.h, 'h') + + $('
          ').appendTo("#red-ui-workspace"); createWorkspaceTabs(); - RED.events.on("sidebar:resize",workspace_tabs.resize); + RED.events.on("view:navigate", function () { + updateScrollbars() + }) + RED.events.on("sidebar:resize",function () { + workspace_tabs.resize(); + let sidebarWidth = $("#red-ui-sidebar-container").width() + const workspaceTargetWidth = $("#red-ui-workspace").width() - sidebarWidth + // $("#red-ui-workspace-toolbar").width(workspaceTargetWidth) + // $("#red-ui-workspace-footer").width(workspaceTargetWidth) + $("#red-ui-workspace-scroll-v").css({ right: sidebarWidth + 2}) + $("#red-ui-workspace-scroll-h").css({ width: workspaceTargetWidth - 15 }) + + const paletteWidth = $("#red-ui-sidebar-left").width() + $("#red-ui-header-logo").width(paletteWidth - 5) + + // const workspacePosition = $("#red-ui-workspace").position() + // $("#red-ui-header-tabs").css({ left: workspacePosition.left, width: workspaceTargetWidth }) + updateScrollbars() + }); + + RED.events.on("workspace:change", function(event) { + setTimeout(() => { + updateScrollbars() + }, 100) + }); RED.events.on("workspace:clear", () => { // Reset the index used to generate new flow names @@ -534,7 +636,8 @@ RED.workspaces = (function() { }); $(window).on("resize", function() { - workspace_tabs.resize(); + // workspace_tabs.resize(); + updateScrollbars() }); if (RED.settings.theme("menu.menu-item-workspace-add", true)) { RED.actions.add("core:add-flow",function(opts) { addWorkspace(undefined,undefined,opts?opts.index:undefined)}); diff --git a/packages/node_modules/@node-red/editor-client/src/sass/base.scss b/packages/node_modules/@node-red/editor-client/src/sass/base.scss index afbafe049b..552c2d9ae1 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/base.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/base.scss @@ -17,8 +17,9 @@ **/ -body { +html, body { overflow: hidden; + touch-action: manipulation; } .red-ui-editor { @@ -29,6 +30,7 @@ body { background: var(--red-ui-primary-background); color: var(--red-ui-primary-text-color); line-height: 20px; + touch-action: manipulation; } #red-ui-editor { @@ -42,17 +44,14 @@ body { position: absolute; top: var(--red-ui-header-height); left:0; bottom: 0; right:0; overflow:hidden; + display: flex; + flex-direction: row; } -#red-ui-palette-shade, #red-ui-editor-shade, #red-ui-header-shade, #red-ui-sidebar-shade { +#red-ui-editor-shade, #red-ui-header-shade, .red-ui-sidebar-shade { @include mixins.shade; z-index: 5; } -#red-ui-sidebar-shade { - left: -8px; - top: -1px; - bottom: -1px; -} #red-ui-full-shade { @include mixins.shade; z-index: 15; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/colors.scss b/packages/node_modules/@node-red/editor-client/src/sass/colors.scss index 8e03b7f0d0..38af324262 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/colors.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/colors.scss @@ -137,12 +137,11 @@ $workspace-button-color-active: $secondary-text-color-active; $workspace-button-color-selected: $secondary-text-color-selected; $workspace-button-color-primary: #eee; -$workspace-button-background-primary: #AD1625; -$workspace-button-background-primary-hover: #6E0A1E; - +$workspace-button-background-primary: #bb0000; +$workspace-button-background-primary-hover: #920f0f; $workspace-button-color-focus-outline: $form-input-focus-color; -$shade-color: rgba(160,160,160,0.5); +$shade-color: rgba(0,0,0,0.05); $popover-background: #333; $popover-border: $popover-background; @@ -182,7 +181,7 @@ $diff-merge-header-color: #800080; $diff-merge-header-background: #e5f9ff; $diff-merge-header-border-color: #b2edff; -$menuBackground: $primary-background; +$menuBackground: $secondary-background; $menuDivider: $secondary-border-color; $menuColor: $primary-text-color; $menuActiveColor: $secondary-text-color-active; @@ -247,28 +246,34 @@ $link-unknown-color: #f00; $clipboard-textarea-background: #F3E7E7; +$header-background: $primary-background; +$header-button-border: $primary-border-color; +$header-button-background: $header-background; +$header-button-background-hover: #ddd; +$header-button-background-active: $workspace-button-background-active; +$header-accent: $primary-background; + +$header-menu-color: $primary-text-color; +$header-menu-color-disabled: $secondary-text-color-disabled; +$header-menu-heading-color:$primary-text-color; +$header-menu-sublabel-color: $secondary-text-color-active; +$header-menu-background: $menuBackground; +$header-menu-item-hover: $secondary-background-hover; +$header-menu-item-border-active: $secondary-background-hover; +$headerMenuItemDivider: $secondary-border-color; +$headerMenuCaret: $tertiary-text-color; + + $deploy-button-color: #eee; $deploy-button-color-active: #ccc; -$deploy-button-color-disabled: #999; -$deploy-button-background: #8C101C; -$deploy-button-background-hover: #6E0A1E; +$deploy-button-color-disabled: $secondary-text-color-disabled; +$deploy-button-border-color: $header-button-border; +$deploy-button-background: #bb0000; +$deploy-button-background-hover: #920f0f; $deploy-button-background-active: #4C0A17; -$deploy-button-background-disabled: #444; -$deploy-button-background-disabled-hover: #555; - - -$header-background: #000; -$header-button-background-active: #121212; -$header-accent: #C02020; -$header-menu-color: #eee; -$header-menu-color-disabled: #666; -$header-menu-heading-color: #fff; -$header-menu-sublabel-color: #aeaeae; -$header-menu-background: #121212; -$header-menu-item-hover: #323232; -$header-menu-item-border-active: #777677; -$headerMenuItemDivider: #464646; -$headerMenuCaret: #C7C7C7; +$deploy-button-background-disabled: #ddd; +$deploy-button-background-disabled-hover: #d3d3d3; + $vcCommitShaColor: #c38888; @@ -315,7 +320,7 @@ $spinner-color: #999; $tab-icon-color: #dedede; // Anonymous User Colors - +$user-profile-text-color: #eee; $user-profile-colors: ( 1: #822e81, 2: #955e42, diff --git a/packages/node_modules/@node-red/editor-client/src/sass/debug.scss b/packages/node_modules/@node-red/editor-client/src/sass/debug.scss index eb550c6f53..909ca3d36a 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/debug.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/debug.scss @@ -168,6 +168,12 @@ border-left-color: var(--red-ui-debug-message-border-error); border-right-color: var(--red-ui-debug-message-border-error); } + +.red-ui-debug-msg-paused { + border-left-color: var(--red-ui-debug-message-border-warning); + border-right-color: var(--red-ui-debug-message-border-warning); +} + .red-ui-debug-msg-object-entry { position: relative; padding-left: 15px; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss b/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss index f6a2d6fdec..87ab5518d1 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss @@ -14,6 +14,8 @@ * limitations under the License. **/ +@use "mixins"; + .red-ui-menu-dropdown { font-family: var(--red-ui-primary-font); font-size: var(--red-ui-primary-font-size); @@ -30,7 +32,8 @@ list-style: none; background: var(--red-ui-menuBackground); border: 1px solid var(--red-ui-secondary-border-color); - box-shadow: 0 5px 10px var(--red-ui-shadow); + border-radius: 4px; + box-shadow: -2px 2px 6px 2px var(--red-ui-shadow); &.pull-right { right: 0; @@ -163,7 +166,7 @@ position: relative; & > .red-ui-menu-dropdown { top: 0; - left: calc(100% - 5px); + left: calc(100%); margin-top: 0; margin-left: -1px; } @@ -187,8 +190,7 @@ &.pull-left { float: none; & > .red-ui-menu-dropdown { - left: -100%; - margin-left: 10px; + left: calc(-100% - 2px); } } } @@ -233,6 +235,25 @@ border-right-color: var(--red-ui-menuCaret); } +.red-ui-menu-dropdown-portaled { + @include mixins.menu-light-theme; + position: fixed; + z-index: 1001; + display: block; + margin: 0; + width: 260px !important; + + // The noicons padding rule (0-2-1) beats menu-light-theme (0-1-1), so restore + // the correct padding here where it comes later in source order (same specificity wins) + &.red-ui-menu-dropdown-noicons > li > a, + &.red-ui-menu-dropdown-noicons > li > a:focus { + padding: 3px 10px 3px 30px; + } +} + +.red-ui-menu-dropdown { + @include mixins.menu-scrollbar-light; +} // Menu NG ul.red-ui-menu:not(.red-ui-menu-dropdown) { diff --git a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss index 72c7110663..0e16b5df8e 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss @@ -28,20 +28,31 @@ } .red-ui-tray { position:absolute; - margin: 0; + margin: 8px 0 8px 7px; top: 0; - //min-width: 500px; + bottom: 34px; width: auto; right: -1000px; - bottom: 0; - background: var(--red-ui-secondary-background); - border-left: 1px solid var(--red-ui-secondary-border-color); - border-bottom: 1px solid var(--red-ui-primary-border-color); - box-sizing: content-box; + box-sizing: border-box; + // overflow: hidden; + display: flex; + flex-direction: row; } .red-ui-tray.open { right: 0; } +.red-ui-tray-wrapper { + position:relative; + flex-grow: 1; + height: 100%; + border-radius: 8px; + background: var(--red-ui-secondary-background); + border: 1px solid var(--red-ui-primary-border-color); + overflow: hidden; + // box-shadow: -2px 0 6px var(--red-ui-shadow); + +} + .red-ui-tray-body-wrapper { width: 100%; box-sizing: border-box; @@ -148,34 +159,11 @@ } } .red-ui-tray-resize-handle { - position: absolute; - top: 0px; - bottom: 0px; - width: 7px; - left: -9px; - background-color: var(--red-ui-primary-background); cursor: col-resize; - border-left: 1px solid var(--red-ui-primary-border-color); - box-shadow: -1px 0 6px var(--red-ui-shadow); - - &:before { - content: ''; - display: block; - width: 100%; - height: 100%; - -webkit-mask-image: url(images/grip.svg); - mask-image: url(images/grip.svg); - -webkit-mask-size: auto; - mask-size: auto; - -webkit-mask-position: 50% 50%; - mask-position: 50% 50%; - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: var(--red-ui-grip-color); - } - + width: 16px; + overflow: visible; &.red-ui-tray-resize-maximised { - background: var(--red-ui-primary-background); + display: none; cursor: default; } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/forms.scss b/packages/node_modules/@node-red/editor-client/src/sass/forms.scss index 3fa8bcc65d..04dc78e5bd 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/forms.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/forms.scss @@ -38,7 +38,6 @@ button, div[contenteditable="true"], input { - *overflow: visible; line-height: normal; } @@ -452,7 +451,6 @@ .input-prepend .uneditable-input { position: relative; margin-bottom: 0; - *margin-left: 0; vertical-align: top; border-radius: 0 4px 4px 0; } @@ -612,10 +610,8 @@ .form-inline .input-append, .form-horizontal .input-append { display: inline-block; - *display: inline; margin-bottom: 0; vertical-align: middle; - *zoom: 1; } .form-search .hide, @@ -667,7 +663,6 @@ .form-horizontal .control-group { margin-bottom: 20px; - *zoom: 1; } .form-horizontal .control-group:before, @@ -689,14 +684,7 @@ } .form-horizontal .controls { - *display: inline-block; - *padding-left: 20px; margin-left: 180px; - *margin-left: 0; - } - - .form-horizontal .controls:first-child { - *padding-left: 180px; } .form-horizontal .help-block { diff --git a/packages/node_modules/@node-red/editor-client/src/sass/header.scss b/packages/node_modules/@node-red/editor-client/src/sass/header.scss index ed8de31657..1aff99a9b4 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/header.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/header.scss @@ -28,31 +28,33 @@ height: var(--red-ui-header-height); background: var(--red-ui-header-background); box-sizing: border-box; - padding: 0px 0px 0px 20px; + padding: 0px; color: var(--red-ui-header-menu-color); font-size: 14px; display: flex; justify-content: space-between; align-items: center; - border-bottom: 2px solid var(--red-ui-header-accent); - padding-top: 2px; + #red-ui-header-logo { + flex: 0 0 auto; + display: flex; + align-items: center; + margin-left: 8px; + min-width: 170px; + } span.red-ui-header-logo { - float: left; - font-size: 30px; - line-height: 30px; text-decoration: none; white-space: nowrap; span { vertical-align: middle; - font-size: 16px !important; + font-size: 14px !important; &:not(:first-child) { margin-left: 8px; } } img { - height: 32px; + height: 26px; } a { @@ -65,12 +67,15 @@ } .red-ui-header-toolbar { - display: flex; + flex: 1 0 auto; + &:not(.hide) { + display: flex; + } align-items: stretch; padding: 0; - margin: 0; + margin: 0 10px 0 20px; list-style: none; - float: right; + gap: 10px; > li { display: inline-flex; @@ -82,41 +87,36 @@ } .button { - height: 100%; + height: 30px; display: inline-flex; align-items: center; justify-content: center; - min-width: 20px; + min-width: 32px; text-align: center; - font-size: 20px; - padding: 0px 12px; + font-size: 16px; + padding: 0px; text-decoration: none; color: var(--red-ui-header-menu-color); - margin: auto 5px; vertical-align: middle; - border-left: 2px solid var(--red-ui-header-background); - border-right: 2px solid var(--red-ui-header-background); + mask-size: contain; + border-radius: 4px; + box-sizing: border-box; - &:hover { - border-color: var(--red-ui-header-menu-item-hover); - } &:active, &.active { background: var(--red-ui-header-button-background-active); } - &:focus { - outline: none; - } + &:hover { + background: var(--red-ui-header-button-background-hover); + } } .button-group { display: inline-block; - margin: auto 15px; vertical-align: middle; clear: both; & > a { display: inline-block; position: relative; - float: left; line-height: 22px; font-size: 14px; text-decoration: none; @@ -128,7 +128,7 @@ .red-ui-deploy-button { background: var(--red-ui-deploy-button-background); color: var(--red-ui-deploy-button-color); - + border: 1px solid var(--red-ui-deploy-button-border-color); &:hover { background: var(--red-ui-deploy-button-background-hover); } @@ -156,18 +156,28 @@ } #red-ui-header-button-deploy { - padding: 4px 12px; + padding: 3px 8px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-right: none; + border-color: var(--red-ui-deploy-button-background); + &:last-child { + border-right: 1px solid var(--red-ui-deploy-button-border-color); + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } &.disabled { cursor: default; background: var(--red-ui-deploy-button-background-disabled); color: var(--red-ui-deploy-button-color-disabled); - + border-color: var(--red-ui-deploy-button-border-color); .red-ui-deploy-button-content>img { - opacity: 0.3; + opacity: 0.7; } &+ #red-ui-header-button-deploy-options { background: var(--red-ui-deploy-button-background-disabled); color: var(--red-ui-deploy-button-color-active); + border-color: var(--red-ui-deploy-button-border-color); } &+ #red-ui-header-button-deploy-options:hover { background: var(--red-ui-deploy-button-background-disabled-hover); @@ -176,9 +186,17 @@ background: var(--red-ui-deploy-button-background-disabled); } } + &+ #red-ui-header-button-deploy-options { + padding: 3px 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-color: var(--red-ui-deploy-button-background); + border-left: none; + } .red-ui-deploy-button-content>img { margin-right: 8px; + height: 16px; } } @@ -212,7 +230,7 @@ background: var(--red-ui-header-menu-background); border: 1px solid var(--red-ui-header-menu-background); width: 260px !important; - margin-top: 0; + margin-top: 5px; li a { color: var(--red-ui-header-menu-color); padding: 3px 10px 3px 30px; @@ -264,7 +282,9 @@ > li.disabled > a:focus { background: none !important; } + } + .red-ui-menu-dropdown-submenu>a:before { border-right-color: var(--red-ui-headerMenuCaret); margin-left: -25px !important; @@ -272,7 +292,7 @@ /* Deploy menu customisations */ ul#red-ui-header-button-deploy-options-submenu { - width: 300px !important; + width: 312px !important; li a { padding: 10px 30px; color: var(--red-ui-header-menu-heading-color); @@ -292,13 +312,15 @@ } } +#red-ui-header-button-user { + background-color: var(--red-ui-header-background); + border: 1px solid var(--red-ui-header-button-border); + border-radius: 4px; +} .red-ui-user-profile { - background-color: var(--red-ui-header-background); - border: 2px solid var(--red-ui-header-menu-color); - border-radius: 30px; overflow: hidden; - + padding: 3px; background-position: center center; background-repeat: no-repeat; background-size: contain; @@ -306,23 +328,28 @@ justify-content: center; align-items: center; vertical-align: middle; - width: 30px; - height: 30px; - font-size: 20px; + width: 22px; + height: 22px; + font-size: 14px; &.red-ui-user-profile-color-1 { + color: var(--red-ui-user-profile-text-color); background-color: var(--red-ui-user-profile-colors-1); } &.red-ui-user-profile-color-2 { + color: var(--red-ui-user-profile-text-color); background-color: var(--red-ui-user-profile-colors-2); } &.red-ui-user-profile-color-3 { + color: var(--red-ui-user-profile-text-color); background-color: var(--red-ui-user-profile-colors-3); } &.red-ui-user-profile-color-4 { + color: var(--red-ui-user-profile-text-color); background-color: var(--red-ui-user-profile-colors-4); } &.red-ui-user-profile-color-5 { + color: var(--red-ui-user-profile-text-color); background-color: var(--red-ui-user-profile-colors-5); } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss b/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss index ca3651c61b..5ae22586e1 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss @@ -53,7 +53,7 @@ } .ui-dialog { - border-radius: 1px; + border-radius: 6px; background: var(--red-ui-secondary-background); padding: 0; @include mixins.component-shadow; @@ -69,14 +69,19 @@ background: var(--red-ui-primary-background); border: none; border-bottom: 1px solid var(--red-ui-primary-border-color); - border-radius: 0; + border-top-left-radius: 6px; + border-top-right-radius: 6px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; } .ui-dialog .ui-dialog-buttonpane.ui-widget-content { background: var(--red-ui-tertiary-background); + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; } .ui-corner-all { - border-radius: 1px; + border-radius: 6px; } .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { background: var(--red-ui-primary-background); diff --git a/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss b/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss index 486396c595..9f369992f4 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss @@ -70,6 +70,7 @@ text-align: center; margin:0; cursor:pointer; + border-radius: 3px; &.selected:not(.disabled):not(:disabled) { color: var(--red-ui-workspace-button-color-selected) !important; @@ -139,7 +140,7 @@ vertical-align: middle; } .button-group:not(:last-child) { - margin-right: 10px; + margin-right: 4px; } @@ -245,3 +246,131 @@ .red-ui-shade { @include shade } + +// Light theme menu styles (for context menus and portaled light-theme submenus) +@mixin menu-light-theme { + font-family: var(--red-ui-primary-font); + font-size: var(--red-ui-primary-font-size); + padding: 5px 0; + list-style: none; + background: var(--red-ui-menuBackground); + border: 1px solid var(--red-ui-secondary-border-color); + box-shadow: -2px 2px 6px 2px var(--red-ui-shadow); + + > li > a, + > li > a:focus { + display: block; + padding: 3px 10px 3px 30px; + clear: both; + font-weight: normal; + line-height: 20px; + color: var(--red-ui-menuColor); + text-decoration: none; + outline: none; + + img { + max-width: 100%; + margin-right: 10px; + padding: 4px; + border: 3px solid transparent; + } + &.active img { + border: 3px solid var(--red-ui-header-menu-item-border-active); + } + span.red-ui-menu-label-container { + width: 180px; + vertical-align: top; + display: inline-block; + text-indent: 0px; + } + span.red-ui-menu-label { + font-size: 14px; + text-indent: 0px; + } + span.red-ui-menu-sublabel { + color: var(--red-ui-header-menu-sublabel-color); + font-size: 13px; + display: block; + text-indent: 0px; + } + } + + > li > a:hover, + > li.open > a, + > li > a:focus, + > li:hover > a, + > li:focus > a { + color: var(--red-ui-menuHoverColor); + background-color: var(--red-ui-menuHoverBackground); + text-decoration: none; + } + + > li.disabled > a, + > li.disabled > a:hover, + > li.disabled > a:focus { + color: var(--red-ui-menuDisabledColor); + background-color: transparent; + text-decoration: none; + cursor: default; + } + + .red-ui-popover-key { + border: none; + padding: 0; + font-size: 13px; + color: var(--red-ui-header-menu-color-disabled) !important; + border-color: var(--red-ui-header-menu-color-disabled) !important; + } + + + > li.disabled .red-ui-popover-key { + color: var(--red-ui-menuDisabledColor); + border-color: var(--red-ui-menuDisabledColor); + } + + + .red-ui-menu-divider { + height: 1px; + margin: 9px 1px; + overflow: hidden; + background-color: var(--red-ui-menuDivider); + } + + + a .fa { + float: left; + width: 20px; + margin-left: -25px; + margin-top: 3px; + text-align: center; + } + + + .red-ui-menu-label { + display: flex; + > :first-child { + flex-grow: 1; + } + } +} + +@mixin menu-scrollbar-light { + &::-webkit-scrollbar { + width: 8px; + } + &::-webkit-scrollbar-track { + background: var(--red-ui-menuBackground); + } + &::-webkit-scrollbar-thumb { + background: var(--red-ui-secondary-border-color); + border-radius: 4px; + } + &::-webkit-scrollbar-thumb:hover { + background: var(--red-ui-menuHoverBackground); + } + // Firefox scrollbar styling + scrollbar-width: thin; + scrollbar-color: var(--red-ui-secondary-border-color) var(--red-ui-menuBackground); +} + + diff --git a/packages/node_modules/@node-red/editor-client/src/sass/multiplayer.scss b/packages/node_modules/@node-red/editor-client/src/sass/multiplayer.scss index 4aaab86b14..ce5431cf08 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/multiplayer.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/multiplayer.scss @@ -52,7 +52,7 @@ } $multiplayer-user-icon-background: var(--red-ui-primary-background); $multiplayer-user-icon-border: var(--red-ui-view-background); -$multiplayer-user-icon-text-color: var(--red-ui-header-menu-color); +$multiplayer-user-icon-text-color: var(--red-ui-user-profile-text-color); $multiplayer-user-icon-count-text-color: var(--red-ui-primary-color); $multiplayer-user-icon-shadow: 0px 0px 4px var(--red-ui-shadow); .red-ui-multiplayer-user-location { diff --git a/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss b/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss index c0e87b7ba3..4903cff3d4 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss @@ -20,13 +20,14 @@ margin-left: -250px; left: 50%; position: absolute; - top: 1px; + top: 5px; } .red-ui-notification { box-sizing: border-box; position: relative; padding: 8px 18px 0px; margin-bottom: 4px; + border-radius: 4px; box-shadow: 0 1px 1px 1px var(--red-ui-shadow); background-color: var(--red-ui-secondary-background); color: var(--red-ui-primary-text-color); diff --git a/packages/node_modules/@node-red/editor-client/src/sass/palette.scss b/packages/node_modules/@node-red/editor-client/src/sass/palette.scss index 507869690b..864f6225ec 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/palette.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/palette.scss @@ -18,54 +18,42 @@ #red-ui-palette{ - position: absolute; - top: 0px; - bottom: 0px; - left:0px; + // position: absolute; + // top: 0px; + // bottom: 0px; + // left:0px; background: var(--red-ui-primary-background); - width: 180px; + // width: 180px; text-align: center; @include mixins.disable-selection; - @include mixins.component-border; transition: width 0.2s ease-in-out; - &:before { - content: ''; - top: 0px; - bottom: 0px; - right: 0px; - width: 7px; - height: 100%; - z-index: 4; - position: absolute; - -webkit-mask-image: url(images/grip.svg); - mask-image: url(images/grip.svg); - -webkit-mask-size: auto; - mask-size: auto; - -webkit-mask-position: 50% 50%; - mask-position: 50% 50%; - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: var(--red-ui-grip-color); - } -} - -.red-ui-palette-closed { - #red-ui-palette { - width: 8px; - .red-ui-component-footer { - display: none; - } - } - #red-ui-palette-search { display: none; } - #red-ui-palette-container { display: none; } + // &:before { + // content: ''; + // top: 0px; + // bottom: 0px; + // right: 0px; + // width: 7px; + // height: 100%; + // z-index: 4; + // position: absolute; + // -webkit-mask-image: url(images/grip.svg); + // mask-image: url(images/grip.svg); + // -webkit-mask-size: auto; + // mask-size: auto; + // -webkit-mask-position: 50% 50%; + // mask-position: 50% 50%; + // -webkit-mask-repeat: no-repeat; + // mask-repeat: no-repeat; + // background-color: var(--red-ui-grip-color); + // } } .red-ui-palette-scroll { position: absolute; top: 35px; right: 0; - bottom: 25px; + bottom: 0; left:0; padding: 0; overflow-y: auto; @@ -91,6 +79,11 @@ .red-ui-palette-content { background: var(--red-ui-palette-content-background); padding: 3px; + > div { + display: flex; + flex-direction: column; + align-items: center; + } } .red-ui-palette-header { @@ -99,9 +92,10 @@ color: var(--red-ui-palette-header-color); cursor: pointer; text-align: left; - padding: 9px; + padding: 3px; + font-size: 0.9em; font-weight: bold; - padding-left: 30px; + padding-left: 20px; overflow: hidden; user-select: none; &:hover { @@ -110,8 +104,8 @@ } .red-ui-palette-header > i { position: absolute; - left: 11px; - top: 12px; + left: 6px; + top: 6px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -144,7 +138,7 @@ // display: inline-block; cursor: move; background: var(--red-ui-secondary-background); - margin: 10px auto; + margin: 5px auto; height: 25px; border-radius: 5px; border: 1px solid var(--red-ui-node-border); @@ -153,7 +147,7 @@ width: 120px; background-size: contain; position: relative; - z-index: 4; + z-index: 5; &:not(.red-ui-palette-node-config):not(.red-ui-palette-node-small):first-child { margin-top: 15px; } @@ -269,7 +263,6 @@ width: 24px; height: 20px; line-height: 20px; - margin-top: 1px; // width: 30px; // height: 25px; border-radius: 3px; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/panels.scss b/packages/node_modules/@node-red/editor-client/src/sass/panels.scss index c782b341b8..b28b95baa2 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/panels.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/panels.scss @@ -42,7 +42,22 @@ cursor: ns-resize; background-color: var(--red-ui-primary-background); - &:before { + &.red-ui-panels-separator-invisible { + border: none; + height: 0px; + position: relative; + overflow: visible; + + .red-ui-panels-separator-handle { + position: absolute; + // background: rgba(255,140,0,0.2); + top: -6px; + left: 0; + width: 100%; + height: 12px; + } + } + &:not(.red-ui-panels-separator-invisible):before { content: ''; display: block; width: 100%; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/search.scss b/packages/node_modules/@node-red/editor-client/src/sass/search.scss index 726c13714a..1ff74a45e0 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/search.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/search.scss @@ -21,11 +21,15 @@ width: 500px; left: 50%; margin-left: -250px; - top: 0px; + top: 5px; + overflow: hidden; border: 1px solid var(--red-ui-primary-border-color); box-shadow: 0 0 10px var(--red-ui-shadow); background: var(--red-ui-secondary-background); - + border-radius: 6px; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; + .red-ui-searchBox-container { display: inline-block; margin-right: 6px; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss index 47c8dbc131..29ef014752 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss @@ -16,65 +16,225 @@ * limitations under the License. **/ -#red-ui-sidebar { + #red-ui-sidebar-container { position: absolute; - top: 0px; - right: 0px; - bottom: 0px; + top: 0; + bottom: 0; + right: 0; + display: flex; + flex-direction: row; + } +.red-ui-sidebar { + position: relative; + flex-grow: 0; + flex-shrink: 0; width: 315px; - background: var(--red-ui-primary-background); + margin: 4px 0 40px 0; box-sizing: border-box; + z-index: 12; + display: flex; + flex-direction: column; + overflow: hidden; +} +.red-ui-sidebar-left { + background: var(--red-ui-primary-background); + margin-top: 0px; + margin-left: 5px; + border: none; z-index: 10; - @include mixins.component-border; +} +.red-ui-sidebar-right { + margin-right: 5px; } -#red-ui-sidebar.closing { - border-style: dashed; +.red-ui-sidebar-footer { + @include mixins.component-footer; + border-top-color: var(--red-ui-secondary-border-color); + position: relative; + flex-grow: 0; + flex-shrink: 0; } -#red-ui-sidebar-content { - position: absolute; +.red-ui-sidebar-section { + margin: 8px 4px 0 4px; + display: flex; + flex-direction: column; + min-height: 80px; + // background: rgba(0,0,255,0.2); + flex-grow: 0; + flex-shrink: 0; + border-radius: 6px; + border: 1px solid var(--red-ui-primary-border-color); + overflow: hidden; + &.red-ui-sidebar-section-top { margin-top: 4px; } + &.red-ui-sidebar-section-bottom { + &:first-child { + margin-top: 4px; + } + flex-grow: 1; + flex-shrink: 1; + } +} +.red-ui-sidebar-left .red-ui-sidebar-section { + margin-left: 0; + &.red-ui-sidebar-section-top { margin-top: 0; } +} +.red-ui-sidebar-right .red-ui-sidebar-section { + margin-right: 0; +} + + +.red-ui-sidebar-content-wrapper { + display: flex; + flex-direction: column; + height: 100%; + flex-grow: 1; + flex-shrink: 0; +} +.red-ui-sidebar-content { + position: relative; background: var(--red-ui-secondary-background); - top: 35px; - right: 0; - bottom: 25px; - left: 0px; + flex-grow: 1; overflow-y: auto; } -#red-ui-sidebar-separator { - position: absolute; - top: 5px; - right: 315px; - bottom:10px; - width: 7px; +.red-ui-sidebar-separator { + width: 0; + flex: 0 0 auto; // z-index: 11; - background-color: var(--red-ui-primary-background); + background-color: var(--red-ui-view-background); + overflow: visible; cursor: col-resize; - &:before { - content: ''; - display: block; + .red-ui-sidebar-separator-handle { + position: absolute; + top: 0; + left: -6px; + width: 12px; + height: calc(100% - 40px);; + z-index: 20; + } +} + +.red-ui-sidebar-tab-bar-separator { + height: 0; + flex: 0 0 auto; + overflow: visible; + cursor: row-resize; + position: relative; + + .red-ui-sidebar-separator-handle { + position: absolute; + // background: rgba(255,140,0,0.2); + top: -6px; + left: 0; + height: 12px; width: 100%; - height: 100%; - -webkit-mask-image: url(images/grip.svg); - mask-image: url(images/grip.svg); - -webkit-mask-size: auto; - mask-size: auto; - -webkit-mask-position: 50% 50%; - mask-position: 50% 50%; - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: var(--red-ui-grip-color); + z-index: 20; + } +} + +.red-ui-sidebar-tab-bar { + display: flex; + flex-direction: row; + flex: 0 0 auto; + align-items: center; + flex-wrap: nowrap; + margin: 0; + z-index: 12; + overflow: hidden; + // background: rgba(243, 160, 204, 0.617); + + &.red-ui-sidebar-left { + z-index: 10; + margin-left: 5px; + background: none; + } + &.red-ui-sidebar-right { + border-bottom: none; + justify-content: flex-end; + } + + button { + @include mixins.workspace-button; + display: flex; + flex-grow: 0; + flex-shrink: 0; + align-items: center; + justify-content: center; + padding: 0; + height: 28px; + width: 28px; + &:not(.selected):not(:hover) { + i { + opacity: 1; + } + } + i { + font-size: 13px; + } + border-color: var(--red-ui-secondary-border-color); + &.selected { + background-color: var(--red-ui-secondary-color); + border-color: var(--red-ui-primary-border-color); + } } + .red-ui-sidebar-tab-bar-button-placeholder { + border: 1px dashed var(--red-ui-form-input-border-color) !important; + } + + .red-ui-sidebar-tab-bar-buttons { + display: flex; + // background-color: var(--red-ui-primary-background); + // background: rgba(233, 255, 91, 0.555); + + height: 28px; + padding: 0 6px; + box-sizing: border-box; + flex-direction: row; + align-items: center; + gap: 8px; + flex-grow: 0; + // height: 50%; + // &:first-child { + // // background: rgba(255,0,0,0.1); + // flex-grow: 0; + // flex-shrink: 0; + // } + // &:last-child { + // // background: rgba(255,255,0,0.1); + // flex-grow: 1; + // flex-shrink: 1; + // } + } + .red-ui-sidebar-tab-bar-buttons.red-ui-sidebar-tab-bar-empty { + display: none; + // background: rgba(255,0,0,0.3); + } + &.red-ui-sidebar-dragging-tab .red-ui-sidebar-tab-bar-empty { + display: flex; + } + &.red-ui-sidebar-dragging-tab .red-ui-sidebar-tab-bar-buttons:last-child { + border-left: 2px dashed var(--red-ui-secondary-border-color); + // margin-left: -2px; + width: 42px; + height: 28px; + } + .red-ui-sidebar-tab-bar-buttons:last-child { + min-width: 28px; + border-left: 2px solid var(--red-ui-secondary-border-color); + } + .red-ui-sidebar-right & { + justify-items: flex-end; + } +} + +.red-ui-sidebar-right .red-ui-sidebar-tab-bar-buttons:first-child { + padding-left: 20px; } -.red-ui-sidebar-closed > #red-ui-sidebar { display: none; } -.red-ui-sidebar-closed > #red-ui-sidebar-separator { right: 0px !important; } -.red-ui-sidebar-closed > #red-ui-workspace { right: 7px !important; } -.red-ui-sidebar-closed > #red-ui-editor-stack { right: 8px !important; } -#red-ui-sidebar .button { +.red-ui-sidebar .button { @include mixins.workspace-button; line-height: 18px; font-size: 12px; @@ -82,14 +242,27 @@ padding: 2px 8px; } +.red-ui-sidebar-banner { /* Currently unused... */ + background: var(--red-ui-primary-background); + color: var(--red-ui-primary-text-color); + font-size: 8px; + padding: 0 3px; + text-align: right; + user-select: none; + cursor: grab; +} .sidebar-header, /* Deprecated -> red-ui-sidebar-header */ .red-ui-sidebar-header { + font-size: 13px; color: var(--red-ui-primary-text-color); - text-align: right; - padding: 8px 10px; + padding: 4px; background: var(--red-ui-primary-background); border-bottom: 1px solid var(--red-ui-secondary-border-color); white-space: nowrap; + display: flex; + justify-content: end; + align-items: center; + gap: 6px; } /* Deprecated -> red-ui-footer-button */ @@ -106,9 +279,9 @@ button.sidebar-header-button, /* Deprecated -> red-ui-sidebar-header-button */ a.red-ui-sidebar-header-button, button.red-ui-sidebar-header-button { @include mixins.workspace-button; - font-size: 13px; - line-height: 13px; - padding: 5px 8px; + font-size: 11px; + line-height: 11px; + padding: 3px 5px; &.toggle { @include mixins.workspace-button-toggle; } @@ -119,9 +292,9 @@ button.sidebar-header-button-toggle, /* Deprecated -> red-ui-sidebar-header-butt a.red-ui-sidebar-header-button-toggle, button.red-ui-sidebar-header-button-toggle { @include mixins.workspace-button-toggle; - font-size: 13px; - line-height: 13px; - padding: 5px 8px; + font-size: 11px; + line-height: 11px; + padding: 3px 5px; } .sidebar-header-button:not(:first-child), /* Deprecated -> red-ui-sidebar-header-button */ @@ -129,34 +302,20 @@ button.red-ui-sidebar-header-button-toggle { border-left: none; } -.red-ui-sidebar-shade { - @include mixins.shade; -} - - -@mixin red-ui-sidebar-control { - display: none; - position: absolute; - top: calc(50% - 26px); - - padding:15px 8px; - border:1px solid var(--red-ui-primary-border-color); - background:var(--red-ui-primary-background); - color: var(--red-ui-secondary-text-color); - text-align: center; - cursor: pointer; -} - -.red-ui-sidebar-control-right { - @include red-ui-sidebar-control; - right: calc(100%); - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; - z-index: 13; -} -.red-ui-sidebar-control-left { - @include red-ui-sidebar-control; - left: calc(100%); - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; -} +i.red-ui-sidebar-tab-icon { + display: inline-block; + // margin-left: -8px; + // margin-right: 3px; + // margin-top: -2px; + opacity: 1; + width: 14px; + height: 14px; + vertical-align: middle; + -webkit-mask-size: contain; + mask-size: contain; + -webkit-mask-position: center; + mask-position: center; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + background-color: var(--red-ui-workspace-button-color); +} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss b/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss index a3d48e76d5..449819d453 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss @@ -14,4 +14,4 @@ * limitations under the License. **/ - $header-height: 48px; \ No newline at end of file + $header-height: 40px; \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss index 732d4dfe88..8cbf8b0d3d 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss @@ -23,27 +23,17 @@ .red-ui-sidebar-info hr { margin: 10px 0; } -.red-ui-info-header { - padding-left: 9px; - line-height: 21px; - cursor: default; - border-bottom: 1px solid var(--red-ui-secondary-border-color); - > * { - vertical-align: middle - } - > span { - display: inline-block; - margin-left: 5px; - overflow-wrap: anywhere; - } -} + table.red-ui-info-table { - font-size: 14px; + font-size: 13px; margin: 0 0 10px; width: 100%; } table.red-ui-info-table tr:not(.blank) { - border-top: 1px solid var(--red-ui-secondary-border-color); + &:not(:first-child) { + border-top: 1px solid var(--red-ui-secondary-border-color); + } + line-height: 23px; border-bottom: 1px solid var(--red-ui-secondary-border-color); } .red-ui-help-property-expand { @@ -360,7 +350,7 @@ div.red-ui-info-table { .red-ui-info-outline-item { display: inline-flex; padding: 0; - font-size: 13px; + font-size: 12px; border: none; &:not(.red-ui-node-list-item) .red-ui-palette-icon-fa { position: relative; @@ -423,7 +413,7 @@ div.red-ui-info-table { .red-ui-info-outline-item-control-spacer { display: inline-block; - width: 23px; + width: 18px; } .red-ui-info-outline-gutter { display:none; @@ -442,21 +432,18 @@ div.red-ui-info-table { right: 1px; padding: 1px 2px 0 1px; text-align: right; - background: var(--red-ui-list-item-background); - - .red-ui-treeList-label:hover & { - background: var(--red-ui-list-item-background-hover); - } - .red-ui-treeList-label.focus & { - background: var(--red-ui-list-item-background-hover); - } - .red-ui-treeList-label.selected & { - background: var(--red-ui-list-item-background-selected); - } - + &.red-ui-info-outline-item-hover-controls button { - min-width: 23px; + margin: 0; + padding: 0 2px; + min-width: 18px; + height: 18px; + border-radius: 4px; + line-height: 0; + i { + font-size: 8px; + } } .red-ui-treeList-label:not(:hover) &.red-ui-info-outline-item-hover-controls { @@ -580,6 +567,7 @@ div.red-ui-info-table { top: 6px; right: 8px; width: calc(100% - 130px); + min-width: 150px; max-width: 250px; background: var(--red-ui-palette-header-background); } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss b/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss index 2131971a22..0b0785965e 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss @@ -48,10 +48,7 @@ li { box-sizing: border-box; display: inline-block; - border-left: 1px solid var(--red-ui-primary-border-color); - border-top: 1px solid var(--red-ui-primary-border-color); - border-right: 1px solid var(--red-ui-primary-border-color); - border-bottom: 1px solid var(--red-ui-primary-border-color); + border: 1px solid var(--red-ui-primary-border-color); background: var(--red-ui-tab-background-inactive); margin: 3px 3px 0 3px; height: 32px; @@ -206,6 +203,7 @@ display: block; margin: 0; border: none; + border-radius: 0; border-right: 1px solid var(--red-ui-primary-border-color); height: auto; &:not(:first-child) { @@ -232,7 +230,6 @@ left: 0; right: 0; opacity: 0.4; - background: red; } } .red-ui-tab-button { @@ -286,9 +283,8 @@ width: 21px; top: 0; a { - height: 35px; + // height: 35px; width: 21px; - display: block; color: var(--red-ui-workspace-button-color); font-size: 22px; text-align: center; @@ -297,7 +293,6 @@ border-right: none; border-top: none; border-bottom: 1px solid var(--red-ui-primary-border-color); - line-height: 34px; } } .red-ui-tab-scroll-left { @@ -436,3 +431,127 @@ i.red-ui-tab-icon { opacity: 1; } } + +#red-ui-header-tabs { + flex: 1 1 100%; + border-right: 1px solid var(--red-ui-secondary-border-color); + padding-right: 5px; + + .red-ui-tabs { + background: var(--red-ui-header-background); + border: none; + display: flex; + padding: 0; + .red-ui-tabs-scroll-container { + min-width:0; + width: 0; + flex: 1 1 0; + } + .red-ui-tab-button { + position: static; + background: var(--red-ui-header-background); + border: var(--red-ui-header-button-border); + a { + background: var(--red-ui-header-background); + border: var(--red-ui-header-button-border); + &:hover { + background: var(--red-ui-header-button-background-hover); + } + } + } + .red-ui-tab-button.red-ui-tab-scroll { + background: none; + border: none; + z-index:10; + border-radius: 0; + } + .red-ui-tab-button.red-ui-tab-scroll a { + border: none; + background: none; + border-radius: 0; + box-shadow: 0 0 8px rgba(0,0,0,0.3); + height: 100%; + display: flex; + align-items: center; + justify-content: center; + } + .red-ui-tab-button.red-ui-tab-scroll.red-ui-tab-scroll-left a { + border: none; + clip-path: inset(0 -8px 0 0); + } + .red-ui-tab-button.red-ui-tab-scroll.red-ui-tab-scroll-right a { + border: none; + clip-path: inset(0 0 0 -8px); + } + } + ul { + display: flex; + align-items: center; + border: none; + gap: 2px; + + li { + min-width: 60px; + max-width: 150px; + flex: 1 1 100%; + border-color: transparent; + margin: 0; + background: transparent; + + a.red-ui-tab-label { + padding: 0 6px; + text-align: center; + width: auto; + + i.red-ui-tab-icon:not(.fa) { + margin-left: 0; + } + } + + &:not(.active) .red-ui-tabs-fade { + display: none; + } + + &:not(.active) { + border-radius: 0; + } + + &:not(:first-child):not(.active) { + box-shadow: -1px 0 0 rgba(0,0,0,0.15); + } + + &:not(:first-child):not(.active):hover, + &.active + li:not(:first-child), + &:hover + li:not(:first-child):not(.active) { + box-shadow: none; + } + + &.active { + background: var(--red-ui-secondary-background); + box-shadow: 0 1px 4px rgba(0,0,0,0.15); + border-color: var(--red-ui-primary-border-color); + border-radius: 4px; + } + + &:not(.active):hover::after { + content: ''; + position: absolute; + inset: 0 0 0 1px; + background: rgba(0,0,0,0.06); + border-radius: 4px; + pointer-events: none; + } + + &:not(.active) a:hover { + background: transparent; + } + } + } +} +#red-ui-header-tabs > .red-ui-tabs > .red-ui-tab-button { + border-color: var(--red-ui-header-button-border); +} +#red-ui-header-tabs > .red-ui-tabs > .red-ui-tab-scroll a { + border-color: var(--red-ui-header-button-border); +} + diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss index 4b8873feeb..00b79b54a7 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss @@ -21,7 +21,6 @@ padding: 2px 16px 2px 4px; font-size: 0.9em; } - overflow-x: hidden; } .red-ui-editableList-container { padding: 5px; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/variables.scss b/packages/node_modules/@node-red/editor-client/src/sass/variables.scss index 9f34d8fde9..4e9459add1 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/variables.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/variables.scss @@ -239,6 +239,7 @@ --red-ui-deploy-button-color: #{colors.$deploy-button-color}; --red-ui-deploy-button-color-active: #{colors.$deploy-button-color-active}; --red-ui-deploy-button-color-disabled: #{colors.$deploy-button-color-disabled}; + --red-ui-deploy-button-border-color: #{colors.$deploy-button-border-color}; --red-ui-deploy-button-background: #{colors.$deploy-button-background}; --red-ui-deploy-button-background-hover: #{colors.$deploy-button-background-hover}; --red-ui-deploy-button-background-active: #{colors.$deploy-button-background-active}; @@ -248,7 +249,11 @@ --red-ui-header-background: #{colors.$header-background}; --red-ui-header-accent: #{colors.$header-accent}; + --red-ui-header-button-background: #{colors.$header-background}; + --red-ui-header-button-background-hover: #{colors.$header-button-background-hover}; --red-ui-header-button-background-active: #{colors.$header-button-background-active}; + + --red-ui-header-button-border: #{colors.$header-button-border}; --red-ui-header-menu-color: #{colors.$header-menu-color}; --red-ui-header-menu-color-disabled: #{colors.$header-menu-color-disabled}; --red-ui-header-menu-heading-color: #{colors.$header-menu-heading-color}; @@ -306,4 +311,5 @@ @each $current-color in 1 2 3 4 5 { --red-ui-user-profile-colors-#{"" + $current-color}: #{map.get(colors.$user-profile-colors, $current-color)}; } + --red-ui-user-profile-text-color: #{colors.$user-profile-text-color}; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss b/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss index 95b8b4b458..f350ca2aaf 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss @@ -17,26 +17,48 @@ **/ #red-ui-workspace { - position: absolute; margin: 0; - top:0px; - left:179px; - bottom: 0px; - right: 322px; overflow: hidden; @include mixins.component-border; + border-top-left-radius: 6px; + border-right: none; + border-bottom: none; transition: left 0.1s ease-in-out; + position: relative; + flex-grow: 1; + .red-ui-workspace-toolbar-active { + top: 40px; + } } #red-ui-workspace-chart { - overflow: auto; - position: absolute; - bottom:26px; - top: 35px; - left:0px; - right:0px; - box-sizing:border-box; - transition: right 0.2s ease; + overflow: auto; + position: absolute; + bottom:0; + top: 0px; + left:0px; + right:0px; + box-sizing:border-box; + transition: right 0.2s ease; + touch-action: none; + padding: 0; + margin: 0; + + // Hide scrollbars + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ + &::-webkit-scrollbar { /* WebKit */ + width: 0; + height: 0; + } + + // Reset SVG default margins + > svg { + display: block; + margin: 0; + padding: 0; + } + &:focus { outline: none; } @@ -66,25 +88,9 @@ } } -.red-ui-palette-closed #red-ui-workspace { - left: 7px; -} - -// .workspace-footer-button { -// @include component-footer-button; -// margin-left: 2px; -// margin-right: 2px; -// } -// -// .workspace-footer-button-toggle { -// @include component-footer-button-toggle; -// margin-left: 2px; -// margin-right: 2px; +// #red-ui-workspace-tabs:not(.red-ui-workspace-focussed) { +// opacity:0.8; // } - -#red-ui-workspace-tabs:not(.red-ui-workspace-focussed) { - opacity:0.8; -} .red-ui-workspace-disabled-icon { display: none; } @@ -122,18 +128,6 @@ } .red-ui-workspace-locked { &.red-ui-tab { - // border-top-style: dashed; - // border-left-style: dashed; - // border-right-style: dashed; - - // a { - // font-style: italic; - // color: var(--red-ui-tab-text-color-disabled-inactive) !important; - // } - // &.active a { - // font-weight: normal; - // color: var(--red-ui-tab-text-color-disabled-active) !important; - // } .red-ui-workspace-locked-icon { display: inline; } @@ -143,21 +137,49 @@ #red-ui-navigator-canvas { position: absolute; bottom: 0; - right:0; + left:0; z-index: 101; - border-left: 1px solid var(--red-ui-primary-border-color); - border-top: 1px solid var(--red-ui-primary-border-color); + border: 1px solid var(--red-ui-primary-border-color); background: var(--red-ui-view-navigator-background); box-shadow: -1px 0 3px var(--red-ui-shadow); + border-radius: 4px; +} + +#view-zoom-controls .button-group button.red-ui-footer-button:not(:last-child) { + border-right: none; +} + +.red-ui-navigator-container { + transition: opacity 0.3s ease; + opacity: 0; + + &.red-ui-navigator-visible { + opacity: 1; + } } .red-ui-navigator-border { - stroke-dasharray: 5,5; + stroke-dasharray: 5,2; pointer-events: none; - stroke: var(--red-ui-secondary-border-color); + stroke: var(--red-ui-view-lasso-stroke); stroke-width: 1; - fill: var(--red-ui-view-background); + fill: none; +} +.red-ui-navigator-node { + opacity: 0.6; +} +#red-ui-workspace-footer { + display: flex; + flex-direction: row; + gap: 10px; + align-items: center; + border: none; + background: none; + bottom: 8px; + right: 0; + left: 0; + padding: 0; + // background: rgba(230,230,255,0.8); } - .red-ui-component-footer { @include mixins.component-footer; @@ -168,11 +190,12 @@ } } - .search-counter { + .red-ui-view-searchtools-counter { display: inline-block; font-size: smaller; font-weight: 600; white-space: nowrap; + background: var(--red-ui-view-background); } } @@ -185,28 +208,42 @@ a.red-ui-footer-button-toggle, button.red-ui-footer-button-toggle { @include mixins.component-footer-button-toggle; } +#red-ui-statusbar { + display: flex; + flex-direction: row; + align-items: center; + gap: 4px; + // background: rgba(62, 236, 53, 0.8); + flex: 1 1 100%; + height: 100%; + padding-left: 5px; +} .red-ui-statusbar-widget { + line-height: 1em; margin: 0 2px; display: inline-block; vertical-align: middle; height: 100%; - line-height: 20px; + & .red-ui-footer-button, + & .red-ui-footer-button-toggle { + min-width: 28px; + height: 28px; + } } .red-ui-statusbar-bucket { - position: absolute; - top: 0; - bottom: 0; + display: flex; + align-items: center; + flex: 1 1 auto; } .red-ui-statusbar-bucket-left { - left: 10px; + flex: 0 0 auto; .red-ui-statusbar-widget:first-child { margin-left: 0; } } .red-ui-statusbar-bucket-right { - right: 10px; .red-ui-statusbar-widget:last-child { margin-right: 0; } @@ -252,3 +289,58 @@ button.red-ui-footer-button-toggle { font-size: 13px; margin-bottom: 2px; } +:root { + --red-ui-scrollbar-width: 12px; + --red-ui-scrollbar-handle-size: 40px; + --red-ui-scrollbar-handle-background: rgb(200, 200, 200); +} + +.red-ui-workspace-scrollbar { + position: absolute; + // background: rgba(223, 236, 230, 0.8); +} +.red-ui-workspace-scrollbar-handle { + position: absolute; + background: var(--red-ui-scrollbar-handle-background); + opacity: 0.7; + border-radius: 4px; + box-sizing: border-box; + border: 1px solid rgba(255,255,255,1); + cursor: pointer; + overflow: visible; + &:hover { + opacity: 1; + } + .red-ui-workspace-scrollbar-handle-target { + position: absolute; + top: -5px; + left: -5px; + right: -5px; + bottom: -5px; + } +} +#red-ui-workspace-scroll-v { + top: 2px; + bottom: 46px; + right: 0; + width: var(--red-ui-scrollbar-width); + .red-ui-workspace-scrollbar-handle { + top: 0; + left: 2px; + width: 8px; + height: var(--red-ui-scrollbar-handle-size); + } +} +#red-ui-workspace-scroll-h { + left: 2px; + right: 0; + bottom: 36px; + height: var(--red-ui-scrollbar-width); + .red-ui-workspace-scrollbar-handle { + left: 0; + top: 2px; + height: 8px; + width: var(--red-ui-scrollbar-handle-size); + } + // background: var(--red-ui-scrollbar-background); +} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss b/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss index 7bc79f35a0..c72fc2b0c8 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss @@ -23,7 +23,7 @@ font-size: 12px; line-height: 18px; position: absolute; - top: 35px; + top: 0; left:0; right: 0; padding: 7px; @@ -53,6 +53,15 @@ .button-group { @include mixins.disable-selection; + .button:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .button:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .button:first-child { margin-right: 0; } diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/missing-modules.png b/packages/node_modules/@node-red/editor-client/src/tours/4.1/images/missing-modules.png similarity index 100% rename from packages/node_modules/@node-red/editor-client/src/tours/images/missing-modules.png rename to packages/node_modules/@node-red/editor-client/src/tours/4.1/images/missing-modules.png diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/node-docs.png b/packages/node_modules/@node-red/editor-client/src/tours/4.1/images/node-docs.png similarity index 100% rename from packages/node_modules/@node-red/editor-client/src/tours/images/node-docs.png rename to packages/node_modules/@node-red/editor-client/src/tours/4.1/images/node-docs.png diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/update-notification.png b/packages/node_modules/@node-red/editor-client/src/tours/4.1/images/update-notification.png similarity index 100% rename from packages/node_modules/@node-red/editor-client/src/tours/images/update-notification.png rename to packages/node_modules/@node-red/editor-client/src/tours/4.1/images/update-notification.png diff --git a/packages/node_modules/@node-red/editor-client/src/tours/4.1/welcome.js b/packages/node_modules/@node-red/editor-client/src/tours/4.1/welcome.js new file mode 100644 index 0000000000..8041db4697 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/tours/4.1/welcome.js @@ -0,0 +1,126 @@ +export default { + version: "4.1.0", + steps: [ + { + titleIcon: "fa fa-map-o", + title: { + "en-US": "Welcome to Node-RED 4.1!", + "ja": "Node-RED 4.1 へようこそ!", + "fr": "Bienvenue dans Node-RED 4.1!" + }, + description: { + "en-US": "

          Let's take a moment to discover the new features in this release.

          ", + "ja": "

          本リリースの新機能を見つけてみましょう。

          ", + "fr": "

          Prenons un moment pour découvrir les nouvelles fonctionnalités de cette version.

          " + } + }, + { + title: { + "en-US": "Update notifications", + "ja": "更新の通知", + "fr": "Notifications de mise à jour" + }, + image: 'images/update-notification.png', + description: { + "en-US": `

          Stay up to date with notifications when there is a new Node-RED version available, or updates to the nodes you have installed

          `, + "ja": `

          新バージョンのNode-REDの提供や、インストールしたノードの更新があった時に、通知を受け取ることができます。

          `, + "fr": `

          Désormais vous recevrez une notification lorsqu'une nouvelle version de Node-RED ou une nouvelle version relative à un des noeuds que vous avez installés est disponible

          ` + } + }, + { + title: { + "en-US": "Flow documentation", + "ja": "フローのドキュメント", + "fr": "Documentation des flux" + }, + image: 'images/node-docs.png', + description: { + "en-US": `

          Quickly see which nodes have additional documentation with the new documentation icon.

          +

          Clicking on the icon opens up the Description tab of the node edit dialog.

          `, + "ja": `

          ドキュメントアイコンによって、どのノードにドキュメントが追加されているかをすぐに確認できます。

          +

          アイコンをクリックすると、ノード編集ダイアログの説明タブが開きます。

          `, + "fr": `

          Voyez rapidement quels noeuds ont une documentation supplémentaire avec la nouvelle icône de documentation.

          +

          Cliquer sur l'icône ouvre l'onglet Description de la boîte de dialogue d'édition du noeud.

          ` + } + }, + { + title: { + "en-US": "Palette Manager Improvements", + "ja": "パレットの管理の改善", + "fr": "Améliorations du Gestionnaire de Palettes" + }, + description: { + "en-US": `

          There are lots of improvements to the palette manager:

          +
            +
          • Search results are sorted by downloads to help you find the most popular nodes
          • +
          • See which nodes have been deprecated by their author and are no longer recommended for use
          • +
          • Links to node documentation for the nodes you already have installed
          • +
          `, + "ja": `

          パレットの管理に多くの改善が加えられました:

          +
            +
          • 検索結果はダウンロード数順で並べられ、最も人気のあるノードを見つけやすくなりました。
          • +
          • 作者によって非推奨とされ、利用が推奨されなくなったノードかを確認できるようになりました。
          • +
          • 既にインストールされているノードに、ノードのドキュメントへのリンクが追加されました。
          • +
          `, + "fr": `

          Le Gestionnaire de Palettes a bénéficié de nombreuses améliorations :

          +
            +
          • Les résultats de recherche sont triés par téléchargement pour vous aider à trouver les noeuds les plus populaires.
          • +
          • Indique les noeuds obsolètes par leur auteur et dont l'utilisation n'est plus recommandée.
          • +
          • Liens vers la documentation des noeuds déjà installés.
          • +
          ` + } + }, + { + title: { + "en-US": "Installing missing modules", + "ja": "不足モジュールのインストール", + "fr": "Installation des modules manquants" + }, + image: 'images/missing-modules.png', + description: { + "en-US": `

          Flows exported from Node-RED 4.1 now include information on what additional modules need to be installed.

          +

          When importing a flow with this information, the editor will let you know what is missing and help to get them installed.

          + `, + "ja": `

          Node-RED 4.1から書き出したフローには、インストールが必要な追加モジュールの情報が含まれる様になりました。

          +

          この情報を含むフローを読み込むと、エディタは不足しているモジュールを通知し、インストールを支援します。

          + `, + "fr": `

          Les flux exportés depuis Node-RED 4.1 incluent désormais des informations sur les modules supplémentaires à installer.

          +

          Lors de l'importation d'un flux contenant ces informations, l'éditeur vous indiquera les modules manquants et vous aidera à les installer.

          + ` + } + }, + { + title: { + "en-US": "Node Updates", + "ja": "ノードの更新", + "fr": "Mises à jour des noeuds" + }, + // image: "images/", + description: { + "en-US": `

          The core nodes have received lots of minor fixes, documentation updates and + small enhancements. Check the full changelog in the Help sidebar for a full list.

          +
            +
          • Support for node: prefixed modules in the Function node
          • +
          • The ability to set a global timeout for Function nodes via the runtime settings
          • +
          • Better display of error objects in the Debug sidebar
          • +
          • and lots more...
          • +
          `, + "ja": `

          コアノードには沢山の軽微な修正、ドキュメント更新、小さな機能拡張が入っています。全リストはヘルプサイドバーにある変更履歴を参照してください。

          +
            +
          • Functionノードでnode:のプレフィックスモジュールをサポート
          • +
          • ランタイム設定からFunctionノードのグローバルタイムアウトを設定可能
          • +
          • デバッグサイドバーでのエラーオブジェクトの表示を改善
          • +
          • その他、多数...
          • +
          `, + "fr": `

          Les noeuds principaux ont bénéficié de nombreux correctifs mineurs, de mises à jour de documentation et d'améliorations mineures. + Consultez le journal complet des modifications dans la barre latérale d'aide pour une liste complète.

          +
            +
          • Prise en charge des modules préfixés node: dans le noeud Fonction.
          • +
          • Possibilité de définir un délai d'expiration global pour les noeuds Fonction via les paramètres d'exécution.
          • +
          • Meilleur affichage des objets d'erreur dans la barre latérale de débogage.
          • +
          • Et bien plus encore...
          • +
          ` + } + } + ] +} diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/debug-pause.png b/packages/node_modules/@node-red/editor-client/src/tours/images/debug-pause.png new file mode 100644 index 0000000000..d1c40c699f Binary files /dev/null and b/packages/node_modules/@node-red/editor-client/src/tours/images/debug-pause.png differ diff --git a/packages/node_modules/@node-red/editor-client/src/tours/welcome.js b/packages/node_modules/@node-red/editor-client/src/tours/welcome.js index 8041db4697..843f09b53c 100644 --- a/packages/node_modules/@node-red/editor-client/src/tours/welcome.js +++ b/packages/node_modules/@node-red/editor-client/src/tours/welcome.js @@ -1,126 +1,31 @@ export default { - version: "4.1.0", + version: "5.0.0-beta.3", steps: [ { titleIcon: "fa fa-map-o", title: { - "en-US": "Welcome to Node-RED 4.1!", - "ja": "Node-RED 4.1 へようこそ!", - "fr": "Bienvenue dans Node-RED 4.1!" + "en-US": "Welcome to Node-RED 5.0 Beta 3!", + "ja": "Node-RED 5.0 へようこそ!", + "fr": "Bienvenue dans Node-RED 5.0 Beta 3!" }, description: { - "en-US": "

          Let's take a moment to discover the new features in this release.

          ", - "ja": "

          本リリースの新機能を見つけてみましょう。

          ", - "fr": "

          Prenons un moment pour découvrir les nouvelles fonctionnalités de cette version.

          " + "en-US": ` +

          As a beta release, this is a step towards the final version of Node-RED 5.0.

          +

          This release has focused on giving the flows more space; moving the editor tabs into the header and the sidebar buttons along the bottom of the screen.

          +` } }, { title: { - "en-US": "Update notifications", - "ja": "更新の通知", - "fr": "Notifications de mise à jour" + "en-US": "What's next?", }, - image: 'images/update-notification.png', description: { - "en-US": `

          Stay up to date with notifications when there is a new Node-RED version available, or updates to the nodes you have installed

          `, - "ja": `

          新バージョンのNode-REDの提供や、インストールしたノードの更新があった時に、通知を受け取ることができます。

          `, - "fr": `

          Désormais vous recevrez une notification lorsqu'une nouvelle version de Node-RED ou une nouvelle version relative à un des noeuds que vous avez installés est disponible

          ` - } - }, - { - title: { - "en-US": "Flow documentation", - "ja": "フローのドキュメント", - "fr": "Documentation des flux" - }, - image: 'images/node-docs.png', - description: { - "en-US": `

          Quickly see which nodes have additional documentation with the new documentation icon.

          -

          Clicking on the icon opens up the Description tab of the node edit dialog.

          `, - "ja": `

          ドキュメントアイコンによって、どのノードにドキュメントが追加されているかをすぐに確認できます。

          -

          アイコンをクリックすると、ノード編集ダイアログの説明タブが開きます。

          `, - "fr": `

          Voyez rapidement quels noeuds ont une documentation supplémentaire avec la nouvelle icône de documentation.

          -

          Cliquer sur l'icône ouvre l'onglet Description de la boîte de dialogue d'édition du noeud.

          ` - } - }, - { - title: { - "en-US": "Palette Manager Improvements", - "ja": "パレットの管理の改善", - "fr": "Améliorations du Gestionnaire de Palettes" - }, - description: { - "en-US": `

          There are lots of improvements to the palette manager:

          -
            -
          • Search results are sorted by downloads to help you find the most popular nodes
          • -
          • See which nodes have been deprecated by their author and are no longer recommended for use
          • -
          • Links to node documentation for the nodes you already have installed
          • -
          `, - "ja": `

          パレットの管理に多くの改善が加えられました:

          -
            -
          • 検索結果はダウンロード数順で並べられ、最も人気のあるノードを見つけやすくなりました。
          • -
          • 作者によって非推奨とされ、利用が推奨されなくなったノードかを確認できるようになりました。
          • -
          • 既にインストールされているノードに、ノードのドキュメントへのリンクが追加されました。
          • -
          `, - "fr": `

          Le Gestionnaire de Palettes a bénéficié de nombreuses améliorations :

          -
            -
          • Les résultats de recherche sont triés par téléchargement pour vous aider à trouver les noeuds les plus populaires.
          • -
          • Indique les noeuds obsolètes par leur auteur et dont l'utilisation n'est plus recommandée.
          • -
          • Liens vers la documentation des noeuds déjà installés.
          • -
          ` - } - }, - { - title: { - "en-US": "Installing missing modules", - "ja": "不足モジュールのインストール", - "fr": "Installation des modules manquants" - }, - image: 'images/missing-modules.png', - description: { - "en-US": `

          Flows exported from Node-RED 4.1 now include information on what additional modules need to be installed.

          -

          When importing a flow with this information, the editor will let you know what is missing and help to get them installed.

          - `, - "ja": `

          Node-RED 4.1から書き出したフローには、インストールが必要な追加モジュールの情報が含まれる様になりました。

          -

          この情報を含むフローを読み込むと、エディタは不足しているモジュールを通知し、インストールを支援します。

          - `, - "fr": `

          Les flux exportés depuis Node-RED 4.1 incluent désormais des informations sur les modules supplémentaires à installer.

          -

          Lors de l'importation d'un flux contenant ces informations, l'éditeur vous indiquera les modules manquants et vous aidera à les installer.

          + "en-US": ` +

          We're nearing the end-point for the UX changes for the editor, so we can start to address other items in the plan, including the long-awaited + built-in dark theme.

          +

          As always, we welcome your feedback on the new design and features - please join us on the forum or GitHub to let us know your thoughts!

          ` } - }, - { - title: { - "en-US": "Node Updates", - "ja": "ノードの更新", - "fr": "Mises à jour des noeuds" - }, - // image: "images/", - description: { - "en-US": `

          The core nodes have received lots of minor fixes, documentation updates and - small enhancements. Check the full changelog in the Help sidebar for a full list.

          -
            -
          • Support for node: prefixed modules in the Function node
          • -
          • The ability to set a global timeout for Function nodes via the runtime settings
          • -
          • Better display of error objects in the Debug sidebar
          • -
          • and lots more...
          • -
          `, - "ja": `

          コアノードには沢山の軽微な修正、ドキュメント更新、小さな機能拡張が入っています。全リストはヘルプサイドバーにある変更履歴を参照してください。

          -
            -
          • Functionノードでnode:のプレフィックスモジュールをサポート
          • -
          • ランタイム設定からFunctionノードのグローバルタイムアウトを設定可能
          • -
          • デバッグサイドバーでのエラーオブジェクトの表示を改善
          • -
          • その他、多数...
          • -
          `, - "fr": `

          Les noeuds principaux ont bénéficié de nombreux correctifs mineurs, de mises à jour de documentation et d'améliorations mineures. - Consultez le journal complet des modifications dans la barre latérale d'aide pour une liste complète.

          -
            -
          • Prise en charge des modules préfixés node: dans le noeud Fonction.
          • -
          • Possibilité de définir un délai d'expiration global pour les noeuds Fonction via les paramètres d'exécution.
          • -
          • Meilleur affichage des objets d'erreur dans la barre latérale de débogage.
          • -
          • Et bien plus encore...
          • -
          ` - } } ] } diff --git a/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/4c354c82c52ca6cc2543.ttf b/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/4c354c82c52ca6cc2543.ttf new file mode 100644 index 0000000000..82acfd5de3 Binary files /dev/null and b/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/4c354c82c52ca6cc2543.ttf differ diff --git a/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/css.worker.js b/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/css.worker.js index 4023d31ca9..b3d057a8b1 100644 --- a/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/css.worker.js +++ b/packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/css.worker.js @@ -1,2 +1 @@ -/*! For license information please see css.worker.js.LICENSE.txt */ -(()=>{var e={550:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>b,aZ:()=>g,l5:()=>C,lQ:()=>y,s7:()=>x,sH:()=>_,sN:()=>v,ss:()=>w,yI:()=>f,zp:()=>k});var r=n(7703),i=n(3298),s=n(4756),o=n(6996);const a=(0,s.x1A)("editor.lineHighlightBackground",null,r.kg("vs/editor/common/core/editorColorRegistry","lineHighlight","Background color for the highlight of line at the cursor position.")),l=((0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},r.kg("vs/editor/common/core/editorColorRegistry","lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),(0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},r.kg("vs/editor/common/core/editorColorRegistry","rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},r.kg("vs/editor/common/core/editorColorRegistry","rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},r.kg("vs/editor/common/core/editorColorRegistry","symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},r.kg("vs/editor/common/core/editorColorRegistry","symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:i.Q1.black,hcDark:i.Q1.white,hcLight:"#0F4A85"},r.kg("vs/editor/common/core/editorColorRegistry","caret","Color of the editor cursor."))),c=(0,s.x1A)("editorCursor.background",null,r.kg("vs/editor/common/core/editorColorRegistry","editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),h=((0,s.x1A)("editorMultiCursor.primary.foreground",l,r.kg("vs/editor/common/core/editorColorRegistry","editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.primary.background",c,r.kg("vs/editor/common/core/editorColorRegistry","editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorMultiCursor.secondary.foreground",l,r.kg("vs/editor/common/core/editorColorRegistry","editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.secondary.background",c,r.kg("vs/editor/common/core/editorColorRegistry","editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},r.kg("vs/editor/common/core/editorColorRegistry","editorWhitespaces","Color of whitespace characters in the editor."))),d=((0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:i.Q1.white,hcLight:"#292929"},r.kg("vs/editor/common/core/editorColorRegistry","editorLineNumbers","Color of editor line numbers.")),(0,s.x1A)("editorIndentGuide.background",h,r.kg("vs/editor/common/core/editorColorRegistry","editorIndentGuides","Color of the editor indentation guides."),!1,r.kg("vs/editor/common/core/editorColorRegistry","deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead."))),u=(0,s.x1A)("editorIndentGuide.activeBackground",h,r.kg("vs/editor/common/core/editorColorRegistry","editorActiveIndentGuide","Color of the active editor indentation guides."),!1,r.kg("vs/editor/common/core/editorColorRegistry","deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),p=((0,s.x1A)("editorIndentGuide.background1",d,r.kg("vs/editor/common/core/editorColorRegistry","editorIndentGuides1","Color of the editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.background2","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorIndentGuides2","Color of the editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.background3","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorIndentGuides3","Color of the editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.background4","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorIndentGuides4","Color of the editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.background5","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorIndentGuides5","Color of the editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.background6","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorIndentGuides6","Color of the editor indentation guides (6).")),(0,s.x1A)("editorIndentGuide.activeBackground1",u,r.kg("vs/editor/common/core/editorColorRegistry","editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},r.kg("vs/editor/common/core/editorColorRegistry","editorActiveLineNumber","Color of editor active line number"),!1,r.kg("vs/editor/common/core/editorColorRegistry","deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."))),m=((0,s.x1A)("editorLineNumber.activeForeground",p,r.kg("vs/editor/common/core/editorColorRegistry","editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,r.kg("vs/editor/common/core/editorColorRegistry","editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),(0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:i.Q1.lightgrey,hcDark:i.Q1.white,hcLight:"#292929"},r.kg("vs/editor/common/core/editorColorRegistry","editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},r.kg("vs/editor/common/core/editorColorRegistry","editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},r.kg("vs/editor/common/core/editorColorRegistry","editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},r.kg("vs/editor/common/core/editorColorRegistry","editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},r.kg("vs/editor/common/core/editorColorRegistry","editorOverviewRulerBorder","Color of the overview ruler border.")),(0,s.x1A)("editorOverviewRuler.background",null,r.kg("vs/editor/common/core/editorColorRegistry","editorOverviewRulerBackground","Background color of the editor overview ruler.")),(0,s.x1A)("editorGutter.background",s.YtV,r.kg("vs/editor/common/core/editorColorRegistry","editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:i.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},r.kg("vs/editor/common/core/editorColorRegistry","unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:i.Q1.fromHex("#000a"),light:i.Q1.fromHex("#0007"),hcDark:null,hcLight:null},r.kg("vs/editor/common/core/editorColorRegistry","unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),(0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:i.Q1.fromHex("#fff").transparent(.8),hcLight:i.Q1.fromHex("#292929").transparent(.8)},r.kg("vs/editor/common/core/editorColorRegistry","editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:i.Q1.fromHex("#ffffff56"),light:i.Q1.fromHex("#0007"),hcDark:null,hcLight:null},r.kg("vs/editor/common/core/editorColorRegistry","editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.x1A)("editorGhostText.background",null,r.kg("vs/editor/common/core/editorColorRegistry","editorGhostTextBackground","Background color of the ghost text in the editor.")),new i.Q1(new i.bU(0,122,204,.6))),f=((0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",m,r.kg("vs/editor/common/core/editorColorRegistry","overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new i.Q1(new i.bU(255,18,18,.7)),light:new i.Q1(new i.bU(255,18,18,.7)),hcDark:new i.Q1(new i.bU(255,50,50,1)),hcLight:"#B5200D"},r.kg("vs/editor/common/core/editorColorRegistry","overviewRuleError","Overview ruler marker color for errors."))),g=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},r.kg("vs/editor/common/core/editorColorRegistry","overviewRuleWarning","Overview ruler marker color for warnings.")),b=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},r.kg("vs/editor/common/core/editorColorRegistry","overviewRuleInfo","Overview ruler marker color for infos.")),v=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},r.kg("vs/editor/common/core/editorColorRegistry","editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),y=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},r.kg("vs/editor/common/core/editorColorRegistry","editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),w=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},r.kg("vs/editor/common/core/editorColorRegistry","editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),C=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),_=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),k=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),x=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new i.Q1(new i.bU(255,18,18,.8)),light:new i.Q1(new i.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},r.kg("vs/editor/common/core/editorColorRegistry","editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));(0,s.x1A)("editorBracketPairGuide.background1","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background2","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background3","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background4","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background5","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background6","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",r.kg("vs/editor/common/core/editorColorRegistry","editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,r.kg("vs/editor/common/core/editorColorRegistry","editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,r.kg("vs/editor/common/core/editorColorRegistry","editorUnicodeHighlight.background","Background color used to highlight unicode characters.")),(0,o.zy)((e,t)=>{const n=e.getColor(s.YtV),r=e.getColor(a),i=r&&!r.isTransparent()?r:n;i&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${i}; }`)})},579:(e,t,n)=>{"use strict";n.d(t,{rr:()=>Q,$b:()=>J}),n(2373);var r=n(6274),i=n(6206),s=n(5603),o=n(1490),a=n(7703);function l(...e){switch(e.length){case 1:return(0,a.kg)("vs/platform/contextkey/common/scanner","contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,a.kg)("vs/platform/contextkey/common/scanner","contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,a.kg)("vs/platform/contextkey/common/scanner","contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const c=(0,a.kg)("vs/platform/contextkey/common/scanner","contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),h=(0,a.kg)("vs/platform/contextkey/common/scanner","contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class d{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(e=>e.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(l("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(l("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(l("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&this._input.charCodeAt(this._current)===e&&(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),r={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(r)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=d._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(c):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(h);const r=this._input.charCodeAt(e);if(t)t=!1;else{if(47===r&&!n){e++;break}91===r?n=!0:92===r?t=!0:93===r&&(n=!1)}e++}for(;e=this._input.length}}var u=n(7352);const p=new Map;p.set("false",!1),p.set("true",!0),p.set("isMac",i.zx),p.set("isLinux",i.j9),p.set("isWindows",i.uF),p.set("isWeb",i.HZ),p.set("isMacNative",i.zx&&!i.HZ),p.set("isEdge",i.UP),p.set("isFirefox",i.gm),p.set("isChrome",i.H8),p.set("isSafari",i.nr);const m=Object.prototype.hasOwnProperty,f={regexParsingWithErrorRecovery:!0},g=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.emptyString","Empty context key expression"),b=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),v=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.noInAfterNot","'in' after 'not'."),y=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),w=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.unexpectedToken","Unexpected token"),C=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),_=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),k=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class x{static{this._parseError=new Error}constructor(e=f){this._config=e,this._scanner=new d,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?C:void 0;throw this._parsingErrors.push({message:w,offset:e.offset,lexeme:d.getLexeme(e),additionalInfo:t}),x._parseError}return e}catch(e){if(e!==x._parseError)throw e;return}}else this._parsingErrors.push({message:g,offset:0,lexeme:"",additionalInfo:b})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:S.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:S.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),F.INSTANCE;case 12:return this._advance(),L.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,y),e?.negate()}case 17:return this._advance(),A.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),S.true();case 12:return this._advance(),S.false();case 0:{this._advance();const e=this._expr();return this._consume(1,y),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const n=e.lexeme,r=n.lastIndexOf("/"),i=r===n.length-1?void 0:this._removeFlagsGY(n.substring(r+1));let s;try{s=new RegExp(n.substring(1,r),i)}catch(t){throw this._errExpectedButGot("REGEX",e)}return W.create(t,s)}switch(e.type){case 10:case 19:{const n=[e.lexeme];this._advance();let r=this._peek(),i=0;for(let t=0;t=0){const s=n.slice(t+1,i),o="i"===n[i+1]?"i":"";try{r=new RegExp(s,o)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===r)throw this._errExpectedButGot("REGEX",e);return W.create(t,r)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,v);const e=this._value();return S.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return S.equals(t,e);switch(e){case"true":return S.has(t);case"false":return S.not(t);default:return S.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return S.notEquals(t,e);switch(e){case"true":return S.not(t);case"false":return S.has(t);default:return S.notEquals(t,e)}}case 5:return this._advance(),P.create(t,this._value());case 6:return this._advance(),B.create(t,this._value());case 7:return this._advance(),O.create(t,this._value());case 8:return this._advance(),z.create(t,this._value());case 13:return this._advance(),S.in(t,this._value());default:return S.has(t)}}case 20:throw this._parsingErrors.push({message:_,offset:e.offset,lexeme:"",additionalInfo:k}),x._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){const r=(0,a.kg)("vs/platform/contextkey/common/contextkey","contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,d.getLexeme(t)),i=t.offset,s=d.getLexeme(t);return this._parsingErrors.push({message:r,offset:i,lexeme:s,additionalInfo:n}),x._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class S{static false(){return F.INSTANCE}static true(){return L.INSTANCE}static has(e){return I.create(e)}static equals(e,t){return T.create(e,t)}static notEquals(e,t){return D.create(e,t)}static regex(e,t){return W.create(e,t)}static in(e,t){return N.create(e,t)}static notIn(e,t){return R.create(e,t)}static not(e){return A.create(e)}static and(...e){return $.create(e,null,!0)}static or(...e){return q.create(e,null,!0)}static{this._parser=new x({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(null!=e)return this._parser.parse(e)}}function E(e,t){return e.cmp(t)}class F{static{this.INSTANCE=new F}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return L.INSTANCE}}class L{static{this.INSTANCE=new L}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return F.INSTANCE}}class I{static create(e,t=null){const n=p.get(e);return"boolean"==typeof n?n?L.INSTANCE:F.INSTANCE:new I(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=p.get(this.key);return"boolean"==typeof e?e?L.INSTANCE:F.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this)),this.negated}}class T{static create(e,t,n=null){if("boolean"==typeof t)return t?I.create(e,n):A.create(e,n);const r=p.get(e);return"boolean"==typeof r?t===(r?"true":"false")?L.INSTANCE:F.INSTANCE:new T(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=p.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?L.INSTANCE:F.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class N{static create(e,t){return new N(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):"string"==typeof n&&"object"==typeof t&&null!==t&&m.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=R.create(this.key,this.valueKey)),this.negated}}class R{static create(e,t){return new R(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=N.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class D{static create(e,t,n=null){if("boolean"==typeof t)return t?A.create(e,n):I.create(e,n);const r=p.get(e);return"boolean"==typeof r?t===(r?"true":"false")?F.INSTANCE:L.INSTANCE:new D(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=p.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?F.INSTANCE:L.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class A{static create(e,t=null){const n=p.get(e);return"boolean"==typeof n?n?F.INSTANCE:L.INSTANCE:new A(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=p.get(this.key);return"boolean"==typeof e?e?F.INSTANCE:L.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}function M(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):F.INSTANCE}class O{static create(e,t,n=null){return M(t,t=>new O(e,t,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class z{static create(e,t,n=null){return M(t,t=>new z(e,t,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{static create(e,t,n=null){return M(t,t=>new P(e,t,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new B(e,t,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class W{static create(e,t){return new W(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this)),this.negated}}class V{static create(e){return new V(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function U(e){let t=null;for(let n=0,r=e.length;ne.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){const e=r[r.length-1];if(9!==e.type)break;r.pop();const t=r.pop(),i=0===r.length,s=q.create(e.expr.map(e=>$.create([e,t],null,n)),null,i);s&&(r.push(s),r.sort(E))}if(1===r.length)return r[0];if(n){for(let e=0;ee.serialize()).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=q.create(e,this,!0)}return this.negated}}class q{static create(e,t,n){return q._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),n=e.shift(),r=[];for(const e of G(t))for(const t of G(n))r.push($.create([e,t],null,!1));e.unshift(q.create(r,null,!1))}this.negated=q.create(e,this,!0)}return this.negated}}class j extends I{static{this._info=[]}static all(){return j._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,"object"==typeof n?j._info.push({...n,key:e}):!0!==n&&j._info.push({key:e,description:n,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return T.create(this.key,e)}}function K(e,t){return et?1:0}function H(e,t,n,r){return en?1:tr?1:0}function G(e){return 9===e.type?e.expr:[e]}(0,u.u1)("contextKeyService");const Q=(0,u.u1)("logService");var J;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(J||(J={})),J.Info,r.jG,new j("logLevel",function(e){switch(e){case J.Trace:return"trace";case J.Debug:return"debug";case J.Info:return"info";case J.Warning:return"warn";case J.Error:return"error";case J.Off:return"off"}}(J.Info))},695:(e,t,n)=>{"use strict";n.d(t,{I:()=>b,r:()=>d});var r=n(9130),i=n(6206);const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//,l="",c="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,n,r,i,h=!1){"object"==typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=function(e,t){return e||t?e:"file"}(e,h),this.authority=t||l,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||l),this.query=r||l,this.fragment=i||l,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,h))}get fsPath(){return b(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===n?n=this.authority:null===n&&(n=l),void 0===r?r=this.path:null===r&&(r=l),void 0===i?i=this.query:null===i&&(i=l),void 0===s?s=this.fragment:null===s&&(s=l),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new p(t,n,r,i,s)}static parse(e,t=!1){const n=h.exec(e);return n?new p(n[2]||l,C(n[4]||l),C(n[5]||l),C(n[7]||l),C(n[9]||l),t):new p(l,l,l,l,l)}static file(e){let t=l;if(i.uF&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const n=e.indexOf(c,2);-1===n?(t=e.substring(2),e=c):(t=e.substring(2,n),e=e.substring(n)||c)}return new p("file",t,e,l,l)}static from(e,t){return new p(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=i.uF&&"file"===e.scheme?d.file(r.IN.join(b(e,!0),...t)).path:r.SA.join(e.path,...t),e.with({path:n})}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new p(e);return t._formatted=e.external??null,t._fsPath=e._sep===u?e.fsPath??null:null,t}}return e}}const u=i.uF?1:void 0;class p extends d{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=m[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function g(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i.uF&&(n=n.replace(/\//g,"\\")),n}function v(e,t){const n=t?g:f;let r="",{scheme:i,authority:s,path:o,query:a,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),l&&(r+="#",r+=t?l:f(l,!1,!1)),r}function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(w)?e.replace(w,e=>y(e)):e}},800:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i});var r=n(8274);class i{constructor(e,t,n,r){e>n||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}isEmpty(){return i.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return i.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return i.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return i.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return i.plusRange(this,e)}static plusRange(e,t){let n,r,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new i(n,r,s,o)}intersectRanges(e){return i.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,r=e.startColumn,s=e.endLineNumber,o=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,h=t.endColumn;return nc?(s=c,o=h):s===c&&(o=Math.min(o,h)),n>s||n===s&&r>o?null:new i(n,r,s,o)}equalsRange(e){return i.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return i.getEndPosition(this)}static getEndPosition(e){return new r.y(e.endLineNumber,e.endColumn)}getStartPosition(){return i.getStartPosition(this)}static getStartPosition(e){return new r.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new i(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new i(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return i.collapseToStart(this)}static collapseToStart(e){return new i(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return i.collapseToEnd(this)}static collapseToEnd(e){return new i(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new i(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},802:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>i,pG:()=>r});const r=(0,n(7352).u1)("configurationService");function i(e){return e.replace(/[\[\]]/g,"")}},803:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SemanticTokensStylingService:()=>d});var r=n(6274),i=n(6631),s=n(6996),o=n(579),a=n(7975),l=n(3182),c=n(1964),h=function(e,t){return function(n,r){t(n,r,e)}};let d=class extends r.jG{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};d=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([h(0,s.Gy),h(1,o.rr),h(2,i.L)],d),(0,c.v)(l.ISemanticTokensStylingService,d,1)},809:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var r=n(2373),i=n(5352);const s={JSONContribution:"base.contributions.json"},o=new class{constructor(){this._onDidChangeSchema=new r.vl,this.schemasById={}}registerSchema(e,t){var n;this.schemasById[(n=e,n.length>0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};i.O.add(s.JSONContribution,o)},867:(e,t,n)=>{"use strict";n.d(t,{Ft:()=>o,Xo:()=>a,ok:()=>i,xb:()=>s});var r=n(1490);function i(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function o(e){e()||(e(),(0,r.dz)(new r.D7("Assertion Failed")))}function a(e,t){let n=0;for(;n{"use strict";n.r(t),n.d(t,{IModelService:()=>r});const r=(0,n(7352).u1)("modelService")},1075:(e,t,n)=>{"use strict";var r;n.d(t,{f:()=>r}),function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function*r(e){yield e}e.empty=function(){return n},e.single=r,e.wrap=function(e){return t(e)?e:r(e)},e.from=function(e){return e||n},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let n=0;for(const r of e)if(t(r,n++))return!0;return!1},e.find=function(e,t){for(const n of e)if(t(n))return n},e.filter=function*(e,t){for(const n of e)t(n)&&(yield n)},e.map=function*(e,t){let n=0;for(const r of e)yield t(r,n++)},e.flatMap=function*(e,t){let n=0;for(const r of e)yield*t(r,n++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,n){let r=n;for(const n of e)r=t(r,n);return r},e.slice=function*(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);ti}]},e.asyncToArray=async function(e){const t=[];for await(const n of e)t.push(n);return Promise.resolve(t)}}(r||(r={}))},1211:(e,t,n)=>{"use strict";function r(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let r=0,i=e.length;re){const n=new Set;return e.filter(e=>{const r=t(e);return!n.has(r)&&(n.add(r),!0)})}function l(e,t){return e.length>0?e[0]:t}function c(e,t,n){const r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function h(e,t){for(const n of t)e.push(n)}var d;function u(e,t){return(n,r)=>t(e(n),e(r))}n.d(t,{E4:()=>h,Fy:()=>l,Hw:()=>m,U9:()=>p,VE:()=>u,aI:()=>r,c1:()=>g,dM:()=>a,j3:()=>f,kj:()=>o,n:()=>i,nK:()=>c,pN:()=>s}),function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(d||(d={}));const p=(e,t)=>e-t;function m(e){return(t,n)=>-e(t,n)}class f{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class g{static{this.empty=new g(e=>{})}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new g(t=>this.iterate(n=>!e(n)||t(n)))}map(e){return new g(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||d.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}}},1408:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageService:()=>I});var r=n(2373),i=n(6274),s=n(6506),o=n(1211),a=n(4945),l=n(4086);const c=(e,t)=>e===t;new WeakMap;class h{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return function(e,t){const n=u.get(e);if(n)return n;const r=function(e,t){const n=u.get(e);if(n)return n;const r=t.owner?function(e){const t=m.get(e);if(t)return t;const n=function(e){const t=e.constructor;return t?t.name:"Object"}(e);let r=p.get(n)??0;r++,p.set(n,r);const i=1===r?n:`${n}#${r}`;return m.set(e,i),i}(t.owner)+".":"";let i;const s=t.debugNameSource;if(void 0!==s){if("function"!=typeof s)return r+s;if(i=s(),void 0!==i)return r+i}const o=t.referenceFn;if(void 0!==o&&(i=f(o),void 0!==i))return r+i;if(void 0!==t.owner){const n=function(e,t){for(const n in e)if(e[n]===t)return n}(t.owner,e);if(void 0!==n)return r+n}}(e,t);if(r){let t=d.get(r)??0;t++,d.set(r,t);const n=1===t?r:`${r}#${t}`;return u.set(e,n),n}}(e,this)}}const d=new Map,u=new WeakMap,p=new Map,m=new WeakMap;function f(e){const t=e.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),r=n?n[1]:void 0;return r?.trim()}let g,b,v;class y{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const n=void 0===t?void 0:e,r=void 0===t?e:t;return v({owner:n,debugName:()=>{const e=f(r);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(r.toString());return t?`${this.debugName}.${t[2]}`:n?void 0:`${this.debugName} (mapped)`},debugReferenceFn:r},e=>r(this.read(e),e))}flatten(){return v({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,t){return e.add(g(this,t)),this}keepObserved(e){return e.add(b(this)),this}}class w extends y{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}class C{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():f(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,_.Ft)(()=>this.updateCount>=0)}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),r=3===this.state;if(n&&(1===this.state||r)&&(this.state=2,r))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function x(e){return new S(new h(void 0,void 0,e),e,void 0,void 0)}class S{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,r){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),this._runIfNeeded(),(0,i.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,i.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,_.Ft)(()=>this.updateCount>=0)}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}function E(...e){let t,n,r;return 3===e.length?[t,n,r]=e:[n,r]=e,new F(new h(t,void 0,r),n,r,()=>F.globalTransaction,c)}(x||(x={})).Observer=S;class F extends w{constructor(e,t,n,r,i){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=r,this._equalityComparator=i,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),n=this.value,r=!this.hasValue||!this._equalityComparator(n,t);let i=!1;var s,o,a;r&&(this.value=t,this.hasValue&&(i=!0,s=this._getTransaction(),o=e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)},a=()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")},s?o(s):function(e,t){const n=new C(e,t);try{e(n)}finally{n.finish()}}(o,a)),this.hasValue=!0)}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}!function(e){e.Observer=F,e.batchEventsGlobally=function(e,t){let n=!1;void 0===F.globalTransaction&&(F.globalTransaction=e,n=!0);try{t()}finally{n&&(F.globalTransaction=void 0)}}}(E||(E={})),b=function(e){const t=new L(!1,void 0);return e.addObserver(t),(0,i.s)(()=>{e.removeObserver(t)})},g=function(e,t){const n=new L(!0,t);return e.addObserver(n),t?t(e.get()):e.reportChanges(),(0,i.s)(()=>{e.removeObserver(n)})};class L{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}n(1490);class I extends i.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new r.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new r.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new r.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,I.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){I.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,o.Fy)(n,null)}createById(e){return new T(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new T(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class T{constructor(e,t){this._value=E(this,e,()=>t()),this.onDidChange=r.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},1471:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var r=n(8274),i=n(800);class s extends i.Q{constructor(e,t,n,r){super(e,t,n,r),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new r.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new r.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{"use strict";n.d(t,{D7:()=>u,EM:()=>h,Qg:()=>l,cU:()=>s,dz:()=>i,iH:()=>c});const r=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack){if(d.isErrorNoTelemetry(e))throw new d(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function i(e){var t;(t=e)instanceof a||t instanceof Error&&t.name===o&&t.message===o||r.onUnexpectedError(e)}function s(e){if(e instanceof Error){const{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack,noTelemetry:d.isErrorNoTelemetry(e)}}return e}const o="Canceled";class a extends Error{constructor(){super(o),this.name=this.message}}function l(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function c(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class h extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class d extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof d)return e;const t=new d;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class u extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,u.prototype)}}},1551:(e,t,n)=>{"use strict";n.d(t,{x:()=>r});class r{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),8&n&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),r=this.getFontStyle(e);let i=`color: ${t[n]};`;1&r&&(i+="font-style: italic;"),2&r&&(i+="font-weight: bold;");let s="";return 4&r&&(s+=" underline"),8&r&&(s+=" line-through"),s&&(i+=`text-decoration:${s};`),i}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&n),bold:Boolean(2&n),underline:Boolean(4&n),strikethrough:Boolean(8&n)}}}},1732:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});class r{static{this.Undefined=new r(void 0)}constructor(e){this.element=e,this.next=r.Undefined,this.prev=r.Undefined}}class i{constructor(){this._first=r.Undefined,this._last=r.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===r.Undefined}clear(){let e=this._first;for(;e!==r.Undefined;){const t=e.next;e.prev=r.Undefined,e.next=r.Undefined,e=t}this._first=r.Undefined,this._last=r.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new r(e);if(this._first===r.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==r.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==r.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==r.Undefined&&e.next!==r.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===r.Undefined&&e.next===r.Undefined?(this._first=r.Undefined,this._last=r.Undefined):e.next===r.Undefined?(this._last=this._last.prev,this._last.next=r.Undefined):e.prev===r.Undefined&&(this._first=this._first.next,this._first.prev=r.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==r.Undefined;)yield e.element,e=e.next}}},1883:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{VV:()=>s,o5:()=>i});class i{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=r):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"==typeof e?(this._fn=e,this._computeKey=r):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}},1905:(e,t,n)=>{"use strict";n.d(t,{TH:()=>o,Zn:()=>l,_1:()=>c,kb:()=>a});var r=n(9130),i=(n(6206),n(5603));function s(e){return 47===e||92===e}function o(e){return e.replace(/[\\/]/g,r.SA.sep)}function a(e){return-1===e.indexOf("/")&&(e=o(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function l(e,t=r.SA.sep){if(!e)return"";const n=e.length,i=e.charCodeAt(0);if(s(i)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let r=3;const i=r;for(;r=65&&o<=90||o>=97&&o<=122)&&58===e.charCodeAt(1))return s(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);var o;let a=e.indexOf("://");if(-1!==a)for(a+=3;ae.length)return!1;if(n){if(!(0,i.ns)(e,t))return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===s&&n--,e.charAt(n)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}},1964:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});class r{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const i=[];function s(e,t,n){t instanceof r||(t=new r(t,[],Boolean(n))),i.push([e,t])}},2013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeSemanticTokensDto:()=>s});var r=n(6575),i=n(6206);function s(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const n of e.deltas)n.data&&(t+=n.data.length)}return t}(e));let n=0;if(t[n++]=e.id,"full"===e.type)t[n++]=1,t[n++]=e.data.length,t.set(e.data,n),n+=e.data.length;else{t[n++]=2,t[n++]=e.deltas.length;for(const r of e.deltas)t[n++]=r.start,t[n++]=r.deleteCount,r.data?(t[n++]=r.data.length,t.set(r.data,n),n+=r.data.length):t[n++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return i.cm()||function(e){for(let t=0,n=e.length;t{"use strict";n.d(t,{d:()=>r});class r{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},2373:(e,t,n)=>{"use strict";n.d(t,{Jh:()=>r,vl:()=>p});var r,i=n(1490),s=n(6274),o=(n(1732),n(3958));!function(e){function t(e){return(t,n=null,r)=>{let i,s=!1;return i=e(e=>{if(!s)return i?i.dispose():s=!0,t.call(n,e)},null,r),s&&i.dispose(),i}}function n(e,t,n){return i((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}function r(e,t,n){return i((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}function i(e,t){let n;const r=new p({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function o(e,t,n=100,r=!1,i=!1,s,o){let a,l,c,h,d=0;const u=new p({leakWarningThreshold:s,onWillAddFirstListener(){a=e(e=>{d++,l=t(l,e),r&&!c&&(u.fire(l),l=void 0),h=()=>{const e=l;l=void 0,c=void 0,(!r||d>1)&&u.fire(e),d=0},"number"==typeof n?(clearTimeout(c),c=setTimeout(h,n)):void 0===c&&(c=0,queueMicrotask(h))})},onWillRemoveListener(){i&&d>0&&h?.()},onDidRemoveLastListener(){h=void 0,a.dispose()}});return o?.add(u),u.event}e.None=()=>s.jG.None,e.defer=function(e,t){return o(e,()=>{},0,void 0,!0,void 0,t)},e.once=t,e.onceIf=function(t,n){return e.once(e.filter(t,n))},e.map=n,e.forEach=function(e,t,n){return i((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)},e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,r)=>{return i=(0,s.qE)(...e.map(e=>e(e=>t.call(n,e)))),(o=r)instanceof Array?o.push(i):o&&o.add(i),i;var i,o}},e.reduce=function(e,t,r,i){let s=r;return n(e,e=>(s=t(s,e),s),i)},e.debounce=o,e.accumulate=function(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)},e.latch=function(e,t=(e,t)=>e===t,n){let i,s=!0;return r(e,e=>{const n=s||!t(e,i);return s=!1,i=e,n},n)},e.split=function(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]},e.buffer=function(e,t=!1,n=[],r){let i=n.slice(),s=e(e=>{i?i.push(e):a.fire(e)});r&&r.add(s);const o=()=>{i?.forEach(e=>a.fire(e)),i=null},a=new p({onWillAddFirstListener(){s||(s=e(e=>a.fire(e)),r&&r.add(s))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return r&&r.add(a),a.event},e.chain=function(e,t){return(n,r,i)=>{const s=t(new l);return e(function(e){const t=s.evaluate(e);t!==a&&n.call(r,t)},void 0,i)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:a),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t,n=!0;return this.steps.push(r=>{const i=n||!e(r,t);return n=!1,t=r,i?r:a}),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,n=e=>e){const r=(...e)=>i.fire(n(...e)),i=new p({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event},e.fromDOMEventEmitter=function(e,t,n=e=>e){const r=(...e)=>i.fire(n(...e)),i=new p({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event},e.toPromise=function(e){return new Promise(n=>t(e)(n))},e.fromPromise=function(e){const t=new p;return e.then(e=>{t.fire(e)},()=>{t.fire(void 0)}).finally(()=>{t.dispose()}),t.event},e.forward=function(e,t){return e(e=>t.fire(e))},e.runAndSubscribe=function(e,t,n){return t(n),e(e=>t(e))};class c{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const n={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new p(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new c(e,t).emitter.event},e.fromObservableLight=function(e){return(t,n,r)=>{let i=0,o=!1;const a={beginUpdate(){i++},endUpdate(){i--,0===i&&(e.reportChanges(),o&&(o=!1,t.call(n)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return r instanceof s.Cm?r.add(l):Array.isArray(r)&&r.push(l),l}}}(r||(r={}));class a{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${a._idPool++}`,a.all.add(this)}start(e){this._stopWatch=new o.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}class l{static{this._idPool=1}constructor(e,t,n=(l._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,r]of this._stacks)(!e||t{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],n=new d(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||i.dz)(n),s.jG.None}if(this._disposed)return s.jG.None;t&&(e=e.bind(t));const r=new u(e);let o;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(r.stack=c.create(),o=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof u?(this._deliveryQueue??=new m,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;const a=(0,s.s)(()=>{o?.(),this._removeListener(r)});return n instanceof s.Cm?n.add(a):Array.isArray(n)&&n.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const r=this._deliveryQueue.current===this;if(2*this._size<=t.length){let e=0;for(let n=0;n0}}class m{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}},2548:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e}function i(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return void 0===e}function o(e){return s(e)||null===e}n.d(t,{Gv:()=>i,Kg:()=>r,b0:()=>s,z:()=>o})},2695:(e,t,n)=>{var r={"./editorBaseApi":[7317],"./editorBaseApi.js":[7317],"./editorSimpleWorker":[2803],"./editorSimpleWorker.js":[2803],"./editorWorker":[2919,792],"./editorWorker.js":[2919,792],"./editorWorkerHost":[3085],"./editorWorkerHost.js":[3085],"./findSectionHeaders":[8332],"./findSectionHeaders.js":[8332],"./getIconClasses":[8123,792],"./getIconClasses.js":[8123,792],"./languageFeatureDebounce":[9208,792],"./languageFeatureDebounce.js":[9208,792],"./languageFeatures":[6461,792],"./languageFeatures.js":[6461,792],"./languageFeaturesService":[8258,792],"./languageFeaturesService.js":[8258,792],"./languageService":[1408,792],"./languageService.js":[1408,792],"./languagesAssociations":[6357,792],"./languagesAssociations.js":[6357,792],"./languagesRegistry":[6506,792],"./languagesRegistry.js":[6506,792],"./markerDecorations":[5563,792],"./markerDecorations.js":[5563,792],"./markerDecorationsService":[8476,792],"./markerDecorationsService.js":[8476,792],"./model":[887,792],"./model.js":[887,792],"./modelService":[9796,792],"./modelService.js":[9796,792],"./resolverService":[8707,792],"./resolverService.js":[8707,792],"./semanticTokensDto":[2013,792],"./semanticTokensDto.js":[2013,792],"./semanticTokensProviderStyling":[7975,792],"./semanticTokensProviderStyling.js":[7975,792],"./semanticTokensStyling":[3182,792],"./semanticTokensStyling.js":[3182,792],"./semanticTokensStylingService":[803,792],"./semanticTokensStylingService.js":[803,792],"./textModelSync/textModelSync.impl":[9956],"./textModelSync/textModelSync.impl.js":[9956],"./textModelSync/textModelSync.protocol":[3051,792],"./textModelSync/textModelSync.protocol.js":[3051,792],"./textResourceConfiguration":[6693,792],"./textResourceConfiguration.js":[6693,792],"./treeSitterParserService":[9241,792],"./treeSitterParserService.js":[9241,792],"./treeViewsDnd":[9268,792],"./treeViewsDnd.js":[9268,792],"./treeViewsDndService":[8685,792],"./treeViewsDndService.js":[8685,792],"./unicodeTextModelHighlighter":[5050],"./unicodeTextModelHighlighter.js":[5050]};function i(e){if(!n.o(r,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then(()=>n(i))}i.keys=()=>Object.keys(r),i.id=2695,e.exports=i},2735:(e,t,n)=>{"use strict";n.d(t,{vb:()=>l,uC:()=>c,Qg:()=>a,$6:()=>h}),n(7542);var r=n(1490),i=n(2373),s=n(6274),o=n(6206);function a(e){return!!e&&"function"==typeof e.then}Symbol("MicrotaskDelay");class l{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new r.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const i=n.setInterval(()=>{e()},t);this.disposable=(0,s.s)(()=>{n.clearInterval(i),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}}class c{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let h,d;var u;d="function"!=typeof globalThis.requestIdleCallback||"function"!=typeof globalThis.cancelIdleCallback?(e,t)=>{(0,o._p)(()=>{if(n)return;const e=Date.now()+15,r={didTimeout:!0,timeRemaining:()=>Math.max(0,e-Date.now())};t(Object.freeze(r))});let n=!1;return{dispose(){n||(n=!0)}}}:(e,t,n)=>{const r=e.requestIdleCallback(t,"number"==typeof n?{timeout:n}:void 0);let i=!1;return{dispose(){i||(i=!0,e.cancelIdleCallback(r))}}},h=e=>d(globalThis,e),function(e){e.settled=async function(e){let t;const n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if(void 0!==t)throw t;return n},e.withAsyncBody=function(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}}(u||(u={}));class p{static fromArray(e){return new p(t=>{t.emitMany(e)})}static fromPromise(e){return new p(async t=>{t.emitMany(await e)})}static fromPromises(e){return new p(async t=>{await Promise.all(e.map(async e=>t.emitOne(await e)))})}static merge(e){return new p(async t=>{await Promise.all(e.map(async e=>{for await(const n of e)t.emitOne(n)}))})}static{this.EMPTY=p.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new i.vl,queueMicrotask(async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new p(async n=>{for await(const r of e)n.emitOne(t(r))})}map(e){return p.map(this,e)}static filter(e,t){return new p(async n=>{for await(const r of e)t(r)&&n.emitOne(r)})}filter(e){return p.filter(this,e)}static coalesce(e){return p.filter(e,e=>!!e)}coalesce(){return p.coalesce(this)}static async toPromise(e){const t=[];for await(const n of e)t.push(n);return t}toPromise(){return p.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}},2803:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseEditorSimpleWorker:()=>Ae,EditorSimpleWorker:()=>Me,create:()=>Oe});class r{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var i=n(9517);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new r(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[r,i,s]=h._getElements(e),[o,a,l]=h._getElements(t);this._hasStrings=s&&l,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(h._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,r=t.length;n=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){let s;return n<=i?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new r(e,0,n,i-n+1)]):e<=t?(a.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),s=[new r(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,i,o,l,s),h=o[0],d=l[0];if(null!==c)return c;if(!s[0]){const o=this.ComputeDiffRecursive(e,h,n,d,s);let a=[];return a=s[0]?[new r(h+1,t-(h+1)+1,d+1,i-(d+1)+1)]:this.ComputeDiffRecursive(h+1,t,d+1,i,s),this.ConcatenateChanges(o,a)}return[new r(e,t-e+1,n,i-n+1)]}WALKTRACE(e,t,n,i,s,o,a,l,h,d,u,p,m,f,g,b,v,y){let w=null,C=null,_=new c,k=t,x=n,S=m[0]-b[0]-i,E=-1073741824,F=this.m_forwardHistory.length-1;do{const t=S+e;t===k||t=0&&(e=(h=this.m_forwardHistory[F])[0],k=1,x=h.length-1)}while(--F>=-1);if(w=_.getReverseChanges(),y[0]){let e=m[0]+1,t=b[0]+1;if(null!==w&&w.length>0){const n=w[w.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}C=[new r(e,p-e+1,t,g-t+1)]}else{_=new c,k=o,x=a,S=m[0]-b[0]-l,E=1073741824,F=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===k||e=d[e+1]?(f=(u=d[e+1]-1)-S-l,u>E&&_.MarkNextChange(),E=u+1,_.AddOriginalElement(u+1,f+1),S=e+1-s):(f=(u=d[e-1])-S-l,u>E&&_.MarkNextChange(),E=u,_.AddModifiedElement(u+1,f+1),S=e-1-s),F>=0&&(s=(d=this.m_reverseHistory[F])[0],k=1,x=d.length-1)}while(--F>=-1);C=_.getChanges()}return this.ConcatenateChanges(w,C)}ComputeRecursionPoint(e,t,n,i,s,o,a){let c=0,h=0,d=0,u=0,p=0,m=0;e--,n--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(i-n),g=f+1,b=new Int32Array(g),v=new Int32Array(g),y=i-n,w=t-e,C=e-n,_=t-i,k=(w-y)%2==0;b[y]=e,v[w]=t,a[0]=!1;for(let x=1;x<=f/2+1;x++){let f=0,S=0;d=this.ClipDiagonalBound(y-x,x,y,g),u=this.ClipDiagonalBound(y+x,x,y,g);for(let e=d;e<=u;e+=2){c=e===d||ef+S&&(f=c,S=h),!k&&Math.abs(e-w)<=x-1&&c>=v[e])return s[0]=c,o[0]=h,n<=v[e]&&x<=1448?this.WALKTRACE(y,d,u,C,w,p,m,_,b,v,c,t,s,h,i,o,k,a):null}const E=(f-e+(S-n)-x)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(f,E))return a[0]=!0,s[0]=f,o[0]=S,E>0&&x<=1448?this.WALKTRACE(y,d,u,C,w,p,m,_,b,v,c,t,s,h,i,o,k,a):(e++,n++,[new r(e,t-e+1,n,i-n+1)]);p=this.ClipDiagonalBound(w-x,x,w,g),m=this.ClipDiagonalBound(w+x,x,w,g);for(let r=p;r<=m;r+=2){c=r===p||r=v[r+1]?v[r+1]-1:v[r-1],h=c-(r-w)-_;const l=c;for(;c>e&&h>n&&this.ElementsAreEqual(c,h);)c--,h--;if(v[r]=c,k&&Math.abs(r-y)<=x&&c<=b[r])return s[0]=c,o[0]=h,l>=b[r]&&x<=1448?this.WALKTRACE(y,d,u,C,w,p,m,_,b,v,c,t,s,h,i,o,k,a):null}if(x<=1447){let e=new Int32Array(u-d+2);e[0]=y-d+1,l.Copy2(b,d,e,1,u-d+1),this.m_forwardHistory.push(e),e=new Int32Array(m-p+2),e[0]=w-p+1,l.Copy2(v,p,e,1,m-p+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(y,d,u,C,w,p,m,_,b,v,c,t,s,h,i,o,k,a)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let r=0,i=0;if(t>0){const n=e[t-1];r=n.originalStart+n.originalLength,i=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,c=n.modifiedStart-e;if(tl&&(l=h,a=e)}n.originalStart-=a,n.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&n>a&&(a=n,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const r=new Array(e.length+t.length-1);return l.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],l.Copy(t,1,r,e.length,t.length-1),r}{const n=new Array(e.length+t.length);return l.Copy(e,0,n,0,e.length),l.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const i=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new r(i,s,o,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,r){if(e>=0&&et&&(t=s),i>n&&(n=i),o>n&&(n=o)}t++,n++;const r=new p(n,t,0);for(let t=0,n=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let f=null,g=null;class b{static _createLink(e,t,n,r,i){let s=i-1;do{const n=t.charCodeAt(s);if(2!==e.get(n))break;s--}while(s>r);if(r>0){const e=t.charCodeAt(r-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:s+2},url:t.substring(r,s+1)}}static computeLinks(e,t=function(){return null===f&&(f=new m([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),f}()){const n=function(){if(null===g){g=new u.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}}var y=n(7317),w=n(3085),C=n(3958),_=n(5050);class k{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class x{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}var S=n(1490),E=n(6362),F=n(8274),L=n(867),I=n(6185);n(3550);class T{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class N{static inverse(e,t,n){const r=[];let i=1,s=1;for(const t of e){const e=new N(new E.M(i,t.original.startLineNumber),new E.M(s,t.modified.startLineNumber));e.modified.isEmpty||r.push(e),i=t.original.endLineNumberExclusive,s=t.modified.endLineNumberExclusive}const o=new N(new E.M(i,t+1),new E.M(s,n+1));return o.modified.isEmpty||r.push(o),r}static clip(e,t,n){const r=[];for(const i of e){const e=i.original.intersect(t),s=i.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&r.push(new N(e,s))}return r}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new N(this.modified,this.original)}join(e){return new N(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new M(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new S.D7("not a valid diff");return new M(new d.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new d.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new M(new d.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new d.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(D(this.original.endLineNumberExclusive,e)&&D(this.modified.endLineNumberExclusive,t))return new M(new d.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new d.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new M(d.Q.fromPositions(new F.y(this.original.startLineNumber,1),R(new F.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),d.Q.fromPositions(new F.y(this.modified.startLineNumber,1),R(new F.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new M(d.Q.fromPositions(R(new F.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),R(new F.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),d.Q.fromPositions(R(new F.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),R(new F.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new S.D7}}function R(e,t){if(e.lineNumber<1)return new F.y(1,1);if(e.lineNumber>t.length)return new F.y(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new F.y(e.lineNumber,n.length+1):e}function D(e,t){return e>=1&&e<=t.length}class A extends N{static fromRangeMappings(e){const t=E.M.join(e.map(e=>E.M.fromRangeInclusive(e.originalRange))),n=E.M.join(e.map(e=>E.M.fromRangeInclusive(e.modifiedRange)));return new A(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new A(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new A(this.original,this.modified,[this.toRangeMapping()])}}class M{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new M(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new T(this.originalRange,t)}}var O=n(5603);class z{computeDiff(e,t,n){const r=new $(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),i=[];let s=null;for(const e of r.changes){let t,n;t=0===e.originalEndLineNumber?new E.M(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new E.M(e.originalStartLineNumber,e.originalEndLineNumber+1),n=0===e.modifiedEndLineNumber?new E.M(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new E.M(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let r=new A(t,n,e.charChanges?.map(e=>new M(new d.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new d.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn))));s&&(s.modified.endLineNumberExclusive!==r.modified.startLineNumber&&s.original.endLineNumberExclusive!==r.original.startLineNumber||(r=new A(s.original.join(r.original),s.modified.join(r.modified),s.innerChanges&&r.innerChanges?s.innerChanges.concat(r.innerChanges):void 0),i.pop())),i.push(r),s=r}return(0,L.Ft)(()=>(0,L.Xo)(i,(e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class V{constructor(e,t,n,r,i,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=r,this.modifiedStartLineNumber=i,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const r=t.getStartLineNumber(e.originalStart),i=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new V(r,i,s,o,a,l,c,h)}}class U{constructor(e,t,n,r,i){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=r,this.charChanges=i}static createFromDiffResult(e,t,n,r,i,s,o){let a,l,c,h,d;if(0===t.originalLength?(a=n.getStartLineNumber(t.originalStart)-1,l=0):(a=n.getStartLineNumber(t.originalStart),l=n.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=r.getStartLineNumber(t.modifiedStart)-1,h=0):(c=r.getStartLineNumber(t.modifiedStart),h=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&i()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=r.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=P(s,a,i,!0).changes;o&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r1&&o>1&&e.charCodeAt(n-2)===t.charCodeAt(o-2);)n--,o--;(n>1||o>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,n,s+1,1,o)}{let n=j(e,1),o=j(t,1);const a=e.length+1,l=t.length+1;for(;n!0;const t=Date.now();return()=>Date.now()-t{n.push(Q.fromOffsetPairs(e?e.getEndExclusives():J.zero,r?r.getStarts():new J(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new Q(new I.L(e.offset1,t.offset1),new I.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new S.D7("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new Q(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Q(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new Q(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new Q(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new Q(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new Q(t,n)}getStarts(){return new J(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new J(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class J{static{this.zero=new J(0,0)}static{this.max=new J(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new J(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class Y{static{this.instance=new Y}isValid(){return!0}}class X{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new S.D7("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&l>0&&3===s.get(a-1,l-1)&&(d+=o.get(a-1,l-1)),d+=r?r(a,l):1):d=-1;const u=Math.max(c,h,d);if(u===d){const e=a>0&&l>0?o.get(a-1,l-1):0;o.set(a,l,e+1),s.set(a,l,3)}else u===c?(o.set(a,l,0),s.set(a,l,1)):u===h&&(o.set(a,l,0),s.set(a,l,2));i.set(a,l,u)}const a=[];let l=e.length,c=t.length;function h(e,t){e+1===l&&t+1===c||a.push(new Q(new I.L(e+1,l),new I.L(t+1,c))),l=e,c=t}let d=e.length-1,u=t.length-1;for(;d>=0&&u>=0;)3===s.get(d,u)?(h(d,u),d--,u--):1===s.get(d,u)?d--:u--;return h(-1,-1),a.reverse(),new G(a,!1)}}class re{compute(e,t,n=Y.instance){if(0===e.length||0===t.length)return G.trivial(e,t);const r=e,i=t;function s(e,t){for(;er.length||u>i.length)continue;const p=s(d,u);a.set(c,p);const m=d===o?l.get(c+1):l.get(c-1);if(l.set(c,p!==d?new ie(m,d,u,p-d):m),a.get(c)===r.length&&a.get(c)-c===i.length)break e}}let h=l.get(c);const d=[];let u=r.length,p=i.length;for(;;){const e=h?h.x+h.length:0,t=h?h.y+h.length:0;if(e===u&&t===p||d.push(new Q(new I.L(e,u),new I.L(t,p))),!h)break;u=h.x,p=h.y,h=h.prev}return d.reverse(),new G(d,!1)}}class ie{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}}class se{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class oe{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var ae=n(8348),le=n(6303);class ce{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let r=e[t-1],i=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(i=this.range.startColumn-1,r=r.substring(i)),this.lineStartOffsets.push(i);let s=0;if(!n){const e=r.trimStart();s=r.length-e.length,r=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-i-s,r.length):r.length;for(let e=0;eString.fromCharCode(e)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=pe(e>0?this.elements[e-1]:-1),n=pe(et<=e),r=e-this.firstElementOffsetByLineIdx[n];return new F.y(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(0===r&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?d.Q.fromPositions(n,n):d.Q.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!he(this.elements[e]))return;let t=e;for(;t>0&&he(this.elements[t-1]);)t--;let n=e;for(;nt<=e.start)??0,n=(0,ae.XP)(this.firstElementOffsetByLineIdx,t=>e.endExclusive<=t)??this.elements.length;return new I.L(t,n)}}function he(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const de={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function ue(e){return de[e]}function pe(e){return 10===e?8:13===e?7:ee(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function me(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const r=(new re).compute(new ce([e],new d.Q(1,1,1,e.length),!1),new ce([t],new d.Q(1,1,1,t.length),!1),n);let i=0;const s=Q.invert(r.diffs,e.length);for(const t of s)t.seq1Range.forEach(t=>{ee(e.charCodeAt(t))||i++});const o=function(t){let n=0;for(let r=0;rt.length?e:t);return i/o>.6&&o>10}function fe(e,t,n){let r=n;return r=ge(e,t,r),r=ge(e,t,r),r=function(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+10&&(o=o.delta(a))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function be(e,t,n,r,i){let s=1;for(;e.seq1Range.start-s>=r.start&&e.seq2Range.start-s>=i.start&&n.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let o=0;for(;e.seq1Range.start+ol&&(l=c,a=r)}return e.delta(a)}class ve{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:ye(this.lines[e-1]))+(e===this.lines.length?0:ye(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function ye(e){let t=0;for(;te===t))return new k([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new k([new A(new E.M(1,e.length+1),new E.M(1,t.length+1),[new M(new d.Q(1,1,e.length,e[e.length-1].length+1),new d.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const r=0===n.maxComputationTimeMs?Y.instance:new X(n.maxComputationTimeMs),i=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map(e=>o(e.trim())),l=t.map(e=>o(e.trim())),c=new ve(a,e),h=new ve(l,t),u=(()=>c.length+h.length<1700?this.dynamicProgrammingDiffing.compute(c,h,r,(n,r)=>e[n]===t[r]?0===t[r].length?.1:1+Math.log(1+t[r].length):.99):this.myersDiffingAlgorithm.compute(c,h,r))();let p=u.diffs,m=u.hitTimeout;p=fe(c,h,p),p=function(e,t,n){let r=n;if(0===r.length)return r;let i,s=0;do{i=!1;const o=[r[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}h(c,l)?(i=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}r=o}while(s++<10&&i);return r}(c,0,p);const f=[],g=n=>{if(i)for(let s=0;sn.seq1Range.start-b===n.seq2Range.start-v),g(n.seq1Range.start-b),b=n.seq1Range.endExclusive,v=n.seq2Range.endExclusive;const s=this.refineDiff(e,t,n,r,i);s.hitTimeout&&(m=!0);for(const e of s.mappings)f.push(e)}g(e.length-b);const y=Ce(f,e,t);let w=[];return n.computeMoves&&(w=this.computeMoves(y,e,t,a,l,r,i)),(0,L.Ft)(()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function r(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const i of y){if(!i.innerChanges)return!1;for(const r of i.innerChanges)if(!(n(r.modifiedRange.getStartPosition(),t)&&n(r.modifiedRange.getEndPosition(),t)&&n(r.originalRange.getStartPosition(),e)&&n(r.originalRange.getEndPosition(),e)))return!1;if(!r(i.modified,t)||!r(i.original,e))return!1}return!0}),new k(y,w,m)}computeMoves(e,t,n,r,i,s,o){return function(e,t,n,r,i,s){let{moves:o,excludedChanges:a}=function(e,t,n,r){const i=[],s=e.filter(e=>e.modified.isEmpty&&e.original.length>=3).map(e=>new te(e.original,t,e)),o=new Set(e.filter(e=>e.original.isEmpty&&e.modified.length>=3).map(e=>new te(e.modified,n,e))),a=new Set;for(const e of s){let t,n=-1;for(const r of o){const i=e.computeSimilarity(r);i>n&&(n=i,t=r)}if(n>.9&&t&&(o.delete(t),i.push(new N(e.range,t.range)),a.add(e.source),a.add(t.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}(e,t,n,s);if(!s.isValid())return[];const l=function(e,t,n,r,i,s){const o=[],a=new le.db;for(const n of e)for(let e=n.original.startLineNumber;ee.modified.startLineNumber,H.U9));for(const t of e){let e=[];for(let r=t.modified.startLineNumber;r{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===i.endLineNumberExclusive)return n.originalLineRange=new E.M(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new E.M(n.modifiedLineRange.startLineNumber,i.endLineNumberExclusive),void s.push(n);const n={modifiedLineRange:i,originalLineRange:t};l.push(n),s.push(n)}),e=s}if(!s.isValid())return[]}l.sort((0,H.Hw)((0,H.VE)(e=>e.modifiedLineRange.length,H.U9)));const c=new E.S,h=new E.S;for(const e of l){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,n=c.subtractFrom(e.modifiedLineRange),r=h.subtractFrom(e.originalLineRange).getWithDelta(t),i=n.getIntersection(r);for(const e of i.ranges){if(e.length<3)continue;const n=e,r=e.delta(-t);o.push(new N(r,n)),c.addRange(n),h.addRange(r)}}o.sort((0,H.VE)(e=>e.original.startLineNumber,H.U9));const d=new ae.vJ(e);for(let t=0;te.original.startLineNumber<=n.original.startLineNumber),l=(0,ae.lx)(e,e=>e.modified.startLineNumber<=n.modified.startLineNumber),u=Math.max(n.original.startLineNumber-a.original.startLineNumber,n.modified.startLineNumber-l.modified.startLineNumber),p=d.findLastMonotonous(e=>e.original.startLineNumbere.modified.startLineNumberr.length||t>i.length)break;if(c.contains(t)||h.contains(e))break;if(!me(r[e-1],i[t-1],s))break}for(g>0&&(h.addRange(new E.M(n.original.startLineNumber-g,n.original.startLineNumber)),c.addRange(new E.M(n.modified.startLineNumber-g,n.modified.startLineNumber))),b=0;br.length||t>i.length)break;if(c.contains(t)||h.contains(e))break;if(!me(r[e-1],i[t-1],s))break}b>0&&(h.addRange(new E.M(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+b)),c.addRange(new E.M(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+b))),(g>0||b>0)&&(o[t]=new N(new E.M(n.original.startLineNumber-g,n.original.endLineNumberExclusive+b),new E.M(n.modified.startLineNumber-g,n.modified.endLineNumberExclusive+b)))}return o}(e.filter(e=>!a.has(e)),r,i,t,n,s);return(0,H.E4)(o,l),o=function(e){if(0===e.length)return e;e.sort((0,H.VE)(e=>e.original.startLineNumber,H.U9));const t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2?t[t.length-1]=r.join(i):t.push(i)}return t}(o),o=o.filter(e=>{const n=e.original.toOffsetRange().slice(t).map(e=>e.trim());return n.join("\n").length>=15&&function(e,t){let n=0;for(const r of e)t(r)&&n++;return n}(n,e=>e.length>=2)>=2}),o=function(e,t){const n=new ae.vJ(e);return t.filter(t=>(n.findLastMonotonous(e=>e.original.startLineNumbere.modified.startLineNumber{const r=Ce(this.refineDiff(t,n,new Q(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o).mappings,t,n,!0);return new x(e,r)})}refineDiff(e,t,n,r,i){var s;const o=(s=n,new N(new E.M(s.seq1Range.start+1,s.seq1Range.endExclusive+1),new E.M(s.seq2Range.start+1,s.seq2Range.endExclusive+1))).toRangeMapping2(e,t),a=new ce(e,o.originalRange,i),l=new ce(t,o.modifiedRange,i),c=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,r):this.myersDiffingAlgorithm.compute(a,l,r);let h=c.diffs;h=fe(a,l,h),h=function(e,t,n){const r=Q.invert(n,e.length),i=[];let s=new J(0,0);function o(n,o){if(n.offset10;){const n=r[0];if(!n.seq1Range.intersects(c.seq1Range)&&!n.seq2Range.intersects(c.seq2Range))break;const i=e.findWordContaining(n.seq1Range.start),s=t.findWordContaining(n.seq2Range.start),o=new Q(i,s),a=o.intersect(n);if(d+=a.seq1Range.length,u+=a.seq2Range.length,c=c.join(o),!(c.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;r.shift()}d+u<2*(c.seq1Range.length+c.seq2Range.length)/3&&i.push(c),s=c.getEndExclusives()}for(;r.length>0;){const e=r.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}return function(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;s=r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}(n,i)}(a,l,h),h=function(e,t,n){const r=[];for(const e of n){const t=r[r.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?r[r.length-1]=new Q(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):r.push(e)}return r}(0,0,h),h=function(e,t,n){let r=n;if(0===r.length)return r;let i,s=0;do{i=!1;const a=[r[0]];for(let l=1;l5||i.length>500)return!1;const s=e.getText(i).trim();if(s.length>20||s.split(/\r\n|\r|\n/).length>1)return!1;const o=e.countLinesIn(n.seq1Range),a=n.seq1Range.length,l=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,u=e.countLinesIn(r.seq1Range),p=r.seq1Range.length,m=t.countLinesIn(r.seq2Range),f=r.seq2Range.length;function g(e){return Math.min(e,130)}return Math.pow(Math.pow(g(40*o+a),1.5)+Math.pow(g(40*l+d),1.5),1.5)+Math.pow(Math.pow(g(40*u+p),1.5)+Math.pow(g(40*m+f),1.5),1.5)>74184.96480721243}d(h,c)?(i=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}r=a}while(s++<10&&i);const o=[];return(0,H.kj)(r,(t,n,r)=>{let i=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new I.L(a.start,n.seq1Range.start));s(l)&&(i=i.deltaStart(-l.length));const c=e.getText(new I.L(n.seq1Range.endExclusive,a.endExclusive));s(c)&&(i=i.deltaEnd(c.length));const h=Q.fromOffsetPairs(t?t.getEndExclusives():J.zero,r?r.getStarts():J.max),d=i.intersect(h);o.length>0&&d.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(d):o.push(d)}),o}(a,l,h);return{mappings:h.map(e=>new M(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range))),hitTimeout:c.hitTimeout}}}function Ce(e,t,n,r=!1){const i=[];for(const r of(0,H.n)(e.map(e=>function(e,t,n){let r=0,i=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+r<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+r<=e.modifiedRange.endLineNumber&&(i=-1),e.modifiedRange.startColumn-1>=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);const s=new E.M(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new E.M(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new A(s,o,[e])}(e,t,n)),(e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified))){const e=r[0],t=r[r.length-1];i.push(new A(e.original.join(t.original),e.modified.join(t.modified),r.map(e=>e.innerChanges[0])))}return(0,L.Ft)(()=>{if(!r&&i.length>0){if(i[0].modified.startLineNumber!==i[0].original.startLineNumber)return!1;if(n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)return!1}return(0,L.Xo)(i,(e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map(e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn])])}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map(e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)])}}static _modelsAreIdentical(e,t){const n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let r=1;r<=n;r++)if(e.getLineContent(r)!==t.getLineContent(r))return!1;return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){const r=this._getModel(e);if(!r)return t;const i=[];let s;t=t.slice(0).sort((e,t)=>e.range&&t.range?d.Q.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1));let a=0;for(let e=1;eMe._diffLimit){i.push({range:e,text:a});continue}const c=o(t,a,n),h=r.offsetAt(d.Q.lift(e).getStartPosition());for(const e of c){const t=r.positionAt(h+e.originalStart),n=r.positionAt(h+e.originalStart+e.originalLength),s={text:a.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};r.getValueInRange(s.range)!==s.text&&i.push(s)}}return"number"==typeof s&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}async $computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?b.computeLinks(e):[]}(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],n=Ne(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(n.length>0)for(const r of n){const n=r.filter(e=>void 0!==e),i=n[1],s=n[2];if(!s)continue;let o;if("rgb"===i){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=Ie(Fe(e,r),Ne(s,t),!1)}else if("rgba"===i){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Ie(Fe(e,r),Ne(s,t),!0)}else if("hsl"===i){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=Te(Fe(e,r),Ne(s,t),!1)}else if("hsla"===i){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Te(Fe(e,r),Ne(s,t),!0)}else"#"===i&&(o=Le(Fe(e,r),i+s));o&&t.push(o)}return t}(e):[]}(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,r){const i=new C.W,s=new RegExp(n,r),o=new Set;e:for(const n of e){const e=this._getModel(n);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>Me._suggestionsLimit))break e}return{words:Array.from(o),duration:i.elapsed()}}async $computeWordRanges(e,t,n,r){const i=this._getModel(e);if(!i)return Object.create(null);const s=new RegExp(n,r),o=Object.create(null);for(let e=t.startLineNumber;ethis._host.$fhr(e,t)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(i,t),Promise.resolve((0,_e.V0)(this._foreignModule))):new Promise((r,s)=>{const o=e=>{this._foreignModule=e.create(i,t),r((0,_e.V0)(this._foreignModule))};{const t=ke.zl.asBrowserUri(`${e}.js`).toString(!0);n(2695)(`${t}`).then(o).catch(s)}})}$fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}function Oe(e){return new Me(w.EditorWorkerHost.getChannel(e),null)}"function"==typeof importScripts&&(globalThis.monaco=(0,y.createMonacoBaseAPI)())},2919:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IEditorWorkerService:()=>r});const r=(0,n(7352).u1)("editorWorkerService")},3035:(e,t,n)=>{"use strict";n.d(t,{YW:()=>I,qg:()=>T});var r=n(2735),i=n(1905),s=n(6303),o=n(9130),a=n(6206),l=n(5603);const c="**",h="/",d="[/\\\\]",u="[^/\\\\]",p=/\//g;function m(e,t){switch(e){case 0:return"";case 1:return`${u}*?`;default:return`(?:${d}|${u}+${d}${t?`|${d}${u}+`:""})*?`}}function f(e,t){if(!e)return[];const n=[];let r=!1,i=!1,s="";for(const o of e){switch(o){case t:if(!r&&!i){n.push(s),s="";continue}break;case"{":r=!0;break;case"}":r=!1;break;case"[":i=!0;break;case"]":i=!1}s+=o}return s&&n.push(s),n}function g(e){if(!e)return"";let t="";const n=f(e,h);if(n.every(e=>e===c))t=".*";else{let e=!1;n.forEach((r,i)=>{if(r===c){if(e)return;t+=m(2,i===n.length-1)}else{let e=!1,s="",o=!1,a="";for(const n of r)if("}"!==n&&e)s+=n;else{if(o&&("]"!==n||!a)){let e;e="-"===n?n:"^"!==n&&"!"!==n||a?n===h?"":(0,l.bm)(n):"^",a+=e;continue}switch(n){case"{":e=!0;continue;case"[":o=!0;continue;case"}":{const n=`(?:${f(s,",").map(e=>g(e)).join("|")})`;t+=n,e=!1,s="";break}case"]":t+="["+a+"]",o=!1,a="";break;case"?":t+=u;continue;case"*":t+=m(1);continue;default:t+=(0,l.bm)(n)}}iE(e,t)).filter(e=>e!==S),e),r=n.length;if(!r)return S;if(1===r)return n[0];const i=function(t,r){for(let i=0,s=n.length;i!!e.allBasenames);s&&(i.allBasenames=s.allBasenames);const o=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return o.length&&(i.allPaths=o),i}(n,t):(s=C.exec(F(n,t)))?L(s[1].substr(1),n,!0):(s=_.exec(F(n,t)))?L(s[1],n,!1):function(e){try{const t=new RegExp(`^${g(e)}$`);return function(n){return t.lastIndex=0,"string"==typeof n&&t.test(n)?e:null}}catch(e){return S}}(n),k.set(r,c)),function(e,t){if("string"==typeof t)return e;const n=function(n,r){return(0,i._1)(n,t.base,!a.j9)?e((0,l.NB)(n.substr(t.base.length),o.Vn),r):null};return n.allBasenames=e.allBasenames,n.allPaths=e.allPaths,n.basenames=e.basenames,n.patterns=e.patterns,n}(c,e)}function F(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function L(e,t,n){const r=o.Vn===o.SA.sep,i=r?e:e.replace(p,o.Vn),s=o.Vn+i,a=o.SA.sep+e;let l;return l=n?function(n,o){return"string"!=typeof n||n!==i&&!n.endsWith(s)&&(r||n!==e&&!n.endsWith(a))?null:t}:function(n,s){return"string"!=typeof n||n!==i&&(r||n!==e)?null:t},l.allPaths=[(n?"*/":"./")+e],l}function I(e,t,n){return!(!e||"string"!=typeof t)&&T(e)(t,void 0,n)}function T(e,t={}){if(!e)return x;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const n=E(e,t);if(n===S)return x;const r=function(e,t){return!!n(e,t)};return n.allBasenames&&(r.allBasenames=n.allBasenames),n.allPaths&&(r.allPaths=n.allPaths),r}return function(e,t){const n=N(Object.getOwnPropertyNames(e).map(n=>function(e,t,n){if(!1===t)return S;const i=E(e,n);if(i===S)return S;if("boolean"==typeof t)return i;if(t){const n=t.when;if("string"==typeof n){const t=(t,s,o,a)=>{if(!a||!i(t,s))return null;const l=a(n.replace("$(basename)",()=>o));return(0,r.Qg)(l)?l.then(t=>t?e:null):l?e:null};return t.requiresSiblings=!0,t}}return i}(n,e[n],t)).filter(e=>e!==S)),i=n.length;if(!i)return S;if(!n.some(e=>!!e.requiresSiblings)){if(1===i)return n[0];const e=function(e,t){let i;for(let s=0,o=n.length;s{for(const e of i){const t=await e;if("string"==typeof t)return t}return null})():null},t=n.find(e=>!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const s=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,i){let s,a;for(let l=0,c=n.length;l{for(const e of a){const t=await e;if("string"==typeof t)return t}return null})():null},a=n.find(e=>!!e.allBasenames);a&&(s.allBasenames=a.allBasenames);const l=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return l.length&&(s.allPaths=l),s}(e,t)}function N(e,t){const n=e.filter(e=>!!e.basenames);if(n.length<2)return e;const r=n.reduce((e,t)=>{const n=t.basenames;return n?e.concat(n):e},[]);let i;if(t){i=[];for(let e=0,n=r.length;e{const n=t.patterns;return n?e.concat(n):e},[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=r.indexOf(t);return-1!==n?i[n]:null};s.basenames=r,s.patterns=i,s.allBasenames=r;const o=e.filter(e=>!e.basenames);return o.push(s),o}},3051:(e,t,n)=>{"use strict";n.r(t)},3085:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditorWorkerHost:()=>r});class r{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(r.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(r.CHANNEL_NAME,t)}}},3142:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SimpleWorkerClient:()=>y,SimpleWorkerServer:()=>_,create:()=>k,logOnceWebWorkerWarning:()=>u});var r=n(1490),i=n(2373),s=n(6274),o=n(4427),a=n(6206),l=n(5603);const c="default",h="$initialize";let d=!1;function u(e){a.HZ&&(d||(d=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class p{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.method=r,this.args=i,this.type=0}}class m{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}}class f{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=r,this.arg=i,this.type=2}}class g{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class b{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class v{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new p(this._workerId,r,e,t,n))})}listen(e,t,n){let r=null;const s=new i.vl({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,s),this._send(new f(this._workerId,r,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new b(this._workerId,r)),r=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const n={get:(n,r)=>("string"!=typeof r||n[r]||(C(r)?n[r]=t=>this.listen(e,r,t):w(r)?n[r]=this.listen(e,r,void 0):36===r.charCodeAt(0)&&(n[r]=async(...n)=>(await(t?.()),this.sendMessage(e,r,n)))),n[r])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(e=>{this._send(new m(this._workerId,t,e,void 0))},e=>{e.detail instanceof Error&&(e.detail=(0,r.cU)(e.detail)),this._send(new m(this._workerId,t,void 0,(0,r.cU)(e)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(e=>{this._send(new g(this._workerId,t,e))});this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;n{this._protocol.handleMessage(e)},e=>{(0,r.dz)(e)})),this._protocol=new v({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this._protocol.setWorkerId(this._worker.getId());let n=null;const i=globalThis.require;void 0!==i&&"function"==typeof i.getConfig?n=i.getConfig():void 0!==globalThis.requirejs&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(c,h,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(c,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(e=>{this._onError("Worker failed to load "+t.amdModuleId,e)})}_handleMessage(e,t,n){const r=this._localChannels.get(e);if(!r)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!=typeof r[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(r[t].apply(r,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const r=this._localChannels.get(e);if(!r)throw new Error(`Missing channel ${e} on main thread`);if(C(t)){const i=r[t].call(r,n);if("function"!=typeof i)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return i}if(w(t)){const n=r[t];if("function"!=typeof n)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return n}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function w(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function C(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class _{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new v({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===c&&t===h)return this.initialize(n[0],n[1],n[2]);const r=e===c?this._requestHandler:this._localChannels.get(e);if(!r)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!=typeof r[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(r[t].apply(r,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const r=e===c?this._requestHandler:this._localChannels.get(e);if(!r)throw new Error(`Missing channel ${e} on worker thread`);if(C(t)){const e=r[t].call(r,n);if("function"!=typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(w(t)){const e=r[t];if("function"!=typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,r){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,void 0!==t.trustedTypesPolicy&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t));{const e=o.zl.asBrowserUri(`${r}.js`).toString(!0);return n(6781)(`${e}`).then(e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")})}}this._requestHandler=this._requestHandlerFactory(this)}}function k(e){return new _(e,null)}},3182:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ISemanticTokensStylingService:()=>r});const r=(0,n(7352).u1)("semanticTokensStylingService")},3298:(e,t,n)=>{"use strict";function r(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{Q1:()=>a,bU:()=>i,hB:()=>s});class i{constructor(e,t,n,i=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=r(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,n,i){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=r(Math.max(Math.min(1,t),0),3),this.l=r(Math.max(Math.min(1,n),0),3),this.a=r(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=e.a,o=Math.max(t,n,r),a=Math.min(t,n,r);let l=0,c=0;const h=(a+o)/2,d=o-a;if(d>0){switch(c=Math.min(h<=.5?d/(2*h):d/(2-2*h),1),o){case t:l=(n-r)/d+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:r,a:o}=e;let a,l,c;if(0===n)a=l=c=r;else{const e=r<.5?r*(1+n):r+n-r*n,i=2*r-e;a=s._hue2rgb(i,e,t+1/3),l=s._hue2rgb(i,e,t),c=s._hue2rgb(i,e,t-1/3)}return new i(Math.round(255*a),Math.round(255*l),Math.round(255*c),o)}}class o{constructor(e,t,n,i){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=r(Math.max(Math.min(1,t),0),3),this.v=r(Math.max(Math.min(1,n),0),3),this.a=r(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=0===i?0:s/i;let l;return l=0===s?0:i===t?((n-r)/s%6+6)%6:i===n?(r-t)/s+2:(t-n)/s+4,new o(Math.round(60*l),a,i,e.a)}static toRGBA(e){const{h:t,s:n,v:r,a:s}=e,o=r*n,a=o*(1-Math.abs(t/60%2-1)),l=r-o;let[c,h,d]=[0,0,0];return t<60?(c=o,h=a):t<120?(c=a,h=o):t<180?(h=o,d=a):t<240?(h=a,d=o):t<300?(c=a,d=o):t<=360&&(c=o,d=a),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),d=Math.round(255*(d+l)),new i(c,h,d,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof i)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}equals(e){return!!e&&i.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)}getRelativeLuminance(){return r(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance(){"use strict";n.d(t,{W:()=>s});var r=n(8274),i=n(800);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const r of e)"\n"===r?(t++,n=0):n++;return new s(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new i.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new i.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new r.y(e.lineNumber,e.column+this.columnCount):new r.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},3793:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});const r=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},3958:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});const r=globalThis.performance&&"function"==typeof globalThis.performance.now;class i{static create(e){return new i(e)}constructor(e){this._now=r&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},4086:(e,t,n)=>{"use strict";n.d(t,{W6:()=>l,vH:()=>c});var r=n(7703),i=n(2373),s=n(5352),o=n(3793),a=n(4709);const l=new class{constructor(){this._onDidChangeLanguages=new i.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t{"use strict";n.d(t,{ny:()=>r,v$:()=>c,zl:()=>u});var r,i=n(1490),s=n(6206),o=n(5603),a=n(695),l=n(9130);function c(e,t){return a.r.isUri(e)?(0,o.Q_)(e.scheme,t):(0,o.ns)(e,t+":")}!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"}(r||(r={}));const h=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,r.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return i.dz(t),e}const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&-1===n.indexOf("[")&&(n=`[${n}]`);const o=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"==typeof l&&(c+=`&tkn=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:r.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:c})}};class d{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===r.vscodeRemote?h.rewrite(e):e.scheme!==r.file||!s.ib&&s.lg!==`${r.vscodeFileResource}://${d.FALLBACK_AUTHORITY}`?e:e.with({scheme:r.vscodeFileResource,authority:e.authority||d.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const n=l.fj(t,e);return a.r.file(n)}return a.r.parse(t.toUrl(e))}}const u=new d;var p;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";e.getHeadersFromQuery=function(e){let r;"string"==typeof e?r=new URL(e).searchParams:e instanceof URL?r=e.searchParams:a.r.isUri(e)&&(r=new URL(e.toString(!0)).searchParams);const i=r?.get(n);if(i)return t.get(i)},e.addSearchParam=function(e,t,r){if(!globalThis.crossOriginIsolated)return;const i=t&&r?"3":r?"2":"1";e instanceof URLSearchParams?e.set(n,i):e[n]=i}}(p||(p={}))},4709:(e,t,n)=>{"use strict";n.d(t,{Fd:()=>h});var r=n(1211),i=n(2373),s=n(2548),o=n(7703),a=n(802),l=n(809),c=n(5352);const h={Configuration:"base.contributions.configuration"},d={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},b="vscode://schemas/settings/resourceLanguage",v=c.O.as(l.F.JSONContribution),y="\\[([^\\]]+)\\]",w=new RegExp(y,"g"),C=`^(${y})+$`,_=new RegExp(C);function k(e){const t=[];if(_.test(e)){let n=w.exec(e);for(;n?.length;){const r=n[1].trim();r&&t.push(r),n=w.exec(e)}}return(0,r.dM)(t)}const x=new class{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new i.vl,this._onDidUpdateConfiguration=new i.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o.kg("vs/platform/configuration/common/configurationRegistry","defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},v.registerSchema(b,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),v.registerSchema(b,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const n=[];for(const{overrides:r,source:i}of e)for(const e in r){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),o=r[e];if(s.configurationDefaultOverrides.push({value:o,source:i}),_.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,o,i,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,i),n.push(...k(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,o,i,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const n=this.configurationProperties[e];n&&(this.updatePropertyDefaultValue(e,n),this.updateSchema(e,n))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){const r={type:"object",default:t.value,description:o.kg("vs/platform/configuration/common/configurationRegistry","defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:b,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=r,this.defaultLanguageConfigurationOverridesNode.properties[e]=r}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,r){const i=r?.value||{},o=r?.source??new Map;if(o instanceof Map){for(const e of Object.keys(t)){const r=t[e];if(s.Gv(r)&&(s.b0(i[e])||s.Gv(i[e]))){if(i[e]={...i[e]??{},...r},n)for(const t in r)o.set(`${e}.${t}`,n)}else i[e]=r,n?o.set(e,n):o.delete(e)}return{value:i,source:o}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,r){const i=this.configurationProperties[e],o=r?.value??i?.defaultDefaultValue;let a=n;if(s.Gv(t)&&(void 0!==i&&"object"===i.type||void 0===i&&(s.b0(o)||s.Gv(o)))){if(a=r?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const r in t)n&&a.set(`${e}.${r}`,n);t={...s.Gv(o)?o:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach(e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,n),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})}validateAndRegisterProperties(e,t=!0,n,r,i=3,o){i=s.z(e.scope)?i:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&S(e,l)?delete a[e]:(l.source=n,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),_.test(e)?l.scope=void 0:(l.scope=s.z(l.scope)?i:l.scope,l.restricted=s.z(l.restricted)?!!r?.includes(e):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],a[e].policy?.name&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),o.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,n,r,i,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const n=e.properties;if(n)for(const e in n)this.updateSchema(e,n[e]);const r=e.allOf;r?.forEach(t)};t(e)}updateSchema(e,t){switch(d.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:p.properties[e]=t;break;case 6:m.properties[e]=t;break;case 3:f.properties[e]=t;break;case 4:g.properties[e]=t;break;case 5:g.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:o.kg("vs/platform/configuration/common/configurationRegistry","overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("vs/platform/configuration/common/configurationRegistry","overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:b};this.updatePropertyDefaultValue(t,n),d.properties[t]=n,u.properties[t]=n,p.properties[t]=n,m.properties[t]=n,f.properties[t]=n,g.properties[t]=n}}registerOverridePropertyPatternKey(){const e={type:"object",description:o.kg("vs/platform/configuration/common/configurationRegistry","overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("vs/platform/configuration/common/configurationRegistry","overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:b};d.patternProperties[C]=e,u.patternProperties[C]=e,p.patternProperties[C]=e,m.patternProperties[C]=e,f.patternProperties[C]=e,g.patternProperties[C]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let r,i;!n||t.disallowConfigurationDefault&&n.source||(r=n.value,i=n.source),s.b0(r)&&(r=t.defaultDefaultValue,i=void 0),s.b0(r)&&(r=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=r,t.defaultValueSource=i}};function S(e,t){return e.trim()?_.test(e)?o.kg("vs/platform/configuration/common/configurationRegistry","config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==x.getConfigurationProperties()[e]?o.kg("vs/platform/configuration/common/configurationRegistry","config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==x.getPolicyConfigurations().get(t.policy?.name)?o.kg("vs/platform/configuration/common/configurationRegistry","config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,x.getPolicyConfigurations().get(t.policy?.name)):null:o.kg("vs/platform/configuration/common/configurationRegistry","config.property.empty","Cannot register an empty property")}c.O.add(h.Configuration,x)},4756:(e,t,n)=>{"use strict";n.d(t,{buw:()=>S,b1q:()=>x,YtV:()=>N,Ubg:()=>U,IIb:()=>W,pOz:()=>B,whs:()=>O,Stt:()=>P,Hng:()=>z,yLC:()=>le,KoI:()=>oe,uMG:()=>ae,x1A:()=>d});var r=n(867),i=n(2735),s=n(3298),o=n(2373),a=n(809),l=n(5352),c=n(7703);const h=new class{constructor(){this._onDidChangeSchema=new o.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,r=!1,i){const s={id:e,description:n,defaults:t,needsTransparency:r,deprecationMessage:i};this.colorsById[e]=s;const o={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return i&&(o.deprecationMessage=i),r&&(o.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",o.patternErrorMessage=c.kg("vs/platform/theme/common/colorUtils","transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[o,{type:"string",const:"default",description:c.kg("vs/platform/theme/common/colorUtils","useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n?.defaults)return b(null!==(r=n.defaults)&&"object"==typeof r&&"light"in r&&"dark"in r?n.defaults[t.type]:n.defaults,t);var r}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort((e,t)=>{const n=-1===e.indexOf(".")?0:1,r=-1===t.indexOf(".")?0:1;return n!==r?n-r:e.localeCompare(t)}).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}};function d(e,t,n,r,i){return h.registerColor(e,t,n,r,i)}function u(e,t){return{op:0,value:e,factor:t}}function p(e,t){return{op:1,value:e,factor:t}}function m(e,t){return{op:2,value:e,factor:t}}function f(...e){return{op:4,values:e}}function g(e,t,n,r){return{op:5,value:e,background:t,factor:n,transparency:r}}function b(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"==typeof e?function(e,t){switch(e.op){case 0:return b(e.value,t)?.darken(e.factor);case 1:return b(e.value,t)?.lighten(e.factor);case 2:return b(e.value,t)?.transparent(e.factor);case 3:{const n=b(e.background,t);return n?b(e.value,t)?.makeOpaque(n):b(e.value,t)}case 4:for(const n of e.values){const e=b(n,t);if(e)return e}return;case 6:return b(t.defines(e.if)?e.then:e.else,t);case 5:{const n=b(e.value,t);if(!n)return;const r=b(e.background,t);return r?n.isDarkerThan(r)?s.Q1.getLighterColor(n,r,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(n,r,e.factor).transparent(e.transparency):n.transparent(e.factor*e.transparency)}default:throw(0,r.xb)(e)}}(e,t):void 0}l.O.add("base.contributions.colors",h);const v="vscode://schemas/workbench-colors",y=l.O.as(a.F.JSONContribution);y.registerSchema(v,h.getColorSchema());const w=new i.uC(()=>y.notifySchemaChanged(v),200);h.onDidChangeSchema(()=>{w.isScheduled()||w.schedule()});const C=d("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/baseColors","foreground","Overall foreground color. This color is only used if not overridden by a component.")),_=(d("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},c.kg("vs/platform/theme/common/colors/baseColors","disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),d("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},c.kg("vs/platform/theme/common/colors/baseColors","errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),d("descriptionForeground",{light:"#717171",dark:m(C,.7),hcDark:m(C,.7),hcLight:m(C,.7)},c.kg("vs/platform/theme/common/colors/baseColors","descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),d("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/baseColors","iconForeground","The default color for icons in the workbench."))),k=d("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},c.kg("vs/platform/theme/common/colors/baseColors","focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),x=d("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/baseColors","contrastBorder","An extra border around elements to separate them from others for greater contrast.")),S=d("contrastActiveBorder",{light:null,dark:null,hcDark:k,hcLight:k},c.kg("vs/platform/theme/common/colors/baseColors","activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),E=(d("selection.background",null,c.kg("vs/platform/theme/common/colors/baseColors","selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),d("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/baseColors","textLinkForeground","Foreground color for links in text.")),d("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/baseColors","textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),d("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/baseColors","textSeparatorForeground","Color for text separators.")),d("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},c.kg("vs/platform/theme/common/colors/baseColors","textPreformatForeground","Foreground color for preformatted text segments.")),d("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},c.kg("vs/platform/theme/common/colors/baseColors","textPreformatBackground","Background color for preformatted text segments.")),d("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},c.kg("vs/platform/theme/common/colors/baseColors","textBlockQuoteBackground","Background color for block quotes in text.")),d("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/baseColors","textBlockQuoteBorder","Border color for block quotes in text.")),d("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},c.kg("vs/platform/theme/common/colors/baseColors","textCodeBlockBackground","Background color for code blocks in text.")),d("sash.hoverBorder",k,c.kg("vs/platform/theme/common/colors/miscColors","sashActiveBorder","Border color of active sashes.")),d("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/miscColors","badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),F=(d("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/miscColors","badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),d("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/miscColors","scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."))),L=d("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:m(x,.6),hcLight:m(x,.4)},c.kg("vs/platform/theme/common/colors/miscColors","scrollbarSliderBackground","Scrollbar slider background color.")),I=d("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:m(x,.8),hcLight:m(x,.8)},c.kg("vs/platform/theme/common/colors/miscColors","scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),T=d("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/miscColors","scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),N=(d("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/miscColors","progressBarBackground","Background color of the progress bar that can show for long running operations.")),d("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/editorColors","editorBackground","Editor background color."))),R=(d("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:C},c.kg("vs/platform/theme/common/colors/editorColors","editorForeground","Editor default foreground color.")),d("editorStickyScroll.background",N,c.kg("vs/platform/theme/common/colors/editorColors","editorStickyScrollBackground","Background color of sticky scroll in the editor")),d("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("vs/platform/theme/common/colors/editorColors","editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),d("editorStickyScroll.border",{dark:null,light:null,hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/editorColors","editorStickyScrollBorder","Border color of sticky scroll in the editor")),d("editorStickyScroll.shadow",F,c.kg("vs/platform/theme/common/colors/editorColors","editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),d("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/editorColors","editorWidgetBackground","Background color of editor widgets, such as find/replace."))),D=d("editorWidget.foreground",C,c.kg("vs/platform/theme/common/colors/editorColors","editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),A=d("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/editorColors","editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),M=(d("editorWidget.resizeBorder",null,c.kg("vs/platform/theme/common/colors/editorColors","editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),d("editorError.background",null,c.kg("vs/platform/theme/common/colors/editorColors","editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),d("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},c.kg("vs/platform/theme/common/colors/editorColors","editorError.foreground","Foreground color of error squigglies in the editor."))),O=(d("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},c.kg("vs/platform/theme/common/colors/editorColors","errorBorder","If set, color of double underlines for errors in the editor.")),d("editorWarning.background",null,c.kg("vs/platform/theme/common/colors/editorColors","editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0)),z=d("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},c.kg("vs/platform/theme/common/colors/editorColors","editorWarning.foreground","Foreground color of warning squigglies in the editor.")),P=d("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},c.kg("vs/platform/theme/common/colors/editorColors","warningBorder","If set, color of double underlines for warnings in the editor.")),B=(d("editorInfo.background",null,c.kg("vs/platform/theme/common/colors/editorColors","editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),d("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},c.kg("vs/platform/theme/common/colors/editorColors","editorInfo.foreground","Foreground color of info squigglies in the editor."))),W=d("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/editorColors","infoBorder","If set, color of double underlines for infos in the editor.")),V=(d("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","editorHint.foreground","Foreground color of hint squigglies in the editor.")),d("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/editorColors","hintBorder","If set, color of double underlines for hints in the editor.")),d("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/editorColors","activeLinkForeground","Color of active links.")),d("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/editorColors","editorSelectionBackground","Color of the editor selection."))),U=(d("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/editorColors","editorSelectionForeground","Color of the selected text for high contrast.")),d("editor.inactiveSelectionBackground",{light:m(V,.5),dark:m(V,.5),hcDark:m(V,.7),hcLight:m(V,.5)},c.kg("vs/platform/theme/common/colors/editorColors","editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),d("editor.selectionHighlightBackground",{light:g(V,N,.3,.6),dark:g(V,N,.3,.6),hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),d("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:S,hcLight:S},c.kg("vs/platform/theme/common/colors/editorColors","editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),d("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","editorFindMatch","Color of the current search match.")),d("editor.findMatchForeground",null,c.kg("vs/platform/theme/common/colors/editorColors","editorFindMatchForeground","Text color of the current search match.")),d("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),$=(d("editor.findMatchHighlightForeground",null,c.kg("vs/platform/theme/common/colors/editorColors","findMatchHighlightForeground","Foreground color of the other search matches."),!0),d("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),d("editor.findMatchBorder",{light:null,dark:null,hcDark:S,hcLight:S},c.kg("vs/platform/theme/common/colors/editorColors","editorFindMatchBorder","Border color of the current search match.")),d("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:S,hcLight:S},c.kg("vs/platform/theme/common/colors/editorColors","findMatchHighlightBorder","Border color of the other search matches."))),q=(d("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:m(S,.4),hcLight:m(S,.4)},c.kg("vs/platform/theme/common/colors/editorColors","findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),d("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),d("editorHoverWidget.background",R,c.kg("vs/platform/theme/common/colors/editorColors","hoverBackground","Background color of the editor hover."))),j=(d("editorHoverWidget.foreground",D,c.kg("vs/platform/theme/common/colors/editorColors","hoverForeground","Foreground color of the editor hover.")),d("editorHoverWidget.border",A,c.kg("vs/platform/theme/common/colors/editorColors","hoverBorder","Border color of the editor hover.")),d("editorHoverWidget.statusBarBackground",{dark:p(q,.2),light:u(q,.05),hcDark:R,hcLight:R},c.kg("vs/platform/theme/common/colors/editorColors","statusBarBackground","Background color of the editor hover status bar.")),d("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},c.kg("vs/platform/theme/common/colors/editorColors","editorInlayHintForeground","Foreground color of inline hints"))),K=d("editorInlayHint.background",{dark:m(E,.1),light:m(E,.1),hcDark:m(s.Q1.white,.1),hcLight:m(E,.1)},c.kg("vs/platform/theme/common/colors/editorColors","editorInlayHintBackground","Background color of inline hints")),H=(d("editorInlayHint.typeForeground",j,c.kg("vs/platform/theme/common/colors/editorColors","editorInlayHintForegroundTypes","Foreground color of inline hints for types")),d("editorInlayHint.typeBackground",K,c.kg("vs/platform/theme/common/colors/editorColors","editorInlayHintBackgroundTypes","Background color of inline hints for types")),d("editorInlayHint.parameterForeground",j,c.kg("vs/platform/theme/common/colors/editorColors","editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),d("editorInlayHint.parameterBackground",K,c.kg("vs/platform/theme/common/colors/editorColors","editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),d("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},c.kg("vs/platform/theme/common/colors/editorColors","editorLightBulbForeground","The color used for the lightbulb actions icon."))),G=(d("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},c.kg("vs/platform/theme/common/colors/editorColors","editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),d("editorLightBulbAi.foreground",H,c.kg("vs/platform/theme/common/colors/editorColors","editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),d("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},c.kg("vs/platform/theme/common/colors/editorColors","snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),d("editor.snippetTabstopHighlightBorder",null,c.kg("vs/platform/theme/common/colors/editorColors","snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),d("editor.snippetFinalTabstopHighlightBackground",null,c.kg("vs/platform/theme/common/colors/editorColors","snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),d("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},c.kg("vs/platform/theme/common/colors/editorColors","snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),Q=new s.Q1(new s.bU(255,0,0,.2)),J=(d("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),d("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),d("diffEditor.insertedLineBackground",{dark:G,light:G,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),d("diffEditor.removedLineBackground",{dark:Q,light:Q,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),d("diffEditorGutter.insertedLineBackground",null,c.kg("vs/platform/theme/common/colors/editorColors","diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),d("diffEditorGutter.removedLineBackground",null,c.kg("vs/platform/theme/common/colors/editorColors","diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),d("diffEditorOverview.insertedForeground",null,c.kg("vs/platform/theme/common/colors/editorColors","diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),d("diffEditorOverview.removedForeground",null,c.kg("vs/platform/theme/common/colors/editorColors","diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),d("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},c.kg("vs/platform/theme/common/colors/editorColors","diffEditorInsertedOutline","Outline color for the text that got inserted.")),d("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},c.kg("vs/platform/theme/common/colors/editorColors","diffEditorRemovedOutline","Outline color for text that got removed.")),d("diffEditor.border",{dark:null,light:null,hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/editorColors","diffEditorBorder","Border color between the two text editors.")),d("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),d("diffEditor.unchangedRegionBackground","sideBar.background",c.kg("vs/platform/theme/common/colors/editorColors","diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),d("diffEditor.unchangedRegionForeground","foreground",c.kg("vs/platform/theme/common/colors/editorColors","diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),d("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),d("widget.shadow",{dark:m(s.Q1.black,.36),light:m(s.Q1.black,.16),hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),Y=(d("widget.border",{dark:null,light:null,hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/editorColors","widgetBorder","Border color of widgets such as find/replace inside the editor.")),d("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"))),X=(d("toolbar.hoverOutline",{dark:null,light:null,hcDark:S,hcLight:S},c.kg("vs/platform/theme/common/colors/editorColors","toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),d("toolbar.activeBackground",{dark:p(Y,.1),light:u(Y,.1),hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","toolbarActiveBackground","Toolbar background when holding the mouse over actions")),d("breadcrumb.foreground",m(C,.8),c.kg("vs/platform/theme/common/colors/editorColors","breadcrumbsFocusForeground","Color of focused breadcrumb items.")),d("breadcrumb.background",N,c.kg("vs/platform/theme/common/colors/editorColors","breadcrumbsBackground","Background color of breadcrumb items.")),d("breadcrumb.focusForeground",{light:u(C,.2),dark:p(C,.1),hcDark:p(C,.1),hcLight:p(C,.1)},c.kg("vs/platform/theme/common/colors/editorColors","breadcrumbsFocusForeground","Color of focused breadcrumb items.")),d("breadcrumb.activeSelectionForeground",{light:u(C,.2),dark:p(C,.1),hcDark:p(C,.1),hcLight:p(C,.1)},c.kg("vs/platform/theme/common/colors/editorColors","breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),d("breadcrumbPicker.background",R,c.kg("vs/platform/theme/common/colors/editorColors","breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),s.Q1.fromHex("#40C8AE").transparent(.5)),Z=s.Q1.fromHex("#40A6FF").transparent(.5),ee=s.Q1.fromHex("#606060").transparent(.4),te=d("merge.currentHeaderBackground",{dark:X,light:X,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),ne=(d("merge.currentContentBackground",m(te,.4),c.kg("vs/platform/theme/common/colors/editorColors","mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),d("merge.incomingHeaderBackground",{dark:Z,light:Z,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),re=(d("merge.incomingContentBackground",m(ne,.4),c.kg("vs/platform/theme/common/colors/editorColors","mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),d("merge.commonHeaderBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/editorColors","mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ie=(d("merge.commonContentBackground",m(re,.4),c.kg("vs/platform/theme/common/colors/editorColors","mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),d("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},c.kg("vs/platform/theme/common/colors/editorColors","mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),se=(d("editorOverviewRuler.currentContentForeground",{dark:m(te,1),light:m(te,1),hcDark:ie,hcLight:ie},c.kg("vs/platform/theme/common/colors/editorColors","overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),d("editorOverviewRuler.incomingContentForeground",{dark:m(ne,1),light:m(ne,1),hcDark:ie,hcLight:ie},c.kg("vs/platform/theme/common/colors/editorColors","overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),d("editorOverviewRuler.commonContentForeground",{dark:m(re,1),light:m(re,1),hcDark:ie,hcLight:ie},c.kg("vs/platform/theme/common/colors/editorColors","overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),d("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},c.kg("vs/platform/theme/common/colors/editorColors","overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),d("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",c.kg("vs/platform/theme/common/colors/editorColors","overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),d("problemsErrorIcon.foreground",M,c.kg("vs/platform/theme/common/colors/editorColors","problemsErrorIconForeground","The color used for the problems error icon.")),d("problemsWarningIcon.foreground",z,c.kg("vs/platform/theme/common/colors/editorColors","problemsWarningIconForeground","The color used for the problems warning icon.")),d("problemsInfoIcon.foreground",B,c.kg("vs/platform/theme/common/colors/editorColors","problemsInfoIconForeground","The color used for the problems info icon.")),d("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/minimapColors","minimapFindMatchHighlight","Minimap marker color for find matches."),!0)),oe=(d("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/minimapColors","minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),d("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/minimapColors","minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),d("minimap.infoHighlight",{dark:B,light:B,hcDark:W,hcLight:W},c.kg("vs/platform/theme/common/colors/minimapColors","minimapInfo","Minimap marker color for infos."))),ae=d("minimap.warningHighlight",{dark:z,light:z,hcDark:P,hcLight:P},c.kg("vs/platform/theme/common/colors/minimapColors","overviewRuleWarning","Minimap marker color for warnings.")),le=d("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},c.kg("vs/platform/theme/common/colors/minimapColors","minimapError","Minimap marker color for errors.")),ce=(d("minimap.background",null,c.kg("vs/platform/theme/common/colors/minimapColors","minimapBackground","Minimap background color.")),d("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),c.kg("vs/platform/theme/common/colors/minimapColors","minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),d("minimapSlider.background",m(L,.5),c.kg("vs/platform/theme/common/colors/minimapColors","minimapSliderBackground","Minimap slider background color.")),d("minimapSlider.hoverBackground",m(I,.5),c.kg("vs/platform/theme/common/colors/minimapColors","minimapSliderHoverBackground","Minimap slider background color when hovering.")),d("minimapSlider.activeBackground",m(T,.5),c.kg("vs/platform/theme/common/colors/minimapColors","minimapSliderActiveBackground","Minimap slider background color when clicked on.")),d("charts.foreground",C,c.kg("vs/platform/theme/common/colors/chartsColors","chartsForeground","The foreground color used in charts.")),d("charts.lines",m(C,.5),c.kg("vs/platform/theme/common/colors/chartsColors","chartsLines","The color used for horizontal lines in charts.")),d("charts.red",M,c.kg("vs/platform/theme/common/colors/chartsColors","chartsRed","The red color used in chart visualizations.")),d("charts.blue",B,c.kg("vs/platform/theme/common/colors/chartsColors","chartsBlue","The blue color used in chart visualizations.")),d("charts.yellow",z,c.kg("vs/platform/theme/common/colors/chartsColors","chartsYellow","The yellow color used in chart visualizations.")),d("charts.orange",se,c.kg("vs/platform/theme/common/colors/chartsColors","chartsOrange","The orange color used in chart visualizations.")),d("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},c.kg("vs/platform/theme/common/colors/chartsColors","chartsGreen","The green color used in chart visualizations.")),d("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},c.kg("vs/platform/theme/common/colors/chartsColors","chartsPurple","The purple color used in chart visualizations.")),d("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/inputColors","inputBoxBackground","Input box background.")),d("input.foreground",C,c.kg("vs/platform/theme/common/colors/inputColors","inputBoxForeground","Input box foreground.")),d("input.border",{dark:null,light:null,hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/inputColors","inputBoxBorder","Input box border.")),d("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/inputColors","inputBoxActiveOptionBorder","Border color of activated options in input fields."))),he=d("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/inputColors","inputOption.hoverBackground","Background color of activated options in input fields.")),de=d("inputOption.activeBackground",{dark:m(k,.4),light:m(k,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},c.kg("vs/platform/theme/common/colors/inputColors","inputOption.activeBackground","Background hover color of options in input fields.")),ue=d("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:C,hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","inputOption.activeForeground","Foreground color of activated options in input fields.")),pe=(d("input.placeholderForeground",{light:m(C,.5),dark:m(C,.5),hcDark:m(C,.7),hcLight:m(C,.7)},c.kg("vs/platform/theme/common/colors/inputColors","inputPlaceholderForeground","Input box foreground color for placeholder text.")),d("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationInfoBackground","Input validation background color for information severity.")),d("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationInfoForeground","Input validation foreground color for information severity.")),d("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationInfoBorder","Input validation border color for information severity.")),d("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationWarningBackground","Input validation background color for warning severity.")),d("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationWarningForeground","Input validation foreground color for warning severity.")),d("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationWarningBorder","Input validation border color for warning severity.")),d("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationErrorBackground","Input validation background color for error severity.")),d("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationErrorForeground","Input validation foreground color for error severity.")),d("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/inputColors","inputValidationErrorBorder","Input validation border color for error severity.")),d("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/inputColors","dropdownBackground","Dropdown background."))),me=(d("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/inputColors","dropdownListBackground","Dropdown list background.")),d("dropdown.foreground",{dark:"#F0F0F0",light:C,hcDark:s.Q1.white,hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","dropdownForeground","Dropdown foreground."))),fe=d("dropdown.border",{dark:pe,light:"#CECECE",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/inputColors","dropdownBorder","Dropdown border.")),ge=d("button.foreground",s.Q1.white,c.kg("vs/platform/theme/common/colors/inputColors","buttonForeground","Button foreground color.")),be=(d("button.separator",m(ge,.4),c.kg("vs/platform/theme/common/colors/inputColors","buttonSeparator","Button separator color.")),d("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/inputColors","buttonBackground","Button background color."))),ve=(d("button.hoverBackground",{dark:p(be,.2),light:u(be,.2),hcDark:be,hcLight:be},c.kg("vs/platform/theme/common/colors/inputColors","buttonHoverBackground","Button background color when hovering.")),d("button.border",x,c.kg("vs/platform/theme/common/colors/inputColors","buttonBorder","Button border color.")),d("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","buttonSecondaryForeground","Secondary button foreground color.")),d("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/inputColors","buttonSecondaryBackground","Secondary button background color."))),ye=(d("button.secondaryHoverBackground",{dark:p(ve,.2),light:u(ve,.2),hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/inputColors","buttonSecondaryHoverBackground","Secondary button background color when hovering.")),d("radio.activeForeground",ue,c.kg("vs/platform/theme/common/colors/inputColors","radioActiveForeground","Foreground color of active radio option."))),we=(d("radio.activeBackground",de,c.kg("vs/platform/theme/common/colors/inputColors","radioBackground","Background color of active radio option.")),d("radio.activeBorder",ce,c.kg("vs/platform/theme/common/colors/inputColors","radioActiveBorder","Border color of the active radio option.")),d("radio.inactiveForeground",null,c.kg("vs/platform/theme/common/colors/inputColors","radioInactiveForeground","Foreground color of inactive radio option.")),d("radio.inactiveBackground",null,c.kg("vs/platform/theme/common/colors/inputColors","radioInactiveBackground","Background color of inactive radio option.")),d("radio.inactiveBorder",{light:m(ye,.2),dark:m(ye,.2),hcDark:m(ye,.4),hcLight:m(ye,.2)},c.kg("vs/platform/theme/common/colors/inputColors","radioInactiveBorder","Border color of the inactive radio option.")),d("radio.inactiveHoverBackground",he,c.kg("vs/platform/theme/common/colors/inputColors","radioHoverBackground","Background color of inactive active radio option when hovering.")),d("checkbox.background",pe,c.kg("vs/platform/theme/common/colors/inputColors","checkbox.background","Background color of checkbox widget.")),d("checkbox.selectBackground",R,c.kg("vs/platform/theme/common/colors/inputColors","checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),d("checkbox.foreground",me,c.kg("vs/platform/theme/common/colors/inputColors","checkbox.foreground","Foreground color of checkbox widget.")),d("checkbox.border",fe,c.kg("vs/platform/theme/common/colors/inputColors","checkbox.border","Border color of checkbox widget.")),d("checkbox.selectBorder",_,c.kg("vs/platform/theme/common/colors/inputColors","checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),d("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},c.kg("vs/platform/theme/common/colors/inputColors","keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),d("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),d("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:x},c.kg("vs/platform/theme/common/colors/inputColors","keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),d("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:C},c.kg("vs/platform/theme/common/colors/inputColors","keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),d("list.focusBackground",null,c.kg("vs/platform/theme/common/colors/listColors","listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),d("list.focusForeground",null,c.kg("vs/platform/theme/common/colors/listColors","listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),d("list.focusOutline",{dark:k,light:k,hcDark:S,hcLight:S},c.kg("vs/platform/theme/common/colors/listColors","listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),d("list.focusAndSelectionOutline",null,c.kg("vs/platform/theme/common/colors/listColors","listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),d("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("vs/platform/theme/common/colors/listColors","listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),Ce=d("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),_e=d("list.activeSelectionIconForeground",null,c.kg("vs/platform/theme/common/colors/listColors","listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ke=(d("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("vs/platform/theme/common/colors/listColors","listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),d("list.inactiveSelectionForeground",null,c.kg("vs/platform/theme/common/colors/listColors","listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),d("list.inactiveSelectionIconForeground",null,c.kg("vs/platform/theme/common/colors/listColors","listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),d("list.inactiveFocusBackground",null,c.kg("vs/platform/theme/common/colors/listColors","listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),d("list.inactiveFocusOutline",null,c.kg("vs/platform/theme/common/colors/listColors","listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),d("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("vs/platform/theme/common/colors/listColors","listHoverBackground","List/Tree background when hovering over items using the mouse.")),d("list.hoverForeground",null,c.kg("vs/platform/theme/common/colors/listColors","listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),d("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),d("list.dropBetweenBackground",{dark:_,light:_,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),d("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:k,hcLight:k},c.kg("vs/platform/theme/common/colors/listColors","highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")));var xe,Se;d("list.focusHighlightForeground",{dark:ke,light:(xe=we,Se=ke,{op:6,if:xe,then:Se,else:"#BBE7FF"}),hcDark:ke,hcLight:ke},c.kg("vs/platform/theme/common/colors/listColors","listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),d("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},c.kg("vs/platform/theme/common/colors/listColors","invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),d("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","listErrorForeground","Foreground color of list items containing errors.")),d("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","listWarningForeground","Foreground color of list items containing warnings.")),d("listFilterWidget.background",{light:u(R,0),dark:p(R,0),hcDark:R,hcLight:R},c.kg("vs/platform/theme/common/colors/listColors","listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),d("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},c.kg("vs/platform/theme/common/colors/listColors","listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),d("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/listColors","listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),d("listFilterWidget.shadow",J,c.kg("vs/platform/theme/common/colors/listColors","listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),d("list.filterMatchBackground",{dark:U,light:U,hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","listFilterMatchHighlight","Background color of the filtered match.")),d("list.filterMatchBorder",{dark:$,light:$,hcDark:x,hcLight:S},c.kg("vs/platform/theme/common/colors/listColors","listFilterMatchHighlightBorder","Border color of the filtered match.")),d("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},c.kg("vs/platform/theme/common/colors/listColors","listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized."));const Ee=d("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},c.kg("vs/platform/theme/common/colors/listColors","treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Fe=(d("tree.inactiveIndentGuidesStroke",m(Ee,.4),c.kg("vs/platform/theme/common/colors/listColors","treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),d("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","tableColumnsBorder","Table border color between columns.")),d("tree.tableOddRowsBackground",{dark:m(C,.04),light:m(C,.04),hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/listColors","tableOddRowsBackgroundColor","Background color for odd table rows.")),d("editorActionList.background",R,c.kg("vs/platform/theme/common/colors/listColors","editorActionListBackground","Action List background color.")),d("editorActionList.foreground",D,c.kg("vs/platform/theme/common/colors/listColors","editorActionListForeground","Action List foreground color.")),d("editorActionList.focusForeground",Ce,c.kg("vs/platform/theme/common/colors/listColors","editorActionListFocusForeground","Action List foreground color for the focused item.")),d("editorActionList.focusBackground",we,c.kg("vs/platform/theme/common/colors/listColors","editorActionListFocusBackground","Action List background color for the focused item.")),d("menu.border",{dark:null,light:null,hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/menuColors","menuBorder","Border color of menus.")),d("menu.foreground",me,c.kg("vs/platform/theme/common/colors/menuColors","menuForeground","Foreground color of menu items.")),d("menu.background",pe,c.kg("vs/platform/theme/common/colors/menuColors","menuBackground","Background color of menu items.")),d("menu.selectionForeground",Ce,c.kg("vs/platform/theme/common/colors/menuColors","menuSelectionForeground","Foreground color of the selected menu item in menus.")),d("menu.selectionBackground",we,c.kg("vs/platform/theme/common/colors/menuColors","menuSelectionBackground","Background color of the selected menu item in menus.")),d("menu.selectionBorder",{dark:null,light:null,hcDark:S,hcLight:S},c.kg("vs/platform/theme/common/colors/menuColors","menuSelectionBorder","Border color of the selected menu item in menus.")),d("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:x,hcLight:x},c.kg("vs/platform/theme/common/colors/menuColors","menuSeparatorBackground","Color of a separator menu item in menus.")),d("quickInput.background",R,c.kg("vs/platform/theme/common/colors/quickpickColors","pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),d("quickInput.foreground",D,c.kg("vs/platform/theme/common/colors/quickpickColors","pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),d("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},c.kg("vs/platform/theme/common/colors/quickpickColors","pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),d("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/quickpickColors","pickerGroupForeground","Quick picker color for grouping labels.")),d("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},c.kg("vs/platform/theme/common/colors/quickpickColors","pickerGroupBorder","Quick picker color for grouping borders.")),d("quickInput.list.focusBackground",null,"",void 0,c.kg("vs/platform/theme/common/colors/quickpickColors","quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")));d("quickInputList.focusForeground",Ce,c.kg("vs/platform/theme/common/colors/quickpickColors","quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),d("quickInputList.focusIconForeground",_e,c.kg("vs/platform/theme/common/colors/quickpickColors","quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),d("quickInputList.focusBackground",{dark:f(Fe,we),light:f(Fe,we),hcDark:null,hcLight:null},c.kg("vs/platform/theme/common/colors/quickpickColors","quickInput.listFocusBackground","Quick picker background color for the focused item.")),d("search.resultsInfoForeground",{light:C,dark:m(C,.65),hcDark:C,hcLight:C},c.kg("vs/platform/theme/common/colors/searchColors","search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),d("searchEditor.findMatchBackground",{light:m(U,.66),dark:m(U,.66),hcDark:U,hcLight:U},c.kg("vs/platform/theme/common/colors/searchColors","searchEditor.queryMatch","Color of the Search Editor query matches.")),d("searchEditor.findMatchBorder",{light:m($,.66),dark:m($,.66),hcDark:$,hcLight:$},c.kg("vs/platform/theme/common/colors/searchColors","searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},4901:(e,t,n)=>{"use strict";function r(e){return e<0?0:e>255?255:0|e}function i(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,{W:()=>r,j:()=>i})},4945:(e,t,n)=>{"use strict";n.d(t,{rY:()=>C,ou:()=>w,dG:()=>k,OB:()=>x});var r=n(8386),i=(n(695),n(2373)),s=n(6274);class o{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,s.s)(()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new a(this,e,t);return this._factories.set(e,n),(0,s.s)(()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class a extends s.jG{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var l,c,h,d,u,p,m,f,g,b,v,y=n(7703);class w{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class C{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(l||(l={})),function(e){const t=new Map;t.set(0,r.W.symbolMethod),t.set(1,r.W.symbolFunction),t.set(2,r.W.symbolConstructor),t.set(3,r.W.symbolField),t.set(4,r.W.symbolVariable),t.set(5,r.W.symbolClass),t.set(6,r.W.symbolStruct),t.set(7,r.W.symbolInterface),t.set(8,r.W.symbolModule),t.set(9,r.W.symbolProperty),t.set(10,r.W.symbolEvent),t.set(11,r.W.symbolOperator),t.set(12,r.W.symbolUnit),t.set(13,r.W.symbolValue),t.set(15,r.W.symbolEnum),t.set(14,r.W.symbolConstant),t.set(15,r.W.symbolEnum),t.set(16,r.W.symbolEnumMember),t.set(17,r.W.symbolKeyword),t.set(27,r.W.symbolSnippet),t.set(18,r.W.symbolText),t.set(19,r.W.symbolColor),t.set(20,r.W.symbolFile),t.set(21,r.W.symbolReference),t.set(22,r.W.symbolCustomColor),t.set(23,r.W.symbolFolder),t.set(24,r.W.symbolTypeParameter),t.set(25,r.W.account),t.set(26,r.W.issues),e.toIcon=function(e){let n=t.get(e);return n||(console.info("No codicon found for CompletionItemKind "+e),n=r.W.symbolProperty),n};const n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26),e.fromString=function(e,t){let r=n.get(e);return void 0!==r||t||(r=9),r}}(c||(c={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(h||(h={})),function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"}(d||(d={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(u||(u={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(p||(p={})),(0,y.kg)("vs/editor/common/languages","Array","array"),(0,y.kg)("vs/editor/common/languages","Boolean","boolean"),(0,y.kg)("vs/editor/common/languages","Class","class"),(0,y.kg)("vs/editor/common/languages","Constant","constant"),(0,y.kg)("vs/editor/common/languages","Constructor","constructor"),(0,y.kg)("vs/editor/common/languages","Enum","enumeration"),(0,y.kg)("vs/editor/common/languages","EnumMember","enumeration member"),(0,y.kg)("vs/editor/common/languages","Event","event"),(0,y.kg)("vs/editor/common/languages","Field","field"),(0,y.kg)("vs/editor/common/languages","File","file"),(0,y.kg)("vs/editor/common/languages","Function","function"),(0,y.kg)("vs/editor/common/languages","Interface","interface"),(0,y.kg)("vs/editor/common/languages","Key","key"),(0,y.kg)("vs/editor/common/languages","Method","method"),(0,y.kg)("vs/editor/common/languages","Module","module"),(0,y.kg)("vs/editor/common/languages","Namespace","namespace"),(0,y.kg)("vs/editor/common/languages","Null","null"),(0,y.kg)("vs/editor/common/languages","Number","number"),(0,y.kg)("vs/editor/common/languages","Object","object"),(0,y.kg)("vs/editor/common/languages","Operator","operator"),(0,y.kg)("vs/editor/common/languages","Package","package"),(0,y.kg)("vs/editor/common/languages","Property","property"),(0,y.kg)("vs/editor/common/languages","String","string"),(0,y.kg)("vs/editor/common/languages","Struct","struct"),(0,y.kg)("vs/editor/common/languages","TypeParameter","type parameter"),(0,y.kg)("vs/editor/common/languages","Variable","variable"),function(e){const t=new Map;t.set(0,r.W.symbolFile),t.set(1,r.W.symbolModule),t.set(2,r.W.symbolNamespace),t.set(3,r.W.symbolPackage),t.set(4,r.W.symbolClass),t.set(5,r.W.symbolMethod),t.set(6,r.W.symbolProperty),t.set(7,r.W.symbolField),t.set(8,r.W.symbolConstructor),t.set(9,r.W.symbolEnum),t.set(10,r.W.symbolInterface),t.set(11,r.W.symbolFunction),t.set(12,r.W.symbolVariable),t.set(13,r.W.symbolConstant),t.set(14,r.W.symbolString),t.set(15,r.W.symbolNumber),t.set(16,r.W.symbolBoolean),t.set(17,r.W.symbolArray),t.set(18,r.W.symbolObject),t.set(19,r.W.symbolKey),t.set(20,r.W.symbolNull),t.set(21,r.W.symbolEnumMember),t.set(22,r.W.symbolStruct),t.set(23,r.W.symbolEvent),t.set(24,r.W.symbolOperator),t.set(25,r.W.symbolTypeParameter),e.toIcon=function(e){let n=t.get(e);return n||(console.info("No codicon found for SymbolKind "+e),n=r.W.symbolProperty),n}}(m||(m={}));class _{static{this.Comment=new _("comment")}static{this.Imports=new _("imports")}static{this.Region=new _("region")}static fromValue(e){switch(e){case"comment":return _.Comment;case"imports":return _.Imports;case"region":return _.Region}return new _(e)}constructor(e){this.value=e}}!function(e){e[e.AIGenerated=1]="AIGenerated"}(f||(f={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(g||(g={})),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(b||(b={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(v||(v={}));const k=new o,x=new o;var S;!function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(S||(S={}))},5021:(e,t,n)=>{var r={"./editorBaseApi":7317,"./editorBaseApi.js":7317,"./editorSimpleWorker":2803,"./editorSimpleWorker.js":2803,"./editorWorker":2919,"./editorWorker.js":2919,"./editorWorkerHost":3085,"./editorWorkerHost.js":3085,"./findSectionHeaders":8332,"./findSectionHeaders.js":8332,"./getIconClasses":8123,"./getIconClasses.js":8123,"./languageFeatureDebounce":9208,"./languageFeatureDebounce.js":9208,"./languageFeatures":6461,"./languageFeatures.js":6461,"./languageFeaturesService":8258,"./languageFeaturesService.js":8258,"./languageService":1408,"./languageService.js":1408,"./languagesAssociations":6357,"./languagesAssociations.js":6357,"./languagesRegistry":6506,"./languagesRegistry.js":6506,"./markerDecorations":5563,"./markerDecorations.js":5563,"./markerDecorationsService":8476,"./markerDecorationsService.js":8476,"./model":887,"./model.js":887,"./modelService":9796,"./modelService.js":9796,"./resolverService":8707,"./resolverService.js":8707,"./semanticTokensDto":2013,"./semanticTokensDto.js":2013,"./semanticTokensProviderStyling":7975,"./semanticTokensProviderStyling.js":7975,"./semanticTokensStyling":3182,"./semanticTokensStyling.js":3182,"./semanticTokensStylingService":803,"./semanticTokensStylingService.js":803,"./textModelSync/textModelSync.impl":9956,"./textModelSync/textModelSync.impl.js":9956,"./textModelSync/textModelSync.protocol":3051,"./textModelSync/textModelSync.protocol.js":3051,"./textResourceConfiguration":6693,"./textResourceConfiguration.js":6693,"./treeSitterParserService":9241,"./treeSitterParserService.js":9241,"./treeViewsDnd":9268,"./treeViewsDnd.js":9268,"./treeViewsDndService":8685,"./treeViewsDndService.js":8685,"./unicodeTextModelHighlighter":5050,"./unicodeTextModelHighlighter.js":5050};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=5021},5050:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnicodeTextModelHighlighter:()=>l});var r=n(800),i=n(9182),s=n(5603),o=n(867),a=n(8281);class l{static computeUnicodeHighlights(e,t,n){const l=n?n.startLineNumber:1,h=n?n.endLineNumber:e.getLineCount(),d=new c(t),u=d.getCandidateCodePoints();let p;var m;p="allNonBasicAscii"===u?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((m=Array.from(u),`[${s.bm(m.map(e=>String.fromCodePoint(e)).join(""))}]`),"g");const f=new i.W5(null,p),g=[];let b,v=!1,y=0,w=0,C=0;e:for(let t=l,n=h;t<=n;t++){const n=e.getLineContent(t),i=n.length;f.reset(0);do{if(b=f.next(n),b){let e=b.index,l=b.index+b[0].length;if(e>0){const t=n.charCodeAt(e-1);s.pc(t)&&e--}if(l+1=n){v=!0;break e}g.push(new r.Q(t,e+1,t,l+1))}}}while(b)}return{ranges:g,hasMore:v,ambiguousCharacterCount:y,invisibleCharacterCount:w,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(e,t){const n=new c(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),i=n.ambiguousCharacters.getPrimaryConfusable(r),o=s.tl.getLocales().filter(e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(i),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}class c{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)h(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,i=!1;if(t)for(const e of t){const t=e.codePointAt(0),n=s.aC(e);r=r||n,n||this.ambiguousCharacters.isAmbiguous(t)||s.y_.isInvisibleCharacter(t)||(i=!0)}return!r&&i?0:this.options.invisibleCharacters&&!h(e)&&s.y_.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function h(e){return" "===e||"\n"===e||"\t"===e}},5352:(e,t,n)=>{"use strict";n.d(t,{O:()=>s});var r=n(867),i=n(2548);const s=new class{constructor(){this.data=new Map}add(e,t){r.ok(i.Kg(e)),r.ok(i.Gv(t)),r.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},5563:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IMarkerDecorationsService:()=>r});const r=(0,n(7352).u1)("markerDecorationsService")},5603:(e,t,n)=>{"use strict";n.d(t,{$X:()=>R,AV:()=>s,E_:()=>L,HG:()=>u,LJ:()=>_,LU:()=>O,NB:()=>l,OS:()=>c,Q_:()=>y,Ss:()=>A,UD:()=>m,Wv:()=>v,Z5:()=>x,_J:()=>N,aC:()=>T,bm:()=>a,eY:()=>h,jy:()=>o,km:()=>E,lT:()=>p,ne:()=>D,ns:()=>w,pc:()=>C,r_:()=>M,tk:()=>z,tl:()=>W,uz:()=>d,y_:()=>V,z_:()=>k});var r=n(1883),i=n(2323);function s(e){return!e||"string"!=typeof e||0===e.trim().length}function o(e){return e.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let r=0;for(;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}function c(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let r="";return n.global&&(r+="g"),n.matchCase||(r+="i"),n.multiline&&(r+="m"),n.unicode&&(r+="u"),new RegExp(e,r)}function h(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function d(e){return e.split(/\r\n|\r|\n/)}function u(e){for(let t=0,n=e.length;t=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function m(e,t){return et?1:0}function f(e,t,n=0,r=e.length,i=0,s=t.length){for(;ns)return 1}const o=r-n,a=s-i;return oa?1:0}function g(e,t,n=0,r=e.length,i=0,s=t.length){for(;n=128||a>=128)return f(e.toLowerCase(),t.toLowerCase(),n,r,i,s);b(o)&&(o-=32),b(a)&&(a-=32);const l=o-a;if(0!==l)return l}const o=r-n,a=s-i;return oa?1:0}function b(e){return e>=97&&e<=122}function v(e){return e>=65&&e<=90}function y(e,t){return e.length===t.length&&0===g(e,t)}function w(e,t){const n=t.length;return!(t.length>e.length)&&0===g(e,t,0,n)}function C(e){return 55296<=e&&e<=56319}function _(e){return 56320<=e&&e<=57343}function k(e,t){return t-56320+(e-55296<<10)+65536}function x(e,t,n){const r=e.charCodeAt(n);if(C(r)&&n+11){const r=e.charCodeAt(t-2);if(C(r))return k(r,n)}return n}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=x(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class E{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new S(e,t)}nextGraphemeLength(){const e=B.getInstance(),t=this._iterator,n=t.offset;let r=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const n=t.offset,i=e.getGraphemeBreakType(t.nextCodePoint());if(P(r,i)){t.setOffset(n);break}r=i}return t.offset-n}prevGraphemeLength(){const e=B.getInstance(),t=this._iterator,n=t.offset;let r=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const n=t.offset,i=e.getGraphemeBreakType(t.prevCodePoint());if(P(i,r)){t.setOffset(n);break}r=i}return n-t.offset}eol(){return this._iterator.eol()}}let F;function L(e){return F||(F=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),F.test(e)}const I=/^[\t\n\r\x20-\x7E]*$/;function T(e){return I.test(e)}const N=/[\u2028\u2029]/;function R(e){return N.test(e)}function D(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function A(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const M=String.fromCharCode(65279);function O(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function z(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function P(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class B{static{this._INSTANCE=null}static getInstance(){return B._INSTANCE||(B._INSTANCE=new B),B._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let r=1;for(;r<=n;)if(et[3*r+1]))return t[3*r+2];r=2*r+1}return 0}}class W{static{this.ambiguousCharacterData=new i.d(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new r.o5({getCacheKey:JSON.stringify},e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&e in r);0===s.length&&(s=["_default"]);for(const e of s)i=n(i,t(r[e]));const o=function(e,t){const n=new Map(e);for(const[e,r]of t)n.set(e,r);return n}(t(r._common),i);return new W(o)})}static getInstance(e){return W.cache.get(Array.from(e))}static{this._locales=new i.d(()=>Object.keys(W.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return W._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class V{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(V.getRawData())),this._data}static isInvisibleCharacter(e){return V.getData().has(e)}static get codePoints(){return V.getData()}}},6185:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});var r=n(1490);class i{static addRange(e,t){let n=0;for(;nt))return new i(e,t)}static ofLength(e){return new i(0,e)}static ofStartAndLength(e,t){return new i(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new r.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new i(this.start+e,this.endExclusive+e)}deltaStart(e){return new i(this.start+e,this.endExclusive)}deltaEnd(e){return new i(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new r.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new r.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t{"use strict";n.d(t,{H8:()=>P,HZ:()=>I,OS:()=>A,UP:()=>V,_p:()=>D,cm:()=>z,gm:()=>B,ib:()=>L,j9:()=>F,lg:()=>T,nr:()=>W,uF:()=>S,zx:()=>E});var r=n(7703);const i="en";let s,o,a=!1,l=!1,c=!1,h=!1,d=!1,u=!1,p=!1,m=!1,f=!1,g=!1,b=null,v=null,y=null;const w=globalThis;let C;void 0!==w.vscode&&void 0!==w.vscode.process?C=w.vscode.process:"undefined"!=typeof process&&"string"==typeof process?.versions?.node&&(C=process);const _="string"==typeof C?.versions?.electron,k=_&&"renderer"===C?.type;if("object"==typeof C){a="win32"===C.platform,l="darwin"===C.platform,c="linux"===C.platform,h=c&&!!C.env.SNAP&&!!C.env.SNAP_REVISION,p=_,f=!!C.env.CI||!!C.env.BUILD_ARTIFACTSTAGINGDIRECTORY,s=i,b=i;const e=C.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);s=t.userLocale,v=t.osLocale,b=t.resolvedLanguage||i,y=t.languagePack?.translationsConfigFile}catch(e){}d=!0}else"object"!=typeof navigator||k?console.error("Unable to resolve platform."):(o=navigator.userAgent,a=o.indexOf("Windows")>=0,l=o.indexOf("Macintosh")>=0,m=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=o.indexOf("Linux")>=0,o?.indexOf("Mobi")>=0,u=!0,b=r.i8()||i,s=navigator.language.toLowerCase(),v=s);let x=0;l?x=1:a?x=3:c&&(x=2);const S=a,E=l,F=c,L=d,I=u,T=u&&"function"==typeof w.importScripts?w.origin:void 0,N=o,R="function"==typeof w.postMessage&&!w.importScripts,D=(()=>{if(R){const e=[];w.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n{const r=++t;e.push({id:r,callback:n}),w.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})(),A=l||m?2:a?1:3;let M=!0,O=!1;function z(){if(!O){O=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);M=513===t[0]}return M}const P=!!(N&&N.indexOf("Chrome")>=0),B=!!(N&&N.indexOf("Firefox")>=0),W=!!(!P&&N&&N.indexOf("Safari")>=0),V=!!(N&&N.indexOf("Edg/")>=0);N&&N.indexOf("Android")},6274:(e,t,n)=>{"use strict";function r(e,t){const n=this;let r,i=!1;return function(){if(i)return r;if(i=!0,t)try{r=e.apply(n,arguments)}finally{t()}else r=e.apply(n,arguments);return r}}n.d(t,{jG:()=>p,$w:()=>f,Cm:()=>u,HE:()=>m,qE:()=>h,AS:()=>c,VD:()=>a,s:()=>d,Ay:()=>o});var i=n(1075);let s=null;function o(e){return s?.trackDisposable(e),e}function a(e){s?.markAsDisposed(e)}function l(e,t){s?.setParent(e,t)}function c(e){if(i.f.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function h(...e){const t=d(()=>c(e));return function(e,t){if(s)for(const n of e)s.setParent(n,t)}(e,t),t}function d(e){const t=o({dispose:r(()=>{a(t),e()})});return t}class u{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,o(this)}dispose(){this._isDisposed||(a(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{c(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return l(e,this),this._isDisposed?u.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),l(e,null))}}class p{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new u,o(this),l(this._store,this)}dispose(){a(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class m{constructor(){this._isDisposed=!1,o(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&l(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,a(this),this._value?.dispose(),this._value=void 0}}class f{constructor(){this._store=new Map,this._isDisposed=!1,o(this)}dispose(){a(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{c(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},6303:(e,t,n)=>{"use strict";var r,i;n.d(t,{cO:()=>h,db:()=>d,fT:()=>o,qK:()=>c});class s{constructor(e,t){this.uri=e,this.value=t}}class o{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[r]="ResourceMap",e instanceof o)this.map=new Map(e.map),this.toKey=t??o.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=t??o.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??o.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(r=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class a{constructor(){this[i]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,0!==n&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:case 2:default:this.addItemLast(r);break;case 1:this.addItemFirst(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}[(i=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class l extends a{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(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class c extends l{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class h{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class d{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){return this.map.get(e)||new Set}}},6357:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearPlatformLanguageAssociations:()=>m,getLanguageIds:()=>f,registerPlatformLanguageAssociation:()=>p});var r=n(3035),i=n(3793),s=n(4427),o=n(9130),a=n(9996),l=n(5603),c=n(4086);let h=[],d=[],u=[];function p(e,t=!1){!function(e,t,n){const i=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,r.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(o.SA.sep)>=0}}(e);h.push(i),i.userConfigured?u.push(i):d.push(i),n&&!i.userConfigured&&h.forEach(e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}(e,0,t)}function m(){h=h.filter(e=>e.userConfigured),d=[]}function f(e,t){return function(e,t){let n;if(e)switch(e.scheme){case s.ny.file:n=e.fsPath;break;case s.ny.data:n=a.B6.parseMetaData(e).get(a.B6.META_DATA_LABEL);break;case s.ny.vscodeNotebookCell:n=void 0;break;default:n=e.path}if(!n)return[{id:"unknown",mime:i.K.unknown}];n=n.toLowerCase();const r=(0,o.P8)(n),p=g(n,r,u);if(p)return[p,{id:c.vH,mime:i.K.text}];const m=g(n,r,d);if(m)return[m,{id:c.vH,mime:i.K.text}];if(t){const e=function(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=h.length-1;t>=0;t--){const n=h[t];if(!n.firstline)continue;const r=e.match(n.firstline);if(r&&r.length>0)return n}}(t);if(e)return[e,{id:c.vH,mime:i.K.text}]}return[{id:"unknown",mime:i.K.unknown}]}(e,t).map(e=>e.id)}function g(e,t,n){let r,i,s;for(let o=n.length-1;o>=0;o--){const a=n[o];if(t===a.filenameLowercase){r=a;break}if(a.filepattern&&(!i||a.filepattern.length>i.filepattern.length)){const n=a.filepatternOnPath?e:t;a.filepatternLowercase?.(n)&&(i=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return r||i||s||void 0}},6362:(e,t,n)=>{"use strict";n.d(t,{M:()=>a,S:()=>l});var r=n(1490),i=n(6185),s=n(800),o=n(8348);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let n=1;nt)throw new r.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber),n=(0,o.iM)(this._normalizedRanges,t=>t.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const r=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,r)}}contains(e){const t=(0,o.lx)(this._normalizedRanges,t=>t.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,o.lx)(this._normalizedRanges,t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,r=0,i=null;for(;n=s.startLineNumber?i=new a(i.startLineNumber,Math.max(i.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(i),i=s)}return null!==i&&t.push(i),new l(t)}subtractFrom(e){const t=(0,o.hw)(this._normalizedRanges,t=>t.endLineNumberExclusive>=e.startLineNumber),n=(0,o.iM)(this._normalizedRanges,t=>t.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new l([e]);const r=[];let i=e.startLineNumber;for(let e=t;ei&&r.push(new a(i,t.startLineNumber)),i=t.endLineNumberExclusive}return ie.toString()).join(", ")}getIntersection(e){const t=[];let n=0,r=0;for(;nt.delta(e)))}}},6461:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeaturesService:()=>r});const r=(0,n(7352).u1)("ILanguageFeaturesService")},6506:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageIdCodec:()=>u,LanguagesRegistry:()=>p});var r=n(2373),i=n(6274),s=n(5603),o=n(6357),a=n(4086),l=n(4709),c=n(5352);const h=Object.prototype.hasOwnProperty,d="vs.editor.nullLanguage";class u{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(d,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||d}}class p extends i.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new r.vl),this.onDidChange=this._onDidChange.event,p.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new u,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages(e=>{this._initializeFromRegistry()})))}dispose(){p.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,o.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach(e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier}),t.mimetypes.forEach(e=>{this._mimeTypesMap[e]=t.identifier})}),c.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;h.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let r=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),r=t.mimetypes[0]),r||(r=`text/x-${n}`,e.mimetypes.push(r)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,o.registerPlatformLanguageAssociation)({id:n,mime:r,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const i of t.filenames)(0,o.registerPlatformLanguageAssociation)({id:n,mime:r,filename:i},this._warnOnOverwrite),e.filenames.push(i);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)(0,o.registerPlatformLanguageAssociation)({id:n,mime:r,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,o.registerPlatformLanguageAssociation)({id:n,mime:r,firstline:t},this._warnOnOverwrite)}catch(n){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,n)}}e.aliases.push(n);let i=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(i=0===t.aliases.length?[null]:t.aliases),null!==i)for(const t of i)t&&0!==t.length&&e.aliases.push(t);const a=null!==i&&i.length>0;if(a&&null===i[0]);else{const t=(a?i[0]:null)||n;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&h.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return h.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&h.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,o.getLanguageIds)(e,t):[]}}},6575:(e,t,n)=>{"use strict";n.d(t,{$l:()=>a,Gs:()=>u,MB:()=>o,Sw:()=>h,bb:()=>c,gN:()=>l,pJ:()=>d});var r=n(2323);const i="undefined"!=typeof Buffer;let s;new r.d(()=>new Uint8Array(256));class o{static wrap(e){return i&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new o(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return i?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(0|e[t+0])>>>0|e[t+1]<<8>>>0}function l(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function c(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function h(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function d(e,t){return e[t]}function u(e,t,n){e[n]=t}},6631:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});const r=(0,n(7352).u1)("languageService")},6693:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextResourceConfigurationService:()=>i,ITextResourcePropertiesService:()=>s});var r=n(7352);const i=(0,r.u1)("textResourceConfigurationService"),s=(0,r.u1)("textResourcePropertiesService")},6781:(e,t,n)=>{var r={"./simpleWorker":3142,"./simpleWorker.js":3142};function i(e){return Promise.resolve().then(()=>{if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n(r[e])})}i.keys=()=>Object.keys(r),i.id=6781,e.exports=i},6996:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>c,zy:()=>u,Yf:()=>h});var r,i,s=n(2373),o=n(6274),a=n(7352),l=n(5352);(i=r||(r={})).DARK="dark",i.LIGHT="light",i.HIGH_CONTRAST_DARK="hcDark",i.HIGH_CONTRAST_LIGHT="hcLight";const c=(0,a.u1)("themeService");function h(e){return{id:e}}const d=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.s)(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}};function u(e){return d.onColorThemeChange(e)}l.O.add("base.contributions.theming",d),o.jG},7317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{KeyMod:()=>me,createMonacoBaseAPI:()=>fe});var r=n(7542),i=n(2373);class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new s,a=new s,l=new s,c=new Array(230),h={},d=[],u=Object.create(null),p=Object.create(null),m=[],f=[];for(let e=0;e<=193;e++)m[e]=-1;for(let e=0;e<=132;e++)f[e]=-1;var g;!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],r=[];for(const e of t){const[t,i,s,g,b,v,y,w,C]=e;if(r[i]||(r[i]=!0,d[i]=s,u[s]=i,p[s.toLowerCase()]=i,t&&(m[i]=g,0!==g&&3!==g&&5!==g&&4!==g&&6!==g&&57!==g&&(f[g]=i))),!n[g]){if(n[g]=!0,!b)throw new Error(`String representation missing for key code ${g} around scan code ${s}`);o.define(g,b),a.define(g,w||b),l.define(g,C||w||b)}v&&(c[v]=g),y&&(h[y]=g)}f[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return a.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return l.keyCodeToStr(e)},e.fromUserSettings=function(e){return a.strToKeyCode(e)||l.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(g||(g={}));var b,v,y,w,C,_,k,x,S,E,F,L,I,T,N,R,D,A,M,O,z,P,B,W,V,U,$,q,j,K,H,G,Q,J,Y,X,Z,ee,te,ne,re,ie,se,oe,ae,le,ce=n(695),he=n(8274),de=n(800),ue=n(1471),pe=n(4945);!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(b||(b={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(v||(v={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(y||(y={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(w||(w={})),function(e){e[e.Deprecated=1]="Deprecated"}(C||(C={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(_||(_={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(k||(k={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(x||(x={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(S||(S={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(E||(E={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(F||(F={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"}(L||(L={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(I||(I={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(T||(T={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(N||(N={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(R||(R={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(D||(D={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(A||(A={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(M||(M={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(O||(O={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(z||(z={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(P||(P={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(B||(B={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(W||(W={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(V||(V={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(U||(U={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}($||($={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(q||(q={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(j||(j={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(K||(K={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(H||(H={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(G||(G={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(Q||(Q={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(J||(J={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(Y||(Y={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(X||(X={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(Z||(Z={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(ee||(ee={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(te||(te={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(ne||(ne={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(re||(re={})),function(e){e[e.Deprecated=1]="Deprecated"}(ie||(ie={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(se||(se={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(oe||(oe={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(ae||(ae={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(le||(le={}));class me{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return function(e,t){return(e|(65535&t)<<16>>>0)>>>0}(e,t)}}function fe(){return{editor:void 0,languages:void 0,CancellationTokenSource:r.Qi,Emitter:i.vl,KeyCode:P,KeyMod:me,Position:he.y,Range:de.Q,Selection:ue.L,SelectionDirection:ee,MarkerSeverity:B,MarkerTag:W,Uri:ce.r,Token:pe.ou}}},7352:(e,t,n)=>{"use strict";var r;n.d(t,{_Y:()=>i,u1:()=>s}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(r||(r={}));const i=s("instantiationService");function s(e){if(r.serviceIds.has(e))return r.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,n){t[r.DI_TARGET]===t?t[r.DI_DEPENDENCIES].push({id:e,index:n}):(t[r.DI_DEPENDENCIES]=[{id:e,index:n}],t[r.DI_TARGET]=t)}(t,e,i)};return t.toString=()=>e,r.serviceIds.set(e,t),t}},7542:(e,t,n)=>{"use strict";n.d(t,{Qi:()=>a});var r=n(2373);const i=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var s;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof o||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(s||(s={}));class o{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&this.dispose())}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new r.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=s.None}}},7703:(e,t,n)=>{"use strict";n.d(t,{i8:()=>o,kg:()=>s});const r="object"==typeof globalThis?globalThis:"object"==typeof window?window:"object"==typeof self?self:n.g;let i="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function s(e,t,n,...s){const o="object"==typeof t?t.key:t;let a=(((r.MonacoLocale||{}||{}).data||{})[e]||{})[o];a||(a=n),s=[];for(let e=3;e{"use strict";n.r(t),n.d(t,{SemanticTokensProviderStyling:()=>p,toMultilineTokens2:()=>m}),n(1551);var r=n(6996),i=n(579),s=n(8274),o=n(800),a=n(8738);class l{static create(e,t){return new l(e,new c(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new o.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[r,i,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new l(this._startLineNumber,r),new l(this._startLineNumber+s,i)]}applyEdit(e,t){const[n,r,i]=(0,a.W)(t);this.acceptEdit(e,n,r,i,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,r,i){this._acceptDeleteRange(e),this._acceptInsertText(new s.y(e.startLineNumber,e.startColumn),t,n,r,i),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const e=n-t;return void(this._startLineNumber-=e)}const r=this._tokens.getMaxDeltaLine();if(!(t>=r+1)){if(t<0&&n>=r+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const r=-t;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,r,i){if(0===t&&0===n)return;const s=e.lineNumber-this._startLineNumber;s<0?this._startLineNumber+=t:s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,n,r,i)}}class c{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)){let i=r;for(;i>t&&this._getDeltaLine(i-1)===e;)i--;let s=r;for(;se||h===e&&u>=t)&&(he||c===e&&p>=t){if(ci?m-=i-n:m=n;else if(u===t&&p===n){if(!(u===r&&m>i)){c=!0;continue}m-=i-n}else if(ui)){c=!0;continue}u=t,p=n,m=p+(m-i)}else if(u>r){if(0===a&&!c){l=o;break}u-=a}else{if(!(u===r&&p>=i))throw new Error("Not possible!");e&&0===u&&(p+=e,m+=e),u-=a,p-=i-n,m-=i-n}const g=4*l;s[g]=u,s[g+1]=p,s[g+2]=m,s[g+3]=f,l++}this._tokenCount=l}acceptInsertText(e,t,n,r,i,s){const o=0===n&&1===r&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s0&&t>=1;const r=this._themeService.getColorTheme().getTokenStyleMetadata(i,o,n);void 0===r?s=2147483647:(s=0,void 0!==r.italic&&(s|=1|(r.italic?1:0)<<11),void 0!==r.bold&&(s|=2|(r.bold?2:0)<<11),void 0!==r.underline&&(s|=4|(r.underline?4:0)<<11),void 0!==r.strikethrough&&(s|=8|(r.strikethrough?8:0)<<11),r.foreground&&(s|=16|r.foreground<<15),0===s&&(s=2147483647))}else s=2147483647,i="not-in-legend";this._hashTable.add(e,t,r,s)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,r,i){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${r} is outside the previous data (length ${i}).`))}};function m(e,t,n){const r=e.data,i=e.data.length/5|0,s=Math.max(Math.ceil(i/1024),400),o=[];let a=0,c=1,h=0;for(;ae&&0===r[5*t];)t--;if(t-1===e){let e=d;for(;e+1l)t.warnOverlappingSemanticTokens(o,l+1);else{const e=t.getMetadata(b,v,n);2147483647!==e&&(0===m&&(m=o),u[p]=o-m,u[p+1]=l,u[p+2]=d,u[p+3]=e,p+=4,f=o,g=d)}c=o,h=l,a++}p!==u.length&&(u=u.subarray(0,p));const b=l.create(m,u);o.push(b)}return o}p=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([u(1,r.Gy),u(2,d.L),u(3,i.rr)],p);class f{constructor(e,t,n,r){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=r,this.next=null}}class g{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=g._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=g._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";n.r(t),n.d(t,{getIconClasses:()=>u});var r,i=n(4427),s=n(9996),o=n(695),a=n(4086);!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(r||(r={}));var l,c,h=n(8386);!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(l||(l={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){const r=t.exec(e.id);if(!r)return n(h.W.error);const[,i,s]=r,o=["codicon","codicon-"+i];return s&&o.push("codicon-modifier-"+s.substring(1)),o}e.asClassNameArray=n,e.asClassName=function(e){return n(e).join(" ")},e.asCSSSelector=function(e){return"."+n(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||l.isThemeColor(e.color))};const r=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=r.exec(e);if(!t)return;const[,n]=t;return{id:n}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let n=e.id;const r=n.lastIndexOf("~");return-1!==r&&(n=n.substring(0,r)),t&&(n=`${n}~${t}`),{id:n}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){return e.id===t.id&&e.color?.id===t.color?.id}}(c||(c={}));const d=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function u(e,t,n,l,h){if(c.isThemeIcon(h))return[`codicon-${h.id}`,"predefined-file-icon"];if(o.r.isUri(h))return[];const u=l===r.ROOT_FOLDER?["rootfolder-icon"]:l===r.FOLDER?["folder-icon"]:["file-icon"];if(n){let o;if(n.scheme===i.ny.data)o=s.B6.parseMetaData(n).get(s.B6.META_DATA_LABEL);else{const e=n.path.match(d);e?(o=p(e[2].toLowerCase()),e[1]&&u.push(`${p(e[1].toLowerCase())}-name-dir-icon`)):o=p(n.authority.toLowerCase())}if(l===r.ROOT_FOLDER)u.push(`${o}-root-name-folder-icon`);else if(l===r.FOLDER)u.push(`${o}-name-folder-icon`);else{if(o){if(u.push(`${o}-name-file-icon`),u.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t{"use strict";n.d(t,{V:()=>i});var r=n(4901);class i{constructor(e){const t=(0,r.W)(e);this._defaultValue=t,this._asciiMap=i._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=(0,r.W)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}},8258:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageFeaturesService:()=>f});var r=n(2373),i=n(6274),s=n(8748),o=n(3035),a=n(9130);function l(e,t,n,r,i,s){if(Array.isArray(e)){let o=0;for(const a of e){const e=l(a,t,n,r,i,s);if(10===e)return e;e>o&&(o=e)}return o}if("string"==typeof e)return r?"*"===e?5:e===n?10:0:0;if(e){const{language:l,pattern:c,scheme:h,hasAccessToAllModels:d,notebookType:u}=e;if(!r&&!d)return 0;u&&i&&(t=i);let p=0;if(h)if(h===t.scheme)p=10;else{if("*"!==h)return 0;p=5}if(l)if(l===n)p=10;else{if("*"!==l)return 0;p=Math.max(p,5)}if(u)if(u===s)p=10;else{if("*"!==u||void 0===s)return 0;p=Math.max(p,5)}if(c){let e;if(e="string"==typeof c?c:{...c,base:(0,a.S8)(c.base)},e!==t.fsPath&&!(0,o.YW)(e,t.fsPath))return 0;p=10}return p}return 0}function c(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(c):!!e.exclusive)}class h{constructor(e,t,n,r,i){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=r,this.recursive=i}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class d{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,i.s)(()=>{if(n){const e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const n=[];return this._orderedForEach(e,t,e=>n.push(e.provider)),n}orderedGroups(e){const t=[];let n,r;return this._orderedForEach(e,!1,e=>{n&&r===e._score?n.push(e.provider):(r=e._score,n=[e.provider],t.push(n))}),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(const e of this._entries)e._score>0&&n(e)}_updateScores(e,t){const n=this._notebookInfoResolver?.(e.uri),r=n?new h(e.uri,e.getLanguageId(),n.uri,n.type,t):new h(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(r)){this._lastCandidate=r;for(const n of this._entries)if(n._score=l(n.selector,r.uri,r.languageId,(0,s.vd)(e),r.notebookUri,r.notebookType),c(n.selector)&&n._score>0){if(!t){for(const e of this._entries)e._score=0;n._score=1e3;break}n._score=0}this._entries.sort(d._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:u(e.selector)&&!u(t.selector)?1:!u(e.selector)&&u(t.selector)?-1:e._timet._time?-1:0}}function u(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(u):Boolean(e.isBuiltin))}var p=n(6461),m=n(1964);class f{constructor(){this.referenceProvider=new d(this._score.bind(this)),this.renameProvider=new d(this._score.bind(this)),this.newSymbolNamesProvider=new d(this._score.bind(this)),this.codeActionProvider=new d(this._score.bind(this)),this.definitionProvider=new d(this._score.bind(this)),this.typeDefinitionProvider=new d(this._score.bind(this)),this.declarationProvider=new d(this._score.bind(this)),this.implementationProvider=new d(this._score.bind(this)),this.documentSymbolProvider=new d(this._score.bind(this)),this.inlayHintsProvider=new d(this._score.bind(this)),this.colorProvider=new d(this._score.bind(this)),this.codeLensProvider=new d(this._score.bind(this)),this.documentFormattingEditProvider=new d(this._score.bind(this)),this.documentRangeFormattingEditProvider=new d(this._score.bind(this)),this.onTypeFormattingEditProvider=new d(this._score.bind(this)),this.signatureHelpProvider=new d(this._score.bind(this)),this.hoverProvider=new d(this._score.bind(this)),this.documentHighlightProvider=new d(this._score.bind(this)),this.multiDocumentHighlightProvider=new d(this._score.bind(this)),this.selectionRangeProvider=new d(this._score.bind(this)),this.foldingRangeProvider=new d(this._score.bind(this)),this.linkProvider=new d(this._score.bind(this)),this.inlineCompletionsProvider=new d(this._score.bind(this)),this.inlineEditProvider=new d(this._score.bind(this)),this.completionProvider=new d(this._score.bind(this)),this.linkedEditingRangeProvider=new d(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new d(this._score.bind(this)),this.documentSemanticTokensProvider=new d(this._score.bind(this)),this.documentDropEditProvider=new d(this._score.bind(this)),this.documentPasteEditProvider=new d(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,m.v)(p.ILanguageFeaturesService,f,1)},8274:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});class r{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new r(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return r.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return r.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";n.d(t,{Io:()=>o,Ld:()=>s,Th:()=>l});var r=n(1075),i=n(1732);const s=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?")e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}();function o(e){let t=s;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const a=new i.w;function l(e,t,n,i,s){if(t=o(t),s||(s=r.f.first(a)),n.length>s.maxLen){let r=e-s.maxLen/2;return r<0?r=0:i+=r,l(e,t,n=n.substring(r,e+s.maxLen/2),i,s)}const h=Date.now(),d=e-1-i;let u=-1,p=null;for(let e=1;!(Date.now()-h>=s.timeBudget);e++){const r=d-s.windowSize*e;t.lastIndex=Math.max(0,r);const i=c(t,n,d,u);if(!i&&p)break;if(p=i,r<=0)break;u=r}if(p){const e={word:p[0],startColumn:i+1+p.index,endColumn:i+1+p.index+p[0].length};return t.lastIndex=0,e}return null}function c(e,t,n,r){let i;for(;i=e.exec(t);){const t=i.index||0;if(t<=n&&e.lastIndex>=n)return i;if(r>0&&t>r)return null}return null}a.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},8332:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSectionHeaders:()=>s});const r=new RegExp("\\bMARK:\\s*(.*)$","d"),i=/^-+|-+$/g;function s(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=function(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const r=e.getLineContent(i),s=r.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:i,startColumn:s[0].length+1,endLineNumber:i,endColumn:r.length+1};if(e.endColumn>e.startColumn){const t={range:e,...a(r.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],n=e.getLineCount();for(let r=1;r<=n;r++)o(e.getLineContent(r),r,t);return t}(e);n=n.concat(t)}return n}function o(e,t,n){r.lastIndex=0;const i=r.exec(e);if(i){const e={startLineNumber:t,startColumn:i.indices[1][0]+1,endLineNumber:t,endColumn:i.indices[1][1]+1};if(e.endColumn>e.startColumn){const t={range:e,...a(i[1]),shouldBeInComments:!0};(t.text||t.hasSeparatorLine)&&n.push(t)}}}function a(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(i,""),hasSeparatorLine:t}}},8348:(e,t,n)=>{"use strict";function r(e,t){const n=function(e,t,n=e.length-1){for(let r=n;r>=0;r--)if(t(e[r]))return r;return-1}(e,t);if(-1!==n)return e[n]}function i(e,t){const n=s(e,t);return-1===n?void 0:e[n]}function s(e,t,n=0,r=e.length){let i=n,s=r;for(;ir,XP:()=>o,hw:()=>a,iM:()=>s,lx:()=>i,vJ:()=>l});class l{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(l.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=s(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}},8386:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(2548);const i=Object.create(null);function s(e,t){if((0,r.Kg)(t)){const n=i[t];if(void 0===n)throw new Error(`${e} references an unknown codicon: ${t}`);t=n}return i[e]=t,{id:e}}const o={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),gitPullRequestLabel:s("git-pull-request-label",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),terminalDecorationSuccess:s("terminal-decoration-success",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circleOutline:s("circle-outline",60092),circle:s("circle",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:s("terminal-decoration-incomplete",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),diffSidebyside:s("diff-sidebyside",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),compareChanges:s("compare-changes",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),terminalDecorationMark:s("terminal-decoration-mark",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),debugAlt:s("debug-alt",60305),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),issueClosed:s("issue-closed",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),export:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnknown:s("workspace-unknown",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracket:s("bracket",60175),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newline:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),terminalDecorationError:s("terminal-decoration-error",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),blank:s("blank",60419),heartFilled:s("heart-filled",60420),map:s("map",60421),mapHorizontal:s("map-horizontal",60421),foldHorizontal:s("fold-horizontal",60421),mapFilled:s("map-filled",60422),mapHorizontalFilled:s("map-horizontal-filled",60422),foldHorizontalFilled:s("fold-horizontal-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),thumbsdownFilled:s("thumbsdown-filled",60435),thumbsupFilled:s("thumbsup-filled",60436),coffee:s("coffee",60437),snake:s("snake",60438),game:s("game",60439),vr:s("vr",60440),chip:s("chip",60441),piano:s("piano",60442),music:s("music",60443),micFilled:s("mic-filled",60444),repoFetch:s("repo-fetch",60445),copilot:s("copilot",60446),lightbulbSparkle:s("lightbulb-sparkle",60447),robot:s("robot",60448),sparkleFilled:s("sparkle-filled",60449),diffSingle:s("diff-single",60450),diffMultiple:s("diff-multiple",60451),surroundWith:s("surround-with",60452),share:s("share",60453),gitStash:s("git-stash",60454),gitStashApply:s("git-stash-apply",60455),gitStashPop:s("git-stash-pop",60456),vscode:s("vscode",60457),vscodeInsiders:s("vscode-insiders",60458),codeOss:s("code-oss",60459),runCoverage:s("run-coverage",60460),runAllCoverage:s("run-all-coverage",60461),coverage:s("coverage",60462),githubProject:s("github-project",60463),mapVertical:s("map-vertical",60464),foldVertical:s("fold-vertical",60464),mapVerticalFilled:s("map-vertical-filled",60465),foldVerticalFilled:s("fold-vertical-filled",60465),goToSearch:s("go-to-search",60466),percentage:s("percentage",60467),sortPercentage:s("sort-percentage",60467),attach:s("attach",60468),dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left"),dropDownButton:s("drop-down-button",60084),symbolCustomColor:s("symbol-customcolor",60252),exportIcon:s("export",60332),workspaceUnspecified:s("workspace-unspecified",60355),newLine:s("newline",60394),thumbsDownFilled:s("thumbsdown-filled",60435),thumbsUpFilled:s("thumbsup-filled",60436),gitFetch:s("git-fetch",60445),lightbulbSparkleAutofix:s("lightbulb-sparkle-autofix",60447),debugBreakpointPending:s("debug-breakpoint-pending",60377)}},8476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MarkerDecorationsService:()=>_});var r,i=n(5603);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(r||(r={})),function(e){const t="error",n="warning",r="info";e.fromValue=function(s){return s?i.Q_(t,s)?e.Error:i.Q_(n,s)||i.Q_("warn",s)?e.Warning:i.Q_(r,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(i){switch(i){case e.Error:return t;case e.Warning:return n;case e.Info:return r;default:return"ignore"}}}(r||(r={}));const s=r;var o,a,l=n(7703),c=n(7352);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(o||(o={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,l.kg)("vs/platform/markers/common/markers","sev.error","Error"),t[e.Warning]=(0,l.kg)("vs/platform/markers/common/markers","sev.warning","Warning"),t[e.Info]=(0,l.kg)("vs/platform/markers/common/markers","sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Error:return e.Error;case s.Warning:return e.Warning;case s.Info:return e.Info;case s.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Error;case e.Warning:return s.Warning;case e.Info:return s.Info;case e.Hint:return s.Ignore}}}(o||(o={})),function(e){const t="";function n(e,n){const r=[t];return e.source?r.push(e.source.replace("¦","\\¦")):r.push(t),e.code?"string"==typeof e.code?r.push(e.code.replace("¦","\\¦")):r.push(e.code.value.replace("¦","\\¦")):r.push(t),void 0!==e.severity&&null!==e.severity?r.push(o.toString(e.severity)):r.push(t),e.message&&n?r.push(e.message.replace("¦","\\¦")):r.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?r.push(e.startLineNumber.toString()):r.push(t),void 0!==e.startColumn&&null!==e.startColumn?r.push(e.startColumn.toString()):r.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?r.push(e.endLineNumber.toString()):r.push(t),void 0!==e.endColumn&&null!==e.endColumn?r.push(e.endColumn.toString()):r.push(t),r.push(t),r.join("¦")}e.makeKey=function(e){return n(e,!0)},e.makeKeyOptionalMessage=n}(a||(a={}));const h=(0,c.u1)("markerService");var d=n(6274),u=n(8748),p=n(6996),m=n(550),f=n(887),g=n(800),b=n(4427),v=n(2373),y=n(4756),w=n(6303),C=function(e,t){return function(n,r){t(n,r,e)}};let _=class extends d.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new v.vl),this._markerDecorations=new w.fT,e.getModels().forEach(e=>this._onModelAdded(e)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)})}_onModelAdded(e){const t=new k(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==b.ny.inMemory&&e.uri.scheme!==b.ny.internal&&e.uri.scheme!==b.ny.vscode||this._markerService?.read({resource:e.uri}).map(e=>e.owner).forEach(t=>this._markerService.remove(t,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([C(0,f.IModelService),C(1,h)],_);class k extends d.jG{constructor(e){super(),this.model=e,this._map=new w.cO,this._register((0,d.s)(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:t,removed:n}=function(e,t){const n=[],r=[];for(const r of e)t.has(r)||n.push(r);for(const n of t)e.has(n)||r.push(n);return{removed:n,added:r}}(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===n.length)return!1;const r=n.map(e=>this._map.get(e)),i=t.map(e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)})),s=this.model.deltaDecorations(r,i);for(const e of n)this._map.delete(e);for(let e=0;e=t)return n;const r=e.getWordAtPosition(n.getStartPosition());r&&(n=new g.Q(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){const r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0}}},8581:(e,t,n)=>{"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;nfunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},r={};for(const t of e)r[t]=n(t);return r}n.d(t,{V0:()=>i,aI:()=>r,kT:()=>s}),Object.prototype.hasOwnProperty},8685:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeViewsDnDService:()=>o});var r=n(1964),i=n(7352),s=n(9268);const o=(0,i.u1)("treeViewsDndService");(0,r.v)(o,s.TreeViewsDnDService,1)},8707:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextModelService:()=>r});const r=(0,n(7352).u1)("textModelService")},8738:(e,t,n)=>{"use strict";function r(e){let t=0,n=0,r=0,i=0;for(let s=0,o=e.length;sr})},8748:(e,t,n)=>{"use strict";n.d(t,{A5:()=>r,Dg:()=>l,F4:()=>u,L5:()=>d,Wo:()=>h,X2:()=>a,ZS:()=>i,nk:()=>c,vd:()=>p});var r,i,s,o=n(8581);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(r||(r={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(i||(i={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,o.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"==typeof e.read}class h{constructor(e,t,n,r,i,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=r,this.isAutoWhitespaceEdit=i,this._isTracked=s}}class d{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class u{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function p(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},9130:(e,t,n)=>{"use strict";n.d(t,{P8:()=>I,pD:()=>L,LC:()=>T,fj:()=>S,S8:()=>x,SA:()=>k,V8:()=>F,hd:()=>E,Vn:()=>N,IN:()=>C});var r=n(6206);let i;const s=globalThis.vscode;if(void 0!==s&&void 0!==s.process){const e=s.process;i={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else i="undefined"!=typeof process&&"string"==typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return r.uF?"win32":r.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const o=i.cwd,a=i.env,l=i.platform,c=46,h=47,d=92,u=58;class p extends Error{constructor(e,t,n){let r;"string"==typeof t&&0===t.indexOf("not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be";const i=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${i} ${r} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function m(e,t){if("string"!=typeof e)throw new p(t,"string",e)}const f="win32"===l;function g(e){return e===h||e===d}function b(e){return e===h}function v(e){return e>=65&&e<=90||e>=97&&e<=122}function y(e,t,n,r){let i="",s=0,o=-1,a=0,l=0;for(let d=0;d<=e.length;++d){if(d2){const e=i.lastIndexOf(n);-1===e?(i="",s=0):(i=i.slice(0,e),s=i.length-1-i.lastIndexOf(n)),o=d,a=0;continue}if(0!==i.length){i="",s=0,o=d,a=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,d)}`:i=e.slice(o+1,d),s=d-o-1;o=d,a=0}else l===c&&-1!==a?++a:a=-1}return i}function w(e,t){!function(e){if(null===e||"object"!=typeof e)throw new p("pathObject","Object",e)}(t);const n=t.dir||t.root,r=t.base||`${t.name||""}${i=t.ext,i?`${"."===i[0]?"":"."}${i}`:""}`;var i;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const C={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],m(s,`paths[${i}]`),0===s.length)continue}else 0===t.length?s=o():(s=a[`=${t}`]||o(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===d)&&(s=`${t}\\`));const l=s.length;let c=0,h="",p=!1;const f=s.charCodeAt(0);if(1===l)g(f)&&(c=1,p=!0);else if(g(f))if(p=!0,g(s.charCodeAt(1))){let e=2,t=e;for(;e2&&g(s.charCodeAt(2))&&(p=!0,c=3));if(h.length>0)if(t.length>0){if(h.toLowerCase()!==t.toLowerCase())continue}else t=h;if(r){if(t.length>0)break}else if(n=`${s.slice(c)}\\${n}`,r=p,p&&t.length>0)break}return n=y(n,!r,"\\",g),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){m(e,"path");const t=e.length;if(0===t)return".";let n,r=0,i=!1;const s=e.charCodeAt(0);if(1===t)return b(s)?"\\":e;if(g(s))if(i=!0,g(e.charCodeAt(1))){let i=2,s=i;for(;i2&&g(e.charCodeAt(2))&&(i=!0,r=3));let o=r0&&g(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?i?`\\${o}`:o:i?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){m(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return g(n)||t>2&&v(n)&&e.charCodeAt(1)===u&&g(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let r=0;r0&&(void 0===t?t=n=i:t+=`\\${i}`)}if(void 0===t)return".";let r=!0,i=0;if("string"==typeof n&&g(n.charCodeAt(0))){++i;const e=n.length;e>1&&g(n.charCodeAt(1))&&(++i,e>2&&(g(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return C.normalize(t)},relative(e,t){if(m(e,"from"),m(t,"to"),e===t)return"";const n=C.resolve(e),r=C.resolve(t);if(n===r)return"";if((e=n.toLowerCase())===(t=r.toLowerCase()))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===d;)s--;const o=s-i;let a=0;for(;aa&&t.charCodeAt(l-1)===d;)l--;const c=l-a,h=oh){if(t.charCodeAt(a+p)===d)return r.slice(a+p+1);if(2===p)return r.slice(a+p)}o>h&&(e.charCodeAt(i+p)===d?u=p:2===p&&(u=3)),-1===u&&(u=0)}let f="";for(p=i+u+1;p<=s;++p)p!==s&&e.charCodeAt(p)!==d||(f+=0===f.length?"..":"\\..");return a+=u,f.length>0?`${f}${r.slice(a,l)}`:(r.charCodeAt(a)===d&&++a,r.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=C.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===d){if(t.charCodeAt(1)===d){const e=t.charCodeAt(2);if(63!==e&&e!==c)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(v(t.charCodeAt(0))&&t.charCodeAt(1)===u&&t.charCodeAt(2)===d)return`\\\\?\\${t}`;return e},dirname(e){m(e,"path");const t=e.length;if(0===t)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(1===t)return g(i)?e:".";if(g(i)){if(n=r=1,g(e.charCodeAt(1))){let i=2,s=i;for(;i2&&g(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let n=t-1;n>=r;--n)if(g(e.charCodeAt(n))){if(!o){s=n;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&m(t,"suffix"),m(e,"path");let n,r=0,i=-1,s=!0;if(e.length>=2&&v(e.charCodeAt(0))&&e.charCodeAt(1)===u&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=r;--n){const l=e.charCodeAt(n);if(g(l)){if(!s){r=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(i=n):(o=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(g(e.charCodeAt(n))){if(!s){r=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){m(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===u&&v(e.charCodeAt(0))&&(t=r=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(g(t)){if(!s){r=a+1;break}}else-1===i&&(s=!1,i=a+1),t===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:w.bind(null,"\\"),parse(e){m(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(1===n)return g(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(g(i)){if(r=1,g(e.charCodeAt(1))){let t=2,i=t;for(;t0&&(t.root=e.slice(0,r));let s=-1,o=r,a=-1,l=!0,h=e.length-1,d=0;for(;h>=r;--h)if(i=e.charCodeAt(h),g(i)){if(!l){o=h+1;break}}else-1===a&&(l=!1,a=h+1),i===c?-1===s?s=h:1!==d&&(d=1):-1!==s&&(d=-1);return-1!==a&&(-1===s||0===d||1===d&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==r?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},_=(()=>{if(f){const e=/\\/g;return()=>{const t=o().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>o()})(),k={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:_();m(i,`paths[${r}]`),0!==i.length&&(t=`${i}/${t}`,n=i.charCodeAt(0)===h)}return t=y(t,!n,"/",b),n?`/${t}`:t.length>0?t:"."},normalize(e){if(m(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===h,n=e.charCodeAt(e.length-1)===h;return 0===(e=y(e,!t,"/",b)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(m(e,"path"),e.length>0&&e.charCodeAt(0)===h),join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=r:t+=`/${r}`)}return void 0===t?".":k.normalize(t)},relative(e,t){if(m(e,"from"),m(t,"to"),e===t)return"";if((e=k.resolve(e))===(t=k.resolve(t)))return"";const n=e.length,r=n-1,i=t.length-1,s=rs){if(t.charCodeAt(1+a)===h)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else r>s&&(e.charCodeAt(1+a)===h?o=a:0===a&&(o=0));let l="";for(a=1+o+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==h||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+o)}`},toNamespacedPath:e=>e,dirname(e){if(m(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===h;let n=-1,r=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===h){if(!r){n=t;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&m(t,"ext"),m(e,"path");let n,r=0,i=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===h){if(!s){r=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(i=n):(o=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===h){if(!s){r=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){m(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==h)-1===r&&(i=!1,r=o+1),a===c?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===s||1===s&&t===r-1&&t===n+1?"":e.slice(t,r)},format:w.bind(null,"/"),parse(e){m(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===h;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,l=e.length-1,d=0;for(;l>=r;--l){const t=e.charCodeAt(l);if(t!==h)-1===o&&(a=!1,o=l+1),t===c?-1===i?i=l:1!==d&&(d=1):-1!==i&&(d=-1);else if(!a){s=l+1;break}}if(-1!==o){const r=0===s&&n?1:s;-1===i||0===d||1===d&&i===o-1&&i===s+1?t.base=t.name=e.slice(r,o):(t.name=e.slice(r,i),t.base=e.slice(r,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};k.win32=C.win32=C,k.posix=C.posix=k;const x=f?C.normalize:k.normalize,S=f?C.join:k.join,E=f?C.resolve:k.resolve,F=f?C.relative:k.relative,L=f?C.dirname:k.dirname,I=f?C.basename:k.basename,T=f?C.extname:k.extname,N=f?C.sep:k.sep},9182:(e,t,n)=>{"use strict";n.d(t,{lt:()=>d,W5:()=>g,hB:()=>m,dr:()=>u,wC:()=>f});var r=n(5603),i=n(6303),s=n(8223);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,n=e.length;tt)break;n=r}return n}findNextIntlWordAtOrAfterOffset(e,t){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index=n)break;const r=e.charCodeAt(t);if(110===r||114===r||87===r)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=r.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new h.L5(t,this.wordSeparators?function(e,t){const n=`${e}/${t.join(",")}`;let r=a.get(n);return r||(r=new o(e,t),a.set(n,r)),r}(this.wordSeparators,[]):null,n?this.searchString:null)}}function u(e,t,n){if(!n)return new h.Dg(e,null);const r=[];for(let e=0,n=t.length;e=e?r=i-1:t[i+1]>=e?(n=i,r=i):n=i+1}return n+1}}class m{static findMatches(e,t,n,r,i){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new g(s.wordSeparators,s.regex),r,i):this._doFindMatchesLineByLine(e,n,s,r,i):[]}static _getMultilineMatchRange(e,t,n,r,i,s){let o,a,l=0;if(r?(l=r.findLineFeedCountBeforeOffset(i),o=t+i+l):o=t+i,r){const e=r.findLineFeedCountBeforeOffset(i+s.length)-l;a=o+s.length+e}else a=o+s.length;const h=e.getPositionAt(o),d=e.getPositionAt(a);return new c.Q(h.lineNumber,h.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,n,r,i){const s=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new p(o):null,l=[];let c,h=0;for(n.reset(0);c=n.next(o);)if(l[h++]=u(this._getMultilineMatchRange(e,s,o,a,c.index,c[0]),c,r),h>=i)return l;return l}static _doFindMatchesLineByLine(e,t,n,r,i){const s=[];let o=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,r,i),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,r,i);for(let a=t.startLineNumber+1;a=a))return i;return i}const d=new g(e.wordSeparators,e.regex);let p;d.reset(0);do{if(p=d.next(t),p&&(s[i++]=u(new c.Q(n,p.index+1+r,n,p.index+1+p[0].length+r),p,o),i>=a))return i}while(p);return i}static findNextMatch(e,t,n,r){const i=t.parseSearchRequest();if(!i)return null;const s=new g(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindNextMatchMultiline(e,n,s,r):this._doFindNextMatchLineByLine(e,n,s,r)}static _doFindNextMatchMultiline(e,t,n,r){const i=new l.y(t.lineNumber,1),s=e.getOffsetAt(i),o=e.getLineCount(),a=e.getValueInRange(new c.Q(i.lineNumber,i.column,o,e.getLineMaxColumn(o)),1),h="\r\n"===e.getEOL()?new p(a):null;n.reset(t.column-1);const d=n.next(a);return d?u(this._getMultilineMatchRange(e,s,a,h,d.index,d[0]),d,r):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new l.y(1,1),n,r):null}static _doFindNextMatchLineByLine(e,t,n,r){const i=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s),a=this._findFirstMatchInLine(n,o,s,t.column,r);if(a)return a;for(let t=1;t<=i;t++){const o=(s+t-1)%i,a=e.getLineContent(o+1),l=this._findFirstMatchInLine(n,a,o+1,1,r);if(l)return l}return null}static _findFirstMatchInLine(e,t,n,r,i){e.reset(r-1);const s=e.next(t);return s?u(new c.Q(n,s.index+1,n,s.index+1+s[0].length),s,i):null}static findPreviousMatch(e,t,n,r){const i=t.parseSearchRequest();if(!i)return null;const s=new g(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,r):this._doFindPreviousMatchLineByLine(e,n,s,r)}static _doFindPreviousMatchMultiline(e,t,n,r){const i=this._doFindMatchesMultiline(e,new c.Q(1,1,t.lineNumber,t.column),n,r,9990);if(i.length>0)return i[i.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new l.y(s,e.getLineMaxColumn(s)),n,r):null}static _doFindPreviousMatchLineByLine(e,t,n,r){const i=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(n,o,s,r);if(a)return a;for(let t=1;t<=i;t++){const o=(i+s-t-1)%i,a=e.getLineContent(o+1),l=this._findLastMatchInLine(n,a,o+1,r);if(l)return l}return null}static _findLastMatchInLine(e,t,n,r){let i,s=null;for(e.reset(0);i=e.next(t);)s=u(new c.Q(n,i.index+1,n,i.index+1+i[0].length),i,r);return s}}function f(e,t,n,r,i){return function(e,t,n,r,i){if(0===r)return!0;const s=t.charCodeAt(r-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(i>0){const n=t.charCodeAt(r);if(0!==e.get(n))return!0}return!1}(e,t,0,r,i)&&function(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(i>0){const n=t.charCodeAt(r+i-1);if(0!==e.get(n))return!0}return!1}(e,t,n,r,i)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const i=n.index,s=n[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){r.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||f(this._wordSeparators,e,t,i,s))return n}while(n);return null}}},9208:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeatureDebounceService:()=>m,LanguageFeatureDebounceService:()=>v});var r=n(9517),i=n(6303);function s(e,t,n){return Math.min(Math.max(e,t),n)}class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class a{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n(0,r.sN)(f.of(t),e),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?s(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let r=this._cache.get(n);r||(r=new a(6),this._cache.set(n,r));const i=s(r.update(t),this._min,this._max);return(0,u.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${i}ms`),i}_overall(){const e=new o;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return s(0|this._overall()||this._default,this._min,this._max)}}let v=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){const r=n?.min??50,i=n?.max??r**2,s=n?.key??void 0,o=`${f.of(e)},${r}${s?","+s:""}`;let a=this._data.get(o);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new g(1.5*r)):a=new b(this._logService,t,e,0|this._overallAverage()||1.5*r,r,i),this._data.set(o,a)),a}_overallAverage(){const e=new o;for(const t of this._data.values())e.update(t.default());return e.value}};v=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([p(0,d.rr),p(1,c)],v),(0,h.v)(m,v,1)},9241:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeSitterParserService:()=>r});const r=(0,n(7352).u1)("treeSitterParserService")},9268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DraggedTreeItemsIdentifier:()=>i,TreeViewsDnDService:()=>r});class r{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class i{constructor(e){this.identifier=e}}},9517:(e,t,n)=>{"use strict";n.d(t,{e2:()=>o,sN:()=>i,v7:()=>h});var r=n(5603);function i(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?(n=e,r=s(104579,r=t),n.reduce((e,t)=>i(t,e),r)):function(e,t){return t=s(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=o(n,t),i(e[n],t)),t)}(e,t);case"string":return o(e,t);case"boolean":return function(e,t){return s(e?433:863,t)}(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}var n,r}function s(e,t){return(t<<5)-t+e|0}function o(e,t){t=s(149417,t);for(let n=0,r=e.length;n>>r)>>>0}function l(e,t=0,n=e.byteLength,r=0){for(let i=0;ie.toString(16).padStart(2,"0")).join(""):function(e,t,n="0"){for(;e.length>>0).toString(16),t/4)}class h{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let i,s,o=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(i=a,s=-1,a=0):(i=e.charCodeAt(0),s=0);;){let l=i;if(r.pc(i)){if(!(s+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),c(this._h0)+c(this._h1)+c(this._h2)+c(this._h3)+c(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,l(this._buff,this._buffLen),this._buffLen>56&&(this._step(),l(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=h._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,a(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,r,i,s=this._h0,o=this._h1,l=this._h2,c=this._h3,d=this._h4;for(let t=0;t<80;t++)t<20?(n=o&l|~o&c,r=1518500249):t<40?(n=o^l^c,r=1859775393):t<60?(n=o&l|o&c|l&c,r=2400959708):(n=o^l^c,r=3395469782),i=a(s,5)+n+d+r+e.getUint32(4*t,!1)&4294967295,d=c,c=l,l=a(o,30),o=s,s=i;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+l&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+d&4294967295}}},9796:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultModelSHA1Computer:()=>gi,ModelService:()=>fi});var r=n(2373),i=n(6274),s=n(6206),o=n(1211),a=n(3298),l=n(1490),c=n(5603),h=n(695),d=n(8738);class u{static _nextVisibleColumn(e,t,n){return 9===e?u.nextRenderTabStop(t,n):c.ne(e)||c.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){const r=Math.min(t-1,e.length),i=e.substring(0,r),s=new c.km(i);let o=0;for(;!s.eol();){const e=c.Z5(i,r,s.offset);s.nextGraphemeLength(),o=this._nextVisibleColumn(e,o,n)}return o}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const r=e.length,i=new c.km(e);let s=0,o=1;for(;!i.eol();){const a=c.Z5(e,r,i.offset);i.nextGraphemeLength();const l=this._nextVisibleColumn(a,s,n),h=i.offset+1;if(l>=t)return l-t \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new w(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new w({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new w({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}function x(e){return!!(3&e)}var S=n(6575);let E,F,L;function I(){return E||(E=new TextDecoder("UTF-16LE")),E}class T{constructor(e,t,n,r,i,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=n,this.close=r,this.forwardRegex=i,this.reversedRegex=s,this._openSet=T._toSet(this.open),this._closeSet=T._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const n of e)t.add(n);return t}}class N{constructor(e,t){this._richEditBracketsBrand=void 0;const n=function(e){const t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);const n=[];for(let e=0;e{const[n,r]=e,[i,s]=t;return n===i||n===s||r===i||r===s},i=(e,r)=>{const i=Math.min(e,r),s=Math.max(e,r);for(let e=0;e0&&s.push({open:i,close:o})}return s}(t);this.brackets=n.map((t,r)=>new T(e,r,t.open,t.close,function(e,t,n,r){let i=[];i=i.concat(e),i=i.concat(t);for(let e=0,t=i.length;e=0&&r.push(t);for(const t of s.close)t.indexOf(e)>=0&&r.push(t)}}function D(e,t){return e.length-t.length}function A(e){if(e.length<=1)return e;const t=[],n=new Set;for(const r of e)n.has(r)||(t.push(r),n.add(r));return t}function M(e){const t=/^[\w ]+$/.test(e);return e=c.bm(e),t?`\\b${e}\\b`:e}function O(e,t){const n=`(${e.map(M).join(")|(")})`;return c.OS(n,!0,t)}const z=function(){let e=null,t=null;return function(n){return e!==n&&(e=n,t=function(e){const t=new Uint16Array(e.length);let n=0;for(let r=e.length-1;r>=0;r--)t[n++]=e.charCodeAt(r);return(L||(L=s.cm()?I():(F||(F=new TextDecoder("UTF-16BE")),F)),L).decode(t)}(e)),t}}();class P{static _findPrevBracketInText(e,t,n,r){const i=n.match(e);if(!i)return null;const s=n.length-(i.index||0),o=i[0].length,a=r+s;return new m.Q(t,a-o+1,t,a+1)}static findPrevBracketInRange(e,t,n,r,i){const s=z(n).substring(n.length-i,n.length-r);return this._findPrevBracketInText(e,t,s,r)}static findNextBracketInText(e,t,n,r){const i=n.match(e);if(!i)return null;const s=i.index||0,o=i[0].length;if(0===o)return null;const a=r+s;return new m.Q(t,a+1,t,a+1+o)}static findNextBracketInRange(e,t,n,r,i){const s=n.substring(r,i);return this.findNextBracketInText(e,t,s,r)}}class B{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return(0,o.dM)(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const r=t.findTokenIndexAtOffset(n-1);if(x(t.getStandardTokenType(r)))return null;const i=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,o=P.findPrevBracketInRange(i,1,s,0,s.length);if(!o)return null;const a=s.substring(o.startColumn-1,o.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function W(e){return e.global&&(e.lastIndex=0),!0}class V{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&W(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&W(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&W(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&W(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class U{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{const t=U._createOpenBracketRegExp(e[0]),n=U._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,r){if(e>=3)for(let e=0,i=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))))return i.action}if(e>=2&&n.length>0&&r.length>0)for(let e=0,t=this._brackets.length;e=2&&n.length>0)for(let e=0,t=this._brackets.length;e{const t=new Set;return{info:new Y(this,e,t),closing:t}}),i=new H.VV(e=>{const t=new Set,n=new Set;return{info:new X(this,e,t,n),opening:t,openingColorized:n}});for(const[e,t]of n){const n=r.get(e),s=i.get(t);n.closing.add(s.info),s.opening.add(n.info)}const s=t.colorizedBracketPairs?Q(t.colorizedBracketPairs):n.filter(e=>!("<"===e[0]&&">"===e[1]));for(const[e,t]of s){const n=r.get(e),s=i.get(t);n.closing.add(s.info),s.openingColorized.add(n.info),s.opening.add(n.info)}this._openingBrackets=new Map([...r.cachedValues].map(([e,t])=>[e,t.info])),this._closingBrackets=new Map([...i.cachedValues].map(([e,t])=>[e,t.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){return O(Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]),e)}}function Q(e){return e.filter(([e,t])=>""!==e&&""!==t)}class J{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class Y extends J{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class X extends J{constructor(e,t,n,r){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=r,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var Z=function(e,t){return function(n,r){t(n,r,e)}};class ee{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const te=(0,$.u1)("languageConfigurationService");let ne=class extends i.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new ce),this.onDidChangeEmitter=this._register(new r.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(re));this._register(this.configurationService.onDidChangeConfiguration(e=>{const t=e.change.keys.some(e=>n.has(e)),r=e.change.overrides.filter(([e,t])=>t.some(e=>n.has(e))).map(([e])=>e);if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new ee(void 0));else for(const e of r)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new ee(e)))})),this._register(this._registry.onDidChange(e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new ee(e.languageId))}))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,n,r){let i=t.getLanguageConfiguration(e);if(!i){if(!r.isRegisteredLanguageId(e))return new he(e,{});i=new he(e,{})}const s=function(e,t){const n=t.getValue(re.brackets,{overrideIdentifier:e}),r=t.getValue(re.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:ie(n),colorizedBracketPairs:ie(r)}}(i.languageId,n),o=oe([i.underlyingConfig,s]);return new he(i.languageId,o)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};ne=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([Z(0,q.pG),Z(1,v.L)],ne);const re={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function ie(e){if(Array.isArray(e))return e.map(e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]}).filter(e=>!!e)}class se{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new ae(e,t,++this._order);return this._entries.push(n),this._resolved=null,(0,i.s)(()=>{for(let e=0;ee.configuration)))}}function oe(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const n of e)t={comments:n.comments||t.comments,brackets:n.brackets||t.brackets,wordPattern:n.wordPattern||t.wordPattern,indentationRules:n.indentationRules||t.indentationRules,onEnterRules:n.onEnterRules||t.onEnterRules,autoClosingPairs:n.autoClosingPairs||t.autoClosingPairs,surroundingPairs:n.surroundingPairs||t.surroundingPairs,autoCloseBefore:n.autoCloseBefore||t.autoCloseBefore,folding:n.folding||t.folding,colorizedBracketPairs:n.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:n.__electricCharacterSupport||t.__electricCharacterSupport};return t}class ae{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class le{constructor(e){this.languageId=e}}class ce extends i.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new r.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(K.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let r=this._entries.get(e);r||(r=new se(e),this._entries.set(e,r));const s=r.register(t,n);return this._onDidChange.fire(new le(e)),(0,i.s)(()=>{s.dispose(),this._onDidChange.fire(new le(e))})}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class he{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new U(this.underlyingConfig):null,this.comments=he._handleComments(this.underlyingConfig),this.characterPair=new k(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||y.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new V(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new G(e,this.underlyingConfig)}getWordDefinition(){return(0,y.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new N(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new B(this.brackets)),this._electricCharacter}onEnter(e,t,n,r){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,r):null}getAutoClosingPairs(){return new C(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[e,r]=t.blockComment;n.blockCommentStartToken=e,n.blockCommentEndToken=r}return n}}(0,j.v)(te,ne,1);var de=n(8748);class ue{constructor(e,t,n,r){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=r}}class pe{constructor(e,t,n,r,i,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=r,this.nestingLevelOfEqualBracketType=i,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class me extends pe{constructor(e,t,n,r,i,s,o){super(e,t,n,r,i,s),this.minVisibleColumnIndentation=o}}var fe=n(3550);function ge(e){return 0===e}const be=2**26;function ve(e,t){return e*be+t}function ye(e){const t=e,n=Math.floor(t/be),r=t-n*be;return new fe.W(n,r)}function we(e){return e}function Ce(e,t){let n=e+t;return t>=be&&(n-=e%be),n}function _e(e,t){return e.reduce((e,n)=>Ce(e,t(n)),0)}function ke(e,t){return e===t}function xe(e,t){const n=e,r=t;if(r-n<=0)return 0;const i=Math.floor(n/be),s=Math.floor(r/be),o=r-s*be;return i===s?ve(0,o-(n-i*be)):ve(s-i,o)}function Se(e,t){return e=t}function Le(e){return ve(e.lineNumber-1,e.column-1)}function Ie(e,t){const n=e,r=Math.floor(n/be),i=n-r*be,s=t,o=Math.floor(s/be),a=s-o*be;return new m.Q(r+1,i+1,o+1,a+1)}class Te{static fromModelContentChanges(e){return e.map(e=>{const t=m.Q.lift(e.range);return new Te(Le(t.getStartPosition()),Le(t.getEndPosition()),function(e){const t=(0,c.uz)(e);return ve(t.length-1,t[t.length-1].length)}(e.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${ye(this.startOffset)}...${ye(this.endOffset)}) -> ${ye(this.newLength)}`}}class Ne{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(e=>Re.from(e))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return null===n?null:xe(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?ve(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):ve(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=ye(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?ve(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):ve(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(0===r){const e=1<e};class Oe{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}class ze{get length(){return this._length}constructor(e){this._length=e}}class Pe extends ze{static create(e,t,n){let r=e.length;return t&&(r=Ce(r,t.length)),n&&(r=Ce(r,n.length)),new Pe(r,e,t,n,t?t.missingOpeningBracketIds:Ae.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,n,r,i){super(e),this.openingBracket=t,this.child=n,this.closingBracket=r,this.missingOpeningBracketIds=i}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new Pe(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(Ce(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class Be extends ze{static create23(e,t,n,r=!1){let i=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(i=Ce(i,t.length),s=s.merge(t.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");i=Ce(i,n.length),s=s.merge(n.missingOpeningBracketIds)}return r?new Ve(i,e.listHeight+1,e,t,n,s):new We(i,e.listHeight+1,e,t,n,s)}static getEmpty(){return new $e(0,0,[],Ae.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,n){super(e),this.listHeight=t,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),n=4===t.kind?t.toMutable():t;return t!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new l.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let r=1;rthis.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;for(;;){const r=this.lineTokens,i=r.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(n>1500)break}const r=(i=e,s=t,o=this.lineIdx,a=this.lineCharOffset,i!==o?ve(o-i,a):ve(0,a-s));var i,s,o,a;return new Je(r,0,-1,Ae.getEmpty(),new Ke(r))}}class Ze{constructor(e,t){this.text=e,this._offset=0,this.idx=0;const n=t.getRegExpStr(),r=n?new RegExp(n+"|\n","gi"):null,i=[];let s,o=0,a=0,l=0,c=0;const h=[];for(let e=0;e<60;e++)h.push(new Je(ve(0,e),0,-1,Ae.getEmpty(),new Ke(ve(0,e))));const d=[];for(let e=0;e<60;e++)d.push(new Je(ve(1,e),0,-1,Ae.getEmpty(),new Ke(ve(1,e))));if(r)for(r.lastIndex=0;null!==(s=r.exec(e));){const e=s.index,n=s[0];if("\n"===n)o++,a=e+1;else{if(l!==e){let t;if(c===o){const n=e-l;if(nfunction(e){let t=(0,c.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(2===n.kind&&n.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class tt{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=et.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function nt(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let n=e.length;for(;n>3;){const r=n>>1;for(let i=0;i=3?e[2]:null,t)}function rt(e,t){return Math.abs(e.listHeight-t.listHeight)}function it(e,t){return e.listHeight===t.listHeight?Be.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let n=e=e.toMutable();const r=[];let i;for(;;){if(t.listHeight===n.listHeight){i=t;break}if(4!==n.kind)throw new Error("unexpected");r.push(n),n=n.makeLastElementMutable()}for(let e=r.length-1;e>=0;e--){const t=r[e];i?t.childrenLength>=3?i=Be.create23(t.unappendChild(),i,null,!1):(t.appendChildOfSameHeight(i),i=void 0):t.handleChildrenChanged()}return i?Be.create23(e,i,null,!1):e}(e,t):function(e,t){let n=e=e.toMutable();const r=[];for(;t.listHeight!==n.listHeight;){if(4!==n.kind)throw new Error("unexpected");r.push(n),n=n.makeFirstElementMutable()}let i=t;for(let e=r.length-1;e>=0;e--){const t=r[e];i?t.childrenLength>=3?i=Be.create23(i,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(i),i=void 0):t.handleChildrenChanged()}return i?Be.create23(i,e,null,!1):e}(t,e)}class st{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(Se(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=at(this.nextNodes);if(!n)return;const r=at(this.offsets);if(Se(e,r))return;if(Se(r,e))if(Ce(r,n.length)<=e)this.nextNodeAfterCurrent();else{const e=ot(n);-1!==e?(this.nextNodes.push(n.getChild(e)),this.offsets.push(r),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const e=ot(n);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(n.getChild(e)),this.offsets.push(r),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=at(this.offsets),t=at(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const n=at(this.nextNodes),r=ot(n,this.idxs[this.idxs.length-1]);if(-1!==r){this.nextNodes.push(n.getChild(r)),this.offsets.push(Ce(e,t.length)),this.idxs[this.idxs.length-1]=r;break}this.idxs.pop()}}}function ot(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function at(e){return e.length>0?e[e.length-1]:void 0}function lt(e,t,n,r){return new ct(e,t,n,r).parseDocument()}class ct{constructor(e,t,n,r){if(this.tokenizer=e,this.createImmutableLists=r,this._itemsConstructed=0,this._itemsFromCache=0,n&&r)throw new Error("Not supported");this.oldNodeReader=n?new st(n):void 0,this.positionMapper=new Ne(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ae.getEmpty(),0);return e||(e=Be.getEmpty()),e}parseList(e,t){const n=[];for(;;){let r=this.tryReadChildFromCache(e);if(!r){const n=this.tokenizer.peek();if(!n||2===n.kind&&n.bracketIds.intersects(e))break;r=this.parseChild(e,t+1)}4===r.kind&&0===r.childrenLength||n.push(r)}const r=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function n(){if(t>=e.length)return null;const n=t,r=e[n].listHeight;for(t++;t=2?nt(0===n&&t===e.length?e:e.slice(n,t),!1):e[n]}let r=n(),i=n();if(!i)return r;for(let e=n();e;e=n())rt(r,i)<=rt(i,e)?(r=it(r,i),i=e):i=it(i,e);return it(r,i)}(n):nt(n,this.createImmutableLists);return r}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!ge(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),n=>!(null!==t&&!Se(n.length,t))&&n.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new Ge(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Ke(n.length);const r=e.merge(n.bracketIds),i=this.parseList(r,t+1),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),Pe.create(n.astNode,i,s.astNode)):Pe.create(n.astNode,i,null)}default:throw new Error("unexpected")}}}function ht(e,t){if(0===e.length)return t;if(0===t.length)return e;const n=new o.j3(ut(e)),r=ut(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let i=n.dequeue();function s(e){if(void 0===e){const e=n.takeWhile(e=>!0)||[];return i&&e.unshift(i),e}const t=[];for(;i&&!ge(e);){const[r,s]=i.splitAt(e);t.push(r),e=xe(r.lengthAfter,e),i=s??n.dequeue()}return ge(e)||t.push(new dt(!1,e,e)),t}const a=[];function l(e,t,n){if(a.length>0&&ke(a[a.length-1].endOffset,e)){const e=a[a.length-1];a[a.length-1]=new Te(e.startOffset,t,Ce(e.newLength,n))}else a.push({startOffset:e,endOffset:t,newLength:n})}let c=0;for(const e of r){const t=s(e.lengthBefore);if(e.modified){const n=Ce(c,_e(t,e=>e.lengthBefore));l(c,n,e.lengthAfter),c=n}else for(const e of t){const t=c;c=Ce(c,e.lengthBefore),e.modified&&l(t,c,e.lengthAfter)}}return a}class dt{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=xe(e,this.lengthAfter);return ke(t,0)?[this,void 0]:this.modified?[new dt(this.modified,this.lengthBefore,e),new dt(this.modified,0,t)]:[new dt(this.modified,e,e),new dt(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${ye(this.lengthBefore)} -> ${ye(this.lengthAfter)}`}}function ut(e){const t=[];let n=0;for(const r of e){const e=xe(n,r.startOffset);ge(e)||t.push(new dt(!1,e,e));const i=xe(r.startOffset,r.endOffset);t.push(new dt(!0,i,r.newLength)),n=r.endOffset}return t}class pt extends i.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new r.vl,this.denseKeyProvider=new Oe,this.brackets=new tt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new Ze(this.textModel.getValue(),e);this.initialAstWithoutTokens=lt(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(e=>new Te(ve(e.fromLineNumber-1,0),ve(e.toLineNumber,0),ve(e.toLineNumber-e.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Te.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=ht(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=ht(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const r=t;return lt(new Ye(this.textModel,this.brackets),e,r,n)}getBracketsInRange(e,t){this.flushQueue();const n=ve(e.startLineNumber-1,e.startColumn-1),r=ve(e.endLineNumber-1,e.endColumn-1);return new o.c1(e=>{const i=this.initialAstWithoutTokens||this.astWithTokens;gt(i,0,i.length,n,r,e,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();const n=Le(e.getStartPosition()),r=Le(e.getEndPosition());return new o.c1(e=>{const i=this.initialAstWithoutTokens||this.astWithTokens,s=new bt(e,t,this.textModel);vt(i,0,i.length,n,r,s,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return ft(t,0,t.length,Le(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return mt(t,0,t.length,Le(e))}}function mt(e,t,n,r){if(4===e.kind||2===e.kind){const i=[];for(const r of e.children)n=Ce(t,r.length),i.push({nodeOffsetStart:t,nodeOffsetEnd:n}),t=n;for(let t=i.length-1;t>=0;t--){const{nodeOffsetStart:n,nodeOffsetEnd:s}=i[t];if(Se(n,r)){const i=mt(e.children[t],n,s,r);if(i)return i}}return null}if(3===e.kind)return null;if(1===e.kind){const r=Ie(t,n);return{bracketInfo:e.bracketInfo,range:r}}return null}function ft(e,t,n,r){if(4===e.kind||2===e.kind){for(const i of e.children){if(Se(r,n=Ce(t,i.length))){const e=ft(i,t,n,r);if(e)return e}t=n}return null}if(3===e.kind)return null;if(1===e.kind){const r=Ie(t,n);return{bracketInfo:e.bracketInfo,range:r}}return null}function gt(e,t,n,r,i,s,o,a,l,c,h=!1){if(o>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let h=0;h200)return!0;let l=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const h=Ce(t,e.openingBracket.length);let d=-1;if(s.includeMinIndentation&&(d=e.computeMinIndentation(t,s.textModel)),l=s.push(new me(Ie(t,n),Ie(t,h),e.closingBracket?Ie(Ce(h,e.child?.length||0),n):void 0,o,c,e,d)),t=h,l&&e.child){const c=e.child;if(n=Ce(t,c.length),Ee(t,i)&&Fe(n,r)&&(l=vt(c,t,n,r,i,s,o+1,a),!l))return!1}a?.set(e.openingBracket.text,c)}else{let n=t;for(const t of e.children){const e=n;if(n=Ce(n,t.length),Ee(e,i)&&Ee(r,n)&&(l=vt(t,e,n,r,i,s,o,a),!l))return!1}}return l}class yt extends i.jG{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new i.HE),this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const n=new i.Cm;this.bracketPairsTree.value=(e=n.add(new pt(this.textModel,e=>this.languageConfigurationService.getLanguageConfiguration(e))),t=n,{object:e,dispose:()=>t?.dispose()}),n.add(this.bracketPairsTree.value.object.onDidChange(e=>this.onDidChangeEmitter.fire(e))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||o.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||o.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||o.c1.empty}findMatchingBracketUp(e,t,n){const r=this.textModel.validatePosition(t),i=this.textModel.getLanguageIdAtPosition(r.lineNumber,r.column);if(this.canBuildAST){const n=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew.getClosingBracketInfo(e);if(!n)return null;const r=this.getBracketPairsInRange(m.Q.fromPositions(t,t)).findLast(e=>n.closes(e.openingBracketInfo));return r?r.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(i).brackets;if(!s)return null;const o=s.textIsBracket[t];return o?_t(this._findMatchingBracketUp(o,r,wt(n))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(m.Q.fromPositions(e,e)).filter(t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e))).findLastMaxBy((0,o.VE)(t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange,m.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const n=wt(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,r){const i=t.getCount(),s=t.getLanguageId(r);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let e=r-1;e>=0;e--){const n=t.getEndOffset(e);if(n<=o)break;if(x(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){o=n;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let e=r+1;e=a)break;if(x(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=n;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(e,t){const n=e.lineNumber,r=this.textModel.tokenization.getLineTokens(n),i=this.textModel.getLineContent(n),s=r.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(s)).brackets;if(o&&!x(r.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,r,o,s),c=null;for(;;){const r=P.findNextBracketInRange(o.forwardRegex,n,i,a,l);if(!r)break;if(r.startColumn<=e.column&&e.column<=r.endColumn){const e=i.substring(r.startColumn-1,r.endColumn-1).toLowerCase(),n=this._matchFoundBracket(r,o.textIsBracket[e],o.textIsOpenBracket[e],t);if(n){if(n instanceof Ct)return null;c=n}}a=r.endColumn-1}if(c)return c}if(s>0&&r.getStartOffset(s)===e.column-1){const o=s-1,a=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(o)).brackets;if(a&&!x(r.getStandardTokenType(o))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,r,a,o),c=P.findPrevBracketInRange(a.reversedRegex,n,i,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),n=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(n)return n instanceof Ct?null:n}}}return null}_matchFoundBracket(e,t,n,r){if(!t)return null;const i=n?this._findMatchingBracketDown(t,e.getEndPosition(),r):this._findMatchingBracketUp(t,e.getStartPosition(),r);return i?i instanceof Ct?i:[e,i]:null}_findMatchingBracketUp(e,t,n){const r=e.languageId,i=e.reversedRegex;let s=-1,o=0;const a=(t,r,a,l)=>{for(;;){if(n&&++o%100==0&&!n())return Ct.INSTANCE;const c=P.findPrevBracketInRange(i,t,r,a,l);if(!c)break;const h=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const n=this.textModel.tokenization.getLineTokens(e),i=n.getCount(),s=this.textModel.getLineContent(e);let o=i-1,l=s.length,c=s.length;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;o>=0;o--){const t=n.getLanguageId(o)===r&&!x(n.getStandardTokenType(o));if(t)h?l=n.getStartOffset(o):(l=n.getStartOffset(o),c=n.getEndOffset(o));else if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}h=t}if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,n){const r=e.languageId,i=e.forwardRegex;let s=1,o=0;const a=(t,r,a,l)=>{for(;;){if(n&&++o%100==0&&!n())return Ct.INSTANCE;const c=P.findNextBracketInRange(i,t,r,a,l);if(!c)break;const h=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const n=this.textModel.tokenization.getLineTokens(e),i=n.getCount(),s=this.textModel.getLineContent(e);let o=0,l=0,c=0;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;o=1;e--){const s=this.textModel.tokenization.getLineTokens(e),o=s.getCount(),a=this.textModel.getLineContent(e);let l=o-1,c=a.length,h=a.length;if(e===t.lineNumber){l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,h=t.column-1;const e=s.getLanguageId(l);n!==e&&(n=e,r=this.languageConfigurationService.getLanguageConfiguration(n).brackets,i=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let d=!0;for(;l>=0;l--){const t=s.getLanguageId(l);if(n!==t){if(r&&i&&d&&c!==h){const t=P.findPrevBracketInRange(r.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(i,t);d=!1}n=t,r=this.languageConfigurationService.getLanguageConfiguration(n).brackets,i=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const o=!!r&&!x(s.getStandardTokenType(l));if(o)d?c=s.getStartOffset(l):(c=s.getStartOffset(l),h=s.getEndOffset(l));else if(i&&r&&d&&c!==h){const t=P.findPrevBracketInRange(r.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(i,t)}d=o}if(i&&r&&d&&c!==h){const t=P.findPrevBracketInRange(r.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(i,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const n=this.textModel.getLineCount();let r=null,i=null,s=null;for(let e=t.lineNumber;e<=n;e++){const n=this.textModel.tokenization.getLineTokens(e),o=n.getCount(),a=this.textModel.getLineContent(e);let l=0,c=0,h=0;if(e===t.lineNumber){l=n.findTokenIndexAtOffset(t.column-1),c=t.column-1,h=t.column-1;const e=n.getLanguageId(l);r!==e&&(r=e,i=this.languageConfigurationService.getLanguageConfiguration(r).brackets,s=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew)}let d=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e));return t?[t.openingBracketRange,t.closingBracketRange]:null}const r=wt(t),i=this.textModel.getLineCount(),s=new Map;let o=[];const a=(e,t)=>{if(!s.has(e)){const n=[];for(let e=0,r=t?t.brackets.length:0;e{for(;;){if(r&&++l%100==0&&!r())return Ct.INSTANCE;const a=P.findNextBracketInRange(e.forwardRegex,t,n,i,s);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[c];if(h&&(h.isOpen(c)?o[h.index]++:h.isClose(c)&&o[h.index]--,-1===o[h.index]))return this._matchFoundBracket(a,h,!1,r);i=a.endColumn-1}return null};let h=null,d=null;for(let e=n.lineNumber;e<=i;e++){const t=this.textModel.tokenization.getLineTokens(e),r=t.getCount(),i=this.textModel.getLineContent(e);let s=0,o=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),o=n.column-1,l=n.column-1;const e=t.getLanguageId(s);h!==e&&(h=e,d=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,d))}let u=!0;for(;s!0;{const t=Date.now();return()=>Date.now()-t<=e}}class Ct{static{this.INSTANCE=new Ct}constructor(){this._searchCanceledBrand=void 0}}function _t(e){return e instanceof Ct?null:e}var kt=n(550),xt=n(6996);class St extends i.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new Et,this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(e=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,r){return r||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range})).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new m.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Et{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,xt.zy)((e,t)=>{const n=[kt.sN,kt.lQ,kt.ss,kt.l5,kt.sH,kt.zp],r=new Et;t.addRule(`.monaco-editor .${r.unexpectedClosingBracketClassName} { color: ${e.getColor(kt.s7)}; }`);const i=n.map(t=>e.getColor(t)).filter(e=>!!e).filter(e=>!e.isTransparent());for(let e=0;e<30;e++){const n=i[e%i.length];t.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(e)} { color: ${n}; }`)}});var Ft=n(7703);function Lt(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class It{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,r){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=r}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Lt(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Lt(this.oldText)}")`:`(replace@${this.oldPosition} "${Lt(this.oldText)}" with "${Lt(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const r=t.length;S.Sw(e,r,n),n+=4;for(let i=0;i0&&(65279===r[0]||65534===r[0])?function(e,t,n){const r=[];let i=0;for(let s=0;s0&&(this.changes=(o=t,null===(s=this.changes)||0===s.length?o:new Tt(s,o).compress())),this.afterEOL=n,this.afterVersionId=r,this.afterCursorState=i}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(S.Sw(e,t?t.length:0,n),n+=4,t)for(const r of t)S.Sw(e,r.selectionStartLineNumber,n),n+=4,S.Sw(e,r.selectionStartColumn,n),n+=4,S.Sw(e,r.positionLineNumber,n),n+=4,S.Sw(e,r.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const r=S.bb(e,t);t+=4;for(let i=0;ie.toString()).join(", ")}matchesResource(e){return(h.r.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Dt}append(e,t,n,r,i){this._data instanceof Dt&&this._data.append(e,t,n,r,i)}close(){this._data instanceof Dt&&(this._data=this._data.serialize())}open(){this._data instanceof Dt||(this._data=Dt.deserialize(this._data))}undo(){if(h.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Dt&&(this._data=this._data.serialize());const e=Dt.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(h.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Dt&&(this._data=this._data.serialize());const e=Dt.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Dt&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Mt{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=Rt(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Rt(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Rt(h.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Rt(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,n,r,i){const s=Rt(e.uri);this._editStackElementsMap.get(s).append(e,t,n,r,i)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=Rt(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,Nt.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function Ot(e){return"\n"===e.getEOL()?0:1}function zt(e){return!!e&&(e instanceof At||e instanceof Mt)}class Pt{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);zt(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);zt(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(zt(n)&&n.canAppend(this._model))return n;const r=new At(Ft.kg("vs/editor/common/model/editStack","edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(r,t),r}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Ot(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,r){const i=this._getOrCreateEditStackElement(e,r),s=this._model.applyEdits(t,!0),o=Pt._computeCursorState(n,s),a=s.map((e,t)=>({index:t,textChange:e.textChange}));return a.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),i.append(this._model,a.map(e=>e.textChange),Ot(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,l.dz)(e),null}}}var Bt,Wt=n(8348);class Vt extends i.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}!function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(Bt||(Bt={}));class Ut{constructor(e,t,n,r,i,s){if(this.visibleColumn=e,this.column=t,this.className=n,this.horizontalLine=r,this.forWrappedLinesAfterColumn=i,this.forWrappedLinesBeforeOrAtColumn=s,-1!==e==(-1!==t))throw new Error}}class $t{constructor(e,t){this.top=e,this.endColumn=t}}class qt extends Vt{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return function(e,t){let n=0,r=0;const i=e.length;for(;rr)throw new l.D7("Illegal value for lineNumber");const i=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(i&&i.offSide);let o=-2,a=-1,c=-2,h=-1;const d=e=>{if(-1!==o&&(-2===o||o>e-1)){o=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){o=t,a=e;break}}}if(-2===c){c=-1,h=-1;for(let t=e;t=0){c=t,h=e;break}}}};let u=-2,p=-1,m=-2,f=-1;const g=e=>{if(-2===u){u=-1,p=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){u=t,p=e;break}}}if(-1!==m&&(-2===m||m=0){m=t,f=e;break}}}};let b=0,v=!0,y=0,w=!0,C=0,_=0;for(let i=0;v||w;i++){const o=e-i,l=e+i;i>1&&(o<1||o1&&(l>r||l>n)&&(w=!1),i>5e4&&(v=!1,w=!1);let m=-1;if(v&&o>=1){const e=this._computeIndentLevel(o-1);e>=0?(c=o-1,h=e,m=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(o),m=this._getIndentLevelForWhitespaceLine(s,a,h))}let k=-1;if(w&&l<=r){const e=this._computeIndentLevel(l-1);e>=0?(u=l-1,p=e,k=Math.ceil(e/this.textModel.getOptions().indentSize)):(g(l),k=this._getIndentLevelForWhitespaceLine(s,p,f))}if(0!==i){if(1===i){if(l<=r&&k>=0&&_+1===k){v=!1,b=l,y=l,C=k;continue}if(o>=1&&m>=0&&m-1===_){w=!1,b=o,y=o,C=m;continue}if(b=e,y=e,C=_,0===C)return{startLineNumber:b,endLineNumber:y,indent:C}}v&&(m>=C?b=o:v=!1),w&&(k>=C?y=l:w=!1)}else _=m}return{startLineNumber:b,endLineNumber:y,indent:C}}getLinesBracketGuides(e,t,n,r){const i=[];for(let n=e;n<=t;n++)i.push([]);const s=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new m.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let o;if(n&&s.length>0){const r=(e<=n.lineNumber&&n.lineNumber<=t?s:this.textModel.bracketPairs.getBracketPairsInRange(m.Q.fromPositions(n)).toArray()).filter(e=>m.Q.strictContainsPosition(e.range,n));o=(0,Wt.Uk)(r,e=>true)?.range}const a=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,l=new jt;for(const n of s){if(!n.closingBracketRange)continue;const s=o&&n.range.equalsRange(o);if(!s&&!r.includeInactive)continue;const h=l.getInlineClassName(n.nestingLevel,n.nestingLevelOfEqualBracketType,a)+(r.highlightActive&&s?" "+l.activeClassName:""),d=n.openingBracketRange.getStartPosition(),u=n.closingBracketRange.getStartPosition(),p=r.horizontalGuides===Bt.Enabled||r.horizontalGuides===Bt.EnabledForActive&&s;if(n.range.startLineNumber===n.range.endLineNumber){p&&i[n.range.startLineNumber-e].push(new Ut(-1,n.openingBracketRange.getEndPosition().column,h,new $t(!1,u.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(u),f=this.getVisibleColumnFromPosition(n.openingBracketRange.getStartPosition()),g=Math.min(f,m,n.minVisibleColumnIndentation+1);let b=!1;c.HG(this.textModel.getLineContent(n.closingBracketRange.startLineNumber))=e&&f>g&&i[d.lineNumber-e].push(new Ut(g,-1,h,new $t(!1,d.column),-1,-1)),u.lineNumber<=t&&m>g&&i[u.lineNumber-e].push(new Ut(g,-1,h,new $t(!b,u.column),-1,-1)))}for(const e of i)e.sort((e,t)=>e.visibleColumn-t.visibleColumn);return i}getVisibleColumnFromPosition(e){return u.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const r=this.textModel.getOptions(),i=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(i&&i.offSide),o=new Array(t-e+1);let a=-2,l=-1,c=-2,h=-1;for(let i=e;i<=t;i++){const t=i-e,d=this._computeIndentLevel(i-1);if(d>=0)a=i-1,l=d,o[t]=Math.ceil(d/r.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=i-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,h=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(s,l,h)}}return o}_getIndentLevelForWhitespaceLine(e,t,n){const r=this.textModel.getOptions();return-1===t||-1===n?0:t0&&a>0)return;if(l>0&&c>0)return;const h=Math.abs(a-c),d=Math.abs(o-l);if(0===h)return i.spacesDiff=d,void(d>0&&0<=l-1&&l-10?i++:f>1&&s++,Ht(o,a,d,m,h),h.looksLikeAlignment&&(!n||t!==h.spacesDiff))continue;const b=h.spacesDiff;b<=8&&c[b]++,o=d,a=m}let d=n;i!==s&&(d=i{const n=c[t];n>e&&(e=n,u=t)}),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:d,tabSize:u}}function Qt(e){return(1&e.metadata)>>>0}function Jt(e,t){e.metadata=254&e.metadata|t}function Yt(e){return(2&e.metadata)>>>1==1}function Xt(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Zt(e){return(4&e.metadata)>>>2==1}function en(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function tn(e){return(64&e.metadata)>>>6==1}function nn(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function rn(e,t){e.metadata=231&e.metadata|t<<3}function sn(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class on{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Jt(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,en(this,!1),nn(this,!1),rn(this,1),sn(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,Xt(this,!1)}reset(e,t,n,r){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=r}setOptions(e){this.options=e;const t=this.options.className;en(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),nn(this,null!==this.options.glyphMarginClassName),rn(this,this.options.stickiness),sn(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const an=new on(null,0,0);an.parent=an,an.left=an,an.right=an,Jt(an,0);class ln{constructor(){this.root=an,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,r,i,s){return this.root===an?[]:function(e,t,n,r,i,s,o){let a=e.root,l=0,c=0,h=0,d=0;const u=[];let p=0;for(;a!==an;)if(Yt(a))Xt(a.left,!1),Xt(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!Yt(a.left)){if(c=l+a.maxEnd,cn)Xt(a,!0);else{if(d=l+a.end,d>=t){a.setCachedOffsets(h,d,s);let e=!0;r&&a.ownerId&&a.ownerId!==r&&(e=!1),i&&Zt(a)&&(e=!1),o&&!tn(a)&&(e=!1),e&&(u[p++]=a)}Xt(a,!0),a.right===an||Yt(a.right)||(l+=a.delta,a=a.right)}}return Xt(e.root,!1),u}(this,e,t,n,r,i,s)}search(e,t,n,r){return this.root===an?[]:function(e,t,n,r,i){let s=e.root,o=0,a=0,l=0;const c=[];let h=0;for(;s!==an;){if(Yt(s)){Xt(s.left,!1),Xt(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),s=s.parent;continue}if(s.left!==an&&!Yt(s.left)){s=s.left;continue}a=o+s.start,l=o+s.end,s.setCachedOffsets(a,l,r);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),n&&Zt(s)&&(e=!1),i&&!tn(s)&&(e=!1),e&&(c[h++]=s),Xt(s,!0),s.right===an||Yt(s.right)||(o+=s.delta,s=s.right)}return Xt(e.root,!1),c}(this,e,t,n,r)}collectNodesFromOwner(e){return function(e,t){let n=e.root;const r=[];let i=0;for(;n!==an;)Yt(n)?(Xt(n.left,!1),Xt(n.right,!1),n=n.parent):n.left===an||Yt(n.left)?(n.ownerId===t&&(r[i++]=n),Xt(n,!0),n.right===an||Yt(n.right)||(n=n.right)):n=n.left;return Xt(e.root,!1),r}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const n=[];let r=0;for(;t!==an;)Yt(t)?(Xt(t.left,!1),Xt(t.right,!1),t=t.parent):t.left===an||Yt(t.left)?t.right===an||Yt(t.right)?(n[r++]=t,Xt(t,!0)):t=t.right:t=t.left;return Xt(e.root,!1),n}(this)}insert(e){dn(this,e),this._normalizeDeltaIfNecessary()}delete(e){un(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let r=0;for(;e!==this.root;)e===e.parent.right&&(r+=e.parent.delta),e=e.parent;const i=n.start+r,s=n.end+r;n.setCachedOffsets(i,s,t)}acceptReplace(e,t,n,r){const i=function(e,t,n){let r=e.root,i=0,s=0,o=0,a=0;const l=[];let c=0;for(;r!==an;)if(Yt(r))Xt(r.left,!1),Xt(r.right,!1),r===r.parent.right&&(i-=r.parent.delta),r=r.parent;else{if(!Yt(r.left)){if(s=i+r.maxEnd,sn?Xt(r,!0):(a=i+r.end,a>=t&&(r.setCachedOffsets(o,a,0),l[c++]=r),Xt(r,!0),r.right===an||Yt(r.right)||(i+=r.delta,r=r.right))}return Xt(e.root,!1),l}(this,e,e+t);for(let e=0,t=i.length;en?(i.start+=l,i.end+=l,i.delta+=l,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),Xt(i,!0)):(Xt(i,!0),i.right===an||Yt(i.right)||(s+=i.delta,i=i.right))}Xt(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(let s=0,o=i.length;sn)&&1!==r&&(2===r||t)}function hn(e,t,n,r,i){const s=function(e){return(24&e.metadata)>>>3}(e),o=0===s||2===s,a=1===s||2===s,l=n-t,c=r,h=Math.min(l,c),d=e.start;let u=!1;const p=e.end;let m=!1;t<=d&&p<=n&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,m=!0);{const e=i?1:l>0?2:0;!u&&cn(d,o,t,e)&&(u=!0),!m&&cn(p,a,t,e)&&(m=!0)}if(h>0&&!i){const e=l>c?2:0;!u&&cn(d,o,t+h,e)&&(u=!0),!m&&cn(p,a,t+h,e)&&(m=!0)}{const r=i?1:0;!u&&cn(d,o,n,r)&&(e.start=t+c,u=!0),!m&&cn(p,a,n,r)&&(e.end=t+c,m=!0)}const f=c-l;u||(e.start=Math.max(0,d+f)),m||(e.end=Math.max(0,p+f)),e.start>e.end&&(e.end=e.start)}function dn(e,t){if(e.root===an)return t.parent=an,t.left=an,t.right=an,Jt(t,0),e.root=t,e.root;!function(e,t){let n=0,r=e.root;const i=t.start,s=t.end;for(;;)if(yn(i,s,r.start+n,r.end+n)<0){if(r.left===an){t.start-=n,t.end-=n,t.maxEnd-=n,r.left=t;break}r=r.left}else{if(r.right===an){t.start-=n+r.delta,t.end-=n+r.delta,t.maxEnd-=n+r.delta,r.right=t;break}n+=r.delta,r=r.right}t.parent=r,t.left=an,t.right=an,Jt(t,1)}(e,t),vn(t.parent);let n=t;for(;n!==e.root&&1===Qt(n.parent);)if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===Qt(t)?(Jt(n.parent,0),Jt(t,0),Jt(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,mn(e,n)),Jt(n.parent,0),Jt(n.parent.parent,1),fn(e,n.parent.parent))}else{const t=n.parent.parent.left;1===Qt(t)?(Jt(n.parent,0),Jt(t,0),Jt(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,fn(e,n)),Jt(n.parent,0),Jt(n.parent.parent,1),mn(e,n.parent.parent))}return Jt(e.root,0),t}function un(e,t){let n,r;if(t.left===an?(n=t.right,r=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===an?(n=t.left,r=t):(r=function(e){for(;e.left!==an;)e=e.left;return e}(t.right),n=r.right,n.start+=r.delta,n.end+=r.delta,n.delta+=r.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),r.start+=t.delta,r.end+=t.delta,r.delta=t.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0)),r===e.root)return e.root=n,Jt(n,0),t.detach(),pn(),bn(n),void(e.root.parent=an);const i=1===Qt(r);if(r===r.parent.left?r.parent.left=n:r.parent.right=n,r===t?n.parent=r.parent:(r.parent===t?n.parent=r:n.parent=r.parent,r.left=t.left,r.right=t.right,r.parent=t.parent,Jt(r,Qt(t)),t===e.root?e.root=r:t===t.parent.left?t.parent.left=r:t.parent.right=r,r.left!==an&&(r.left.parent=r),r.right!==an&&(r.right.parent=r)),t.detach(),i)return vn(n.parent),r!==t&&(vn(r),vn(r.parent)),void pn();let s;for(vn(n),vn(n.parent),r!==t&&(vn(r),vn(r.parent));n!==e.root&&0===Qt(n);)n===n.parent.left?(s=n.parent.right,1===Qt(s)&&(Jt(s,0),Jt(n.parent,1),mn(e,n.parent),s=n.parent.right),0===Qt(s.left)&&0===Qt(s.right)?(Jt(s,1),n=n.parent):(0===Qt(s.right)&&(Jt(s.left,0),Jt(s,1),fn(e,s),s=n.parent.right),Jt(s,Qt(n.parent)),Jt(n.parent,0),Jt(s.right,0),mn(e,n.parent),n=e.root)):(s=n.parent.left,1===Qt(s)&&(Jt(s,0),Jt(n.parent,1),fn(e,n.parent),s=n.parent.left),0===Qt(s.left)&&0===Qt(s.right)?(Jt(s,1),n=n.parent):(0===Qt(s.left)&&(Jt(s.right,0),Jt(s,1),mn(e,s),s=n.parent.left),Jt(s,Qt(n.parent)),Jt(n.parent,0),Jt(s.left,0),fn(e,n.parent),n=e.root));Jt(n,0),pn()}function pn(){an.parent=an,an.delta=0,an.start=0,an.end=0}function mn(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==an&&(n.left.parent=t),n.parent=t.parent,t.parent===an?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,bn(t),bn(n)}function fn(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==an&&(n.right.parent=t),n.parent=t.parent,t.parent===an?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,bn(t),bn(n)}function gn(e){let t=e.end;if(e.left!==an){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==an){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function bn(e){e.maxEnd=gn(e)}function vn(e){for(;e!==an;){const t=gn(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function yn(e,t,n,r){return e===n?t-r:e-n}class wn{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Cn)return _n(this.right);let e=this;for(;e.parent!==Cn&&e.parent.left!==e;)e=e.parent;return e.parent===Cn?Cn:e.parent}prev(){if(this.left!==Cn)return kn(this.left);let e=this;for(;e.parent!==Cn&&e.parent.right!==e;)e=e.parent;return e.parent===Cn?Cn:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Cn=new wn(null,0);function _n(e){for(;e.left!==Cn;)e=e.left;return e}function kn(e){for(;e.right!==Cn;)e=e.right;return e}function xn(e){return e===Cn?0:e.size_left+e.piece.length+xn(e.right)}function Sn(e){return e===Cn?0:e.lf_left+e.piece.lineFeedCnt+Sn(e.right)}function En(){Cn.parent=Cn}function Fn(e,t){const n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==Cn&&(n.left.parent=t),n.parent=t.parent,t.parent===Cn?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function Ln(e,t){const n=t.left;t.left=n.right,n.right!==Cn&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===Cn?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function In(e,t){let n,r;if(t.left===Cn?(r=t,n=r.right):t.right===Cn?(r=t,n=r.left):(r=_n(t.right),n=r.right),r===e.root)return e.root=n,n.color=0,t.detach(),En(),void(e.root.parent=Cn);const i=1===r.color;if(r===r.parent.left?r.parent.left=n:r.parent.right=n,r===t?(n.parent=r.parent,Rn(e,n)):(r.parent===t?n.parent=r:n.parent=r.parent,Rn(e,n),r.left=t.left,r.right=t.right,r.parent=t.parent,r.color=t.color,t===e.root?e.root=r:t===t.parent.left?t.parent.left=r:t.parent.right=r,r.left!==Cn&&(r.left.parent=r),r.right!==Cn&&(r.right.parent=r),r.size_left=t.size_left,r.lf_left=t.lf_left,Rn(e,r)),t.detach(),n.parent.left===n){const t=xn(n),r=Sn(n);if(t!==n.parent.size_left||r!==n.parent.lf_left){const i=t-n.parent.size_left,s=r-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=r,Nn(e,n.parent,i,s)}}if(Rn(e,n.parent),i)return void En();let s;for(;n!==e.root&&0===n.color;)n===n.parent.left?(s=n.parent.right,1===s.color&&(s.color=0,n.parent.color=1,Fn(e,n.parent),s=n.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.right.color&&(s.left.color=0,s.color=1,Ln(e,s),s=n.parent.right),s.color=n.parent.color,n.parent.color=0,s.right.color=0,Fn(e,n.parent),n=e.root)):(s=n.parent.left,1===s.color&&(s.color=0,n.parent.color=1,Ln(e,n.parent),s=n.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.left.color&&(s.right.color=0,s.color=1,Fn(e,s),s=n.parent.left),s.color=n.parent.color,n.parent.color=0,s.left.color=0,Ln(e,n.parent),n=e.root));n.color=0,En()}function Tn(e,t){for(Rn(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Fn(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Ln(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&Ln(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Fn(e,t.parent.parent))}e.root.color=0}function Nn(e,t,n,r){for(;t!==e.root&&t!==Cn;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=r),t=t.parent}function Rn(e,t){let n=0,r=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(n=xn((t=t.parent).left)-t.size_left,r=Sn(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=r;t!==e.root&&(0!==n||0!==r);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=r),t=t.parent}}Cn.parent=Cn,Cn.left=Cn,Cn.right=Cn,Cn.color=0;var Dn=n(9182);const An=65535;function Mn(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class On{constructor(e,t,n,r,i){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=r,this.isBasicASCII=i}}function zn(e,t=!0){const n=[0];let r=1;for(let t=0,i=e.length;t(e!==Cn&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Vn{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let r=0;r=e)&&(n[r]=null,t=!0)}if(t){const e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class Un{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new Bn("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Cn,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let r=null;for(let t=0,n=e.length;t0){e[t].lineStarts||(e[t].lineStarts=zn(e[t].buffer));const n=new Pn(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),r=this.rbInsertRight(r,n)}this._searchCache=new Vn(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),n=2*t;let r="",i=0;const s=[];if(this.iterate(this.root,o=>{const a=this.getNodeContent(o),l=a.length;if(i<=t||i+l0){const t=r.replace(/\r\n|\r|\n/g,e);s.push(new Bn(t,zn(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Wn(this,e)}getOffsetAt(e,t){let n=0,r=this.root;for(;r!==Cn;)if(r.left!==Cn&&r.lf_left+1>=e)r=r.left;else{if(r.lf_left+r.piece.lineFeedCnt+1>=e)return n+=r.size_left,n+(this.getAccumulatedValue(r,e-r.lf_left-2)+t-1);e-=r.lf_left+r.piece.lineFeedCnt,n+=r.size_left+r.piece.length,r=r.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const r=e;for(;t!==Cn;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const i=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+i.index,0===i.index){const e=r-this.getOffsetAt(n+1,1);return new p.y(n+1,e+1)}return new p.y(n+1,i.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===Cn){const t=r-e-this.getOffsetAt(n+1,1);return new p.y(n+1,t+1)}t=t.right}return new p.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),r=this.nodeAt2(e.endLineNumber,e.endColumn),i=this.getValueInRange2(n,r);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?i:i.replace(/\r\n|\r|\n/g,t):i}getValueInRange2(e,t){if(e.node===t.node){const n=e.node,r=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r.substring(i+e.remainder,i+t.remainder)}let n=e.node;const r=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let s=r.substring(i+e.remainder,i+n.piece.length);for(n=n.next();n!==Cn;){const e=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=e.substring(r,r+t.remainder);break}s+=e.substr(r,n.piece.length),n=n.next()}return s}getLinesContent(){const e=[];let t=0,n="",r=!1;return this.iterate(this.root,i=>{if(i===Cn)return!0;const s=i.piece;let o=s.length;if(0===o)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,c=s.start.line,h=s.end.line;let d=l[c]+s.start.column;if(r&&(10===a.charCodeAt(d)&&(d++,o--),e[t++]=n,n="",r=!1,0===o))return!0;if(c===h)return this._EOLNormalized||13!==a.charCodeAt(d+o-1)?n+=a.substr(d,o):(r=!0,n+=a.substr(d,o-1)),!0;n+=this._EOLNormalized?a.substring(d,Math.max(d,l[c+1]-this._EOLLength)):a.substring(d,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let r=c+1;re+p,t.reset(0)):(v=d.buffer,y=e=>e,t.reset(p));do{if(g=t.next(v),g){if(y(g.index)>=f)return c;this.positionInBuffer(e,y(g.index)-u,b);const t=this.getLineFeedCnt(e.piece.bufferIndex,i,b),s=b.line===i.line?b.column-i.column+r:b.column+1,o=s+g[0].length;if(h[c++]=(0,Dn.dr)(new m.Q(n+t,s,n+t,o),g,a),y(g.index)+g[0].length>=f)return c;if(c>=l)return c}}while(g);return c}findMatchesLineByLine(e,t,n,r){const i=[];let s=0;const o=new Dn.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,o,e.startLineNumber,e.startColumn,c,h,t,n,r,s,i),i;let d=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),p=a[c.line+l],m=d===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,o,d,m,c,this.positionInBuffer(u,p-h),t,n,r,s,i),s>=r)return i;d+=l}const h=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){const a=this.getLineContent(d).substring(h,e.endColumn-1);return s=this._findMatchesInLine(t,o,a,e.endLineNumber,h,s,i,n,r),i}if(s=this._findMatchesInLine(t,o,this.getLineContent(d).substr(h),d,h,s,i,n,r),s>=r)return i;d++,a=this.nodeAt2(d,1),u=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){const a=d===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(d).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,o,l,e.endLineNumber,a,s,i,n,r),i}const p=d===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,o,d,p,c,h,t,n,r,s,i),i}_findMatchesInLine(e,t,n,r,i,s,o,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=n.length;let d=-a;for(;-1!==(d=n.indexOf(t,d+a));)if((!c||(0,Dn.wC)(c,n,h,d,a))&&(o[s++]=new de.Dg(new m.Q(r,d+1+i,r,d+1+a+i),null),s>=l))return s;return s}let h;t.reset(0);do{if(h=t.next(n),h&&(o[s++]=(0,Dn.dr)(new m.Q(r,h.index+1+i,r,h.index+1+h[0].length+i),h,a),s>=l))return s}while(h);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Cn){const{node:n,remainder:r,nodeStartOffset:i}=this.nodeAt(e),s=n.piece,o=s.bufferIndex,a=this.positionInBuffer(n,r);if(0===n.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&i+s.length===e&&t.lengthe){const e=[];let i=new Pn(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(o,s.end)-this.offsetInBuffer(o,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(n,r)){const e={line:i.start.line+1,column:0};i=new Pn(i.bufferIndex,e,i.end,this.getLineFeedCnt(i.bufferIndex,e,i.end),i.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(n,r-1)){const i=this.positionInBuffer(n,r-1);this.deleteNodeTail(n,i),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a);else this.deleteNodeTail(n,a);const l=this.createNewPieces(t);i.length>0&&this.rbInsertRight(n,i);let c=n;for(let e=0;e=0;e--)i=this.rbInsertLeft(i,r[e]);this.validateCRLFWithPrevNode(i),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const n=this.createNewPieces(e),r=this.rbInsertRight(t,n[0]);let i=r;for(let e=1;e=h))break;a=c+1}return n?(n.line=c,n.column=o-d,null):{line:c,column:o-d}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;const r=this._buffers[e].lineStarts;if(n.line===r.length-1)return n.line-t.line;const i=r[n.line+1],s=r[n.line]+n.column;if(i>s+1)return n.line-t.line;const o=s-1;return 13===this._buffers[e].buffer.charCodeAt(o)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tAn){const t=[];for(;e.length>An;){const n=e.charCodeAt(65534);let r;13===n||n>=55296&&n<=56319?(r=e.substring(0,65534),e=e.substring(65534)):(r=e.substring(0,An),e=e.substring(An));const i=zn(r);t.push(new Pn(this._buffers.length,{line:0,column:0},{line:i.length-1,column:r.length-i[i.length-1]},i.length-1,r.length)),this._buffers.push(new Bn(r,i))}const n=zn(e);return t.push(new Pn(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new Bn(e,n)),t}let t=this._buffers[0].buffer.length;const n=zn(e,!1);let r=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},r=this._lastChangeBufferPos;for(let e=0;e=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:i,nodeStartLineNumber:s-(e-1-n.lf_left)}),a.substring(l+r,l+o-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(n,e-n.lf_left-2),i=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r=i.substring(s+t,s+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}}for(n=n.next();n!==Cn;){const e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const i=this.getAccumulatedValue(n,0),s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=e.substring(s,s+i-t),r}{const t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r+=e.substr(t,n.piece.length)}n=n.next()}return r}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==Cn;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,r=this.positionInBuffer(e,t),i=r.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,r);if(t!==i)return{index:t,remainder:0}}return{index:i,remainder:r.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,r=this._buffers[n.bufferIndex].lineStarts,i=n.start.line+t+1;return i>n.end.line?r[n.end.line]+n.end.column-r[n.start.line]-n.start.column:r[i]-r[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,r=n.lineFeedCnt,i=this.offsetInBuffer(n.bufferIndex,n.end),s=t,o=this.offsetInBuffer(n.bufferIndex,s),a=this.getLineFeedCnt(n.bufferIndex,n.start,s),l=a-r,c=o-i,h=n.length+c;e.piece=new Pn(n.bufferIndex,n.start,s,a,h),Nn(this,e,c,l)}deleteNodeHead(e,t){const n=e.piece,r=n.lineFeedCnt,i=this.offsetInBuffer(n.bufferIndex,n.start),s=t,o=this.getLineFeedCnt(n.bufferIndex,s,n.end),a=o-r,l=i-this.offsetInBuffer(n.bufferIndex,s),c=n.length+l;e.piece=new Pn(n.bufferIndex,s,n.end,o,c),Nn(this,e,l,a)}shrinkNode(e,t,n){const r=e.piece,i=r.start,s=r.end,o=r.length,a=r.lineFeedCnt,l=t,c=this.getLineFeedCnt(r.bufferIndex,r.start,l),h=this.offsetInBuffer(r.bufferIndex,t)-this.offsetInBuffer(r.bufferIndex,i);e.piece=new Pn(r.bufferIndex,r.start,l,c,h),Nn(this,e,h-o,c-a);const d=new Pn(r.bufferIndex,n,s,this.getLineFeedCnt(r.bufferIndex,n,s),this.offsetInBuffer(r.bufferIndex,s)-this.offsetInBuffer(r.bufferIndex,n)),u=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),r=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const i=zn(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){r+=t.size_left;const n={node:t,remainder:e-t.size_left,nodeStartOffset:r};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,r+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,r=0;for(;n!==Cn;)if(n.left!==Cn&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const i=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return r+=n.size_left,{node:n,remainder:Math.min(i+t-1,s),nodeStartOffset:r}}if(n.lf_left+n.piece.lineFeedCnt===e-1){const i=this.getAccumulatedValue(n,e-n.lf_left-2);if(i+t-1<=n.piece.length)return{node:n,remainder:i+t-1,nodeStartOffset:r};t-=n.piece.length-i;break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==Cn;){if(n.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(n,0),r=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:r}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],r=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(r)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===Cn||0===e.piece.lineFeedCnt)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,r=t.start.line,i=n[r]+t.start.column;return r!==n.length-1&&(!(n[r+1]>i+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(i))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==Cn&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],r=this._buffers[e.piece.bufferIndex].lineStarts;let i;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:r[e.piece.end.line]-r[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,o=e.piece.lineFeedCnt-1;e.piece=new Pn(e.piece.bufferIndex,e.piece.start,i,o,s),Nn(this,e,-1,-1),0===e.piece.length&&n.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Pn(t.piece.bufferIndex,a,t.piece.end,c,l),Nn(this,t,-1,-1),0===t.piece.length&&n.push(t);const h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let e=0;ee.sortIndex-t.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=i,this._mightContainNonBasicASCII=s;const m=this._doApplyEdits(a);let f=null;if(t&&u.length>0){u.sort((e,t)=>t.lineNumber-e.lineNumber),f=[];for(let e=0,t=u.length;e0&&u[e-1].lineNumber===t)continue;const n=u[e].oldContent,r=this.getLineContent(t);0!==r.length&&r!==n&&-1===c.HG(r)&&f.push(t)}}return this._onDidChangeContent.fire(),new de.F4(p,m,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,r=e[e.length-1].range,i=new m.Q(n.startLineNumber,n.startColumn,r.endLineNumber,r.endColumn);let s=n.startLineNumber,o=n.startColumn;const a=[];for(let n=0,r=e.length;n0&&a.push(r.text),s=i.endLineNumber,o=i.endColumn}const l=a.join(""),[c,h,u]=(0,d.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:i,rangeOffset:this.getOffsetAt(i.startLineNumber,i.startColumn),rangeLength:this.getValueLengthInRange(i,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort($n._sortOpsDescending);const t=[];for(let n=0;n0){const e=o.eolCount+1;c=1===e?new m.Q(a,l,a,l+o.firstLineLength):new m.Q(a,l,a+e-1,o.lastLineLength+1)}else c=new m.Q(a,l,a,l);n=c.endLineNumber,r=c.endColumn,t.push(c),i=o}return t}static _sortOpsAscending(e,t){const n=m.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=m.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class qn{constructor(e,t,n,r,i,s,o,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=r,this._crlf=i,this._containsRTL=s,this._containsUnusualLineTerminators=o,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,r=n.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let n=1,r=0,i=0,s=0,o=!0;for(let a=0,l=t.length;a126)&&(o=!1)}const a=new On(Mn(e),r,i,s,o);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new Bn(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=c.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=c.$X(e)))}finish(e=!0){return this._finish(),new qn(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=zn(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Kn=n(6362),Hn=n(4945),Gn=n(2735),Qn=n(3958),Jn=n(6185);const Yn=new class{clone(){return this}equals(e){return this===e}};class Xn{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(0===t)return void this.insert(e,n);if(0===n)return void this.delete(e,t);const r=this._store.slice(0,e),i=this._store.slice(e+t),s=function(e,t){const n=[];for(let r=0;r=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const n=[];for(let e=0;e0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e)return void n.appendLineTokens(t)}this._tokens.push(new Zn(e,[t]))}finalize(){return this._tokens}}class tr{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const n=tr.defaultTokenMetadata,r=new Uint32Array(2);return r[0]=e.length,r[1]=n,new tr(r,e,t)}static createFromTextAndMetadata(e,t){let n=0,r="";const i=new Array;for(const{text:t,metadata:s}of e)i.push(n+t.length,s),n+=t.length,r+=t;return new tr(new Uint32Array(i),r,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof tr&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const r=t<<1,i=r+(n<<1);for(let t=r;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],n=Qe.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return Qe.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return Qe.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return Qe.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return Qe.x.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return Qe.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return tr.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new nr(this,e,t,n)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;nt&&(r=i)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,r="";const i=new Array;let s=0;for(;;){const o=ts){r+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];i.push(r.length,e),s=a.offset}r+=a.text,i.push(r.length,a.tokenMetadata),n++}}return new tr(new Uint32Array(i),r,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),n=this.getEndOffset(e);return this._text.substring(t,n)}forEach(e){const t=this.getCount();for(let n=0;n=n);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof nr&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),r=this._source.getEndOffset(t);let i=this._source.getTokenText(t);return nthis._endOffset&&(i=i.substring(0,i.length-(r-this._endOffset))),i}forEach(e){for(let t=0;tt)break;const i=this._textModel.getLineContent(r.lineNumber),s=lr(this._languageIdCodec,n,this.tokenizationSupport,i,!0,r.startState);e.add(r.lineNumber,s.tokens),this.store.setEndState(r.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const r=this._textModel.getLanguageId(),i=this._textModel.getLineContent(e.lineNumber),s=i.substring(0,e.column-1)+t+i.substring(e.column-1),o=lr(this._languageIdCodec,r,this.tokenizationSupport,s,!0,n),a=new tr(o.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,n){const r=e.lineNumber,i=e.column,s=this.getStartState(r);if(!s)return null;const o=this._textModel.getLineContent(r),a=o.substring(0,i-1)+n+o.substring(i-1+t),l=this._textModel.getLanguageIdAtPosition(r,0),c=lr(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s);return new tr(c.tokens,a,this._languageIdCodec)}hasAccurateTokensForLine(e){return e1&&i>=1;i--){const e=this._textModel.getLineFirstNonWhitespaceColumn(i);if(0!==e&&e0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class ar{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex(t=>t.contains(e));if(-1!==t){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Jn.L(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Jn.L(n.start,e):this._ranges.splice(t,1,new Jn.L(n.start,e),new Jn.L(e+1,n.endExclusive))}}addRange(e){Jn.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let r=n;for(;!(r>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}}function lr(e,t,n,r,i,s){let o=null;if(n)try{o=n.tokenizeEncoded(r,i,s.clone())}catch(e){(0,l.dz)(e)}return o||(o=function(e,t){const n=new Uint32Array(2);return n[0]=0,n[1]=(32768|e|2<<24)>>>0,new Hn.rY(n,null===t?Yn:t)}(e.encodeLanguageId(t),s)),tr.convertToEndOffset(o.tokens,r.length),o}class cr{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Gn.$6)(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Kn.M(e,t))}}class hr{constructor(){this._onDidChangeVisibleRanges=new r.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new dr(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class dr{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map(e=>new Kn.M(e.startLineNumber,e.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class ur extends i.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Gn.uC(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,o.aI)(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class pr extends i.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new r.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class mr extends pr{constructor(e,t,n,r){super(t,n,r),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Hn.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new tr(n,t,this._languageIdCodec)}return tr.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){return void 0!==this._treeSitterService.getParseResult(this._textModel)}}var fr=n(9241);const gr=new Uint32Array(0).buffer;class br{static deleteBeginning(e,t){return null===e||e===gr?e:br.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===gr)return e;const n=vr(e),r=n[n.length-2];return br.delete(e,t,r)}static delete(e,t,n){if(null===e||e===gr||t===n)return e;const r=vr(e),i=r.length>>>1;if(0===t&&r[r.length-2]===n)return gr;const s=tr.findIndexInTokensArray(r,t),o=s>0?r[s-1<<1]:0;if(nl&&(r[a++]=t,r[a++]=r[1+(e<<1)],l=t)}if(a===r.length)return e;const h=new Uint32Array(a);return h.set(r.subarray(0,a),0),h.buffer}static append(e,t){if(t===gr)return e;if(e===gr)return t;if(null===e)return e;if(null===t)return null;const n=vr(e),r=vr(t),i=r.length>>>1,s=new Uint32Array(n.length+r.length);s.set(n,0);let o=n.length;const a=n[n.length-2];for(let e=0;e>>1;let s=tr.findIndexInTokensArray(r,t);s>0&&r[s-1<<1]===t&&s--;for(let e=s;e0}getTokens(e,t,n){let r=null;if(t1&&(t=Qe.x.getLanguageId(r[1])!==e),!t)return gr}if(!r||0===r.length){const n=new Uint32Array(2);return n[0]=t,n[1]=wr(e),n.buffer}return r[r.length-2]=t,0===r.byteOffset&&r.byteLength===r.buffer.byteLength?r.buffer:r}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const n=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=br.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=br.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let r=null;n=this._len||(0!==t?(this._lineTokens[r]=br.deleteEnding(this._lineTokens[r],e.column-1),this._lineTokens[r]=br.insert(this._lineTokens[r],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[r]=br.insert(this._lineTokens[r],e.column-1,n))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const n=[];for(let r=0,i=e.length;r>>0}class Cr{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const r=t[0].getRange(),i=t[t.length-1].getRange();if(!r||!i)return e;n=e.plusRange(r).plusRange(i)}let r=null;for(let e=0,t=this._pieces.length;en.endLineNumber){r=r||{index:e};break}if(i.removeTokens(n),i.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(i.endLineNumbern.endLineNumber){r=r||{index:e};continue}const[s,o]=i.split(n);s.isEmpty()?r=r||{index:e}:o.isEmpty()||(this._pieces.splice(e,1,s,o),e++,t++,r=r||{index:e})}return r=r||{index:this._pieces.length},t.length>0&&(this._pieces=o.nK(this._pieces,r.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const n=this._pieces;if(0===n.length)return t;const r=n[Cr._findFirstPieceWithLine(n,e)].getLineTokens(e);if(!r)return t;const i=t.getCount(),s=r.getCount();let o=0;const a=[];let l=0,c=0;const h=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;ot)){for(;i>n&&e[i-1].startLineNumber<=t&&t<=e[i-1].endLineNumber;)i--;return i}r=i-1}}return n}acceptEdit(e,t,n,r,i){for(const s of this._pieces)s.acceptEdit(e,t,n,r,i)}}var _r,kr=function(e,t){return function(n,r){t(n,r,e)}};let xr=_r=class extends Vt{constructor(e,t,n,s,o,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=s,this._languageService=o,this._languageConfigurationService=a,this._treeSitterService=l,this._semanticTokens=new Cr(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new r.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new i.Cm),this._register(this._languageConfigurationService.onDidChange(e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(r.Jh.filter(Hn.OB.onDidChange,e=>e.changedLanguages.includes(this._languageId))(()=>{this.createPreferredTokenProvider()})),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new Sr(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews))}createTreeSitterTokens(){return this._register(new mr(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,()=>this._languageId))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens(e=>{this._emitModelTokensChangedEvent(e)})),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState(e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Hn.OB.get(this._languageId)?this._tokens instanceof mr||this.createTokens(!0):this._tokens instanceof Sr||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,n,r]=(0,d.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,n,r,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new l.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),r=this.getLineTokens(t.lineNumber),i=r.findTokenIndexAtOffset(t.column-1),[s,o]=_r._findLanguageBoundaries(r,i),a=(0,y.Th)(t.column,this.getLanguageConfiguration(r.getLanguageId(i)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(i>0&&s===t.column-1){const[s,o]=_r._findLanguageBoundaries(r,i-1),a=(0,y.Th)(t.column,this.getLanguageConfiguration(r.getLanguageId(i-1)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let r=0;for(let i=t;i>=0&&e.getLanguageId(i)===n;i--)r=e.getStartOffset(i);let i=e.getLineContent().length;for(let r=t,s=e.getCount();r=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([kr(4,v.L),kr(5,te),kr(6,fr.ITreeSitterParserService)],xr);class Sr extends pr{constructor(e,t,n,r){super(e,t,n),this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new i.HE),this._tokens=new yr(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new i.HE),this._attachedViewStates=this._register(new i.$w),this._register(Hn.dG.onDidChange(e=>{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()})),this.resetTokenization(),this._register(r.onDidChangeVisibleRanges(({view:e,state:t})=>{if(t){let n=this._attachedViewStates.get(e);n||(n=new ur(()=>this.refreshRanges(n.lineRanges)),this._attachedViewStates.set(e,n)),n.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)}))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new sr(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[t,n]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Hn.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,l.dz)(e),[null,null]}return[e,t]})();if(this._tokenizer=t&&n?new ir(this._textModel.getLineCount(),t,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{2!==this._backgroundTokenizationState&&(this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire())},setEndState:(e,t)=>{if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&this._tokenizer?.store.setEndState(e,t)}};t&&t.createBackgroundTokenizer&&!t.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new cr(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),t?.backgroundTokenizerShouldOnlyVerifyTokens&&t.createBackgroundTokenizer?(this._debugBackgroundTokens=new yr(this._languageIdCodec),this._debugBackgroundStates=new sr(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,n]=(0,d.W)(t.text);this._tokens.acceptEdit(t.range,e,n),this._debugBackgroundTokens?.acceptEdit(t.range,e,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Kn.M.joinMany([...this._attachedViewStates].map(([e,t])=>t.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const n=new er,{heuristicTokens:r}=this._tokenizer.tokenizeHeuristically(n,e,t),i=this.setTokens(n.finalize());if(r)for(const e of i.changes)this._backgroundTokenizer.value?.requestTokens(e.fromLineNumber,e.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new er;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const r=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(r)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const r=this._textModel.validatePosition(new p.y(e,t));return this.forceTokenization(r.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(r,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;const r=this._textModel.validatePosition(e);return this.forceTokenization(r.lineNumber),this._tokenizer.tokenizeLineWithEdit(r,t,n)}get hasTokens(){return this._tokens.hasTokens}}class Er{constructor(){this.changeType=1}}class Fr{static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",r=0;for(const i of t)n+=e.substring(r,i.column-1),r=i.column-1,n+=i.options.content;return n+=e.substring(r),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new Fr(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new Fr(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber),t}constructor(e,t,n,r,i){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=r,this.order=i}}class Lr{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class Ir{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class Tr{constructor(e,t,n,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class Nr{constructor(){this.changeType=5}}class Rr{constructor(e,t,n,r){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=r,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t0&&(e[t++]=r,n+=r.length),n>=65536)return e.join("")}}}const $r=()=>{throw new Error("Invalid change accessor")};let qr=class extends i.jG{static{Pr=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:g.tabSize,indentSize:g.indentSize,insertSpaces:g.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:g.trimAutoWhitespace,largeFileOptimizations:g.largeFileOptimizations,bracketPairColorizationOptions:g.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const n=Gt(e,t.tabSize,t.insertSpaces);return new de.X2({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new de.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return(0,i.qE)(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,s=null,o,a,l,d){super(),this._undoRedoService=o,this._languageService=a,this._languageConfigurationService=l,this.instantiationService=d,this._onWillDispose=this._register(new r.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new ri(e=>this.handleBeforeFireDecorationsChangedEvent(e))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.vl),this._eventEmitter=this._register(new ii),this._languageSelectionListener=this._register(new i.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new hr,Vr++,this.id="$model"+Vr,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==s?h.r.parse("inmemory://model/"+Vr):s,this._attachedEditorCount=0;const{textBuffer:u,disposable:p}=Wr(e,n.defaultEOL);this._buffer=u,this._bufferDisposable=p,this._options=Pr.resolveOptions(this._buffer,n);const f="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new yt(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new qt(this,this._languageConfigurationService)),this._decorationProvider=this._register(new St(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(xr,this,this._bracketPairs,f,this._attachedViews);const g=this._buffer.getLineCount(),b=this._buffer.getValueLengthInRange(new m.Q(1,1,g,this._buffer.getLineLength(g)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=b>Pr.LARGE_FILE_SIZE_THRESHOLD||g>Pr.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=b>Pr.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=b>Pr._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=c.tk(Vr),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Hr,this._commandManager=new Pt(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange(e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new $n([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=i.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new l.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new Ar(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw(0,l.Qg)();const{textBuffer:t,disposable:n}=Wr(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,r,i,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:r}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:i,isRedoing:s,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),r=this.getValueLengthInRange(n),i=this.getLineCount(),s=this.getLineMaxColumn(i);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Hr,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Rr([new Er],this._versionId,!1,!1),this._createContentChanged2(new m.Q(1,1,i,s),0,r,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),r=this.getValueLengthInRange(n),i=this.getLineCount(),s=this.getLineMaxColumn(i);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Rr([new Nr],this._versionId,!1,!1),this._createContentChanged2(new m.Q(1,1,i,s),0,r,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,r=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let r=1;r<=n;r++){const n=this._buffer.getLineLength(r);n>=1e4?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,r=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,o=new de.X2({tabSize:t,indentSize:n,insertSpaces:r,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i,bracketPairColorizationOptions:s});if(this._options.equals(o))return;const a=this._options.createChangeEvent(o);this._options=o,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const n=Gt(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),function(e,t,n){let r=c.HG(e);return-1===r&&(r=e.length),function(e,t,n){let r=0;for(let n=0;n({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");const n=this.getFullModelRange(),r=this.getValueInRange(n,e);return t?this._buffer.getBOM()+r:r}createSnapshot(e=!1){return new Ur(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),r=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+r:r}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,r=e.startColumn;let i=Math.floor("number"!=typeof n||isNaN(n)?1:n),s=Math.floor("number"!=typeof r||isNaN(r)?1:r);if(i<1)i=1,s=1;else if(i>t)i=t,s=this.getLineMaxColumn(i);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(i);s>=e&&(s=e)}const o=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof o||isNaN(o)?1:o),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return n===i&&r===s&&o===l&&a===c&&e instanceof m.Q&&!(e instanceof f.L)?e:new m.Q(i,s,l,c)}_isValidPosition(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(c.pc(n))return!1}return!0}_validatePosition(e,t,n){const r=Math.floor("number"!=typeof e||isNaN(e)?1:e),i=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(r<1)return new p.y(1,1);if(r>s)return new p.y(s,this.getLineMaxColumn(s));if(i<=1)return new p.y(r,1);const o=this.getLineMaxColumn(r);if(i>=o)return new p.y(r,o);if(1===n){const e=this._buffer.getLineCharCode(r,i-2);if(c.pc(e))return new p.y(r,i-1)}return new p.y(r,i)}validatePosition(e){return this._assertNotDisposed(),e instanceof p.y&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,r,0))return!1;if(!this._isValidPosition(i,s,0))return!1;if(1===t){const e=r>1?this._buffer.getLineCharCode(n,r-2):0,t=s>1&&s<=this._buffer.getLineLength(i)?this._buffer.getLineCharCode(i,s-2):0,o=c.pc(e),a=c.pc(t);return!o&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof m.Q&&!(e instanceof f.L)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),r=t.lineNumber,i=t.column,s=n.lineNumber,o=n.column;{const e=i>1?this._buffer.getLineCharCode(r,i-2):0,t=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,n=c.pc(e),a=c.pc(t);return n||a?r===s&&i===o?new m.Q(r,i-1,s,o-1):n&&a?new m.Q(r,i-1,s,o+1):n?new m.Q(r,i-1,s,o):new m.Q(r,i,s,o+1):new m.Q(r,i,s,o)}}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new m.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,r){return this._buffer.findMatchesLineByLine(e,t,n,r)}findMatches(e,t,n,r,i,s,o=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>m.Q.isIRange(e))&&(a=t.map(e=>this.validateRange(e)))),null===a&&(a=[this.getFullModelRange()]),a=a.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);const l=[];let c;if(l.push(a.reduce((e,t)=>m.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t))),!n&&e.indexOf("\n")<0){const t=new Dn.lt(e,n,r,i).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,s,o)}else c=t=>Dn.hB.findMatches(this,new Dn.lt(e,n,r,i),t,s,o);return l.map(c).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,n,r,i,s){this._assertNotDisposed();const o=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new Dn.lt(e,n,r,i).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new m.Q(o.lineNumber,o.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,s,1);return Dn.hB.findNextMatch(this,new Dn.lt(e,n,r,i),o,s),c.length>0?c[0]:(l=new m.Q(1,1,o.lineNumber,this.getLineMaxColumn(o.lineNumber)),c=this.findMatchesLineByLine(l,t,s,1),c.length>0?c[0]:null)}return Dn.hB.findNextMatch(this,new Dn.lt(e,n,r,i),o,s)}findPreviousMatch(e,t,n,r,i,s){this._assertNotDisposed();const o=this.validatePosition(t);return Dn.hB.findPreviousMatch(this,new Dn.lt(e,n,r,i),o,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof de.Wo?e:new de.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,r=e.length;n({range:this.validateRange(e.range),text:e.text}));let r=!0;if(e)for(let t=0,i=e.length;ti.endLineNumber,o=i.startLineNumber>t.endLineNumber;if(!r&&!o){s=!0;break}}if(!s){r=!1;break}}if(r)for(let e=0,r=this._trimAutoWhitespaceLines.length;et.endLineNumber||r===t.startLineNumber&&t.startColumn===i&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(0)||r===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(o.length-1))){s=!1;break}}if(s){const e=new m.Q(r,1,r,i);t.push(new de.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,r)}_applyUndo(e,t,n,r){const i=e.map(e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new m.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}});this._applyUndoRedoEdits(i,t,!0,!1,n,r)}_applyRedo(e,t,n,r){const i=e.map(e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new m.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}});this._applyUndoRedoEdits(i,t,!1,!0,n,r)}_applyUndoRedoEdits(e,t,n,r,i,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=r,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(i)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),i=this._buffer.getLineCount(),s=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e=0;t--){const n=l+t,r=g+t;C.takeFromEndWhile(e=>e.lineNumber>r);const i=C.takeFromEndWhile(e=>e.lineNumber===r);e.push(new Lr(n,this.getLineContent(r),i))}if(me.lineNumbere.lineNumber===t)}e.push(new Tr(r+1,l+u,h,c))}t+=f}this._emitContentChangedEvent(new Rr(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===r.reverseEdits?void 0:r.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map(e=>new Lr(e,this.getLineContent(e),this._getInjectedTextInLine(e)));this._onDidChangeInjectedText.fire(new Dr(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,ni(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)};let r=null;try{r=t(n)}catch(e){(0,l.dz)(e)}return n.addDecoration=$r,n.changeDecoration=$r,n.changeDecorationOptions=$r,n.removeDecoration=$r,n.deltaDecorations=$r,r}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,l.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const r=e?this._decorations[e]:null;if(!r)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:ti[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(r),delete this._decorations[r.id],null;const i=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),o=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);return this._decorationsTree.delete(r),r.reset(this.getVersionId(),s,o,i),r.setOptions(ti[n]),this._decorationsTree.insert(r),r.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,n=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,r=!1,i=!1){const s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),c=this.getLineMaxColumn(l),h=new m.Q(a,1,l,c),d=this._getDecorationsInRange(h,n,r,i);return(0,o.E4)(d,this._decorationProvider.getDecorationsInRange(h,n,r)),d}getDecorationsInRange(e,t=0,n=!1,r=!1,i=!1){const s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,i);return(0,o.E4)(a,this._decorationProvider.getDecorationsInRange(s,t,n,r)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),r=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return Fr.fromDecorations(r).filter(t=>t.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,r){const i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,i,s,t,n,r)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const r=this._validateRangeRelaxedNoAllocations(t),i=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),s=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),i,s,r),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const r=!(!n.options.overviewRuler||!n.options.overviewRuler.color),i=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=r!==i,o=function(e){return!!e.after||!!e.before}(t)!==Kr(n);s||o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,r=!1){const i=this.getVersionId(),s=t.length;let o=0;const a=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(a);for(;othis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const n of e){if(" "!==n&&"\t"!==n)break;t++}return t}(this.getLineContent(e))+1}};function jr(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Kr(e){return!!e.options.after||!!e.options.before}qr=Pr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([Br(4,Mr),Br(5,v.L),Br(6,te),Br(7,$._Y)],qr);class Hr{constructor(){this._decorationsTree0=new ln,this._decorationsTree1=new ln,this._injectedTextDecorationsTree=new ln}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)null===n.range&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,r,i,s){const o=e.getVersionId(),a=this._intervalSearch(t,n,r,i,o,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,n,r,i,s){const o=this._decorationsTree0.intervalSearch(e,t,n,r,i,s),a=this._decorationsTree1.intervalSearch(e,t,n,r,i,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,r,i,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,n,r){const i=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,r,!1,i,!1);return this._ensureNodesHaveRanges(e,s).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAllInjectedText(e,t){const n=e.getVersionId(),r=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,r).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAll(e,t,n,r,i){const s=e.getVersionId(),o=this._search(t,n,r,s,i);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,r,i){if(n)return this._decorationsTree1.search(e,t,r,i);{const n=this._decorationsTree0.search(e,t,r,i),s=this._decorationsTree1.search(e,t,r,i),o=this._injectedTextDecorationsTree.search(e,t,r,i);return n.concat(s).concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),r=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(r)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){Kr(e)?this._injectedTextDecorationsTree.insert(e):jr(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Kr(e)?this._injectedTextDecorationsTree.delete(e):jr(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Kr(e)?this._injectedTextDecorationsTree.resolveNode(e,t):jr(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,r){this._decorationsTree0.acceptReplace(e,t,n,r),this._decorationsTree1.acceptReplace(e,t,n,r),this._injectedTextDecorationsTree.acceptReplace(e,t,n,r)}}function Gr(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Qr{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Jr extends Qr{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:de.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Yr{constructor(e){this.position=e?.position??de.ZS.Center,this.persistLane=e?.persistLane}}class Xr extends Qr{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?a.Q1.fromHex(e):t.getColor(e.id)}}class Zr{static from(e){return e instanceof Zr?e:new Zr(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class ei{static register(e){return new ei(e)}static createDynamic(e){return new ei(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?Gr(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Gr(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Jr(e.overviewRuler):null,this.minimap=e.minimap?new Xr(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Yr(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?Gr(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Gr(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?Gr(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?c.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Gr(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Gr(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Gr(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Gr(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Gr(e.afterContentClassName):null,this.after=e.after?Zr.from(e.after):null,this.before=e.before?Zr.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}ei.EMPTY=ei.register({description:"empty"});const ti=[ei.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),ei.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),ei.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),ei.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ni(e){return e instanceof ei?e:ei.createDynamic(e)}class ri extends i.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class ii extends i.jG{constructor(){super(),this._fastEmitter=this._register(new r.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}var si,oi=n(6693),ai=n(9517),li=n(4427),ci=n(8581),hi=function(e,t){return function(n,r){t(n,r,e)}};function di(e){return e.toString()}class ui{constructor(e,t,n){this.model=e,this._modelEventListeners=new i.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>n(e,t)))}dispose(){this._modelEventListeners.dispose()}}const pi=s.j9||s.zx?1:2;class mi{constructor(e,t,n,r,i,s,o,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=r,this.heapSize=i,this.sha1=s,this.versionId=o,this.alternativeVersionId=a}}let fi=class extends i.jG{static{si=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,n,i){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=i,this._onModelAdded=this._register(new r.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new r.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new r.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(e=>this._updateModelOptions(e))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=g.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let r="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(r=Math.max(t,1))}let i=g.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(i="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=pi;const o=e.eol;"\r\n"===o?s=2:"\n"===o&&(s=1);let a=g.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=g.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=g.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=g.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"==typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:r,insertSpaces:i,detectIndentation:l,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:c,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"==typeof n&&"auto"!==n?n:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,n){const r="string"==typeof e?e:e.languageId;let i=this._modelCreationOptionsByLanguageAndResource[r+t];if(!i){const e=this._configurationService.getValue("editor",{overrideIdentifier:r,resource:t}),s=this._getEOL(t,r);i=si._readModelOptions({editor:e,eol:s},n),this._modelCreationOptionsByLanguageAndResource[r+t]=i}return i}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let r=0,i=n.length;re){const t=[];for(this._disposedModels.forEach(e=>{e.sharesUndoRedoStack||t.push(e)}),t.sort((e,t)=>e.time-t.time);t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,r){const i=this.getCreationOptions(t,n,r),s=this._instantiationService.createInstance(qr,e,t,i,n);if(n&&this._disposedModels.has(di(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),r=this._getSHA1Computer(),i=!!r.canComputeSHA1(s)&&r.computeSHA1(s)===e.sha1;if(i||e.sharesUndoRedoStack){for(const e of t.past)zt(e)&&e.matchesResource(n)&&e.setModel(s);for(const e of t.future)zt(e)&&e.matchesResource(n)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,e=>zt(e)&&e.matchesResource(n)),i&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const o=di(s.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const a=new ui(s,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[o]=a,a}createModel(e,t,n,r=!1){let i;return i=t?this._createModelData(e,t,n,r):this._createModelData(e,K.vH,n,r),this._onModelAdded.fire(i.model),i.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,r=t.length;n0||t.future.length>0){for(const n of t.past)zt(n)&&n.matchesResource(e.uri)&&(i=!0,s+=n.heapSize(e.uri),n.setModel(e.uri));for(const n of t.future)zt(n)&&n.matchesResource(e.uri)&&(i=!0,s+=n.heapSize(e.uri),n.setModel(e.uri))}}const o=si.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(i)if(r||!(s>o)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(o-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,t=>zt(t)&&t.matchesResource(e.uri)),this._insertDisposedModel(new mi(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),r,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!r){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,r=e.getLanguageId(),i=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(r,e.uri,e.isForSimpleWidget);si._setModelOptionsForModel(e,s,i),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new gi}};fi=si=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([hi(0,q.pG),hi(1,oi.ITextResourcePropertiesService),hi(2,Mr),hi(3,$._Y)],fi);class gi{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=gi.MAX_MODEL_SIZE}computeSHA1(e){const t=new ai.v7,n=e.createSnapshot();let r;for(;r=n.read();)t.update(r);return t.digest()}}},9956:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MirrorModel:()=>b,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>m,WorkerTextModelSyncClient:()=>f,WorkerTextModelSyncServer:()=>g});var r=n(2735),i=n(6274),s=n(695),o=n(8274),a=n(800),l=n(8281),c=n(5603),h=(n(1211),n(4901));class d{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,h.j)(e);const n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,h.j)(e),t=(0,h.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,h.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,s=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],s=i-this.values[r],e=i))break;t=r+1}return new u(r,e-s)}}class u{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class p{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new o.y(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;rthis._checkStopModelSync(),Math.round(m/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,i.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const n of e){const e=n.toString();this._syncedModels[e]||this._beginModelSync(n,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>m&&t.push(n);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n)return;if(!t&&n.isTooLargeForSyncing())return;const r=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const s=new i.Cm;s.add(n.onDidChangeContent(e=>{this._proxy.$acceptModelChanged(r.toString(),e)})),s.add(n.onWillDispose(()=>{this._stopModelSync(r)})),s.add((0,i.s)(()=>{this._proxy.$acceptRemovedModel(r)})),this._syncedModels[r]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,i.AS)(t)}}class g{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new b(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class b extends p{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>e&&(n=e,r=!0)}return r?{lineNumber:t,column:n}:e}}},9996:(e,t,n)=>{"use strict";n.d(t,{B6:()=>f,P8:()=>u});var r=n(1905),i=n(4427),s=n(9130),o=n(6206),a=n(5603),l=n(695);function c(e){return(0,l.I)(e,!0)}class h{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===i.ny.file)return r._1(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(p(e.authority,t.authority))return r._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return u(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===i.ny.file?t=l.r.file(s.pD(c(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===i.ny.file?l.r.file(s.S8(c(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!p(e.authority,t.authority))return;if(e.scheme===i.ny.file){const n=s.V8(c(e),c(t));return o.uF?r.TH(n):n}let n=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(n.length,a.length);er.Zn(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return m(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let n=!1;if(e.scheme===i.ny.file){const i=c(e);n=void 0!==i&&i.length===r.Zn(i).length&&i[i.length-1]===t}else{t="/";const r=e.path;n=1===r.length&&47===r.charCodeAt(r.length-1)}return n||m(e,t)?e:e.with({path:e.path+"/"})}}const d=new h(()=>!1),u=(new h(e=>e.scheme!==i.ny.file||!o.j9),new h(e=>!0),d.isEqual.bind(d),d.isEqualOrParent.bind(d),d.getComparisonKey.bind(d),d.basenameOrAuthority.bind(d),d.basename.bind(d)),p=(d.extname.bind(d),d.dirname.bind(d),d.joinPath.bind(d),d.normalizePath.bind(d),d.relativePath.bind(d),d.resolvePath.bind(d),d.isAbsolutePath.bind(d),d.isEqualAuthority.bind(d)),m=d.hasTrailingPathSeparator.bind(d);var f;d.removeTrailingPathSeparator.bind(d),d.addTrailingPathSeparator.bind(d),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,r]=e.split(":");t&&r&&n.set(t,r)});const r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(e.META_DATA_MIME,r),n}}(f||(f={}))}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(3142),t=n(2803),r=n(3085);let i=!1;function s(n){if(i)return;i=!0;const s=new e.SimpleWorkerServer(e=>{globalThis.postMessage(e)},e=>new t.EditorSimpleWorker(r.EditorWorkerHost.getChannel(e),n));globalThis.onmessage=e=>{s.onmessage(e.data)}}var o,a;globalThis.onmessage=e=>{i||s(null)},(a=o||(o={}))[a.Ident=0]="Ident",a[a.AtKeyword=1]="AtKeyword",a[a.String=2]="String",a[a.BadString=3]="BadString",a[a.UnquotedString=4]="UnquotedString",a[a.Hash=5]="Hash",a[a.Num=6]="Num",a[a.Percentage=7]="Percentage",a[a.Dimension=8]="Dimension",a[a.UnicodeRange=9]="UnicodeRange",a[a.CDO=10]="CDO",a[a.CDC=11]="CDC",a[a.Colon=12]="Colon",a[a.SemiColon=13]="SemiColon",a[a.CurlyL=14]="CurlyL",a[a.CurlyR=15]="CurlyR",a[a.ParenthesisL=16]="ParenthesisL",a[a.ParenthesisR=17]="ParenthesisR",a[a.BracketL=18]="BracketL",a[a.BracketR=19]="BracketR",a[a.Whitespace=20]="Whitespace",a[a.Includes=21]="Includes",a[a.Dashmatch=22]="Dashmatch",a[a.SubstringOperator=23]="SubstringOperator",a[a.PrefixOperator=24]="PrefixOperator",a[a.SuffixOperator=25]="SuffixOperator",a[a.Delim=26]="Delim",a[a.EMS=27]="EMS",a[a.EXS=28]="EXS",a[a.Length=29]="Length",a[a.Angle=30]="Angle",a[a.Time=31]="Time",a[a.Freq=32]="Freq",a[a.Exclamation=33]="Exclamation",a[a.Resolution=34]="Resolution",a[a.Comma=35]="Comma",a[a.Charset=36]="Charset",a[a.EscapedJavaScript=37]="EscapedJavaScript",a[a.BadEscapedJavaScript=38]="BadEscapedJavaScript",a[a.Comment=39]="Comment",a[a.SingleLineComment=40]="SingleLineComment",a[a.EOF=41]="EOF",a[a.ContainerQueryLength=42]="ContainerQueryLength",a[a.CustomToken=43]="CustomToken";var l=class{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;t".charCodeAt(0),I="@".charCodeAt(0),T="#".charCodeAt(0),N="$".charCodeAt(0),R="\\".charCodeAt(0),D="/".charCodeAt(0),A="\n".charCodeAt(0),M="\r".charCodeAt(0),O="\f".charCodeAt(0),z='"'.charCodeAt(0),P="'".charCodeAt(0),B=" ".charCodeAt(0),W="\t".charCodeAt(0),V=";".charCodeAt(0),U=":".charCodeAt(0),$="{".charCodeAt(0),q="}".charCodeAt(0),j="[".charCodeAt(0),K="]".charCodeAt(0),H=",".charCodeAt(0),G=".".charCodeAt(0),Q="!".charCodeAt(0),J="?".charCodeAt(0),Y="+".charCodeAt(0),X={};X[V]=o.SemiColon,X[U]=o.Colon,X[$]=o.CurlyL,X[q]=o.CurlyR,X[K]=o.BracketR,X[j]=o.BracketL,X[S]=o.ParenthesisL,X[E]=o.ParenthesisR,X[H]=o.Comma;var Z={};Z.em=o.EMS,Z.ex=o.EXS,Z.px=o.Length,Z.cm=o.Length,Z.mm=o.Length,Z.in=o.Length,Z.pt=o.Length,Z.pc=o.Length,Z.deg=o.Angle,Z.rad=o.Angle,Z.grad=o.Angle,Z.ms=o.Time,Z.s=o.Time,Z.hz=o.Freq,Z.khz=o.Freq,Z["%"]=o.Percentage,Z.fr=o.Percentage,Z.dpi=o.Resolution,Z.dpcm=o.Resolution,Z.cqw=o.ContainerQueryLength,Z.cqh=o.ContainerQueryLength,Z.cqi=o.ContainerQueryLength,Z.cqb=o.ContainerQueryLength,Z.cqmin=o.ContainerQueryLength,Z.cqmax=o.ContainerQueryLength;var ee,te,ne,re,ie=class{constructor(){this.stream=new l(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new l(e)}finishToken(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}}substring(e,t){return this.stream.substring(e,e+t)}pos(){return this.stream.pos()}goBackTo(e){this.stream.goBackTo(e)}scanUnquotedString(){const e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,o.UnquotedString,t.join("")):null}scan(){const e=this.trivia();if(null!==e)return e;const t=this.stream.pos();return this.stream.eos()?this.finishToken(t,o.EOF):this.scanNext(t)}tryScanUnicode(){const e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,o.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([F,Q,C,C]))return this.finishToken(e,o.CDO);if(this.stream.advanceIfChars([C,C,L]))return this.finishToken(e,o.CDC);let t=[];if(this.ident(t))return this.finishToken(e,o.Ident,t.join(""));if(this.stream.advanceIfChar(I)){if(t=["@"],this._name(t)){const n=t.join("");return"@charset"===n?this.finishToken(e,o.Charset,n):this.finishToken(e,o.AtKeyword,n)}return this.finishToken(e,o.Delim)}if(this.stream.advanceIfChar(T))return t=["#"],this._name(t)?this.finishToken(e,o.Hash,t.join("")):this.finishToken(e,o.Delim);if(this.stream.advanceIfChar(Q))return this.finishToken(e,o.Exclamation);if(this._number()){const n=this.stream.pos();if(t=[this.stream.substring(e,n)],this.stream.advanceIfChar(k))return this.finishToken(e,o.Percentage);if(this.ident(t)){const r=this.stream.substring(n).toLowerCase(),i=Z[r];return void 0!==i?this.finishToken(e,i,t.join("")):this.finishToken(e,o.Dimension,t.join(""))}return this.finishToken(e,o.Num)}t=[];let n=this._string(t);return null!==n?this.finishToken(e,n,t.join("")):(n=X[this.stream.peekChar()],void 0!==n?(this.stream.advance(1),this.finishToken(e,n)):this.stream.peekChar(0)===b&&this.stream.peekChar(1)===y?(this.stream.advance(2),this.finishToken(e,o.Includes)):this.stream.peekChar(0)===w&&this.stream.peekChar(1)===y?(this.stream.advance(2),this.finishToken(e,o.Dashmatch)):this.stream.peekChar(0)===x&&this.stream.peekChar(1)===y?(this.stream.advance(2),this.finishToken(e,o.SubstringOperator)):this.stream.peekChar(0)===v&&this.stream.peekChar(1)===y?(this.stream.advance(2),this.finishToken(e,o.PrefixOperator)):this.stream.peekChar(0)===N&&this.stream.peekChar(1)===y?(this.stream.advance(2),this.finishToken(e,o.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,o.Delim)))}trivia(){for(;;){const e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,o.Whitespace)}else{if(!this.comment())return null;if(!this.ignoreComment)return this.finishToken(e,o.Comment)}}}comment(){if(this.stream.advanceIfChars([D,x])){let e=!1,t=!1;return this.stream.advanceWhileChar(n=>t&&n===D?(e=!0,!1):(t=n===x,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e,t=0;return this.stream.peekChar()===G&&(t=1),e=this.stream.peekChar(t),e>=f&&e<=g&&(this.stream.advance(t+1),this.stream.advanceWhileChar(e=>e>=f&&e<=g||0===t&&e===G),!0)}_newline(e){const t=this.stream.peekChar();switch(t){case M:case O:case A:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===M&&this.stream.advanceIfChar(A)&&e.push("\n"),!0}return!1}_escape(e,t){let n=this.stream.peekChar();if(n===R){this.stream.advance(1),n=this.stream.peekChar();let r=0;for(;r<6&&(n>=f&&n<=g||n>=c&&n<=h||n>=u&&n<=p);)this.stream.advance(1),n=this.stream.peekChar(),r++;if(r>0){try{const t=parseInt(this.stream.substring(this.stream.pos()-r),16);t&&e.push(String.fromCharCode(t))}catch(e){}return n===B||n===W?this.stream.advance(1):this._newline([]),!0}if(n!==M&&n!==O&&n!==A)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){const n=this.stream.peekChar();return 0!==n&&n!==e&&n!==R&&n!==M&&n!==O&&n!==A&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)}_string(e){if(this.stream.peekChar()===P||this.stream.peekChar()===z){const t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),o.String):o.BadString}return null}_unquotedChar(e){const t=this.stream.peekChar();return 0!==t&&t!==R&&t!==P&&t!==z&&t!==S&&t!==E&&t!==B&&t!==W&&t!==A&&t!==O&&t!==M&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(e=>e===B||e===W||e===A||e===O||e===M)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){const t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1}_identFirstChar(e){const t=this.stream.peekChar();return(t===_||t>=c&&t<=d||t>=u&&t<=m||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_minus(e){const t=this.stream.peekChar();return t===C&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_identChar(e){const t=this.stream.peekChar();return(t===_||t===C||t>=c&&t<=d||t>=u&&t<=m||t>=f&&t<=g||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unicodeRange(){if(this.stream.advanceIfChar(Y)){const e=e=>e>=f&&e<=g||e>=c&&e<=h||e>=u&&e<=p,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(e=>e===J);if(t>=1&&t<=6){if(!this.stream.advanceIfChar(C))return!0;{const t=this.stream.advanceWhileChar(e);if(t>=1&&t<=6)return!0}}}return!1}};function se(e,t){if(e.length0?e.lastIndexOf(t)===n:0===n&&e===t}function ae(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}function le(e,t){let n="";for(;t>0;)1&~t||(n+=e),e+=e,t>>>=1;return n}function ce(e,t){let n=null;return!e||te.end?null:(e.accept(e=>-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0)),n)}function he(e,t){let n=ce(e,t);const r=[];for(;n;)r.unshift(n),n=n.parent;return r}(te=ee||(ee={}))[te.Undefined=0]="Undefined",te[te.Identifier=1]="Identifier",te[te.Stylesheet=2]="Stylesheet",te[te.Ruleset=3]="Ruleset",te[te.Selector=4]="Selector",te[te.SimpleSelector=5]="SimpleSelector",te[te.SelectorInterpolation=6]="SelectorInterpolation",te[te.SelectorCombinator=7]="SelectorCombinator",te[te.SelectorCombinatorParent=8]="SelectorCombinatorParent",te[te.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",te[te.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",te[te.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",te[te.Page=12]="Page",te[te.PageBoxMarginBox=13]="PageBoxMarginBox",te[te.ClassSelector=14]="ClassSelector",te[te.IdentifierSelector=15]="IdentifierSelector",te[te.ElementNameSelector=16]="ElementNameSelector",te[te.PseudoSelector=17]="PseudoSelector",te[te.AttributeSelector=18]="AttributeSelector",te[te.Declaration=19]="Declaration",te[te.Declarations=20]="Declarations",te[te.Property=21]="Property",te[te.Expression=22]="Expression",te[te.BinaryExpression=23]="BinaryExpression",te[te.Term=24]="Term",te[te.Operator=25]="Operator",te[te.Value=26]="Value",te[te.StringLiteral=27]="StringLiteral",te[te.URILiteral=28]="URILiteral",te[te.EscapedValue=29]="EscapedValue",te[te.Function=30]="Function",te[te.NumericValue=31]="NumericValue",te[te.HexColorValue=32]="HexColorValue",te[te.RatioValue=33]="RatioValue",te[te.MixinDeclaration=34]="MixinDeclaration",te[te.MixinReference=35]="MixinReference",te[te.VariableName=36]="VariableName",te[te.VariableDeclaration=37]="VariableDeclaration",te[te.Prio=38]="Prio",te[te.Interpolation=39]="Interpolation",te[te.NestedProperties=40]="NestedProperties",te[te.ExtendsReference=41]="ExtendsReference",te[te.SelectorPlaceholder=42]="SelectorPlaceholder",te[te.Debug=43]="Debug",te[te.If=44]="If",te[te.Else=45]="Else",te[te.For=46]="For",te[te.Each=47]="Each",te[te.While=48]="While",te[te.MixinContentReference=49]="MixinContentReference",te[te.MixinContentDeclaration=50]="MixinContentDeclaration",te[te.Media=51]="Media",te[te.Keyframe=52]="Keyframe",te[te.FontFace=53]="FontFace",te[te.Import=54]="Import",te[te.Namespace=55]="Namespace",te[te.Invocation=56]="Invocation",te[te.FunctionDeclaration=57]="FunctionDeclaration",te[te.ReturnStatement=58]="ReturnStatement",te[te.MediaQuery=59]="MediaQuery",te[te.MediaCondition=60]="MediaCondition",te[te.MediaFeature=61]="MediaFeature",te[te.FunctionParameter=62]="FunctionParameter",te[te.FunctionArgument=63]="FunctionArgument",te[te.KeyframeSelector=64]="KeyframeSelector",te[te.ViewPort=65]="ViewPort",te[te.Document=66]="Document",te[te.AtApplyRule=67]="AtApplyRule",te[te.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",te[te.CustomPropertySet=69]="CustomPropertySet",te[te.ListEntry=70]="ListEntry",te[te.Supports=71]="Supports",te[te.SupportsCondition=72]="SupportsCondition",te[te.NamespacePrefix=73]="NamespacePrefix",te[te.GridLine=74]="GridLine",te[te.Plugin=75]="Plugin",te[te.UnknownAtRule=76]="UnknownAtRule",te[te.Use=77]="Use",te[te.ModuleConfiguration=78]="ModuleConfiguration",te[te.Forward=79]="Forward",te[te.ForwardVisibility=80]="ForwardVisibility",te[te.Module=81]="Module",te[te.UnicodeRange=82]="UnicodeRange",te[te.Layer=83]="Layer",te[te.LayerNameList=84]="LayerNameList",te[te.LayerName=85]="LayerName",te[te.PropertyAtRule=86]="PropertyAtRule",te[te.Container=87]="Container",(re=ne||(ne={}))[re.Mixin=0]="Mixin",re[re.Rule=1]="Rule",re[re.Variable=2]="Variable",re[re.Function=3]="Function",re[re.Keyframe=4]="Keyframe",re[re.Unknown=5]="Unknown",re[re.Module=6]="Module",re[re.Forward=7]="Forward",re[re.ForwardVisibility=8]="ForwardVisibility",re[re.Property=9]="Property";var de,ue,pe=class{get end(){return this.offset+this.length}constructor(e=-1,t=-1,n){this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}set type(e){this.nodeType=e}get type(){return this.nodeType||ee.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let n=this.children;return n||(n=this.children=[]),-1!==t?n.splice(t,0,e):n.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(t=>t.getRule()===e)}isErroneous(e=!1){return!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some(e=>e.isErroneous(!0))}setNode(e,t,n=-1){return!!t&&(t.attachTo(this,n),this[e]=t,!0)}addChild(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)}updateOffsetAndLength(e){(e.offsetthis.end||-1===this.length)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;n--)if(t=this.children[n],t.offset<=e)return t}return null}findChildAtOffset(e,t){const n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof me;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some(e=>t.type===e);)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null}},me=class extends pe{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}},fe=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}},ge=class extends pe{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return ee.Identifier}containsInterpolation(){return this.hasChildren()}},be=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Stylesheet}},ve=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Declarations}},ye=class extends pe{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}},we=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Ruleset}getSelectors(){return this.selectors||(this.selectors=new me(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(ee.Declarations)}},Ce=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Selector}},_e=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.SimpleSelector}},ke=class extends pe{constructor(e,t){super(e,t)}},xe=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.CustomPropertySet}},Se=class e extends ke{constructor(e,t){super(e,t),this.property=null}get type(){return ee.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const t=this.property?this.property.getName():"unknown";if(this.parent instanceof ve&&this.parent.getParent()instanceof We){const n=this.parent.getParent().getParent();if(n instanceof e)return n.getFullPropertyName()+t}return t}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){const t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}},Ee=class extends Se{constructor(e,t){super(e,t)}get type(){return ee.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}},Fe=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e){const t=/[_\+]+$/.exec(e);return t&&t[0].length?e.substr(0,e.length-t[0].length):e}(this.getText())}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},Le=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Invocation}getArguments(){return this.arguments||(this.arguments=new me(this)),this.arguments}},Ie=class extends Le{constructor(e,t){super(e,t)}get type(){return ee.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},Te=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}},Ne=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},Re=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}},De=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.For}setVariable(e){return this.setNode("variable",e,0)}},Ae=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Each}getVariables(){return this.variables||(this.variables=new me(this)),this.variables}},Me=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.While}},Oe=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Else}},ze=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new me(this)),this.parameters}},Pe=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.ViewPort}},Be=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.FontFace}},We=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.NestedProperties}},Ve=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},Ue=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.KeyframeSelector}},$e=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Import}setMedialist(e){return!!e&&(e.attachTo(this),!0)}},qe=class extends pe{get type(){return ee.Use}getParameters(){return this.parameters||(this.parameters=new me(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},je=class extends pe{get type(){return ee.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},Ke=class extends pe{get type(){return ee.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new me(this)),this.members}getParameters(){return this.parameters||(this.parameters=new me(this)),this.parameters}},He=class extends pe{get type(){return ee.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Ge=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Namespace}},Qe=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Media}},Je=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Supports}},Ye=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}},Xe=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.PropertyAtRule}setName(e){return!!e&&(e.attachTo(this),this.name=e,!0)}getName(){return this.name}},Ze=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Document}},et=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Container}},tt=class extends pe{constructor(e,t){super(e,t)}},nt=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.MediaQuery}},rt=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.MediaCondition}},it=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.MediaFeature}},st=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.SupportsCondition}},ot=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.Page}},at=class extends ye{constructor(e,t){super(e,t)}get type(){return ee.PageBoxMarginBox}},lt=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Expression}},ct=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}},ht=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}},dt=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}},ut=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.HexColorValue}},pt=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.RatioValue}},mt=".".charCodeAt(0),ft="0".charCodeAt(0),gt="9".charCodeAt(0),bt=class extends pe{constructor(e,t){super(e,t)}get type(){return ee.NumericValue}getValue(){const e=this.getText();let t,n=0;for(let r=0,i=e.length;r0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{}}return s=r,o=i,0===Object.keys(o).length?s:s.replace(At,(e,t)=>o[t]??e);var s,o}var At=/{([^}]+)}/g;var Mt,Ot,zt,Pt,Bt,Wt,Vt,Ut,$t,qt,jt,Kt,Ht,Gt,Qt,Jt,Yt,Xt,Zt,en,tn,nn,rn,sn,on,an,ln,cn,hn,dn,un,pn,mn,fn,gn,bn,vn,yn,wn,Cn,_n,kn,xn,Sn,En,Fn,Ln,In,Tn,Nn,Rn,Dn,An,Mn,On,zn,Pn,Bn,Wn,Vn,Un,$n,qn,jn,Kn,Hn,Gn,Qn,Jn,Yn,Xn,Zn,er,tr,nr,rr,ir,sr,or,ar,lr,cr,hr,dr,ur,pr,mr,fr,gr,br,vr,yr,wr,Cr,_r,kr,xr,Sr,Er,Fr,Lr,Ir,Tr,Nr,Rr,Dr,Ar,Mr,Or,zr,Pr,Br,Wr,Vr,Ur,$r,qr,jr,Kr,Hr,Gr,Qr,Jr,Yr,Xr,Zr,ei,ti,ni,ri,ii,si,oi,ai=class{constructor(e,t){this.id=e,this.message=t}},li={NumberExpected:new ai("css-numberexpected",Dt("number expected")),ConditionExpected:new ai("css-conditionexpected",Dt("condition expected")),RuleOrSelectorExpected:new ai("css-ruleorselectorexpected",Dt("at-rule or selector expected")),DotExpected:new ai("css-dotexpected",Dt("dot expected")),ColonExpected:new ai("css-colonexpected",Dt("colon expected")),SemiColonExpected:new ai("css-semicolonexpected",Dt("semi-colon expected")),TermExpected:new ai("css-termexpected",Dt("term expected")),ExpressionExpected:new ai("css-expressionexpected",Dt("expression expected")),OperatorExpected:new ai("css-operatorexpected",Dt("operator expected")),IdentifierExpected:new ai("css-identifierexpected",Dt("identifier expected")),PercentageExpected:new ai("css-percentageexpected",Dt("percentage expected")),URIOrStringExpected:new ai("css-uriorstringexpected",Dt("uri or string expected")),URIExpected:new ai("css-uriexpected",Dt("URI expected")),VariableNameExpected:new ai("css-varnameexpected",Dt("variable name expected")),VariableValueExpected:new ai("css-varvalueexpected",Dt("variable value expected")),PropertyValueExpected:new ai("css-propertyvalueexpected",Dt("property value expected")),LeftCurlyExpected:new ai("css-lcurlyexpected",Dt("{ expected")),RightCurlyExpected:new ai("css-rcurlyexpected",Dt("} expected")),LeftSquareBracketExpected:new ai("css-rbracketexpected",Dt("[ expected")),RightSquareBracketExpected:new ai("css-lbracketexpected",Dt("] expected")),LeftParenthesisExpected:new ai("css-lparentexpected",Dt("( expected")),RightParenthesisExpected:new ai("css-rparentexpected",Dt(") expected")),CommaExpected:new ai("css-commaexpected",Dt("comma expected")),PageDirectiveOrDeclarationExpected:new ai("css-pagedirordeclexpected",Dt("page directive or declaraton expected")),UnknownAtRule:new ai("css-unknownatrule",Dt("at-rule unknown")),UnknownKeyword:new ai("css-unknownkeyword",Dt("unknown keyword")),SelectorExpected:new ai("css-selectorexpected",Dt("selector expected")),StringLiteralExpected:new ai("css-stringliteralexpected",Dt("string literal expected")),WhitespaceExpected:new ai("css-whitespaceexpected",Dt("whitespace expected")),MediaQueryExpected:new ai("css-mediaqueryexpected",Dt("media query expected")),IdentifierOrWildcardExpected:new ai("css-idorwildcardexpected",Dt("identifier or wildcard expected")),WildcardExpected:new ai("css-wildcardexpected",Dt("wildcard expected")),IdentifierOrVariableExpected:new ai("css-idorvarexpected",Dt("identifier or variable expected"))};(Mt||(Mt={})).is=function(e){return"string"==typeof e},(Ot||(Ot={})).is=function(e){return"string"==typeof e},(Pt=zt||(zt={})).MIN_VALUE=-2147483648,Pt.MAX_VALUE=2147483647,Pt.is=function(e){return"number"==typeof e&&Pt.MIN_VALUE<=e&&e<=Pt.MAX_VALUE},(Wt=Bt||(Bt={})).MIN_VALUE=0,Wt.MAX_VALUE=2147483647,Wt.is=function(e){return"number"==typeof e&&Wt.MIN_VALUE<=e&&e<=Wt.MAX_VALUE},(Ut=Vt||(Vt={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=Bt.MAX_VALUE),t===Number.MAX_VALUE&&(t=Bt.MAX_VALUE),{line:e,character:t}},Ut.is=function(e){let t=e;return ci.objectLiteral(t)&&ci.uinteger(t.line)&&ci.uinteger(t.character)},(qt=$t||($t={})).create=function(e,t,n,r){if(ci.uinteger(e)&&ci.uinteger(t)&&ci.uinteger(n)&&ci.uinteger(r))return{start:Vt.create(e,t),end:Vt.create(n,r)};if(Vt.is(e)&&Vt.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},qt.is=function(e){let t=e;return ci.objectLiteral(t)&&Vt.is(t.start)&&Vt.is(t.end)},(Kt=jt||(jt={})).create=function(e,t){return{uri:e,range:t}},Kt.is=function(e){let t=e;return ci.objectLiteral(t)&&$t.is(t.range)&&(ci.string(t.uri)||ci.undefined(t.uri))},(Gt=Ht||(Ht={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},Gt.is=function(e){let t=e;return ci.objectLiteral(t)&&$t.is(t.targetRange)&&ci.string(t.targetUri)&&$t.is(t.targetSelectionRange)&&($t.is(t.originSelectionRange)||ci.undefined(t.originSelectionRange))},(Jt=Qt||(Qt={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},Jt.is=function(e){const t=e;return ci.objectLiteral(t)&&ci.numberRange(t.red,0,1)&&ci.numberRange(t.green,0,1)&&ci.numberRange(t.blue,0,1)&&ci.numberRange(t.alpha,0,1)},(Xt=Yt||(Yt={})).create=function(e,t){return{range:e,color:t}},Xt.is=function(e){const t=e;return ci.objectLiteral(t)&&$t.is(t.range)&&Qt.is(t.color)},(en=Zt||(Zt={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},en.is=function(e){const t=e;return ci.objectLiteral(t)&&ci.string(t.label)&&(ci.undefined(t.textEdit)||bn.is(t))&&(ci.undefined(t.additionalTextEdits)||ci.typedArray(t.additionalTextEdits,bn.is))},(nn=tn||(tn={})).Comment="comment",nn.Imports="imports",nn.Region="region",(sn=rn||(rn={})).create=function(e,t,n,r,i,s){const o={startLine:e,endLine:t};return ci.defined(n)&&(o.startCharacter=n),ci.defined(r)&&(o.endCharacter=r),ci.defined(i)&&(o.kind=i),ci.defined(s)&&(o.collapsedText=s),o},sn.is=function(e){const t=e;return ci.objectLiteral(t)&&ci.uinteger(t.startLine)&&ci.uinteger(t.startLine)&&(ci.undefined(t.startCharacter)||ci.uinteger(t.startCharacter))&&(ci.undefined(t.endCharacter)||ci.uinteger(t.endCharacter))&&(ci.undefined(t.kind)||ci.string(t.kind))},(an=on||(on={})).create=function(e,t){return{location:e,message:t}},an.is=function(e){let t=e;return ci.defined(t)&&jt.is(t.location)&&ci.string(t.message)},(cn=ln||(ln={})).Error=1,cn.Warning=2,cn.Information=3,cn.Hint=4,(dn=hn||(hn={})).Unnecessary=1,dn.Deprecated=2,(un||(un={})).is=function(e){const t=e;return ci.objectLiteral(t)&&ci.string(t.href)},(mn=pn||(pn={})).create=function(e,t,n,r,i,s){let o={range:e,message:t};return ci.defined(n)&&(o.severity=n),ci.defined(r)&&(o.code=r),ci.defined(i)&&(o.source=i),ci.defined(s)&&(o.relatedInformation=s),o},mn.is=function(e){var t;let n=e;return ci.defined(n)&&$t.is(n.range)&&ci.string(n.message)&&(ci.number(n.severity)||ci.undefined(n.severity))&&(ci.integer(n.code)||ci.string(n.code)||ci.undefined(n.code))&&(ci.undefined(n.codeDescription)||ci.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(ci.string(n.source)||ci.undefined(n.source))&&(ci.undefined(n.relatedInformation)||ci.typedArray(n.relatedInformation,on.is))},(gn=fn||(fn={})).create=function(e,t,...n){let r={title:e,command:t};return ci.defined(n)&&n.length>0&&(r.arguments=n),r},gn.is=function(e){let t=e;return ci.defined(t)&&ci.string(t.title)&&ci.string(t.command)},(vn=bn||(bn={})).replace=function(e,t){return{range:e,newText:t}},vn.insert=function(e,t){return{range:{start:e,end:e},newText:t}},vn.del=function(e){return{range:e,newText:""}},vn.is=function(e){const t=e;return ci.objectLiteral(t)&&ci.string(t.newText)&&$t.is(t.range)},(wn=yn||(yn={})).create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},wn.is=function(e){const t=e;return ci.objectLiteral(t)&&ci.string(t.label)&&(ci.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ci.string(t.description)||void 0===t.description)},(Cn||(Cn={})).is=function(e){const t=e;return ci.string(t)},(kn=_n||(_n={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},kn.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},kn.del=function(e,t){return{range:e,newText:"",annotationId:t}},kn.is=function(e){const t=e;return bn.is(t)&&(yn.is(t.annotationId)||Cn.is(t.annotationId))},(Sn=xn||(xn={})).create=function(e,t){return{textDocument:e,edits:t}},Sn.is=function(e){let t=e;return ci.defined(t)&&zn.is(t.textDocument)&&Array.isArray(t.edits)},(Fn=En||(En={})).create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},Fn.is=function(e){let t=e;return t&&"create"===t.kind&&ci.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ci.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ci.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Cn.is(t.annotationId))},(In=Ln||(Ln={})).create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},In.is=function(e){let t=e;return t&&"rename"===t.kind&&ci.string(t.oldUri)&&ci.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ci.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ci.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Cn.is(t.annotationId))},(Nn=Tn||(Tn={})).create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},Nn.is=function(e){let t=e;return t&&"delete"===t.kind&&ci.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ci.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ci.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Cn.is(t.annotationId))},(Rn||(Rn={})).is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>ci.string(e.kind)?En.is(e)||Ln.is(e)||Tn.is(e):xn.is(e)))},(An=Dn||(Dn={})).create=function(e){return{uri:e}},An.is=function(e){let t=e;return ci.defined(t)&&ci.string(t.uri)},(On=Mn||(Mn={})).create=function(e,t){return{uri:e,version:t}},On.is=function(e){let t=e;return ci.defined(t)&&ci.string(t.uri)&&ci.integer(t.version)},(Pn=zn||(zn={})).create=function(e,t){return{uri:e,version:t}},Pn.is=function(e){let t=e;return ci.defined(t)&&ci.string(t.uri)&&(null===t.version||ci.integer(t.version))},(Wn=Bn||(Bn={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},Wn.is=function(e){let t=e;return ci.defined(t)&&ci.string(t.uri)&&ci.string(t.languageId)&&ci.integer(t.version)&&ci.string(t.text)},(Un=Vn||(Vn={})).PlainText="plaintext",Un.Markdown="markdown",Un.is=function(e){const t=e;return t===Un.PlainText||t===Un.Markdown},($n||($n={})).is=function(e){const t=e;return ci.objectLiteral(e)&&Vn.is(t.kind)&&ci.string(t.value)},(jn=qn||(qn={})).Text=1,jn.Method=2,jn.Function=3,jn.Constructor=4,jn.Field=5,jn.Variable=6,jn.Class=7,jn.Interface=8,jn.Module=9,jn.Property=10,jn.Unit=11,jn.Value=12,jn.Enum=13,jn.Keyword=14,jn.Snippet=15,jn.Color=16,jn.File=17,jn.Reference=18,jn.Folder=19,jn.EnumMember=20,jn.Constant=21,jn.Struct=22,jn.Event=23,jn.Operator=24,jn.TypeParameter=25,(Hn=Kn||(Kn={})).PlainText=1,Hn.Snippet=2,(Gn||(Gn={})).Deprecated=1,(Jn=Qn||(Qn={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},Jn.is=function(e){const t=e;return t&&ci.string(t.newText)&&$t.is(t.insert)&&$t.is(t.replace)},(Xn=Yn||(Yn={})).asIs=1,Xn.adjustIndentation=2,(Zn||(Zn={})).is=function(e){const t=e;return t&&(ci.string(t.detail)||void 0===t.detail)&&(ci.string(t.description)||void 0===t.description)},(er||(er={})).create=function(e){return{label:e}},(tr||(tr={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(rr=nr||(nr={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},rr.is=function(e){const t=e;return ci.string(t)||ci.objectLiteral(t)&&ci.string(t.language)&&ci.string(t.value)},(ir||(ir={})).is=function(e){let t=e;return!!t&&ci.objectLiteral(t)&&($n.is(t.contents)||nr.is(t.contents)||ci.typedArray(t.contents,nr.is))&&(void 0===e.range||$t.is(e.range))},(sr||(sr={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(or||(or={})).create=function(e,t,...n){let r={label:e};return ci.defined(t)&&(r.documentation=t),ci.defined(n)?r.parameters=n:r.parameters=[],r},(lr=ar||(ar={})).Text=1,lr.Read=2,lr.Write=3,(cr||(cr={})).create=function(e,t){let n={range:e};return ci.number(t)&&(n.kind=t),n},(dr=hr||(hr={})).File=1,dr.Module=2,dr.Namespace=3,dr.Package=4,dr.Class=5,dr.Method=6,dr.Property=7,dr.Field=8,dr.Constructor=9,dr.Enum=10,dr.Interface=11,dr.Function=12,dr.Variable=13,dr.Constant=14,dr.String=15,dr.Number=16,dr.Boolean=17,dr.Array=18,dr.Object=19,dr.Key=20,dr.Null=21,dr.EnumMember=22,dr.Struct=23,dr.Event=24,dr.Operator=25,dr.TypeParameter=26,(ur||(ur={})).Deprecated=1,(pr||(pr={})).create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s},(mr||(mr={})).create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}},(gr=fr||(fr={})).create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},gr.is=function(e){let t=e;return t&&ci.string(t.name)&&ci.number(t.kind)&&$t.is(t.range)&&$t.is(t.selectionRange)&&(void 0===t.detail||ci.string(t.detail))&&(void 0===t.deprecated||ci.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(vr=br||(br={})).Empty="",vr.QuickFix="quickfix",vr.Refactor="refactor",vr.RefactorExtract="refactor.extract",vr.RefactorInline="refactor.inline",vr.RefactorRewrite="refactor.rewrite",vr.Source="source",vr.SourceOrganizeImports="source.organizeImports",vr.SourceFixAll="source.fixAll",(wr=yr||(yr={})).Invoked=1,wr.Automatic=2,(_r=Cr||(Cr={})).create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},_r.is=function(e){let t=e;return ci.defined(t)&&ci.typedArray(t.diagnostics,pn.is)&&(void 0===t.only||ci.typedArray(t.only,ci.string))&&(void 0===t.triggerKind||t.triggerKind===yr.Invoked||t.triggerKind===yr.Automatic)},(xr=kr||(kr={})).create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):fn.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},xr.is=function(e){let t=e;return t&&ci.string(t.title)&&(void 0===t.diagnostics||ci.typedArray(t.diagnostics,pn.is))&&(void 0===t.kind||ci.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||fn.is(t.command))&&(void 0===t.isPreferred||ci.boolean(t.isPreferred))&&(void 0===t.edit||Rn.is(t.edit))},(Er=Sr||(Sr={})).create=function(e,t){let n={range:e};return ci.defined(t)&&(n.data=t),n},Er.is=function(e){let t=e;return ci.defined(t)&&$t.is(t.range)&&(ci.undefined(t.command)||fn.is(t.command))},(Lr=Fr||(Fr={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},Lr.is=function(e){let t=e;return ci.defined(t)&&ci.uinteger(t.tabSize)&&ci.boolean(t.insertSpaces)},(Tr=Ir||(Ir={})).create=function(e,t,n){return{range:e,target:t,data:n}},Tr.is=function(e){let t=e;return ci.defined(t)&&$t.is(t.range)&&(ci.undefined(t.target)||ci.string(t.target))},(Rr=Nr||(Nr={})).create=function(e,t){return{range:e,parent:t}},Rr.is=function(e){let t=e;return ci.objectLiteral(t)&&$t.is(t.range)&&(void 0===t.parent||Rr.is(t.parent))},(Ar=Dr||(Dr={})).namespace="namespace",Ar.type="type",Ar.class="class",Ar.enum="enum",Ar.interface="interface",Ar.struct="struct",Ar.typeParameter="typeParameter",Ar.parameter="parameter",Ar.variable="variable",Ar.property="property",Ar.enumMember="enumMember",Ar.event="event",Ar.function="function",Ar.method="method",Ar.macro="macro",Ar.keyword="keyword",Ar.modifier="modifier",Ar.comment="comment",Ar.string="string",Ar.number="number",Ar.regexp="regexp",Ar.operator="operator",Ar.decorator="decorator",(Or=Mr||(Mr={})).declaration="declaration",Or.definition="definition",Or.readonly="readonly",Or.static="static",Or.deprecated="deprecated",Or.abstract="abstract",Or.async="async",Or.modification="modification",Or.documentation="documentation",Or.defaultLibrary="defaultLibrary",(zr||(zr={})).is=function(e){const t=e;return ci.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(Br=Pr||(Pr={})).create=function(e,t){return{range:e,text:t}},Br.is=function(e){const t=e;return null!=t&&$t.is(t.range)&&ci.string(t.text)},(Vr=Wr||(Wr={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Vr.is=function(e){const t=e;return null!=t&&$t.is(t.range)&&ci.boolean(t.caseSensitiveLookup)&&(ci.string(t.variableName)||void 0===t.variableName)},($r=Ur||(Ur={})).create=function(e,t){return{range:e,expression:t}},$r.is=function(e){const t=e;return null!=t&&$t.is(t.range)&&(ci.string(t.expression)||void 0===t.expression)},(jr=qr||(qr={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},jr.is=function(e){const t=e;return ci.defined(t)&&$t.is(e.stoppedLocation)},(Hr=Kr||(Kr={})).Type=1,Hr.Parameter=2,Hr.is=function(e){return 1===e||2===e},(Qr=Gr||(Gr={})).create=function(e){return{value:e}},Qr.is=function(e){const t=e;return ci.objectLiteral(t)&&(void 0===t.tooltip||ci.string(t.tooltip)||$n.is(t.tooltip))&&(void 0===t.location||jt.is(t.location))&&(void 0===t.command||fn.is(t.command))},(Yr=Jr||(Jr={})).create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},Yr.is=function(e){const t=e;return ci.objectLiteral(t)&&Vt.is(t.position)&&(ci.string(t.label)||ci.typedArray(t.label,Gr.is))&&(void 0===t.kind||Kr.is(t.kind))&&void 0===t.textEdits||ci.typedArray(t.textEdits,bn.is)&&(void 0===t.tooltip||ci.string(t.tooltip)||$n.is(t.tooltip))&&(void 0===t.paddingLeft||ci.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ci.boolean(t.paddingRight))},(Xr||(Xr={})).createSnippet=function(e){return{kind:"snippet",value:e}},(Zr||(Zr={})).create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}},(ei||(ei={})).create=function(e){return{items:e}},(ni=ti||(ti={})).Invoked=0,ni.Automatic=1,(ri||(ri={})).create=function(e,t){return{range:e,text:t}},(ii||(ii={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(si||(si={})).is=function(e){const t=e;return ci.objectLiteral(t)&&Ot.is(t.uri)&&ci.string(t.name)},function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,l=0;for(;o{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(oi||(oi={}));var ci,hi=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Vt.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return Vt.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1e?r=i:n=i+1}let i=n-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function wi(e){const t=yi(e.range);return t!==e.range?{newText:e.newText,range:t}:e}(ui=di||(di={})).create=function(e,t,n,r){return new gi(e,t,n,r)},ui.update=function(e,t,n){if(e instanceof gi)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},ui.applyEdits=function(e,t){let n=e.getText(),r=bi(t.map(wi),(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),i=0;const s=[];for(const t of r){let r=e.offsetAt(t.range.start);if(ri&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")},(pi||(pi={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Vn.Markdown,Vn.PlainText]}},hover:{contentFormat:[Vn.Markdown,Vn.PlainText]}}},(fi=mi||(mi={}))[fi.Unknown=0]="Unknown",fi[fi.File=1]="File",fi[fi.Directory=2]="Directory",fi[fi.SymbolicLink=64]="SymbolicLink";var Ci={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function _i(e){switch(e){case"experimental":return"⚠️ Property is experimental. Be cautious when using it.️\n\n";case"nonstandard":return"🚨️ Property is nonstandard. Avoid using it.\n\n";case"obsolete":return"🚨️️️ Property is obsolete. Avoid using it.\n\n";default:return""}}function ki(e,t,n){let r;if(r=t?{kind:"markdown",value:Ei(e,n)}:{kind:"plaintext",value:Si(e,n)},""!==r.value)return r}function xi(e){return(e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(//g,">")}function Si(e,t){if(!e.description||""===e.description)return"";if("string"!=typeof e.description)return e.description.value;let n="";if(!1!==t?.documentation){e.status&&(n+=_i(e.status)),n+=e.description;const t=Fi(e.browsers);t&&(n+="\n("+t+")"),"syntax"in e&&(n+=`\n\nSyntax: ${e.syntax}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map(e=>`${e.name}: ${e.url}`).join(" | ")),n}function Ei(e,t){if(!e.description||""===e.description)return"";let n="";if(!1!==t?.documentation){e.status&&(n+=_i(e.status)),"string"==typeof e.description?n+=xi(e.description):n+=e.description.kind===Vn.Markdown?e.description.value:xi(e.description.value);const t=Fi(e.browsers);t&&(n+="\n\n("+xi(t)+")"),"syntax"in e&&e.syntax&&(n+=`\n\nSyntax: ${xi(e.syntax)}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | ")),n}function Fi(e=[]){return 0===e.length?null:e.map(e=>{let t="";const n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in Ci&&(t+=Ci[r]),i&&(t+=" "+i),t}).join(", ")}var Li=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,Ii=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:Dt("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:Dt("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:Dt("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:Dt("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:Dt("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:Dt("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:Dt("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:Dt("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:Dt("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:Dt("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:Dt("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:Dt("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:Dt("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:Dt("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:Dt("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:Dt("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:Dt("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:Dt("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:Dt("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:Dt("Mix two colors together in a polar color space.")}],Ti=/^(rgb|rgba|hsl|hsla|hwb)$/i,Ni={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Ri=new RegExp(`^(${Object.keys(Ni).join("|")})$`,"i"),Di={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},Ai=new RegExp(`^(${Object.keys(Di).join("|")})$`,"i");function Mi(e,t){const n=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(n){n[2]&&(t=100);const e=parseFloat(n[1])/t;if(e>=0&&e<=1)return e}throw new Error}function Oi(e){const t=e.getText(),n=t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(t)%360;case"rad":return 180*parseFloat(t)/Math.PI%360;case"grad":return.9*parseFloat(t)%360;case"turn":return 360*parseFloat(t)%360;default:if(void 0===n[2])return parseFloat(t)%360}throw new Error}function zi(e){return Li.test(e)||Ri.test(e)||Ai.test(e)}function Pi(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Bi(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*Pi(e.charCodeAt(1))/255,green:17*Pi(e.charCodeAt(2))/255,blue:17*Pi(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Pi(e.charCodeAt(1))/255,green:17*Pi(e.charCodeAt(2))/255,blue:17*Pi(e.charCodeAt(3))/255,alpha:17*Pi(e.charCodeAt(4))/255};case 7:return{red:(16*Pi(e.charCodeAt(1))+Pi(e.charCodeAt(2)))/255,green:(16*Pi(e.charCodeAt(3))+Pi(e.charCodeAt(4)))/255,blue:(16*Pi(e.charCodeAt(5))+Pi(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Pi(e.charCodeAt(1))+Pi(e.charCodeAt(2)))/255,green:(16*Pi(e.charCodeAt(3))+Pi(e.charCodeAt(4)))/255,blue:(16*Pi(e.charCodeAt(5))+Pi(e.charCodeAt(6)))/255,alpha:(16*Pi(e.charCodeAt(7))+Pi(e.charCodeAt(8)))/255}}return null}function Wi(e,t,n,r=1){if(0===t)return{red:n,green:n,blue:n,alpha:r};{const i=(e,t,n)=>{for(;n<0;)n+=6;for(;n>=6;)n-=6;return n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e},s=n<=.5?n*(t+1):n+t-n*t,o=2*n-s;return{red:i(o,s,2+(e/=60)),green:i(o,s,e),blue:i(o,s,e-2),alpha:r}}}function Vi(e){const t=e.red,n=e.green,r=e.blue,i=e.alpha,s=Math.max(t,n,r),o=Math.min(t,n,r);let a=0,l=0;const c=(o+s)/2,h=s-o;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case t:a=(n-r)/h+(ne[t])}function is(e){return void 0!==e}var ss=class{constructor(e=new ie){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:o.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return o.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return o.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return o.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return-1!==e.indexOf(this.token.type)}peekRegExp(e,t){return e===this.token.type&&t.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){const e=this.scanner.tryScanUnicode();return!!e&&(this.prevToken=e,this.token=this.scanner.scan(),!0)}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){const t=this.mark();return e()||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(o.AtKeyword===this.token.type)for(const t of e)if(t.length===this.token.text.length&&t===this.token.text.toLowerCase())return this.consumeToken(),!0;return!1}accept(e){return e===this.token.type&&(this.consumeToken(),!0)}acceptIdent(e){return!!this.peekIdent(e)&&(this.consumeToken(),!0)}acceptKeyword(e){return!!this.peekKeyword(e)&&(this.consumeToken(),!0)}acceptDelim(e){return!!this.peekDelim(e)&&(this.consumeToken(),!0)}acceptRegexp(e){return!!e.test(this.token.text)&&(this.consumeToken(),!0)}_parseRegexp(e){let t=this.createNode(ee.Identifier);do{}while(this.acceptRegexp(e));return this.finish(t)}acceptUnquotedString(){const e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);const t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,t){for(;;){if(e&&-1!==e.indexOf(this.token.type))return this.consumeToken(),!0;if(t&&-1!==t.indexOf(this.token.type))return!0;if(this.token.type===o.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new pe(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,n,r){if(!(e instanceof me)&&(t&&this.markError(e,t,n,r),this.prevToken)){const t=this.prevToken.offset+this.prevToken.len;e.length=t>e.offset?t-e.offset:0}return e}markError(e,t,n,r){this.token!==this.lastErrorToken&&(e.addIssue(new Nt(e,t,de.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||r)&&this.resync(n,r)}parseStylesheet(e){const t=e.version,n=e.getText();return this.internalParse(n,this._parseStylesheet,(r,i)=>{if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return n.substr(r,i)})}internalParse(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();const r=t.bind(this)();return r&&(r.textProvider=n||((t,n)=>e.substr(t,n))),r}_parseStylesheet(){const e=this.create(be);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let n=!1;do{n=!1;const r=this._parseStylesheetStatement();for(r&&(e.addChild(r),n=!0,t=!1,this.peek(o.EOF)||!this._needsSemicolonAfter(r)||this.accept(o.SemiColon)||this.markError(e,li.SemiColonExpected));this.accept(o.SemiColon)||this.accept(o.CDO)||this.accept(o.CDC);)n=!0,t=!1}while(n);if(this.peek(o.EOF))break;t||(this.peek(o.AtKeyword)?this.markError(e,li.UnknownAtRule):this.markError(e,li.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(o.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(o.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){const t=this.mark();if(this._parseSelector(e)){for(;this.accept(o.Comma)&&this._parseSelector(e););if(this.accept(o.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){const t=this.create(we),n=t.getSelectors();if(!n.addChild(this._parseSelector(e)))return null;for(;this.accept(o.Comma);)if(!n.addChild(this._parseSelector(e)))return this.finish(t,li.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(o.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(o.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case ee.Keyframe:case ee.ViewPort:case ee.Media:case ee.Ruleset:case ee.Namespace:case ee.If:case ee.For:case ee.Each:case ee.While:case ee.MixinDeclaration:case ee.FunctionDeclaration:case ee.MixinContentDeclaration:return!1;case ee.ExtendsReference:case ee.MixinContentReference:case ee.ReturnStatement:case ee.MediaQuery:case ee.Debug:case ee.Import:case ee.AtApplyRule:case ee.CustomPropertyDeclaration:return!0;case ee.VariableDeclaration:return e.needsSemicolon;case ee.MixinReference:return!e.getContent();case ee.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const t=this.create(ve);if(!this.accept(o.CurlyL))return null;let n=e();for(;t.addChild(n)&&!this.peek(o.CurlyR);){if(this._needsSemicolonAfter(n)&&!this.accept(o.SemiColon))return this.finish(t,li.SemiColonExpected,[o.SemiColon,o.CurlyR]);for(n&&this.prevToken&&this.prevToken.type===o.SemiColon&&(n.semicolonPosition=this.prevToken.offset);this.accept(o.SemiColon););n=e()}return this.accept(o.CurlyR)?this.finish(t):this.finish(t,li.RightCurlyExpected,[o.CurlyR,o.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,li.LeftCurlyExpected,[o.CurlyR,o.SemiColon])}_parseSelector(e){const t=this.create(Ce);let n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)n=!0,t.addChild(this._parseCombinator());return n?this.finish(t):null}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const n=this.create(Se);return n.setProperty(this._parseProperty())?this.accept(o.Colon)?(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseExpr())?(n.addChild(this._parsePrio()),this.peek(o.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):this.finish(n,li.PropertyValueExpected)):this.finish(n,li.ColonExpected,[o.Colon],e||[o.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(o.Ident,/^--/))return null;const t=this.create(Ee);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(o.Colon))return this.finish(t,li.ColonExpected,[o.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);const n=this.mark();if(this.peek(o.CurlyL)){const e=this.create(xe),r=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(e.setDeclarations(r)&&!r.isErroneous(!0)&&(e.addChild(this._parsePrio()),this.peek(o.SemiColon)))return this.finish(e),t.setPropertySet(e),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(n)}const r=this._parseExpr();return r&&!r.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],o.SemiColon,o.EOF))?(t.setValue(r),this.peek(o.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(n),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),is(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,li.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[o.CurlyR]){const t=this.create(pe),n=()=>0===i&&0===s&&0===a,r=()=>-1!==e.indexOf(this.token.type);let i=0,s=0,a=0;e:for(;;){switch(this.token.type){case o.SemiColon:case o.Exclamation:if(n())break e;break;case o.CurlyL:i++;break;case o.CurlyR:if(i--,i<0){if(r()&&0===s&&0===a)break e;return this.finish(t,li.LeftCurlyExpected)}break;case o.ParenthesisL:s++;break;case o.ParenthesisR:if(s--,s<0){if(r()&&0===a&&0===i)break e;return this.finish(t,li.LeftParenthesisExpected)}break;case o.BracketL:a++;break;case o.BracketR:if(a--,a<0)return this.finish(t,li.LeftSquareBracketExpected);break;case o.BadString:break e;case o.EOF:let e=li.RightCurlyExpected;return a>0?e=li.RightSquareBracketExpected:s>0&&(e=li.RightParenthesisExpected),this.finish(t,e)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){const t=this.mark();return this._parseProperty()&&this.accept(o.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){const e=this.create(Fe),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(o.Charset))return null;const e=this.create(pe);return this.consumeToken(),this.accept(o.String)?this.accept(o.SemiColon)?this.finish(e):this.finish(e,li.SemiColonExpected):this.finish(e,li.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create($e);return this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?this._completeParseImport(e):this.finish(e,li.URIOrStringExpected)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(o.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,li.IdentifierExpected,[o.SemiColon]);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[o.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(o.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(o.ParenthesisR))?this.finish(e,li.RightParenthesisExpected,[o.ParenthesisR],[]):(this.peek(o.SemiColon)||this.peek(o.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(Ge);return this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this.accept(o.SemiColon)?this.finish(e):this.finish(e,li.SemiColonExpected):this.finish(e,li.URIExpected,[o.SemiColon])}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(Be);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;const e=this.create(Pe);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(o.AtKeyword,this.keyframeRegex))return null;const e=this.create(Ve),t=this.create(pe);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,li.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,li.IdentifierExpected,[o.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([ne.Keyframe])}_parseKeyframeSelector(){const e=this.create(Ue);let t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(o.Percentage)&&(t=!0),!t)return null;for(;this.accept(o.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(o.Percentage)&&(t=!0),!t)return this.finish(e,li.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(Ue),t=this.mark();let n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(o.Percentage)&&(n=!0),!n)return null;for(;this.accept(o.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(o.Percentage)&&(n=!0),!n)return this.restoreAtMark(t),null;return this.peek(o.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(Xe);return this.consumeToken(),this.peekRegExp(o.Ident,/^--/)&&e.setName(this._parseIdent([ne.Property]))?this._parseBody(e,this._parseDeclaration.bind(this)):this.finish(e,li.IdentifierExpected)}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const t=this.create(Ye);this.consumeToken();const n=this._parseLayerNameList();return n&&t.setNames(n),n&&1!==n.getChildren().length||!this.peek(o.CurlyL)?this.accept(o.SemiColon)?this.finish(t):this.finish(t,li.SemiColonExpected):this._parseBody(t,this._parseLayerDeclaration.bind(this,e))}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){const e=this.createNode(ee.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(o.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,li.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(ee.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,li.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const t=this.create(Je);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){const e=this.create(st);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(o.Ident,/^(and|or)$/i)){const t=this.token.text.toLowerCase();for(;this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){const e=this.create(st);if(this.accept(o.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration([o.ParenthesisR]))||this._parseSupportsCondition()?this.accept(o.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,li.RightParenthesisExpected,[o.ParenthesisR],[]):this.finish(e,li.ConditionExpected);if(this.peek(o.Ident)){const t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(o.ParenthesisL)){let t=1;for(;this.token.type!==o.EOF&&0!==t;)this.token.type===o.ParenthesisL?t++:this.token.type===o.ParenthesisR&&t--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,li.LeftParenthesisExpected,[],[o.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;const t=this.create(Qe);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,li.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(tt);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,li.MediaQueryExpected);for(;this.accept(o.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,li.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(nt),t=this.mark();if(this.acceptIdent("not"),this.peek(o.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){const e=this.mark(),t=this.create(pt);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,li.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(rt);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(o.ParenthesisL))return this.finish(e,li.LeftParenthesisExpected,[],[o.CurlyL]);if(this.peek(o.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[],[o.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[o.ParenthesisR],t=this.create(it);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(o.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,li.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,li.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,li.TermExpected,[],e)}}else{if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,li.IdentifierExpected,[],e);if(!this._parseMediaFeatureRangeOperator())return this.finish(t,li.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,li.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,li.TermExpected,[],e)}return this.finish(t)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){const e=this.create(pe);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;const e=this.create(ot);if(this.consumeToken(),e.addChild(this._parsePageSelector()))for(;this.accept(o.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,li.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(o.AtKeyword))return null;const e=this.create(at);return this.acceptOneKeyword(ns)||this.markError(e,li.UnknownAtRule,[],[o.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(o.Ident)&&!this.peek(o.Colon))return null;const e=this.create(pe);return e.addChild(this._parseIdent()),this.accept(o.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,li.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(Ze);return this.consumeToken(),this.resync([],[o.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;const t=this.create(et);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(pe);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){const e=this.create(pe);if(this.accept(o.ParenthesisL)){if(this.peekIdent("not")||this.peek(o.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[],[o.CurlyL])}else{if(!this.acceptIdent("style"))return this.finish(e,li.LeftParenthesisExpected,[],[o.CurlyL]);if(this.hasWhitespace()||!this.accept(o.ParenthesisL))return this.finish(e,li.LeftParenthesisExpected,[],[o.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[],[o.CurlyL])}return this.finish(e)}_parseStyleQuery(){const e=this.create(pe);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(o.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([o.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(pe);return this.accept(o.ParenthesisL)?(e.addChild(this._parseStyleQuery()),this.accept(o.ParenthesisR)?this.finish(e):this.finish(e,li.RightParenthesisExpected,[],[o.CurlyL])):this.finish(e,li.LeftParenthesisExpected,[],[o.CurlyL])}_parseUnknownAtRule(){if(!this.peek(o.AtKeyword))return null;const e=this.create(Et);e.addChild(this._parseUnknownAtRuleName());const t=()=>0===r&&0===i&&0===s;let n=0,r=0,i=0,s=0;e:for(;;){switch(this.token.type){case o.SemiColon:if(t())break e;break;case o.EOF:return r>0?this.finish(e,li.RightCurlyExpected):s>0?this.finish(e,li.RightSquareBracketExpected):i>0?this.finish(e,li.RightParenthesisExpected):this.finish(e);case o.CurlyL:n++,r++;break;case o.CurlyR:if(r--,n>0&&0===r){if(this.consumeToken(),s>0)return this.finish(e,li.RightSquareBracketExpected);if(i>0)return this.finish(e,li.RightParenthesisExpected);break e}if(r<0){if(0===i&&0===s)break e;return this.finish(e,li.LeftCurlyExpected)}break;case o.ParenthesisL:i++;break;case o.ParenthesisR:if(i--,i<0)return this.finish(e,li.LeftParenthesisExpected);break;case o.BracketL:s++;break;case o.BracketR:if(s--,s<0)return this.finish(e,li.LeftSquareBracketExpected)}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(pe);return this.accept(o.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(o.Dashmatch)||this.peek(o.Includes)||this.peek(o.SubstringOperator)||this.peek(o.PrefixOperator)||this.peek(o.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(ee.Operator);return this.consumeToken(),this.finish(e)}return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(pe);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(pe);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=ee.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=ee.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){const e=this.create(pe);return this.consumeToken(),e.type=ee.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){const e=this.create(pe);return this.consumeToken(),e.type=ee.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){const e=this.create(pe);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=ee.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){const e=this.create(_e);let t=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&t++;(0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(ee.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(o.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(ee.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,li.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(ee.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,li.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),t=this.createNode(ee.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),t.addChild(this._parseSelectorIdent())||this.acceptDelim("*")?this.finish(t):(this.restoreAtMark(e),null)}_parseNamespacePrefix(){const e=this.mark(),t=this.createNode(ee.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(o.BracketL))return null;const e=this.create(dt);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(o.BracketR)?this.finish(e):this.finish(e,li.RightSquareBracketExpected)):this.finish(e,li.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(o.ParenthesisL)){const t=()=>{const e=this.create(pe);if(!e.addChild(this._parseSelector(!0)))return null;for(;this.accept(o.Comma)&&e.addChild(this._parseSelector(!0)););return this.peek(o.ParenthesisR)?this.finish(e):null};if(!e.addChild(this.try(t))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(t)))return this.finish(e,li.SelectorExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(o.Colon))return null;const e=this.mark(),t=this.createNode(ee.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(o.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,li.IdentifierExpected):this.finish(t))}_tryParsePrio(){const e=this.mark();return this._parsePrio()||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(o.Exclamation))return null;const e=this.createNode(ee.Prio);return this.accept(o.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const t=this.create(lt);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(o.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;const e=this.create(fe);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(o.BracketL))return null;const e=this.createNode(ee.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(o.BracketR)?this.finish(e):this.finish(e,li.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let n=this.create(ct);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,li.TermExpected);n=this.finish(n);const r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)}_parseTerm(){let e=this.create(ht);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(o.ParenthesisL))return null;const e=this.create(pe);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(o.ParenthesisR)?this.finish(e):this.finish(e,li.RightParenthesisExpected)}_parseNumeric(){if(this.peek(o.Num)||this.peek(o.Percentage)||this.peek(o.Resolution)||this.peek(o.Length)||this.peek(o.EMS)||this.peek(o.EXS)||this.peek(o.Angle)||this.peek(o.Time)||this.peek(o.Dimension)||this.peek(o.ContainerQueryLength)||this.peek(o.Freq)){const e=this.create(bt);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(o.String)&&!this.peek(o.BadString))return null;const e=this.createNode(ee.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(o.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),t=this.createNode(ee.URILiteral);return this.accept(o.Ident),this.hasWhitespace()||!this.peek(o.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(o.ParenthesisR)?this.finish(t):this.finish(t,li.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(pe);return this.accept(o.String)||this.accept(o.BadString)||this.acceptUnquotedString()?this.finish(e):null}_parseIdent(e){if(!this.peek(o.Ident))return null;const t=this.create(ge);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(o.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){const e=this.mark(),t=this.create(Ie);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(o.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,li.ExpressionExpected);return this.accept(o.ParenthesisR)?this.finish(t):this.finish(t,li.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(o.Ident))return null;const e=this.create(ge);if(e.referenceTypes=[ne.Function],this.acceptIdent("progid")){if(this.accept(o.Colon))for(;this.accept(o.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(Ne);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(o.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){const e=this.create(ut);return this.consumeToken(),this.finish(e)}return null}};function os(e,t){return-1!==e.indexOf(t)}function as(...e){const t=[];for(const n of e)for(const e of n)os(t,e)||t.push(e);return t}var ls,cs=class{constructor(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,t=0){return this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){const n=e+t,r=function(e,t){let n=0,r=e.length;if(0===r)return 0;for(;ne.offset>n);if(0===r)return this;const i=this.children[r-1];return i.offset<=e&&i.offset+i.length>=e+t?i.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let n=0;n{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else o>c&&(47===e.charCodeAt(i+d)?h=d:0===d&&(h=0));break}var u=e.charCodeAt(i+d);if(u!==n.charCodeAt(a+d))break;47===u&&(h=d)}var p="";for(d=i+h+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+h):(a+=h,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!o){i=r+1;break}}else-1===l&&(o=!1,l=r+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=l))}return i===s?s=l:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(s=!1,i=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return n=(t=e).dir||t.root,r=t.base||(t.name||"")+(t.ext||""),n?n===t.root?n+r:n+"/"+r:r;var t,n,r},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,l=-1,c=!0,h=e.length-1,d=0;h>=r;--h)if(47!==(i=e.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===i?-1===o?o=h:1!==d&&(d=1):-1!==o&&(d=-1);else if(!c){a=h+1;break}return-1===o||-1===l||0===d||1===d&&o===l-1&&o===a+1?-1!==l&&(n.base=n.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(a,o),n.base=e.slice(a,l)),n.ext=e.slice(o,l)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>h,Utils:()=>x}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",l="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,n||a),this.query=r||a,this.fragment=i||a,o(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===i?i=this.query:null===i&&(i=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new u(t,n,r,i,s)}static parse(e,t=!1){const n=c.exec(e);return n?new u(n[2]||a,w(n[4]||a),w(n[5]||a),w(n[7]||a),w(n[9]||a),t):new u(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){const e=t.indexOf(l,2);-1===e?(n=t.substring(2),t=l):(n=t.substring(2,e),t=t.substring(e)||l)}return new u("file",n,t,a,a)}static from(e){const t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class u extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=p[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function f(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function b(e,t){const n=t?f:m;let r="",{scheme:i,authority:s,path:o,query:a,fragment:c}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=l,r+=l),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:m(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}const y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(y)?e.replace(y,e=>v(e)):e}var C=n(470);const _=C.posix||C,k="/";var x,S;(S=x||(x={})).joinPath=function(e,...t){return e.with({path:_.join(e.path,...t)})},S.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=_.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},S.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=_.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},S.basename=function(e){return _.basename(e.path)},S.extname=function(e){return _.extname(e.path)}})(),ls=r})();var{URI:ms,Utils:fs}=ls;function gs(e){return fs.dirname(ms.parse(e)).toString(!0)}function bs(e,...t){return fs.joinPath(ms.parse(e),...t).toString(!0)}var vs=class{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){const n={items:[],isIncomplete:!1};for(const r of this.literalCompletions){const i=r.uriValue,s=ws(i);if("."===s||".."===s)n.isIncomplete=!0;else{const s=await this.providePathSuggestions(i,r.position,r.range,e,t);for(let e of s)n.items.push(e)}}for(const r of this.importCompletions){const i=r.pathValue,s=ws(i);if("."===s||".."===s)n.isIncomplete=!0;else{let s=await this.providePathSuggestions(i,r.position,r.range,e,t);"scss"===e.languageId&&s.forEach(e=>{se(e.label,"_")&&oe(e.label,".scss")&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))});for(let e of s)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,r,i){const s=ws(e),o=se(e,"'")||se(e,'"'),a=o?s.slice(0,t.character-(n.start.character+1)):s.slice(0,t.character-n.start.character),l=r.uri,c=function(e,t,n){let r;const i=e.lastIndexOf("/");if(-1===i)r=n;else{const e=t.slice(i+1),s=ks(n.end,-e.length),o=e.indexOf(" ");let a;a=-1!==o?ks(s,o):n.end,r=$t.create(s,a)}return r}(a,s,o?function(e){const t=ks(e.start,1),n=ks(e.end,-1);return $t.create(t,n)}(n):n),h=a.substring(0,a.lastIndexOf("/")+1);let d=i.resolveReference(h||".",l);if(d)try{const e=[],t=await this.readDirectory(d);for(const[n,r]of t)n.charCodeAt(0)===ys||r!==mi.Directory&&bs(d,n)===l||e.push(Cs(n,r===mi.Directory,c));return e}catch(e){}return[]}},ys=".".charCodeAt(0);function ws(e){return se(e,"'")||se(e,'"')?e.slice(1,-1):e}function Cs(e,t,n){return t?{label:_s(e+="/"),kind:qn.Folder,textEdit:bn.replace(n,_s(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}:{label:_s(e),kind:qn.File,textEdit:bn.replace(n,_s(e))}}function _s(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function ks(e,t){return Vt.create(e.line,e.character+t)}var xs,Ss,Es=Kn.Snippet,Fs={title:"Suggest",command:"editor.action.triggerSuggest"};(Ss=xs||(xs={})).Enums=" ",Ss.Normal="d",Ss.VendorPrefixed="x",Ss.Term="y",Ss.Variable="z";var Ls=class{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new ps(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,r,i=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,i);const s=new vs(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[s].concat(o);const a=this.doComplete(e,t,n,i);try{const t=await s.computeCompletions(e,r);return{isIncomplete:a.isIncomplete||t.isIncomplete,itemDefaults:a.itemDefaults,items:t.items.concat(a.items)}}finally{this.completionParticipants=o}}doComplete(e,t,n,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=function(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}(e,this.offset),this.defaultReplaceRange=$t.create(Vt.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=r;try{const e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=he(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(n instanceof Fe)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof lt)n.parent instanceof yt?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof _e){const t=n.findAParent(ee.ExtendsReference,ee.Ruleset);if(t)if(t.type===ee.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{const n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof Ne)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof ve)this.getCompletionsForDeclarations(n,e);else if(n instanceof vt)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof we)this.getCompletionsForRuleSet(n,e);else if(n instanceof yt)this.getCompletionsForInterpolation(n,e);else if(n instanceof ze)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof xt)this.getCompletionsForMixinReference(n,e);else if(n instanceof Ie)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof Je)this.getCompletionsForSupports(n,e);else if(n instanceof st)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof Ct)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===ee.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(null===n.parent)this.getCompletionForTopLevel(e);else{if(n.type!==ee.StringLiteral||!this.isImportPathParent(n.parent.type))continue;this.getCompletionForImportPath(n,e)}if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),0===e.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,e),this.finalize(e)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===ee.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(-1!==e.indexOf(n.type))return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){const n=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(i=>{let s,o,a=!1;e?(s=this.getCompletionRange(e.getProperty()),o=i.name,is(e.colonPosition)||(o+=": ",a=!0)):(s=this.getCompletionRange(null),o=i.name+": ",a=!0),!e&&r&&(o+="$0;"),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(s.end)&&(o+="$0;");const l={label:i.name,documentation:ki(i,this.doesSupportMarkdown()),tags:Is(i)?[Gn.Deprecated]:[],textEdit:bn.replace(s,o),insertTextFormat:Kn.Snippet,kind:qn.Property};i.restrictions||(a=!1),n&&a&&(l.command=Fs);const c=(255-("number"==typeof i.relevance?Math.min(Math.max(i.relevance,0),99):50)).toString(16),h=se(i.name,"-")?xs.VendorPrefixed:xs.Normal;l.sortText=h+"_"+c,t.items.push(l)}),this.completionParticipants.forEach(e=>{e.onCssProperty&&e.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){const n=e.getFullPropertyName(),r=this.cssDataManager.getProperty(n);let i=e.getValue()||null;for(;i&&i.hasChildren();)i=i.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(i)})}),r){if(r.restrictions)for(const e of r.restrictions)switch(e){case"color":this.getColorProposals(r,i,t);break;case"position":this.getPositionProposals(r,i,t);break;case"repeat":this.getRepeatStyleProposals(r,i,t);break;case"line-style":this.getLineStyleProposals(r,i,t);break;case"line-width":this.getLineWidthProposals(r,i,t);break;case"geometry-box":this.getGeometryBoxProposals(r,i,t);break;case"box":this.getBoxProposals(r,i,t);break;case"image":this.getImageProposals(r,i,t);break;case"timing-function":this.getTimingFunctionProposals(r,i,t);break;case"shape":this.getBasicShapeProposals(r,i,t)}this.getValueEnumProposals(r,i,t),this.getCSSWideKeywordProposals(r,i,t),this.getUnitProposals(r,i,t)}else{const n=function(e,t){const n=t.getFullPropertyName(),r=new Ts;function i(e){return(e instanceof ge||e instanceof bt||e instanceof ut)&&r.add(e.getText()),!0}return e.accept(function(e){if(e instanceof Se&&e!==t&&function(e){const t=e.getFullPropertyName();return n===t}(e)){const t=e.getValue();t&&t.accept(i)}return!0}),r}(this.styleSheet,e);for(const e of n.getEntries())t.items.push({label:e,textEdit:bn.replace(this.getCompletionRange(i),e),kind:qn.Value})}return this.getVariableProposals(i,t),this.getTermProposals(r,i,t),t}getValueEnumProposals(e,t,n){if(e.values)for(const r of e.values){let i,s=r.name;if(oe(s,")")){const e=s.lastIndexOf("(");-1!==e&&(s=s.substring(0,e+1)+"$1"+s.substring(e+1),i=Es)}let o=xs.Enums;se(r.name,"-")&&(o+=xs.VendorPrefixed);const a={label:r.name,documentation:ki(r,this.doesSupportMarkdown()),tags:Is(e)?[Gn.Deprecated]:[],textEdit:bn.replace(this.getCompletionRange(t),s),sortText:o,kind:qn.Value,insertTextFormat:i};n.items.push(a)}return n}getCSSWideKeywordProposals(e,t,n){for(const e in Gi)n.items.push({label:e,documentation:Gi[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});for(const e in Qi){const r=Ns(e);n.items.push({label:e,documentation:Qi[e],textEdit:bn.replace(this.getCompletionRange(t),r),kind:qn.Function,insertTextFormat:Es,command:se(e,"var")?Fs:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){const n=this.getSymbolContext().findSymbolsAtOffset(this.offset,ne.Variable);for(const r of n){const n=se(r.name,"--")?`var(${r.name})`:r.name,i={label:r.name,documentation:r.value?ae(r.value):r.value,textEdit:bn.replace(this.getCompletionRange(e),n),kind:qn.Variable,sortText:xs.Variable};if("string"==typeof i.documentation&&zi(i.documentation)&&(i.kind=qn.Color),r.node.type===ee.FunctionParameter){const e=r.node.getParent();e.type===ee.MixinDeclaration&&(i.detail=Dt("argument from '{0}'",e.getName()))}t.items.push(i)}return t}getVariableProposalsForCSSVarFunction(e){const t=new Ts;this.styleSheet.acceptVisitor(new As(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,ne.Variable);for(const r of n){if(se(r.name,"--")){const t={label:r.name,documentation:r.value?ae(r.value):r.value,textEdit:bn.replace(this.getCompletionRange(null),r.name),kind:qn.Variable};"string"==typeof t.documentation&&zi(t.documentation)&&(t.kind=qn.Color),e.items.push(t)}t.remove(r.name)}for(const n of t.getEntries())if(se(n,"--")){const t={label:n,textEdit:bn.replace(this.getCompletionRange(null),n),kind:qn.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let r="0";if(this.currentWord.length>0){const e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(r=e[0],n.isIncomplete=r.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===ee.Term&&(t=t.getParent()),e.restrictions)for(const i of e.restrictions){const e=Zi[i];if(e)for(const i of e){const e=r+i;n.items.push({label:e,textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const t=-1!==e.end?this.textDocument.positionAt(e.end):this.position,n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return $t.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(const e in Ni)n.items.push({label:e,documentation:Ni[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Color});for(const e in Di)n.items.push({label:e,documentation:Di[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});const r=new Ts;this.styleSheet.acceptVisitor(new Ds(r,this.offset));for(const e of r.getEntries())n.items.push({label:e,textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Color});for(const e of Ii)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:bn.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:Es,kind:qn.Function});return n}getPositionProposals(e,t,n){for(const e in Ui)n.items.push({label:e,documentation:Ui[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});return n}getRepeatStyleProposals(e,t,n){for(const e in $i)n.items.push({label:e,documentation:$i[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});return n}getLineStyleProposals(e,t,n){for(const e in qi)n.items.push({label:e,documentation:qi[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});return n}getLineWidthProposals(e,t,n){for(const e of ji)n.items.push({label:e,textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});return n}getGeometryBoxProposals(e,t,n){for(const e in Hi)n.items.push({label:e,documentation:Hi[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});return n}getBoxProposals(e,t,n){for(const e in Ki)n.items.push({label:e,documentation:Ki[e],textEdit:bn.replace(this.getCompletionRange(t),e),kind:qn.Value});return n}getImageProposals(e,t,n){for(const e in Ji){const r=Ns(e);n.items.push({label:e,documentation:Ji[e],textEdit:bn.replace(this.getCompletionRange(t),r),kind:qn.Function,insertTextFormat:e!==r?Es:void 0})}return n}getTimingFunctionProposals(e,t,n){for(const e in Yi){const r=Ns(e);n.items.push({label:e,documentation:Yi[e],textEdit:bn.replace(this.getCompletionRange(t),r),kind:qn.Function,insertTextFormat:e!==r?Es:void 0})}return n}getBasicShapeProposals(e,t,n){for(const e in Xi){const r=Ns(e);n.items.push({label:e,documentation:Xi[e],textEdit:bn.replace(this.getCompletionRange(t),r),kind:qn.Function,insertTextFormat:e!==r?Es:void 0})}return n}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof we?this.getCompletionsForRuleSet(t,e):t instanceof Je?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:bn.replace(this.getCompletionRange(null),t.name),documentation:ki(t,this.doesSupportMarkdown()),tags:Is(t)?[Gn.Deprecated]:[],kind:qn.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){const n=e.getDeclarations();return n&&n.endsWith("}")&&this.offset>=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){const r=this.findInNodePath(ee.PseudoSelector,ee.IdentifierSelector,ee.ClassSelector,ee.ElementNameSelector);if(!r&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=$t.create(Vt.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(e=>{const t=Ns(e.name),i={label:e.name,textEdit:bn.replace(this.getCompletionRange(r),t),documentation:ki(e,this.doesSupportMarkdown()),tags:Is(e)?[Gn.Deprecated]:[],kind:qn.Function,insertTextFormat:e.name!==t?Es:void 0};se(e.name,":-")&&(i.sortText=xs.VendorPrefixed),n.items.push(i)}),this.cssDataManager.getPseudoElements().forEach(e=>{const t=Ns(e.name),i={label:e.name,textEdit:bn.replace(this.getCompletionRange(r),t),documentation:ki(e,this.doesSupportMarkdown()),tags:Is(e)?[Gn.Deprecated]:[],kind:qn.Function,insertTextFormat:e.name!==t?Es:void 0};se(e.name,"::-")&&(i.sortText=xs.VendorPrefixed),n.items.push(i)}),!t){for(const e of es)n.items.push({label:e,textEdit:bn.replace(this.getCompletionRange(r),e),kind:qn.Keyword});for(const e of ts)n.items.push({label:e,textEdit:bn.replace(this.getCompletionRange(r),e),kind:qn.Keyword})}const i={};i[this.currentWord]=!0;const s=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===ee.SimpleSelector&&e.length>0){const t=s.substr(e.offset,e.length);return"."!==t.charAt(0)||i[t]||(i[t]=!0,n.items.push({label:t,textEdit:bn.replace(this.getCompletionRange(r),t),kind:qn.Keyword})),!1}return!0}),e&&e.isNested()){const t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&0===e.getSelectors().getChildren().indexOf(t)&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;const n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof ke){const e=n;if(!is(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(is(e.semicolonPosition)&&e.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const n=e.getParent();if(n instanceof Ne)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;const r=e.findParent(ee.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;const i=e.findChildAtOffset(this.offset,!0);return i?i instanceof bt||i instanceof ge?this.getCompletionsForDeclarationValue(r,t):t:this.getCompletionsForDeclarationValue(r,t)}getCompletionsForFunctionArgument(e,t,n){const r=t.getIdentifier();return r&&r.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(n)),n}getCompletionsForFunctionDeclaration(e,t){const n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),t}getTermProposals(e,t,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,ne.Function);for(const e of r)e.node instanceof ze&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;const r=t.getChildren().map(e=>e instanceof Te?e.getName():e.getText()),i=e.name+"("+r.map((e,t)=>"${"+(t+1)+":"+e+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+r.join(", ")+")",textEdit:bn.replace(this.getCompletionRange(n),i),insertTextFormat:Es,kind:qn.Function,sortText:xs.Term}}getCompletionsForSupportsCondition(e,t){const n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof Se)return!is(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof st)return this.getCompletionsForSupportsCondition(n,t)}return is(e.lParent)&&this.offset>e.lParent&&(!is(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){const n=e.getDeclarations();if(!n||this.offset<=n.offset){const n=e.findFirstChildBeforeOffset(this.offset);return n instanceof st?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,r,i;if(e.hasChildren()){const t=e.getChild(0);n=t.getText(),r=this.position,i=this.getCompletionRange(t)}else{n="",r=this.position;const t=this.textDocument.positionAt(e.offset+4);i=$t.create(t,t)}return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){const n=this.textDocument.getText();return e>=0&&e"),this.writeLine(t,r.join(""))}};!function(e){function t(e){const t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,n){return n+t(e)+n},e.remove=t}(Rs||(Rs={}));var Bs=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function Ws(e,t){let n=new Ms;for(const r of e.getChildren())switch(r.type){case ee.SelectorCombinator:if(t){const e=r.getText().split("&");if(1===e.length){n.addAttr("name",e[0]);break}n=t.cloneWithParent(),e[0]&&n.findRoot().prepend(e[0]);for(let r=1;r1){const e=t.cloneWithParent();n.addChild(e.findRoot()),n=e}n.append(e[r])}}break;case ee.SelectorPlaceholder:if(r.matches("@at-root"))return n;case ee.ElementNameSelector:const e=r.getText();n.addAttr("name","*"===e?"element":Vs(e));break;case ee.ClassSelector:n.addAttr("class",Vs(r.getText().substring(1)));break;case ee.IdentifierSelector:n.addAttr("id",Vs(r.getText().substring(1)));break;case ee.MixinDeclaration:n.addAttr("class",r.getName());break;case ee.PseudoSelector:n.addAttr(Vs(r.getText()),"");break;case ee.AttributeSelector:const i=r,s=i.getIdentifier();if(s){const e=i.getValue(),t=i.getOperator();let r;if(e&&t)switch(Vs(t.getText())){case"|=":r=`${Rs.remove(Vs(e.getText()))}-…`;break;case"^=":r=`${Rs.remove(Vs(e.getText()))}…`;break;case"$=":r=`…${Rs.remove(Vs(e.getText()))}`;break;case"~=":r=` … ${Rs.remove(Vs(e.getText()))} … `;break;case"*=":r=`…${Rs.remove(Vs(e.getText()))}…`;break;default:r=Rs.remove(Vs(e.getText()))}n.addAttr(Vs(s.getText()),r)}}return n}function Vs(e){const t=new ie;t.setSource(e);const n=t.scanUnquotedString();return n?n.text:e}var Us=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){const n=function(e){if(e.matches("@at-root"))return null;const t=new Os,n=[],r=e.getParent();if(r instanceof we){let e=r.getParent();for(;e&&!qs(e);){if(e instanceof we){if(e.getSelectors().matches("@at-root"))break;n.push(e)}e=e.getParent()}}const i=new $s(t);for(let e=n.length-1;e>=0;e--){const t=n[e].getSelectors().getChild(0);t&&i.processSelector(t)}return i.processSelector(e),t}(e);if(n){const r=new Ps('"').print(n,t);return r.push(this.selectorToSpecificityMarkedString(e)),r}return[]}simpleSelectorToMarkedString(e){const t=Ws(e),n=new Ps('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}isPseudoElementIdentifier(e){const t=e.match(/^::?([\w-]+)/);return!!t&&!!this.cssDataManager.getPseudoElement("::"+t[1])}selectorToSpecificityMarkedString(e){const t=e=>{const t=new Bs;let r=new Bs;for(const t of e)for(const e of t.getChildren()){const t=n(e);t.id>r.id?r=t:t.idr.attr?r=t:t.attrr.tag&&(r=t))}return t.id+=r.id,t.attr+=r.attr,t.tag+=r.tag,t},n=e=>{const r=new Bs;e:for(const i of e.getChildren()){switch(i.type){case ee.IdentifierSelector:r.id++;break;case ee.ClassSelector:case ee.AttributeSelector:r.attr++;break;case ee.ElementNameSelector:if(i.matches("*"))break;r.tag++;break;case ee.PseudoSelector:const e=i.getText(),n=i.getChildren();if(this.isPseudoElementIdentifier(e)){if(e.match(/^::slotted/i)&&n.length>0){r.tag++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}r.tag++;continue e}if(e.match(/^:where/i))continue e;if(e.match(/^:(?:not|has|is)/i)&&n.length>0){let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}if(e.match(/^:(?:host|host-context)/i)&&n.length>0){r.attr++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}if(e.match(/^:(?:nth-child|nth-last-child)/i)&&n.length>0){if(r.attr++,3===n.length&&23===n[1].type){let e=t(n[2].getChildren());r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}const e=new ss,i=n[1].getText();e.scanner.setSource(i);const s=e.scanner.scan(),o=e.scanner.scan();if("n"===s.text||"-n"===s.text&&"of"===o.text){const n=[],s=i.slice(o.offset+2).split(",");for(const t of s){const r=e.internalParse(t,e._parseSelector);r&&n.push(r)}let a=t(n);r.id+=a.id,r.attr+=a.attr,r.tag+=a.tag;continue e}continue e}r.attr++;continue e}if(i.getChildren().length>0){const e=n(i);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag}}return r},r=n(e);return`[${Dt("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${r.id}, ${r.attr}, ${r.tag})`}},$s=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Os)&&e.getChildren().some(e=>e.hasChildren()&&e.getChild(0).type===ee.SelectorCombinator)){const e=this.element.findRoot();e.parent instanceof Os&&(t=this.element,this.element=e.parent,this.element.removeChild(e),this.prev=null)}for(const n of e.getChildren()){if(n instanceof _e){if(this.prev instanceof _e){const e=new zs("…");this.element.addChild(e),this.element=e}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new zs("⋮"));const e=Ws(n,t),r=e.findRoot();this.element.addChild(r),this.element=e}(n instanceof _e||n.type===ee.SelectorCombinatorParent||n.type===ee.SelectorCombinatorShadowPiercingDescendant||n.type===ee.SelectorCombinatorSibling||n.type===ee.SelectorCombinatorAllSiblings)&&(this.prev=n)}}};function qs(e){switch(e.type){case ee.MixinDeclaration:case ee.Stylesheet:return!0}return!1}var js=class{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new Us(t)}configure(e){this.defaultSettings=e}doHover(e,t,n,r=this.defaultSettings){function i(t){return $t.create(e.positionAt(t.offset),e.positionAt(t.end))}const s=he(n,e.offsetAt(t));let o,a=null;for(let e=0;e"string"==typeof e?e:e.value):e.value}doesSupportMarkdown(){if(!is(this.supportsMarkdown)){if(!is(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&-1!==e.contentFormat.indexOf(Vn.Markdown)}return this.supportsMarkdown}},Ks=/^\w+:\/\//,Hs=/^data:/,Gs=class{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,n){const r=new ps(n),i=ce(n,e.offsetAt(t));if(!i)return null;const s=r.findSymbolFromNode(i);return s?{uri:e.uri,range:Qs(s.node,e)}:null}findReferences(e,t,n){return this.findDocumentHighlights(e,t,n).map(t=>({uri:e.uri,range:t.range}))}getHighlightNode(e,t,n){let r=ce(n,e.offsetAt(t));if(r&&r.type!==ee.Stylesheet&&r.type!==ee.Declarations)return r.type===ee.Identifier&&r.parent&&r.parent.type===ee.ClassSelector&&(r=r.parent),r}findDocumentHighlights(e,t,n){const r=[],i=this.getHighlightNode(e,t,n);if(!i)return r;const s=new ps(n),o=s.findSymbolFromNode(i),a=i.getText();return n.accept(t=>{if(o){if(s.matchesSymbol(t,o))return r.push({kind:Ys(t),range:Qs(t,e)}),!1}else i&&i.type===t.type&&t.matches(a)&&r.push({kind:Ys(t),range:Qs(t,e)});return!0}),r}isRawStringDocumentLinkNode(e){return e.type===ee.Import}findDocumentLinks(e,t,n){const r=this.findUnresolvedLinks(e,t),i=[];for(let t of r){const r=t.link,s=r.target;if(!s||Hs.test(s));else if(Ks.test(s))i.push(r);else{const t=n.resolveReference(s,e.uri);t&&(r.target=t),i.push(r)}}return i}async findDocumentLinks2(e,t,n){const r=this.findUnresolvedLinks(e,t),i=[];for(let t of r){const r=t.link,s=r.target;if(!s||Hs.test(s));else if(Ks.test(s))i.push(r);else{const o=await this.resolveReference(s,e.uri,n,t.isRawLink);void 0!==o&&(r.target=o,i.push(r))}}return i}findUnresolvedLinks(e,t){const n=[],r=t=>{let r=t.getText();const i=Qs(t,e);if(i.start.line===i.end.line&&i.start.character===i.end.character)return;(se(r,"'")||se(r,'"'))&&(r=r.slice(1,-1));const s=!!t.parent&&this.isRawStringDocumentLinkNode(t.parent);n.push({link:{target:r,range:i},isRawLink:s})};return t.accept(e=>{if(e.type===ee.URILiteral){const t=e.getChild(0);return t&&r(t),!1}if(e.parent&&this.isRawStringDocumentLinkNode(e.parent)){const t=e.getText();return(se(t,"'")||se(t,'"'))&&r(e),!1}return!0}),n}findSymbolInformations(e,t){const n=[];return this.collectDocumentSymbols(e,t,(t,r,i)=>{const s=i instanceof pe?Qs(i,e):i,o={name:t||Dt(""),kind:r,location:jt.create(e.uri,s)};n.push(o)}),n}findDocumentSymbols(e,t){const n=[],r=[];return this.collectDocumentSymbols(e,t,(t,i,s,o,a)=>{const l=s instanceof pe?Qs(s,e):s;let c=o instanceof pe?Qs(o,e):o;c&&Js(l,c)||(c=$t.create(l.start,l.start));const h={name:t||Dt(""),kind:i,range:l,selectionRange:c};let d=r.pop();for(;d&&!Js(d[1],l);)d=r.pop();if(d){const e=d[0];e.children||(e.children=[]),e.children.push(h),r.push(d)}else n.push(h);a&&r.push([h,Qs(a,e)])}),n}collectDocumentSymbols(e,t,n){t.accept(t=>{if(t instanceof we){for(const r of t.getSelectors().getChildren())if(r instanceof Ce){const i=$t.create(e.positionAt(r.offset),e.positionAt(t.end));n(r.getText(),hr.Class,i,r,t.getDeclarations())}}else if(t instanceof vt)n(t.getName(),hr.Variable,t,t.getVariable(),void 0);else if(t instanceof St)n(t.getName(),hr.Method,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof ze)n(t.getName(),hr.Function,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof Ve){const e=Dt("@keyframes {0}",t.getName());n(e,hr.Class,t,t.getIdentifier(),t.getDeclarations())}else if(t instanceof Be){const e=Dt("@font-face");n(e,hr.Class,t,void 0,t.getDeclarations())}else if(t instanceof Qe){const e=t.getChild(0);if(e instanceof tt){const r="@media "+e.getText();n(r,hr.Module,t,e,t.getDeclarations())}}return!0})}findDocumentColors(e,t){const n=[];return t.accept(t=>{const r=function(e,t){const n=function(e){if(e.type===ee.HexColorValue)return Bi(e.getText());if(e.type===ee.Function){const t=e,n=t.getName();let r=t.getArguments().getChildren();if(1===r.length){const e=r[0].getChildren();if(1===e.length&&e[0].type===ee.Expression&&(r=e[0].getChildren(),3===r.length)){const e=r[2];if(e instanceof ct){const t=e.getLeft(),n=e.getRight(),i=e.getOperator();t&&n&&i&&i.matches("/")&&(r=[r[0],r[1],t,n])}}}if(!n||r.length<3||r.length>4)return null;try{const e=4===r.length?Mi(r[3],1):1;if("rgb"===n||"rgba"===n)return{red:Mi(r[0],255),green:Mi(r[1],255),blue:Mi(r[2],255),alpha:e};if("hsl"===n||"hsla"===n){return Wi(Oi(r[0]),Mi(r[1],100),Mi(r[2],100),e)}if("hwb"===n){return function(e,t,n,r=1){if(t+n>=1){const e=t/(t+n);return{red:e,green:e,blue:e,alpha:r}}const i=Wi(e,1,.5,r);let s=i.red;s*=1-t-n,s+=t;let o=i.green;o*=1-t-n,o+=t;let a=i.blue;return a*=1-t-n,a+=t,{red:s,green:o,blue:a,alpha:r}}(Oi(r[0]),Mi(r[1],100),Mi(r[2],100),e)}}catch(e){return null}}else if(e.type===ee.Identifier){if(e.parent&&e.parent.type!==ee.Term)return null;const t=e.parent;if(t&&t.parent&&t.parent.type===ee.BinaryExpression){const e=t.parent;if(e.parent&&e.parent.type===ee.ListEntry&&e.parent.key===e)return null}const n=e.getText().toLowerCase();if("none"===n)return null;const r=Ni[n];if(r)return Bi(r)}return null}(e);return n?{color:n,range:Qs(e,t)}:null}(t,e);return r&&n.push(r),!0}),n}getColorPresentations(e,t,n,r){const i=[],s=Math.round(255*n.red),o=Math.round(255*n.green),a=Math.round(255*n.blue);let l;l=1===n.alpha?`rgb(${s}, ${o}, ${a})`:`rgba(${s}, ${o}, ${a}, ${n.alpha})`,i.push({label:l,textEdit:bn.replace(r,l)}),l=1===n.alpha?`#${Xs(s)}${Xs(o)}${Xs(a)}`:`#${Xs(s)}${Xs(o)}${Xs(a)}${Xs(Math.round(255*n.alpha))}`,i.push({label:l,textEdit:bn.replace(r,l)});const c=Vi(n);l=1===c.a?`hsl(${c.h}, ${Math.round(100*c.s)}%, ${Math.round(100*c.l)}%)`:`hsla(${c.h}, ${Math.round(100*c.s)}%, ${Math.round(100*c.l)}%, ${c.a})`,i.push({label:l,textEdit:bn.replace(r,l)});const h=function(e){const t=Vi(e),n=Math.min(e.red,e.green,e.blue),r=1-Math.max(e.red,e.green,e.blue);return{h:t.h,w:n,b:r,a:t.a}}(n);return l=1===h.a?`hwb(${h.h} ${Math.round(100*h.w)}% ${Math.round(100*h.b)}%)`:`hwb(${h.h} ${Math.round(100*h.w)}% ${Math.round(100*h.b)}% / ${h.a})`,i.push({label:l,textEdit:bn.replace(r,l)}),i}prepareRename(e,t,n){const r=this.getHighlightNode(e,t,n);if(r)return $t.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,t,n,r){const i=this.findDocumentHighlights(e,t,r).map(e=>bn.replace(e.range,n));return{changes:{[e.uri]:i}}}async resolveModuleReference(e,t,n){if(se(t,"file://")){const r=function(e){const t=e.indexOf("/");if(-1===t)return"";if("@"===e[0]){const n=e.indexOf("/",t+1);return-1===n?e:e.substring(0,n)}return e.substring(0,t)}(e);if(r&&"."!==r&&".."!==r){const i=n.resolveReference("/",t),s=gs(t),o=await this.resolvePathToModule(r,s,i);if(o)return bs(o,e.substring(r.length+1))}}}async mapReference(e,t){return e}async resolveReference(e,t,n,r=!1,i=this.defaultSettings){if("~"===e[0]&&"/"!==e[1]&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,n),r);const s=await this.mapReference(n.resolveReference(e,t),r);if(this.resolveModuleReferences){if(s&&await this.fileExists(s))return s;const i=await this.mapReference(await this.resolveModuleReference(e,t,n),r);if(i)return i}if(s&&!await this.fileExists(s)){const s=n.resolveReference("/",t);if(i&&s){if(e in i)return this.mapReference(bs(s,i[e]),r);const t=e.indexOf("/"),n=`${e.substring(0,t)}/`;if(n in i){let t=bs(s,i[n].slice(0,-1));return this.mapReference(t=bs(t,e.substring(n.length-1)),r)}}}return s}async resolvePathToModule(e,t,n){const r=bs(t,"node_modules",e,"package.json");return await this.fileExists(r)?gs(r):n&&t.startsWith(n)&&t.length!==n.length?this.resolvePathToModule(e,gs(t),n):void 0}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const t=await this.fileSystemProvider.stat(e);return t.type!==mi.Unknown||-1!==t.size}catch(e){return!1}}};function Qs(e,t){return $t.create(t.positionAt(e.offset),t.positionAt(e.end))}function Js(e,t){const n=t.start.line,r=t.end.line,i=e.start.line,s=e.end.line;return!(ns||r>s||n===i&&t.start.charactere.end.character)}function Ys(e){if(e.type===ee.Selector)return ar.Write;if(e instanceof ge&&e.parent&&e.parent instanceof Fe&&e.isCustomProperty)return ar.Write;if(e.parent)switch(e.parent.type){case ee.FunctionDeclaration:case ee.MixinDeclaration:case ee.Keyframe:case ee.VariableDeclaration:case ee.FunctionParameter:return ar.Write}return ar.Read}function Xs(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}var Zs=de.Warning,eo=de.Error,to=de.Ignore,no=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},ro={AllVendorPrefixes:new no("compatibleVendorPrefixes",Dt("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),to),IncludeStandardPropertyWhenUsingVendorPrefix:new no("vendorPrefix",Dt("When using a vendor-specific prefix also include the standard property"),Zs),DuplicateDeclarations:new no("duplicateProperties",Dt("Do not use duplicate style definitions"),to),EmptyRuleSet:new no("emptyRules",Dt("Do not use empty rulesets"),Zs),ImportStatemement:new no("importStatement",Dt("Import statements do not load in parallel"),to),BewareOfBoxModelSize:new no("boxModel",Dt("Do not use width or height when using padding or border"),to),UniversalSelector:new no("universalSelector",Dt("The universal selector (*) is known to be slow"),to),ZeroWithUnit:new no("zeroUnits",Dt("No unit for zero needed"),to),RequiredPropertiesForFontFace:new no("fontFaceProperties",Dt("@font-face rule must define 'src' and 'font-family' properties"),Zs),HexColorLength:new no("hexColorLength",Dt("Hex colors must consist of three, four, six or eight hex numbers"),eo),ArgsInColorFunction:new no("argumentsInColorFunction",Dt("Invalid number of parameters"),eo),UnknownProperty:new no("unknownProperties",Dt("Unknown property."),Zs),UnknownAtRules:new no("unknownAtRules",Dt("Unknown at-rule."),Zs),IEStarHack:new no("ieHack",Dt("IE hacks are only necessary when supporting IE7 and older"),to),UnknownVendorSpecificProperty:new no("unknownVendorSpecificProperties",Dt("Unknown vendor specific property."),to),PropertyIgnoredDueToDisplay:new no("propertyIgnoredDueToDisplay",Dt("Property is ignored due to the display."),Zs),AvoidImportant:new no("important",Dt("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),to),AvoidFloat:new no("float",Dt("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),to),AvoidIdSelector:new no("idSelector",Dt("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),to)},io={ValidProperties:new class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}("validProperties",Dt("A list of properties that are not validated against the `unknownProperties` rule."),[])},so=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const t=function(e){switch(e){case"ignore":return de.Ignore;case"warning":return de.Warning;case"error":return de.Error}return null}(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}},oo=class{constructor(e){this.cssDataManager=e}doCodeActions(e,t,n,r){return this.doCodeActions2(e,t,n,r).map(t=>{const n=t.edit&&t.edit.documentChanges&&t.edit.documentChanges[0];return fn.create(t.title,"_css.applyCodeAction",e.uri,e.version,n&&n.edits)})}doCodeActions2(e,t,n,r){const i=[];if(n.diagnostics)for(const t of n.diagnostics)this.appendFixesForMarker(e,r,t,i);return i}getFixesForUnknownProperty(e,t,n,r){const i=t.getName(),s=[];this.cssDataManager.getProperties().forEach(e=>{const t=function(e,t,n=4){let r=Math.abs(e.length-t.length);if(r>n)return 0;let i,s,o=[],a=[];for(i=0;i=i.length/2&&s.push({property:e.name,score:t})}),s.sort((e,t)=>t.score-e.score||e.property.localeCompare(t.property));let o=3;for(const t of s){const i=t.property,s=Dt("Rename to '{0}'",i),a=bn.replace(n.range,i),l=Mn.create(e.uri,e.version),c={documentChanges:[xn.create(l,[a])]},h=kr.create(s,c,br.QuickFix);if(h.diagnostics=[n],r.push(h),--o<=0)return}}appendFixesForMarker(e,t,n,r){if(n.code!==ro.UnknownProperty.id)return;const i=e.offsetAt(n.range.start),s=e.offsetAt(n.range.end),o=he(t,i);for(let t=o.length-1;t>=0;t--){const a=o[t];if(a instanceof Se){const t=a.getProperty();if(t&&t.offset===i&&t.end===s)return void this.getFixesForUnknownProperty(e,t,n,r)}}}},ao=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function lo(e,t,n,r){const i=e[t];i.value=n,n&&(os(i.properties,r)||i.properties.push(r))}function co(e,t,n,r){"top"===t||"right"===t||"bottom"===t||"left"===t?lo(e,t,n,r):function(e,t,n){lo(e,"top",t,n),lo(e,"right",t,n),lo(e,"bottom",t,n),lo(e,"left",t,n)}(e,n,r)}function ho(e,t,n){switch(t.length){case 1:co(e,void 0,t[0],n);break;case 2:co(e,"top",t[0],n),co(e,"bottom",t[0],n),co(e,"right",t[1],n),co(e,"left",t[1],n);break;case 3:co(e,"top",t[0],n),co(e,"right",t[1],n),co(e,"left",t[1],n),co(e,"bottom",t[2],n);break;case 4:co(e,"top",t[0],n),co(e,"right",t[1],n),co(e,"bottom",t[2],n),co(e,"left",t[3],n)}}function uo(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function po(e,t=!0){return!(t&&uo(e,["initial","unset"])||0===parseFloat(e.getText()))}function mo(e,t=!0){return e.map(e=>po(e,t))}function fo(e,t=!0){return!(uo(e,["none","hidden"])||t&&uo(e,["initial","unset"]))}function go(e,t=!0){return e.map(e=>fo(e,t))}function bo(e){const t=e.getChildren();if(1===t.length){const e=t[0];return po(e)&&fo(e)}for(const e of t){const t=e;if(!po(t,!1)||!fo(t,!1))return!1}return!0}var vo=class{constructor(){this.data={}}add(e,t,n){let r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(t),n&&r.nodes.push(n)}},yo=class e{static entries(t,n,r,i,s){const o=new e(n,r,i);return t.acceptVisitor(o),o.completeValidations(),o.getEntries(s)}constructor(e,t,n){this.cssDataManager=n,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new vo,this.validProperties={};const r=t.getSetting(io.ValidProperties);Array.isArray(r)&&r.forEach(e=>{if("string"==typeof e){const t=e.trim().toLowerCase();t.length&&(this.validProperties[t]=!0)}})}isValidPropertyDeclaration(e){const t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){const n=[];for(const r of e)r.fullPropertyName===t&&n.push(r);return n}fetchWithValue(e,t,n){const r=[];for(const i of e)if(i.fullPropertyName===t){const e=i.node.getValue();e&&this.findValueInExpression(e,n)&&r.push(i)}return r}findValueInExpression(e,t){let n=!1;return e.accept(e=>(e.type===ee.Identifier&&e.matches(t)&&(n=!0),!n)),n}getEntries(e=de.Warning|de.Error){return this.warnings.filter(t=>0!==(t.getLevel()&e))}addEntry(e,t,n){const r=new Nt(e,t,this.settings.getRule(t),n);this.warnings.push(r)}getMissingNames(e,t){const n=e.slice(0);for(let e=0;e0){const e=this.fetch(r,"float");for(let t=0;t0){const e=this.fetch(r,"vertical-align");for(let t=0;t1)for(let n=0;ne.startsWith(i))&&a.delete(t)}}const l=[];for(let t=0,n=e.prefixes.length;t!(e instanceof ct&&(r+=1,1))),r!==n&&this.addEntry(e,ro.ArgsInColorFunction)),!0}};yo.prefixes=["-ms-","-moz-","-o-","-webkit-"];var wo=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,n=this.settings){if(n&&!1===n.validate)return[];const r=[];r.push.apply(r,Rt.entries(t)),r.push.apply(r,yo.entries(t,e,new so(n&&n.lint),this.cssDataManager));const i=[];for(const e in ro)i.push(ro[e].id);return r.filter(e=>e.getLevel()!==de.Ignore).map(function(t){const n=$t.create(e.positionAt(t.getOffset()),e.positionAt(t.getOffset()+t.getLength())),r=e.languageId;return{code:t.getRule().id,source:r,message:t.getMessage(),severity:t.getLevel()===de.Warning?ln.Warning:ln.Error,range:n}})}},Co="/".charCodeAt(0),_o="\n".charCodeAt(0),ko="\r".charCodeAt(0),xo="\f".charCodeAt(0),So="$".charCodeAt(0),Eo="#".charCodeAt(0),Fo="{".charCodeAt(0),Lo="=".charCodeAt(0),Io="!".charCodeAt(0),To="<".charCodeAt(0),No=">".charCodeAt(0),Ro=".".charCodeAt(0),Do=("@".charCodeAt(0),o.CustomToken),Ao=Do++,Mo=Do++,Oo=(Do++,Do++),zo=Do++,Po=Do++,Bo=Do++,Wo=Do++,Vo=(Do++,class extends ie{scanNext(e){if(this.stream.advanceIfChar(So)){const t=["$"];if(this.ident(t))return this.finishToken(e,Ao,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([Eo,Fo])?this.finishToken(e,Mo):this.stream.advanceIfChars([Lo,Lo])?this.finishToken(e,Oo):this.stream.advanceIfChars([Io,Lo])?this.finishToken(e,zo):this.stream.advanceIfChar(To)?this.stream.advanceIfChar(Lo)?this.finishToken(e,Bo):this.finishToken(e,o.Delim):this.stream.advanceIfChar(No)?this.stream.advanceIfChar(Lo)?this.finishToken(e,Po):this.finishToken(e,o.Delim):this.stream.advanceIfChars([Ro,Ro,Ro])?this.finishToken(e,Wo):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([Co,Co]))&&(this.stream.advanceWhileChar(e=>{switch(e){case _o:case ko:case xo:return!1;default:return!0}}),!0)}}),Uo=class{constructor(e,t){this.id=e,this.message=t}},$o={FromExpected:new Uo("scss-fromexpected",Dt("'from' expected")),ThroughOrToExpected:new Uo("scss-throughexpected",Dt("'through' or 'to' expected")),InExpected:new Uo("scss-fromexpected",Dt("'in' expected"))},qo=class extends ss{constructor(){super(new Vo)}_parseStylesheetStatement(e=!1){return this.peek(o.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create($e);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,li.URIOrStringExpected);for(;this.accept(o.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,li.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Ao))return null;const t=this.create(vt);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(o.Colon))return this.finish(t,li.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,li.VariableValueExpected,[],e);for(;this.peek(o.Exclamation);)if(t.addChild(this._tryParsePrio()));else{if(this.consumeToken(),!this.peekRegExp(o.Ident,/^(default|global)$/))return this.finish(t,li.UnknownKeyword);this.consumeToken()}return this.peek(o.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Bo)||this.accept(Po)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(Ao))return null;const e=this.create(wt);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),t=this.create(Tt);return t.setIdentifier(this._parseIdent([ne.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,li.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(o.Ident)&&!this.peek(Mo)&&!this.peekDelim("-"))return null;const t=this.create(ge);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(o.Ident,/^--/);let n=!1;const r=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()};for(;(this.accept(o.Ident)||t.addChild(r())||n&&this.acceptRegexp(/^[\w-]/))&&(n=!0,!this.hasWhitespace()););return n?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Mo)){const e=this.create(yt);return this.consumeToken(),e.addChild(this._parseExpr())||this._parseNestingSelector()?this.accept(o.CurlyR)?this.finish(e):this.finish(e,li.RightCurlyExpected):this.accept(o.CurlyR)?this.finish(e):this.finish(e,li.ExpressionExpected)}return null}_parseOperator(){if(this.peek(Oo)||this.peek(zo)||this.peek(Po)||this.peek(Bo)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(ee.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(pe);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(o.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const n=this.create(Se);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(o.Colon))return this.finish(n,li.ColonExpected,[o.Colon],e||[o.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);let r=!1;if(n.setValue(this._parseExpr())&&(r=!0,n.addChild(this._parsePrio())),this.peek(o.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!r)return this.finish(n,li.PropertyValueExpected);return this.peek(o.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseNestedProperties(){const e=this.create(We);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(Ct);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,li.SelectorExpected);for(;this.accept(o.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(o.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,li.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(ee.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(o.Num)||this.accept(o.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(ee.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){const e=this.createNode(ee.SelectorPlaceholder);if(this.consumeToken(),this.accept(o.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,li.IdentifierExpected);if(!this.accept(o.Colon))return this.finish(e,li.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,li.IdentifierExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[o.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(o.ParenthesisL)?(this.restoreAtMark(e),null):t}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;const e=this.createNode(ee.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(o.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){const t=this.create(Re);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,li.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else"))if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(o.CurlyL)){const n=this.create(Oe);this._parseBody(n,e),t.setElseClause(n)}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const t=this.create(De);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?this.acceptIdent("to")||this.acceptIdent("through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,li.ExpressionExpected,[o.CurlyR]):this.finish(t,$o.ThroughOrToExpected,[o.CurlyR]):this.finish(t,li.ExpressionExpected,[o.CurlyR]):this.finish(t,$o.FromExpected,[o.CurlyR]):this.finish(t,li.VariableNameExpected,[o.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const t=this.create(Ae);this.consumeToken();const n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,li.VariableNameExpected,[o.CurlyR]);for(;this.accept(o.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,li.VariableNameExpected,[o.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,li.ExpressionExpected,[o.CurlyR]):this.finish(t,$o.InExpected,[o.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const t=this.create(Me);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,li.ExpressionExpected,[o.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;const e=this.create(ze);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([ne.Function])))return this.finish(e,li.IdentifierExpected,[o.CurlyR]);if(!this.accept(o.ParenthesisL))return this.finish(e,li.LeftParenthesisExpected,[o.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,li.VariableNameExpected);return this.accept(o.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,li.RightParenthesisExpected,[o.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(ee.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,li.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(St);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([ne.Mixin])))return this.finish(e,li.IdentifierExpected,[o.CurlyR]);if(this.accept(o.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,li.VariableNameExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[o.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(Te);return e.setIdentifier(this._parseVariable())?(this.accept(Wo),this.accept(o.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,li.VariableValueExpected,[],[o.Comma,o.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(_t);if(this.consumeToken(),this.accept(o.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,li.ExpressionExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(xt);this.consumeToken();const t=this._parseIdent([ne.Mixin]);if(!e.setIdentifier(t))return this.finish(e,li.IdentifierExpected,[o.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const n=this._parseIdent([ne.Mixin]);if(!n)return this.finish(e,li.IdentifierExpected,[o.CurlyR]);const r=this.create(Tt);t.referenceTypes=[ne.Module],r.setIdentifier(t),e.setIdentifier(n),e.addChild(r)}if(this.accept(o.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,li.ExpressionExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(o.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(kt);if(this.acceptIdent("using")){if(!this.accept(o.ParenthesisL))return this.finish(e,li.LeftParenthesisExpected,[o.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,li.VariableNameExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[o.CurlyL])}return this.peek(o.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(Ne),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(o.Colon))e.setIdentifier(n);else{if(this.accept(Wo))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(Wo),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(o.ParenthesisR)){this.restoreAtMark(e);const t=this.create(pe);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}_parseOperation(){if(!this.peek(o.ParenthesisL))return null;const e=this.create(pe);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(o.Comma);return this.accept(o.ParenthesisR)?this.finish(e):this.finish(e,li.RightParenthesisExpected)}_parseListElement(){const e=this.create(Ft),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(o.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,li.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(qe);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,li.StringLiteralExpected);if(!this.peek(o.SemiColon)&&!this.peek(o.EOF)){if(!this.peekRegExp(o.Ident,/as|with/))return this.finish(e,li.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([ne.Module]))&&!this.acceptDelim("*"))return this.finish(e,li.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(o.ParenthesisL))return this.finish(e,li.LeftParenthesisExpected,[o.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,li.VariableNameExpected);for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,li.VariableNameExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected)}}return this.accept(o.SemiColon)||this.accept(o.EOF)?this.finish(e):this.finish(e,li.SemiColonExpected)}_parseModuleConfigDeclaration(){const e=this.create(je);return e.setIdentifier(this._parseVariable())?this.accept(o.Colon)&&e.setValue(this._parseExpr(!0))?!this.accept(o.Exclamation)||!this.hasWhitespace()&&this.acceptIdent("default")?this.finish(e):this.finish(e,li.UnknownKeyword):this.finish(e,li.VariableValueExpected,[],[o.Comma,o.ParenthesisR]):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(Ke);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,li.StringLiteralExpected);if(this.acceptIdent("as")){const t=this._parseIdent([ne.Forward]);if(!e.setIdentifier(t))return this.finish(e,li.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,li.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(o.ParenthesisL))return this.finish(e,li.LeftParenthesisExpected,[o.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,li.VariableNameExpected);for(;this.accept(o.Comma)&&!this.peek(o.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,li.VariableNameExpected);if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,li.IdentifierOrVariableExpected);return this.accept(o.SemiColon)||this.accept(o.EOF)?this.finish(e):this.finish(e,li.SemiColonExpected)}_parseForwardVisibility(){const e=this.create(He);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(o.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}},jo=Dt("Sass documentation"),Ko=class e extends Ls{constructor(t,n){super("$",t,n),Ho(e.scssModuleLoaders),Ho(e.scssModuleBuiltIns)}isImportPathParent(e){return e===ee.Forward||e===ee.Use||super.isImportPathParent(e)}getCompletionForImportPath(t,n){const r=t.getParent().type;if(r===ee.Forward||r===ee.Use)for(let r of e.scssModuleBuiltIns){const e={label:r.label,documentation:r.documentation,textEdit:bn.replace(this.getCompletionRange(t),`'${r.label}'`),kind:qn.Module};n.items.push(e)}return super.getCompletionForImportPath(t,n)}createReplaceFunction(){let t=1;return(n,r)=>"\\"+r+": ${"+t+++":"+(e.variableDefaults[r]||"")+"}"}createFunctionProposals(e,t,n,r){for(const i of e){const e=i.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),s={label:i.func.substr(0,i.func.indexOf("(")),detail:i.func,documentation:i.desc,textEdit:bn.replace(this.getCompletionRange(t),e),insertTextFormat:Kn.Snippet,kind:qn.Function};n&&(s.sortText="z"),r.items.push(s)}return r}getCompletionsForSelector(t,n,r){return this.createFunctionProposals(e.selectorFuncs,null,!0,r),super.getCompletionsForSelector(t,n,r)}getTermProposals(t,n,r){let i=e.builtInFuncs;return t&&(i=i.filter(e=>!e.type||!t.restrictions||-1!==t.restrictions.indexOf(e.type))),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(t,n,r)}getColorProposals(t,n,r){return this.createFunctionProposals(e.colorProposals,n,!1,r),super.getColorProposals(t,n,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,ne.Rule);for(const e of r){const r={label:e.name,textEdit:bn.replace(this.getCompletionRange(t),e.name),kind:qn.Function};n.items.push(r)}return n}getCompletionForAtDirectives(t){return t.items.push(...e.scssAtDirectives),t}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(t){return t.items.push(...e.scssModuleLoaders),t}};function Ho(e){e.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const t="string"==typeof e.documentation?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+="\n\n",t.value+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | "),e.documentation=t}})}Ko.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},Ko.colorProposals=[{func:"red($color)",desc:Dt("Gets the red component of a color.")},{func:"green($color)",desc:Dt("Gets the green component of a color.")},{func:"blue($color)",desc:Dt("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:Dt("Mixes two colors together.")},{func:"hue($color)",desc:Dt("Gets the hue component of a color.")},{func:"saturation($color)",desc:Dt("Gets the saturation component of a color.")},{func:"lightness($color)",desc:Dt("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:Dt("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:Dt("Makes a color lighter.")},{func:"darken($color, $amount)",desc:Dt("Makes a color darker.")},{func:"saturate($color, $amount)",desc:Dt("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:Dt("Makes a color less saturated.")},{func:"grayscale($color)",desc:Dt("Converts a color to grayscale.")},{func:"complement($color)",desc:Dt("Returns the complement of a color.")},{func:"invert($color)",desc:Dt("Returns the inverse of a color.")},{func:"alpha($color)",desc:Dt("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:Dt("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:Dt("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:Dt("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:Dt("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:Dt("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Dt("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:Dt("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Dt("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:Dt("Converts a color into the format understood by IE filters.")}],Ko.selectorFuncs=[{func:"selector-nest($selectors…)",desc:Dt("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:Dt("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:Dt("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:Dt("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:Dt("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:Dt("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:Dt("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:Dt("Parses a selector into the format returned by &.")}],Ko.builtInFuncs=[{func:"unquote($string)",desc:Dt("Removes quotes from a string.")},{func:"quote($string)",desc:Dt("Adds quotes to a string.")},{func:"str-length($string)",desc:Dt("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:Dt("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:Dt("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:Dt("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:Dt("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:Dt("Converts a string to lower case.")},{func:"percentage($number)",desc:Dt("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:Dt("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:Dt("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:Dt("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:Dt("Returns the absolute value of a number.")},{func:"min($numbers)",desc:Dt("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:Dt("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:Dt("Returns a random number.")},{func:"length($list)",desc:Dt("Returns the length of a list.")},{func:"nth($list, $n)",desc:Dt("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:Dt("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:Dt("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:Dt("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:Dt("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:Dt("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:Dt("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:Dt("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:Dt("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:Dt("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:Dt("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:Dt("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:Dt("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:Dt("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:Dt("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:Dt("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:Dt("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:Dt("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:Dt("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:Dt("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:Dt("Returns the type of a value.")},{func:"unit($number)",desc:Dt("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:Dt("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:Dt("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:Dt("Dynamically calls a Sass function.")}],Ko.scssAtDirectives=[{label:"@extend",documentation:Dt("Inherits the styles of another selector."),kind:qn.Keyword},{label:"@at-root",documentation:Dt("Causes one or more rules to be emitted at the root of the document."),kind:qn.Keyword},{label:"@debug",documentation:Dt("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:qn.Keyword},{label:"@warn",documentation:Dt("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:qn.Keyword},{label:"@error",documentation:Dt("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:qn.Keyword},{label:"@if",documentation:Dt("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:"@if ${1:expr} {\n\t$0\n}",insertTextFormat:Kn.Snippet,kind:qn.Keyword},{label:"@for",documentation:Dt("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",insertTextFormat:Kn.Snippet,kind:qn.Keyword},{label:"@each",documentation:Dt("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n\t$0\n}",insertTextFormat:Kn.Snippet,kind:qn.Keyword},{label:"@while",documentation:Dt("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:"@while ${1:condition} {\n\t$0\n}",insertTextFormat:Kn.Snippet,kind:qn.Keyword},{label:"@mixin",documentation:Dt("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:"@mixin ${1:name} {\n\t$0\n}",insertTextFormat:Kn.Snippet,kind:qn.Keyword},{label:"@include",documentation:Dt("Includes the styles defined by another mixin into the current rule."),kind:qn.Keyword},{label:"@function",documentation:Dt("Defines complex operations that can be re-used throughout stylesheets."),kind:qn.Keyword}],Ko.scssModuleLoaders=[{label:"@use",documentation:Dt("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:jo,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Kn.Snippet,kind:qn.Keyword},{label:"@forward",documentation:Dt("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:jo,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Kn.Snippet,kind:qn.Keyword}],Ko.scssModuleBuiltIns=[{label:"sass:math",documentation:Dt("Provides functions that operate on numbers."),references:[{name:jo,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:Dt("Makes it easy to combine, search, or split apart strings."),references:[{name:jo,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:Dt("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:jo,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:Dt("Lets you access and modify values in lists."),references:[{name:jo,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:Dt("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:jo,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:Dt("Provides access to Sass’s powerful selector engine."),references:[{name:jo,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:Dt("Exposes the details of Sass’s inner workings."),references:[{name:jo,url:"https://sass-lang.com/documentation/modules/meta"}]}];var Go,Qo="/".charCodeAt(0),Jo="\n".charCodeAt(0),Yo="\r".charCodeAt(0),Xo="\f".charCodeAt(0),Zo="`".charCodeAt(0),ea=".".charCodeAt(0),ta=o.CustomToken,na=ta++,ra=class extends ie{scanNext(e){const t=this.escapedJavaScript();return null!==t?this.finishToken(e,t):this.stream.advanceIfChars([ea,ea,ea])?this.finishToken(e,na):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([Qo,Qo]))&&(this.stream.advanceWhileChar(e=>{switch(e){case Jo:case Yo:case Xo:return!1;default:return!0}}),!0)}escapedJavaScript(){return this.stream.peekChar()===Zo?(this.stream.advance(1),this.stream.advanceWhileChar(e=>e!==Zo),this.stream.advanceIfChar(Zo)?o.EscapedJavaScript:o.BadEscapedJavaScript):null}},ia=class extends ss{constructor(){super(new ra)}_parseStylesheetStatement(e=!1){return this.peek(o.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create($e);if(this.consumeToken(),this.accept(o.ParenthesisL)){if(!this.accept(o.Ident))return this.finish(e,li.IdentifierExpected,[o.SemiColon]);do{if(!this.accept(o.Comma))break}while(this.accept(o.Ident));if(!this.accept(o.ParenthesisR))return this.finish(e,li.RightParenthesisExpected,[o.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(o.SemiColon)||this.peek(o.EOF)||e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e)):this.finish(e,li.URIOrStringExpected,[o.SemiColon])}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(ee.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(o.SemiColon)?this.finish(e):this.finish(e,li.SemiColonExpected):this.finish(e,li.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const e=this.create(nt);return e.addChild(this._parseVariable())?this.finish(e):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const t=this.create(vt),n=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(o.Colon))return this.restoreAtMark(n),null;if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,li.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(o.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim(".")){if(this.consumeToken(),this.hasWhitespace()||!this.accept(o.ParenthesisL))return this.restoreAtMark(e),null;{let t=this.create(St);if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(o.Comma)||this.accept(o.SemiColon))&&!this.peek(o.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,li.IdentifierExpected,[],[o.ParenthesisR]);if(!this.accept(o.ParenthesisR))return this.restoreAtMark(e),null}}if(!this.peek(o.CurlyL))return null;const t=this.create(ye);return this._parseBody(t,this._parseDetachedRuleSetBody.bind(this)),this.finish(t)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let t=!1;for(;this.peek(o.BracketL)&&(t=!0),e.addChild(this._parseLookupValue());)t=!1;return!t}_parseLookupValue(){const e=this.create(pe),t=this.mark();return this.accept(o.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(o.BracketR)||this.accept(o.BracketR))?e:(this.restoreAtMark(t),null)}_parseVariable(e=!1,t=!1){const n=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(o.AtKeyword))return null;const r=this.create(wt),i=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(i),null;return!this.accept(o.AtKeyword)&&!this.accept(o.Ident)||!t&&this.peek(o.BracketL)&&!this._addLookupChildren(r)?(this.restoreAtMark(i),null):r}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(o.EscapedJavaScript)||this.peek(o.BadEscapedJavaScript)){const e=this.createNode(ee.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(ee.EscapedValue);return this.consumeToken(),this.accept(o.String)||this.accept(o.EscapedJavaScript)?this.finish(e):this.finish(e,li.TermExpected)}return null}_parseOperator(){return this._parseGuardOperator()||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(ee.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){const e=this.createNode(ee.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){const e=this.createNode(ee.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(o.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([ne.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const t=this.create(Ce);let n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){n=!0;const e=this.mark();if(t.addChild(this._parseGuard())&&this.peek(o.CurlyL))break;this.restoreAtMark(e),t.addChild(this._parseCombinator())}return n?this.finish(t):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(ee.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(o.Num)||this.accept(o.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(ee.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){const t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;const n=this.mark(),r=this.create(ge);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let i=!1;return i=e?r.isCustomProperty?r.addChild(this._parseIdent()):r.addChild(this._parseRegexp(t)):r.isCustomProperty?this._acceptInterpolatedIdent(r):this._acceptInterpolatedIdent(r,t),i?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(n),null)}peekInterpolatedIdent(){return this.peek(o.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,t){let n=!1;const r=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()},i=t?()=>this.acceptRegexp(t):()=>this.accept(o.Ident);for(;(i()||e.addChild(this._parseInterpolation()||this.try(r)))&&(n=!0,!this.hasWhitespace()););return n}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const t=this.createNode(ee.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(o.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(o.CurlyR)?this.finish(t):this.finish(t,li.RightCurlyExpected):this.finish(t,li.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),t=this.create(St);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(o.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(o.Comma)||this.accept(o.SemiColon))&&!this.peek(o.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,li.IdentifierExpected,[],[o.ParenthesisR]);return this.accept(o.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(o.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(ge),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(o.Hash))return null;e=this.create(ge),this.consumeToken()}return e.referenceTypes=[ne.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(o.Colon))return null;const e=this.mark(),t=this.create(Ct);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;const e=this.mark(),t=this.create(Ct);return this.consumeToken(),!this.hasWhitespace()&&this.accept(o.Colon)&&this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),null)}_completeExtends(e){if(!this.accept(o.ParenthesisL))return this.finish(e,li.LeftParenthesisExpected);const t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,li.SelectorExpected);for(;this.accept(o.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,li.SelectorExpected);return this.accept(o.ParenthesisR)?this.finish(e):this.finish(e,li.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(o.AtKeyword))return null;const e=this.mark(),t=this.create(xt);return!t.addChild(this._parseVariable(!0))||!this.hasWhitespace()&&this.accept(o.ParenthesisL)?this.accept(o.ParenthesisR)?this.finish(t):this.finish(t,li.RightParenthesisExpected):(this.restoreAtMark(e),null)}_tryParseMixinReference(e=!0){const t=this.mark(),n=this.create(xt);let r=this._parseMixinDeclarationIdentifier();for(;r;){this.acceptDelim(">");const e=this._parseMixinDeclarationIdentifier();if(!e)break;n.getNamespaces().addChild(r),r=e}if(!n.setIdentifier(r))return this.restoreAtMark(t),null;let i=!1;if(this.accept(o.ParenthesisL)){if(i=!0,n.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(o.Comma)||this.accept(o.SemiColon))&&!this.peek(o.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,li.ExpressionExpected);if(!this.accept(o.ParenthesisR))return this.finish(n,li.RightParenthesisExpected);r.referenceTypes=[ne.Mixin]}else r.referenceTypes=[ne.Mixin,ne.Rule];return this.peek(o.BracketL)?e||this._addLookupChildren(n):n.addChild(this._parsePrio()),i||this.peek(o.SemiColon)||this.peek(o.CurlyR)||this.peek(o.EOF)?this.finish(n):(this.restoreAtMark(t),null)}_parseMixinArgument(){const e=this.create(Ne),t=this.mark(),n=this._parseVariable();return n&&(this.accept(o.Colon)?e.setIdentifier(n):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)}_parseMixinParameter(){const e=this.create(Te);if(this.peekKeyword("@rest")){const t=this.create(pe);return this.consumeToken(),this.accept(na)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,li.DotExpected,[],[o.Comma,o.ParenthesisR])}if(this.peek(na)){const t=this.create(pe);return this.consumeToken(),e.setIdentifier(this.finish(t)),this.finish(e)}let t=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(o.Colon),t=!0),e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))||t?this.finish(e):null}_parseGuard(){if(!this.peekIdent("when"))return null;const e=this.create(Lt);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,li.ConditionExpected);for(;this.acceptIdent("and")||this.accept(o.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,li.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(It);return e.isNegated=this.acceptIdent("not"),this.accept(o.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(o.ParenthesisR)?this.finish(e):this.finish(e,li.RightParenthesisExpected)):e.isNegated?this.finish(e,li.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),t=this.create(Ie);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(o.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(o.Comma)||this.accept(o.SemiColon))&&!this.peek(o.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,li.ExpressionExpected);return this.accept(o.ParenthesisR)?this.finish(t):this.finish(t,li.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(ge);return e.referenceTypes=[ne.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(o.ParenthesisR)){this.restoreAtMark(e);const t=this.create(pe);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}},sa=class e extends Ls{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,n,r){for(const i of e){const e={label:i.name,detail:i.example,documentation:i.description,textEdit:bn.replace(this.getCompletionRange(t),i.name+"($0)"),insertTextFormat:Kn.Snippet,kind:qn.Function};n&&(e.sortText="z"),r.items.push(e)}return r}getTermProposals(t,n,r){let i=e.builtInProposals;return t&&(i=i.filter(e=>!e.type||!t.restrictions||-1!==t.restrictions.indexOf(e.type))),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(t,n,r)}getColorProposals(t,n,r){return this.createFunctionProposals(e.colorProposals,n,!1,r),super.getColorProposals(t,n,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}};function oa(e,t){const n=function(e){function t(t){return e.positionAt(t.offset).line}function n(t){return e.positionAt(t.offset+t.len).line}function r(e,r){const i=t(e),s=n(e);return i!==s?{startLine:i,endLine:s,kind:r}:null}const i=[],s=[],a=function(){switch(e.languageId){case"scss":return new Vo;case"less":return new ra;default:return new ie}}();a.ignoreComment=!1,a.setSource(e.getText());let l=a.scan(),c=null;for(;l.type!==o.EOF;){switch(l.type){case o.CurlyL:case Mo:s.push({line:t(l),type:"brace",isStart:!0});break;case o.CurlyR:if(0!==s.length){const e=aa(s,"brace");if(!e)break;let t=n(l);"brace"===e.type&&(c&&n(c)!==t&&t--,e.line!==t&&i.push({startLine:e.line,endLine:t,kind:void 0}))}break;case o.Comment:{const o=e=>"#region"===e?{line:t(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1},a=(t=>{const n=t.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(n)return o(n[1]);if("scss"===e.languageId||"less"===e.languageId){const e=t.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(e)return o(e[1])}return null})(l);if(a)if(a.isStart)s.push(a);else{const e=aa(s,"comment");if(!e)break;"comment"===e.type&&e.line!==a.line&&i.push({startLine:e.line,endLine:a.line,kind:"region"})}else{const e=r(l,"comment");e&&i.push(e)}break}}c=l,l=a.scan()}return i}(e);return function(e,t){const n=t&&t.rangeLimit||Number.MAX_VALUE,r=e.sort((e,t)=>{let n=e.startLine-t.startLine;return 0===n&&(n=e.endLine-t.endLine),n}),i=[];let s=-1;return r.forEach(e=>{e.startLine=0;n--)if(e[n].type===t&&e[n].isStart)return e.splice(n,1)[0];return null}sa.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:Dt("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:Dt('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:Dt("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:Dt("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:Dt("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:Dt("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:Dt("URL encodes a string")},{name:"e",example:"e(@string);",description:Dt("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:Dt("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:Dt("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:Dt("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:Dt("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:Dt("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:Dt("absolute value of a number"),example:"abs(number);"},{name:"acos",description:Dt("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:Dt("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:Dt("rounds up to an integer")},{name:"cos",description:Dt("cosine function"),example:"cos(number);"},{name:"floor",description:Dt("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:Dt("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:Dt("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:Dt("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:Dt("sine function"),example:"sin(number);"},{name:"tan",description:Dt("tangent function"),example:"tan(number);"},{name:"atan",description:Dt("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:Dt("returns pi"),example:"pi();"},{name:"pow",description:Dt("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:Dt("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:Dt("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:Dt("returns the lowest of one or more values"),example:"max(@x, @y);"}],sa.colorProposals=[{name:"argb",example:"argb(@color);",description:Dt("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:Dt("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:Dt("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:Dt("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:Dt("creates a color")},{name:"hue",example:"hue(@color);",description:Dt("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:Dt("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:Dt("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:Dt("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:Dt("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:Dt("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:Dt("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:Dt("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:Dt("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:Dt("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:Dt("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:Dt("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:Dt("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:Dt("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:Dt("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:Dt("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:Dt("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:Dt("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:Dt("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:Dt("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:Dt("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:Dt("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],function(){var e=[,,function(e){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function r(e,r){this.__indent_cache=new n(e,r),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},t.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return 0===this.__items.length},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},n.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),(n+=e*this.__indent_size)+t},n.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+this.__cache[t]},n.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},r.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},r.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},r.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},r.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(e,n){for(var r=this.__lines.length-2;r>=0;){var i=this.__lines[r];if(i.is_empty())break;if(0!==i.item(0).indexOf(e)&&i.item(-1)!==n){this.__lines.splice(r+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=r},,,,function(e){function t(e,t){this.raw_options=n(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(e,t){var n,i={};for(n in e=r(e))n!==t&&(i[n]=e[n]);if(t&&e[t])for(n in e[t])i[n]=e[t][n];return i}function r(e){var t,n={};for(t in e)n[t.replace(/-/g,"_")]=e[t];return n}t.prototype._get_array=function(e,t){var n=this.raw_options[e],r=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(r=n.concat()):"string"==typeof n&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r},t.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},t.prototype._get_characters=function(e,t){var n=this.raw_options[e],r=t||"";return"string"==typeof n&&(r=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},t.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var r=parseInt(n,10);return isNaN(r)&&(r=t),r},t.prototype._get_selection=function(e,t,n){var r=this._get_selection_list(e,t,n);if(1!==r.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},t.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var r=this._get_array(e,n);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},t.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},e.exports.Options=t,e.exports.normalizeOpts=r,e.exports.mergeOpts=n},,function(e){var t=RegExp.prototype.hasOwnProperty("sticky");function n(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=n},,,,,function(e){function t(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}t.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},t.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=t},,function(e,t,n){var r=n(16).Beautifier,i=n(17).Options;e.exports=function(e,t){return new r(e,t).beautify()},e.exports.defaultOptions=function(){return new i}},function(e,t,n){var r=n(17).Options,i=n(2).Output,s=n(8).InputScanner,o=new(0,n(13).Directives)(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=/\s/,h=/(?:\s|\n)+/g,d=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,u=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(e,t){this._source_text=e||"",this._options=new r(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},p.prototype.eatWhitespace=function(e){for(var t=c.test(this._input.peek()),n=0;c.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===t&&(t="\n",e&&a.test(e||"")&&(t=e.match(a)[0]));var n=(e=e.replace(l,"\n")).match(/^[\t ]*/)[0];this._output=new i(this._options,n),this._input=new s(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r,p,m=0,f=!1,g=!1,b=!1,v=!1,y=!1,w=this._ch,C=!1;r=""!==this._input.read(h),p=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var _=this._input.read(d),k=o.get_directives(_);k&&"start"===k.ignore&&(_+=o.readIgnored(this._input)),this.print_string(_),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(u)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(r),this.print_string(this._ch);var x=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);x.match(/[ :]$/)&&(x=this.eatString(": ").replace(/\s+$/,""),this.print_string(x),this._output.space_before_token=!0),0===m&&-1!==x.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(r),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),0===m&&-1!==S.indexOf(":")?(g=!0,this.indent()):S in this.NESTED_AT_RULE?(this._nestedLevel+=1,S in this.CONDITIONAL_GROUP_RULE&&(b=!0)):0!==m||g||(v=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(r),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),v=!1,b?(b=!1,f=this._indentLevel>=this._nestedLevel):f=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&f&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===p?this._output.space_before_token=!1:","!==p&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===p&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),f=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var E=0;E"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==m)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(r),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var I='"'===p||"'"===p;this.preserveSingleSpace(I||r),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&C&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=""));return this._output.get_code(t)},e.exports.Beautifier=p},function(e,t,n){var r=n(6).Options;function i(e){r.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i0&&fa(r,l-1);)l--;0===l||ma(r,l-1)?a=l:l=0;){const n=e.charCodeAt(t);if(n===da)return!0;if(n===ua)return!1;t--}return!1}(r,a),i=c===r.length,r=r.substring(a,c),0!==a){const r=e.offsetAt(Vt.create(t.start.line,0));s=function(e,t,n){let r=t,i=0;const s=n.tabSize||4;for(;r0){const e=n.insertSpaces?le(" ",a*s):le("\t",s);c=c.split("\n").join("\n"+e),0===t.start.character&&(c=e+c)}return[{range:t,newText:c}]}function ha(e){return e.replace(/^\s+/,"")}var da="{".charCodeAt(0),ua="}".charCodeAt(0);function pa(e,t,n){if(e&&e.hasOwnProperty(t)){const n=e[t];if(null!==n)return n}return n}function ma(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function fa(e,t){return-1!==" \t".indexOf(e.charAt(t))}var ga={version:1.1,properties:[{name:"additive-symbols",browsers:["FF33"],atRule:"@counter-style",syntax:"[ && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",browsers:["E12","FF28","S9","C29","IE11","O16"],values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | | | ? ",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],description:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",browsers:["E12","FF20","S9","C29","IE11","O16"],values:[{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | | [ ? ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","IE10","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-self"}],description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","S9","C29","IE10","O12.1"],values:[{name:"auto",description:"Computes to the value of 'align-items' on the element's parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"normal"},{name:"self-end"},{name:"self-start"},{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"safe"},{name:"unsafe"}],syntax:"auto | normal | stretch | | ? ",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-self"}],description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert | revert-layer",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",browsers:["E12","FF16","S9","C43","IE10","O30"],values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",browsers:["E12","FF16","S9","C43","IE10","O30"],syntax:"